LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Re-installing Linux on a dual-boot system: what happens with Grub and the MBR? (https://www.linuxquestions.org/questions/linux-newbie-8/re-installing-linux-on-a-dual-boot-system-what-happens-with-grub-and-the-mbr-686430/)

jem 11-26-2008 03:05 PM

Re-installing Linux on a dual-boot system: what happens with Grub and the MBR?
 
OK, so I've got my dual-boot system up and running with Win XP and Fedora. Grub was installed on the MBR and everything is fine.
I was just wondering - if I decide to switch distro's or reinstall Fedora for some reason, what happens with the MBR? Can I just delete the Linux partitions using Partition Manager (via Windows) and then re-install? But doesn't that mean Grub gets installed on the MBR a second time, making a mess?

Please advise.

sfjoe 11-26-2008 03:21 PM

Are you adding a new distro or replacing Fedora? If you're replacing it, just go through the install process as usual and it should overwrite your Linux partitions just fine.

jailbait 11-26-2008 03:22 PM

Grub is installed in two places, the MBR and in /boot/grub/menu.lst. The portion of Grub on the MBR points to /boot/grub/menu.lst.

You can have several Linux distributions installed in different partitions, each with its own copy of /boot/grub/menu.lst, but the MBR can only point to one of the menu.lst files.

If you delete the partition which contains the menu.lst that your MBR points to then booting the computer will fail when Grub cannot find the menu.lst file.

So when you reinstall or install a distribution to a new partition you have to plan ahead as to what you want the installer to do about the MBR. You can tell the installer to not install Grub to the MBR or you can tell the installer to create its own version of menu.lst and point the MBR at the new menu.lst.

-------------------------
Steve Stites

ronlau9 11-26-2008 03:24 PM

Just imagine you wish to reinstall Fedora and let use here old space and install GRUB in MBR again than the old GRUB will overwritten by new one.
Same happens if you replace Fedora by for instance opensuse and let opensuse use the Fedora space and GRUB in MBR
than the GRUB will be overwritten by Opensuse GRUB

pixellany 11-26-2008 03:25 PM

Welcome to LQ!!

Most Linux installers give you the option of NOT installing a bootloader (or at least the option to put it on a floppy, USB stick, etc.)

Most Linux installers ALSO are quite good at detecting the other OSes present and configuring GRUB accordingly.

Quote:

But doesn't that mean Grub gets installed on the MBR a second time, making a mess?
It doesn't "make a mess"---all that happens is that, when you install GRUB to the MBR, you overwrite whatever was there before.

I currently take the lazy way out--I let each installer take the MBR. Then, if it did not correctly set up for all my other installation, I just go in and fix it by hand.

jem 11-26-2008 03:47 PM

Got it, thanks everybody for clearing that up


All times are GMT -5. The time now is 04:48 AM.