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....
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| 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 |
| |||
| 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. |
| |||
| 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 |
| |||
| 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. |
| |||
| 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. |
| |||
| 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. |
| |||
| 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. |
| |||
| 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 |
| Thread Tools | |
| Display Modes | |
|
|