Booting more than one linux - GRUB and \boot partition questions
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Booting more than one linux - GRUB and \boot partition questions
I've found some similar topics, so apologies for starting yet another one But I've not found exactly what I wanted, so I decided to start yet another thread...
I'm dual booting with Windows at the moment. But what if I wanted to have not just one linux distribution alongside windows, but two, three, four or whatever? Or even if the number of linux distributions alongside my Windows would errr... change frequently?
I'm still a bit confused what exactly the MBR is, but that's where I've got GRUB installed right now I think. But even though that's where it is, I have some sort of grub file in which I can edit the grub menu in the \boot parition of my current linux distro and I do want to have access to it.
I know that my current distro asks during installation if I want GRUB installed in the MBR or in the \boot partition. So is that what I want to do? Should I have a /boot partition and share it between all the distros on my computer? But then each time I install a new distro, what do I do? Do I tell the installer to use the /boot parition as it is (without formatting it) and then manually add entries to the grub menu file or do I format it every time I install a new distro? Is this even what I want to do? But then having a seperate \boot folder in 4 different linuxes and a grub menu file in each of them sounds like a rather ridiculous idea too
Hope someone understands my (probably badly phrased) questions and can come up with an answer that I can understand
Just take a look at your /boot/grub/grub.conf
If you want to install multiple Linux Distros all you have to do is change the grub.conf accordantly.
i.e. You have to tell grub where is your linux kernel is installed, & where is the relevant root partition.
You can share same boot partition with multiple distros.
But make sure that your new distro wont overwrite your existing /boot files...
Some times you may have to copy the kernel manually (depending on your distro).
Just check these chapters of Gentoo Handbook http://www.gentoo.org/doc/en/handboo...p=10#doc_chap2 http://www.gentoo.org/doc/en/handboo...ap=7#doc_chap3
Originally posted by kesara i.e. You have to tell grub where is your linux kernel is installed, & where is the relevant root partition.
Ok, lets say I installed linux distro A and now want to install linux distro B. Where will B's kernel be installed if I tell the installer to use an existing \boot partition? I mean if it doesn't overwrite the partition then where will its kernel be written? I totally don't understand this. Or if I tell it to use the \boot partition but not format it, will it just put another kernel there, but leave everything else the way it was?
One of those as far as I can see is about compiling a kernel. I can see how compiling a kernel might be of benefit and how I might want to learn it, but what does it have to do with my questions? I don't understand. Surely I can boot as many linuxes I want using the kernels compiled as they are by default, no?
all of your linux distros will have their own /boot partition,... BUT there will not be a bootloader in there. It'll just have kernel images. So, what you do is set up the bootloader in the mbr, and edit the text file accordingly. If you wanna add another distro, you add it to whtaever distros has the grub menu.lst you boot from. Make sure you point Grub ot THAT paritition's /boot/kernel (the parition of the new distro)
Originally posted by rozoweskarpetki Ok, lets say I installed linux distro A and now want to install linux distro B. Where will B's kernel be installed if I tell the installer to use an existing \boot partition? I mean if it doesn't overwrite the partition then where will its kernel be written? I totally don't understand this. Or if I tell it to use the \boot partition but not format it, will it just put another kernel there, but leave everything else the way it was?
Well! Kernel Will be copied to the partition that you pointed to. And the kernel will have a name according its version & distro.
For Ex, if you got a shared /boot, Kernel images will be some thing like
/boot/vmlinuz-2.6.11-1.14_FC3 <-- Fedora
/boot/kernel-2.6.11-gentoo-r3 <-- Gentoo
So you have to edit grub.conf accordantly
For above kernels you can use following grub.conf
Originally posted by rozoweskarpetki One of those as far as I can see is about compiling a kernel. I can see how compiling a kernel might be of benefit and how I might want to learn it, but what does it have to do with my questions? I don't understand. Surely I can boot as many linuxes I want using the kernels compiled as they are by default, no?
I just wanted show you about installing kernel images to get an idea about, to where the kernel is copied to & the files..
Installing a source based distro like gentoo will be good experience for you:-)
Thanks kesara I think I get it now
And yeah... I'm thinking of installing a more geeky distro to learn a bit more. Though for now I'm thinking about Slackware since it's sounds very "clean" - i.e. I'll learn linux according to the standards. But I'm thinking about Gentoo and Arch too, but not all at once
Quote:
all of your linux distros will have their own /boot partition,... BUT there will not be a bootloader in there. It'll just have kernel images. So, what you do is set up the bootloader in the mbr, and edit the text file accordingly. If you wanna add another distro, you add it to whtaever distros has the grub menu.lst you boot from. Make sure you point Grub ot THAT paritition's /boot/kernel (the parition of the new distro)
DeusExLinux, I'm not sure I get this - won't there be a grub file in all of them then? Or will something stupid like that happen only if I re-install GRUB with every new distro installation? But in such a case, what happens if I end up getting rid of the distro that had the grub file? I guess I'm in trouble, right? So maybe better if I share the boot partition? Or no?
Originally posted by rozoweskarpetki DeusExLinux, I'm not sure I get this - won't there be a grub file in all of them then? Or will something stupid like that happen only if I re-install GRUB with every new distro installation? But in such a case, what happens if I end up getting rid of the distro that had the grub file? I guess I'm in trouble, right? So maybe better if I share the boot partition? Or no?
When you install a new distro, select not to install any boot-loader, so you'll be safe.
If you want to install new distro in separate boot partitions make sure to change grub.conf's root (hdx,y) accordantly.
I'm not sure I get this - won't there be a grub file in all of them then? Or will something stupid like that happen only if I re-install GRUB with every new distro installation?
yes, basically. You should skip the grub installiation step.
Quote:
what happens if I end up getting rid of the distro that had the grub file? I guess I'm in trouble, right?
again, yes. You loose the bootloader, but you can always install another one (as long as you kept your menu.lst, or you can always just rewrite it, once you do it about 5 times, it becomes second nature .
I tend to not make a separate /boot partition, but that is generally a pretty good practice. Mine is a little more convoluted, but I have my main distro, and a partition that gets changed a lot (Its my playtime parititon). So I choose to used eachs insalliation's /boot partition as location for it's own kernel. If you wanna do that, you have to make sure to point grub to that particular parition when you are booting it. a la
[code] title=Distro Whatever
kernel (hd0,X)/boot/kernel-image
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.