Can multiple linux distros use the same partitions?
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.
Can multiple linux distros use the same partitions?
i have redhat 9 and let's say i want to install slackware
i believe most linux distros need a /boot, / , and SWAP
will slackware install it's boot stuff into my existing /boot and use the SWAP space i already have? if so, then all i need to create is a / just for slack?
/home is usually within the root partition on a default install, either actually at /home or at /usr/home and then linked to /home. However, in instances where a large number of users are present, this is often separated onto its own partition so that, if the /boot or / partitions become corrupt, the user data is still (probably) recoverable.
It would probably be a bad idea to even *try* to share a /home partition, based solely on the fact that it's the default location for user directories, and creating a new user on one distro's install after creating the same user on another distro's install will probably destroy all previously saved config files for the existing user on the other distro. It could also result in misconfigurations because of options supported by one distro that won't work on another.
If this was too confusing, don't worry. I confused myself too.
No - Say if you want to multiboot 4 different Linux distributions you only need
4 Root partitions - each one corresponding to a different distribution
a shared Swap partition
The idea is that if you don't specify a separate Boot partition for a particular distribution then the Kernel image and other relevant files will just be contained in the boot directory of that distributions Root partition. The bootloader then simply locates the Kernel image in the boot dircetory - it doesnt need a separate boot partition.
I definately recommend a /home partition. I make different usernames for different distros, copy their config files to distro.whatever and copy stuff over and try it until I get what I want. It doesn't take long if you remember to command as root:
my initial question was if i can share the same swap file space. appears that i can. any complications arising from the use of the same swap space? can the /tmp mount point be shared as well?
are there extended boot loaders like xosl that work well w/ linux (and do more than 4 partitions/ distros per hdd)? reason i ask, is i've never used it, and really just have a limited knowledge of xosl (heard of it, know it exists, but haven't tried it out yet)?
if i set up multiple /(root) partitions/ mount points, i'll more than likely be past the 1024cyl/ 8gig mark, so is forcing lba necessary, or is that something that some distros take care of automatically?
btw, something that i'm puzzled about, is i've seen different values for cyl- are there different types? seems that zero filling a hdd gives a different value, than using a dos type fdisk for setting up partitions. so when they say 1024 cyl is approx at the 8 gig mark, i see different values for cyl, and wonder what' going on??? this is tied to forcing lba- just something that has been puzzling to me.
Originally posted by len my initial question was if i can share the same swap file space. appears that i can. any complications arising from the use of the same swap space? can the /tmp mount point be shared as well?
Both can be used by all your distros. BTW You may need to delete /tmp entries every boot (/tmp tends to grow in size and usually you don't need the data next boot).
Quote:
are there extended boot loaders like xosl that work well w/ linux (and do more than 4 partitions/ distros per hdd)? reason i ask, is i've never used it, and really just have a limited knowledge of xosl (heard of it, know it exists, but haven't tried it out yet)?
I don't know this bootloader, but bootloader usually only care about partitions you boot from (so / or /boot if you have it separate), other "don't exist" for them.
Quote:
if i set up multiple /(root) partitions/ mount points, i'll more than likely be past the 1024cyl/ 8gig mark, so is forcing lba necessary, or is that something that some distros take care of automatically?
If you're planning to use recent distros, there should not be a problem (new distros handle this without problems).
Quote:
btw, something that i'm puzzled about, is i've seen different values for cyl- are there different types? seems that zero filling a hdd gives a different value, than using a dos type fdisk for setting up partitions. so when they say 1024 cyl is approx at the 8 gig mark, i see different values for cyl, and wonder what' going on??? this is tied to forcing lba- just something that has been puzzling to me.
What do you mean: nimber of cylinders or their size (MB)?
There should be no problem sharing a /swap partition. Consider your swap just counter space in the kitchen where you put things you don't need right at this nanosecond but will need shortly. Nothing in there should be considered valid across boots -- or efen executions of the same app or daemon that put it there in the first place. It's a scratch pad.
You could have a situation where you quite happily boot 10 distributions from 1 hard drive - you'd only need 10 Root partitions and a shared Swap partition.
The idea is simply that the respective kernels are found in the boot directories of the respective root partitions.
LILO doesnt have problems with the 1024 limit -
The key to the situation is that the BIOS needs to find a bootloader in a "BIOS designated" boot sector - its the bootloader that needs to be inside a certain sector not an OS or root partition.
mara, here's something on cylinders (seems to answer my question, as heads, and sector are variable, creating different cylinder #'s, as well as capacity #'s- was a reference in redhat install guide, and elsewhere that 1024 cyl is roughly 8gig): http://www.pcguide.com/ref/hdd/bios/sizeMB504-c.html
skyline, lilo can boot 16 partitions-wow! thanks for the bios clarification as well.
if 4 primary partitions max per hdd, then 12 would then be logical in an extended partition- will that work, or is there a different technique? should all the partitions be created first, so as to write the partition table once, then create the / partition as each distro is installed? i just seem to think that it wouldn't go very smoothly. perhaps there are some tricks to making a 16 distro multiboot config work?
here's a simple question- when pointing to a particular partition to boot up, should lilo point to the /(root) partition, which links to the /boot partition (/boot is seperate). i just wondered about what should get toggled for boot. point the distro install to a specific / partition, and the kernel will be automatically placed either into an existing /boot partition, or go into a / partition in the absence of the seperate /boot partition? perhaps i just need to go for it, and find out in the process ( figure a little discussion can save some time)
The "trick" to making a multiboot with LILO is to install LILO each time you install a distribution - then when you finally put your last distribution on - you simply mount all the previous distributions Root partitions - then simply copy over the previous distributions LILO settings into the last distributions lilo.conf file - then modify the paths to the kernal images/initrd ect etc to take into account the temporary mounted root partitions - then run the Map installer /sbin/lilo
Len
Quote:
here's a simple question- when pointing to a particular partition to boot up, should lilo point to the /(root) partition, which links to the /boot partition (/boot is seperate).
You dont need separate boot partitions! - the kernel images are contained in the boot directories of each distributions Root partition - that is sufficient!
LILO as such doesn't point to any root partitions - LILO is simply initiated by the BIOS then reads the Map file for the Raw hard disk location of the default kernel image or OS - it finds the default image from reading lilo.conf
i believe that lilo can do 16 os's because the common mb/ controller card layout is to have 2 ide channels w/ a primary master, primary slave and secondary master, and secondary slave equalling 4 hdd's in total, w/ 4 primary partitions each where the os's will reside, totalling 16 os's. an extended bootloader is then necessary to get into booting os's in extended/ logical partitions (it's claim to fame in being able to do this). because i've had linux installs fail previously that went into extended/ logical partitions, i have to believe that 4 primary partitions*4hdd for 2 ide channels common to a mb layout the rationale for enabling 16 os's capable for lilo- until proven otherwise...
skyline wrote:
Quote:
You dont need separate boot partitions! - the kernel images are contained in the boot directories of each distributions Root partition - that is sufficient!
but i was just contemplating (w/o really saying so), that a single /boot partition is created (not multiple /boot partitions), where all the os kernels are stored. i guess i was wondering as well if this would allow one to get past the 4 primary partition/ os/ hdd situation by placing the /boot partition in a primary partition. i would imagine that the kernels would have to be labeled differently to boot the correct /(root) partition (perhaps kernel~01 for first /(root).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.