Partioning & Grub

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
cottfcfan
Level 4
Level 4
Posts: 286
Joined: Tue Jun 16, 2009 7:32 am
Location: Hull, England.

Partioning & Grub

Post by cottfcfan »

I have my main Linux system on sd1, and have several other partitions for other OSs that I mess with.
My question is, can I add another Linux OS without it controling Boot & Grub, and if so how do I do it?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
FedoraRefugee

Re: Partioning & Grub

Post by FedoraRefugee »

There are a few different ways to multiboot actually.

Think of grub as separate from your linux distro. /boot is part of the distro. What happens is the bootloader, in this case Grub, sits in the MBR and directs traffic to each OS.

The easiest way to multiboot would be to simply install your operating systems one after the other allowing each one to overwrite the MBR. The last distro installed should be one that has no trouble picking up other distros and other operating systems on the computer. That Grub will allow you to boot each OS. You can edit that Grub in that distro's /boot.

The problem with this is when a kernel updates in what I call the slave distros the change does not automatically show up in the master distro's Grub, the Grub in the MBR. You have to manually edit this Grub with each change. This can suck major league when you have a few fast updating distros on your computer.

A better way: Is to chainload from the Grub in the MBR to each distro's separate Grub placed in its own /boot. The way to do this is to install the first distro the normal way. Then, each subsequent distro you will have to find and choose to install Grub in /boot instead of the MBR when you install. In Mint, Ubuntu, and Fedora this option can be found by hitting the advance tab on the last screen of the installer. You will then have to modify the Grub in the MBR a single time by adding the other distros. The /boot/grub/menu.lst using the old style grub would look something like this:

title windows or alternate distro
rootnoverify (hd0,1)
chainloader +1

I am not sure how you would write this with Grub2 but that info should be easily found.

You could also use a single /boot for all distros, but this gets a bit more complicated and really has no advantage and some downsides so unless this fits your application I would not worry about this.
cottfcfan
Level 4
Level 4
Posts: 286
Joined: Tue Jun 16, 2009 7:32 am
Location: Hull, England.

Re: Partioning & Grub

Post by cottfcfan »

Seems a bit complicated.
I think I might leave alone and let each subsequent OS control grub.
breaker

Re: Partioning & Grub

Post by breaker »

lol, some multiboot methods seem complicated at first, but with a little time and tweaking, you'll find they really aren't and you can learn a lot.

Personally, even though the chainloading grub from grub is cool, I like just using the advanced option to have the installer not install another boot loader (grub) in the mbr, then just boot to the first distro (the one with the rest of the grub or grub2 files) and just run "sudo update-grub" reboot, pick the new distro and have fun.

If it doesn't go smoothly, you'll have to troubleshoot, but you *always* run that risk when multibooting. :)

have fun!
DataMan

Re: Partioning & Grub

Post by DataMan »

-OR-

To muddy the waters a bit more :D ... let the install go ahead and install grub as it wants. Post installation, modify the menu.lst (assuming you're using GRUB 1x in the dedicated GRUB partition) and re-direct grub back to the dedicated. Somewhat detailed to get it going initially. Post that, a breeze and it keeps you away from the GRUB 2 stuff.

-DataMan
cottfcfan
Level 4
Level 4
Posts: 286
Joined: Tue Jun 16, 2009 7:32 am
Location: Hull, England.

Re: Partioning & Grub

Post by cottfcfan »

I'm using Grub2 by the way.
Think i'll stick to booting back into the original OS and running the command:
sudo grub-install /dev/sda
The problem is on one occasion it screwed my system big style, requiring a reinstall.
breaker

Re: Partioning & Grub

Post by breaker »

It's best to always backup your MBR, boot sectors, and boot loaders...
Locked

Return to “Installation & Boot”