[nmglug] Restoring MBR

Ed Brown ebrown at lanl.gov
Tue Sep 27 13:52:17 PDT 2005


On Tue, 2005-09-27 at 12:31, William D. Nystrom wrote:
> This seems more complicated.  Are you saying that you tried the method
> suggested by Ravi and that it did not work?

Both solutions will work, up to a point.  Because 'grub-install' is a
shell script, and makes certain assumptions, invoking 'grub' directly
offers more flexibility.  'grub-install' is basically running the 'grub'
commands that you would otherwise run yourself.  grub-install can't be
run from the rescue environment, like grub can, you have to be chrooted
to the hard disk. 

By running grub directly, you can do more discovery, like using 'find'
to find the correct 'root' to use, as mentioned in the docs Mars linked
to.

I've never used update-grub, but judging from the man page, I don't
think it will help you (since you already have a working menu) unless it
is able to add a new entry to be able to boot windows, something like:

title XP
  rootnoverify (hd0,2)  #(you have to supply the correct partition,
                                  this is equivalent to hda3.)
  chainloader +1

You could add this entry while in the rescue environment, and be ready
to go either way when you reboot.  If using the FC boot disk, after
chrooting to /mnt/sysimage, just edit /boot/grub/grub.conf (which is the
file pointed to by symlinks at /boot/grub/menu.1st and /etc/grub.conf).

-Ed





More information about the nmglug mailing list