Unix Technical Forum

Grub updates

This is a discussion on Grub updates within the Gentoo Linux Support forums, part of the Unix Operating Systems category; --> When an emerge -u world updates Grub, is it important to do a `grub-install /dev/hdx` afterwards? -- Walker M....


Go Back   Unix Technical Forum > Unix Operating Systems > Gentoo Linux Support

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-21-2008, 09:43 AM
Walker M.
 
Posts: n/a
Default Grub updates

When an emerge -u world updates Grub, is it important to do a
`grub-install /dev/hdx` afterwards?
--
Walker M.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-21-2008, 09:43 AM
Johan Lindquist
 
Posts: n/a
Default Re: Grub updates

So anyway, it was like, 11:45 CEST Apr 22 2005, you know? Oh, and, yeah,
Walker M. was all like, "Dude,

> When an emerge -u world updates Grub, is it important to do a
> `grub-install /dev/hdx` afterwards?


Only if you want the system to boot again.

I dunno if this is still the case tho, but every time grub has been
updated previously, it's forgotten where grub.conf lives and only
given me the grub prompt on the next boot. Not catastrophic, but
slightly annoying when you have a headless server sitting somewhere
which you now have to hook up a monitor and a keyboard to.

--
Time flies like an arrow, fruit flies like a banana. Perth ---> *
12:08:01 up 179 days, 23:34, 6 users, load average: 0.00, 0.00, 0.00
Linux 2.6.9 x86_64 GNU/Linux Registered Linux user #261729
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-21-2008, 09:43 AM
Walker M.
 
Posts: n/a
Default Re: Grub updates

Johan Lindquist wrote:

> So anyway, it was like, 11:45 CEST Apr 22 2005, you know? Oh, and, yeah,
> Walker M. was all like, "Dude,
>
>> When an emerge -u world updates Grub, is it important to do a
>> `grub-install /dev/hdx` afterwards?

>
> Only if you want the system to boot again.


It definitely boots up without doing that. Maybe the .keep file in /boot
has since fixed the behaviour you're talking about?

--
Walker M.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-21-2008, 09:44 AM
Johan Lindquist
 
Posts: n/a
Default Re: Grub updates

So anyway, it was like, 14:49 CEST Apr 22 2005, you know? Oh, and, yeah,
Walker M. was all like, "Dude,
> Johan Lindquist wrote:
>> So anyway, it was like, 11:45 CEST Apr 22 2005, you know? Oh, and, yeah,
>> Walker M. was all like, "Dude,


>>> When an emerge -u world updates Grub, is it important to do a
>>> `grub-install /dev/hdx` afterwards?

>>
>> Only if you want the system to boot again.

>
> It definitely boots up without doing that. Maybe the .keep file in
> /boot has since fixed the behaviour you're talking about?


The behaviour I mentioned does include the machine booting, for some
value of. The problem being that I had to manually run the install
commands from the grub prompt, either before I rebooted or if (as I
mostly did) I forgot to do that, once it booted to the grub prompt.

I should perhaps have said "booted the proper kernel automatically",
instead of just "booted".

Actually, there's a grub update that portage wants to do right now,
and I have planned to reboot at some point since I'm almost 200
days behind on the kernel versions. I'll see what happens when it's
rebooted if I get around to it.

--
Time flies like an arrow, fruit flies like a banana. Perth ---> *
15:27:39 up 180 days, 2:53, 5 users, load average: 0.10, 0.03, 0.01
Linux 2.6.9 x86_64 GNU/Linux Registered Linux user #261729
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-21-2008, 09:44 AM
Walker M.
 
Posts: n/a
Default Re: Grub updates

Johan Lindquist wrote:

> So anyway, it was like, 14:49 CEST Apr 22 2005, you know? Oh, and, yeah,
> Walker M. was all like, "Dude,
>> Johan Lindquist wrote:
>>> So anyway, it was like, 11:45 CEST Apr 22 2005, you know? Oh, and, yeah,
>>> Walker M. was all like, "Dude,

>
>>>> When an emerge -u world updates Grub, is it important to do a
>>>> `grub-install /dev/hdx` afterwards?
>>>
>>> Only if you want the system to boot again.

>>
>> It definitely boots up without doing that. Maybe the .keep file in
>> /boot has since fixed the behaviour you're talking about?

>
> The behaviour I mentioned does include the machine booting, for some
> value of. The problem being that I had to manually run the install
> commands from the grub prompt, either before I rebooted or if (as I
> mostly did) I forgot to do that, once it booted to the grub prompt.
>
> I should perhaps have said "booted the proper kernel automatically",
> instead of just "booted".


Regardless, it doesn't affect boot and init (here at least). System boots
into all operating systems exactly as it did before.

> Actually, there's a grub update that portage wants to do right now,


....and that's why I asked. I've updated it already (on the machine I'm
typing this message on), but I haven't done a grub-install.

> and I have planned to reboot at some point since I'm almost 200
> days behind on the kernel versions. I'll see what happens when it's
> rebooted if I get around to it.


It'll be interesting if it doesn't, given my own experience. :-)

I remember having problems like that you describe with Lilo some years
ago...but I just couldn't remember whether Grub was similarly affected; or
whether one should run grub-install whether it /appears/ affected or not.
--
Walker M.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-21-2008, 09:44 AM
Lars H.
 
Posts: n/a
Default Re: Grub updates

Walker M. wrote:

> When an emerge -u world updates Grub, is it important to do a
> `grub-install /dev/hdx` afterwards?


Can't say is grub-install is needed, but when I did the upgrading to grub
version "grub (GNU GRUB 0.96)"
"grub-install --no-floppy /dev/hda" just took forever 22 min. plus where I
killed it. and ran this instead

# grub
grub> root (hd0,0)
grub> setup (hd0)
grub> quit

this just worked very fast! And I have now rebooted OK.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-21-2008, 09:44 AM
Walker M.
 
Posts: n/a
Default Re: Grub updates

Lars H. wrote:

> Walker M. wrote:
>
>> When an emerge -u world updates Grub, is it important to do a
>> `grub-install /dev/hdx` afterwards?

>
> Can't say is grub-install is needed, but when I did the upgrading to grub
> version "grub (GNU GRUB 0.96)"
> "grub-install --no-floppy /dev/hda" just took forever 22 min. plus where I
> killed it. and ran this instead
>
> # grub
> grub> root (hd0,0)
> grub> setup (hd0)
> grub> quit
>
> this just worked very fast! And I have now rebooted OK.


Hmmm, but was it necessary? Sorry to raise the question again, but clearly
`grub-install /dev/hdx` (or the manual alternative) isn't required to
reboot back into the OS (in my case at least) which performs exactly as it
did before; but is it possible that Grub's MBR code is changed in some
revisions, rendering it important to install on the boot partition of the
primary drive again?

--
Walker M.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-21-2008, 09:44 AM
Ben Measures
 
Posts: n/a
Default Re: Grub updates

Walker M. wrote:
> When an emerge -u world updates Grub, is it important to do a
> `grub-install /dev/hdx` afterwards?


There are three stages involved in grub's boot process. 'grub-install'
has the job of writing the first two stages to the MBR (and beyond).
These have the simple task of loading the last stage. The last stage is
installed to the boot partition by the ebuild, and accordingly kept
updated. This last stage does everything but the booting itself.

Thus, the majority of changes made to Grub are kept updated by the
ebuild. I would imagine the only reason to update the first two stages
is if the boot partition's filesystem were radically changed. However,
such a change is unlikely, unless an experimental filesystem is used for
the boot partition (fool!).

So far, my experience with updating Grub without 'reinstalling' has
yielded no problems (in over 2 years, IIRC). Having said that, I think
I'll reinstall tomorrow, just because I'm compulsive ;-)

I hope that goes some way to clear things,
--
Ben M.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-21-2008, 09:44 AM
Johan Lindquist
 
Posts: n/a
Default Re: Grub updates

So anyway, it was like, 20:22 CEST Apr 22 2005, you know? Oh, and, yeah,
Walker M. was all like, "Dude,
> Johan Lindquist wrote:


>> I'll see what happens when it's rebooted if I get around to it.

>
> It'll be interesting if it doesn't, given my own experience. :-)


Well, same thing happened as always. Grub boots but only gives me the
prompt. The only thing needed to make it work again is to run the root
(hd0,0) and setup (hd0) commands.

The update was actually for my x86, but I seem to recall this box (an
all-out ~amd64 setup) doing the same thing.

I have no idea why this happens. I don't auto-mount /boot, which might
be a reason somehow, but I made sure that it was indeed mounted during
this update. Since I seem to be in the minority here, I can only guess
that's it's something odd with my setup.

--
Time flies like an arrow, fruit flies like a banana. Perth ---> *
16:14:22 up 181 days, 3:40, 11 users, load average: 0.44, 0.39, 0.18
Linux 2.6.9 x86_64 GNU/Linux Registered Linux user #261729
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 02-21-2008, 09:44 AM
Walker M.
 
Posts: n/a
Default Re: Grub updates

Ben Measures wrote:
{snip}
> I hope that goes some way to clear things,


It does, thanks Ben. Snipped because I don't have any more questions!

--
Walker M.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:26 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com