Click to See Complete Forum and Search --> : GRUB woes!


Ophiuchus
08-11-2005, 10:27 AM
I hope I'm posting my question in the right section.

I have (or should I say had) FC3 and Windows XP installed on my computer on separate partitions, with Grub on the MBR. A few days back, I had to re-install Windows and consequently, Grub got spooked.

Is it possible to re-install Grub on the MBR without damaging the data on my other partitions? :confused:

This is how my partiton layout looks like:

/dev/hda1 >> 7.51G >> fat32
/dev/hda2 >> 78M >> /boot
/dev/hda4 >> 4.40G >> /
/dev/hda5 >> 1.17G >> /home
/dev/hda6 >> 455M >> swap
/dev/hda7 >> 6.71G >> fat32
/dev/hda8 >> 6.71G >> fat32
/dev/hda9 >> 3.00G >> fat32
/dev/hda10 >> 7.28G >> fat32

Ophiuchus.

Hayl
08-11-2005, 10:31 AM
yes, you can reinstall grub.
there are quite a few threads on here that are about the exact same issue (windows overwriting the mbr) if you search our forums.

WhiteKnight
08-11-2005, 10:38 AM
Boot with a live-cd.. (i prefer gentoo's)

run grub
in grub's shell:
root (hd0,1) <--- this is where is /boot is (/dev/hda2)
setup (hd0) <--- MBR of hda

Icarus
08-11-2005, 12:19 PM
Go with WhiteKnight's suggestion, Windows has a nasty habit of formatting the MBR when it installs so this is a common problem

My method of doing this is boot from a liveCD (gentoo is great for this but any will work)
Mount and chroot to your installed Linux system (again, tons of info on this and the gentoo install docs cover it beutifully, even if you arn't running gentoo that section applys very well for this)
make sure your /boot is mounted
grub-install /dev/hda

and that really should be it...might want to also look at gentoo's grub install section for additional tips

http://www.gentoo.org/doc/en/handbook/2005.1/handbook-x86.xml?full=1
sections 6 and 11