LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Booting more than one linux - GRUB and \boot partition questions (https://www.linuxquestions.org/questions/linux-newbie-8/booting-more-than-one-linux-grub-and-%5Cboot-partition-questions-326569/)

rozoweskarpetki 05-24-2005 07:53 AM

Booting more than one linux - GRUB and \boot partition questions
 
I've found some similar topics, so apologies for starting yet another one :o 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 ;)

kesara 05-24-2005 08:38 AM

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

rozoweskarpetki 05-24-2005 09:26 AM

Quote:

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?

DeusExLinux 05-24-2005 10:21 AM

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)

kesara 05-24-2005 10:39 AM

Quote:

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
Code:

default 0
timeout 30
splashimage=(hd0,0)/grub/splash.xpm.gz

# Fedora
title Fedora Core (2.6.11-1.14_FC3)
root (hd0,0)
kernel /vmlinuz-2.6.11-1.14_FC3 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.11-1.14_FC3.img

# Gentoo
title=Gentoo Linux 2.6.11-r3
root (hd0,0)
kernel /kernel-2.6.11-gentoo-r3 root=/dev/hda3

Quote:

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:-)

rozoweskarpetki 05-24-2005 01:24 PM

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?

kesara 05-24-2005 08:17 PM

Quote:

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.

DeusExLinux 05-25-2005 01:06 AM

Quote:

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

And pass whatever options you need.

This seems to work well for me.

rozoweskarpetki 05-25-2005 05:58 AM

Thanks to both of you :)

Your help is much appreciated :)


All times are GMT -5. The time now is 11:07 PM.