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?
Partioning & Grub
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Partioning & Grub
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.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Partioning & Grub
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.
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.
Re: Partioning & Grub
Seems a bit complicated.
I think I might leave alone and let each subsequent OS control grub.
I think I might leave alone and let each subsequent OS control grub.
Re: Partioning & Grub
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!
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!
Re: Partioning & Grub
-OR-
To muddy the waters a bit more ... 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
To muddy the waters a bit more ... 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
Re: Partioning & Grub
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.
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.
Re: Partioning & Grub
It's best to always backup your MBR, boot sectors, and boot loaders...