Click to See Complete Forum and Search --> : How to re-install Grub to MBR?


czgu
04-14-2002, 10:07 PM
I installed Lindows. LindowsOS installed LILO to MBR. I like Grub but don't know how to re-install it to MBR

Timothy L. Miller
04-14-2002, 10:44 PM
Is lindows cool? I've heard some seriously differing opinions on it.

seaman_staines
04-14-2002, 11:02 PM
Okay...more info needed here. Are you dual booting lindows with another distro? Is grub installed but just not to your MBR? If you are dual booting you can just run grub from the other distro and it will overwrite the MBR.

DMR
04-14-2002, 11:18 PM
As seaman_staines suggested, you shouldn't have to uninstall lilo from the MBR; installing a bootloader will just overwrite info that any previous bootloader put there. The instructions for installing grub are here (http://www.gnu.org/manual/grub-0.90/html_mono/grub.html#SEC9).

bigrigdriver
04-15-2002, 04:41 AM
Go to Calderasystems.com. Support/Knowledge base and search for the document "Zen and the Art of Using Grub". It will tell you how to install grub (and how to make secret boot loader menus). There are also other documents if you are willing to spend some time with google searches.
Grub is good!

czgu
04-15-2002, 05:42 AM
I had Redhat 7.2 and Win 98 on 2 HDs, and Grub was in MBR. Yestoday I tried Lindows, it installed Lilo to MBR, so I couldn't boot into RD 7.2 on 2nd HD. Lindows was very slow in my system (PII 233). It couldn't run Office 2000 (MSWords 2000). I re-moved Lindows from my system and wanted to re-install Grub.

Lindows is cool, but still have long way to go. I think I better use Linux now.

mdwatts
04-15-2002, 07:10 AM
From the Caldera knowledgebase. Edit as necessary for your system.

Reinstalling Grub:

First we are going to mount the partition to the floppy mount point. This will allow us to access the drive. At the prompt you will need to type the following replacing the ** with the appropriate information.

mount /dev/hd** /mnt/floppy

This will mount that partition to the floppy mount point. now you will need to change the /usr/sbin directory on the drive. To do this type:

cd /mnt/floppy/usr/sbin/

This will put you in that directory. Now you will need to run the grub script again and reinstall grub. This gives an example of a simple reinstall for the purposes of recovering from this error. If you have more questions about what can be done here then check out the Zen the Art of Grub in our knowledge base. The link is at the bottom of this faq. To start grub type "./grub" at the prompt. This will bring you to a grub>. Now you are in the grub shell and can setup your boot loader again. The first thing that you will want to do it start by specifing the root partition:

grub> root (hd

If you hit the <Tab> here it will show you all parititions or just finish it for you if you only have one.

grub> root (hd0,

Hit the <Tab> now it will show you all the partitions on the drive again. You will need to put the number in here for your boot partition. If you do not have a boot partition then you put the number of your main linux partition(Id of 83).

grub> root (hd0,2)

Then hit enter and it should out put the following: Filesystem type is ext2fs, partition type 0x83. Now you will need to write grub to the mbr again. To do this type:

grub> setup (hd0)

This will write to the mbr adn output and install line in "". You will need to run the install command and add the location of your menu.lst file. To do this type the install line inside the "" and then put a space and /boot/grub/menu.lst. It should look like this:

grub> install..... /boot/grub/menu.lst

This will complete the grub install so type "quit" at the next prompt and it will return you to the # again. Now we need to umount and reboot. Run the following commands and on reboot removethe cdrom.

#cd

#umount /dev/floppy

#reboot