misc‎ > ‎

grub2MBR

--------------------------------------------------------------------------------------
Rewriting grub.conf into the master boot record (MBR).
(This allows one to install WinXP, say, *after* a linux installation.)

Thanks to Bird for supplying this solution (& Immir for explaining it).
--------------------------------------------------------------------------------------

Via root login (or knoppix live CD, etc ...)

1) print or save the contents of /etc/grub.conf

2) Find the boot hard drive device name via
   more /etc/grub.conf | grep boot
   (*** e.g. /dev/sda for me ***)

3) reboot with grub cd
   (www.gnu.org/software/grub/manual/html_node/Making-a-GRUB-bootable-CD-ROM.html)

4) issue commands (*** based on my pre-existing grub.conf file contents ***)
   grub > root (hd0,5)
   grub > kernel /vmlinuz-2.6.23.1-42.fc8 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
   grub > initrd /initrd-2.6.23.1-42.fc8.img
   grub > boot

5) login as root and run ...
   /sbin/grub-install /dev/sda

At this stage the grub.conf has been written to the MBR and a reboot should be tried.
--------------------------------------------------------------------------------------
Comments