What's a good partition strategy for running two distros?
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
/dev/hda1... how do you intend to run two partitions on ... one... partition?!
boot should be no bigger than 100mb or so... no place for iso's in partition that small. also you should never just install a distro onto just / you should at least have a seperate /home partition, especially if you want two distro's, then you can have a shared /home between the two.
What's getting more and more common is the use of LVM. you would partition typically 100mb for /boot on hda1, then give over the rest of it all to a single LVM partition, within which you can happily carve up space for /home, /var /usr etc... for each distro. sorted.
/boot is meant to hold just enough files to get you up off of the ground. your kernel images, your init ramdisk if you need one, your bootloader configs (for grub) etc... it's a small space which in actual fact you should not even be mounting at all once you have botoed your system. it is not for storage. You could almost see it was a sort of massive boot sector (maybe...) you don't use /boot for a running system. you don't read from it, you don't write to it. it doesn't change, therefore it's not at danger of being corrupted and damaging your system. the larger it is, and the more data is on it, the less this holds up. never have a /boot larger than 100mb ever, and if you're using more than 25% of it, you're going wrong somewhere!
images and things would mnore conventionally go under /var/ somewhere, although you can certainl deviate from standards and just have an /images, /data, /stuff etc...
swap can go anywhere really. if you were to use LVM, which i really do recommend, then it's just be an LV inside there. there is no performance hit for runnign partitions inside an LVM container, it's just a mapping table which writes to whichever disk sector that movable volume might exist on. you could always keepo it outside of LVM as a normal partition, but there's no benefit of doing so, and should you want to make it larger or smalelr you'll have some difficulties to overcome.
Last edited by acid_kewpie; 03-01-2006 at 01:49 PM.
I'm a big fan of LVM. With that in mind, I'd go for:
Code:
Primary partition: hda1, 50Mb, mounted as /boot, shared by both distros
Primary partition: hda2, 500Mb, swap, used by both distros
Logical partition: hda5, 300Mb, mounted as / for distro #1
Logical partition: hda6, 300Mb, mounted as / for distro #2
Logical partition: hda7, remainder of disk, LVM2, initially divided into:
usr_distro_1 (2Gb), var_distro_1 (150Mb), opt_distro_1 (50Mb),
usr_distro_2 (2Gb), var_distro_2 (150Mb), opt_distro_2 (50Mb),
tmp_shared (50Mb), home_shared (50Mb)
Symlink usr_local_distro_1 to opt_distro_1
Symlink usr_local_distro_2 to opt_distro_2
You will probably need to grow some of these LVM filesystems soon after creation. Especially /home. I prefer to start small and grow only as needed. If you decide not to use LVM, the above suggested sizes will be way too small for regular partitions.
You might ask around about good starting minimum filesystem sizes, you can always grow them later with LVM . I offer the relevent filesystems from my two desktop computers current disk usage as examples (/usr/local symlinked to /opt on both of these):
Code:
Workstation Debian SARGE desktop, not much extra stuff installed:
$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda7 918322 141398 727928 17% /
/dev/sda5 45130 18196 24526 43% /boot ***** two kernels *****
/dev/mapper/vg0-usr 2445053 1906963 433724 82% /usr
/dev/mapper/vg0-var 1920391 131389 1686602 8% /var
/dev/mapper/vg0-opt 242191 156471 72818 69% /opt ***** I store local .debs here *****
/dev/mapper/vg0-tmp 479842 8462 445780 2% /tmp
/dev/mapper/vg0-home 49893 33663 13568 72% /home
Code:
Workstation Debian SID desktop, more stuff installed on this one, but still fairly lean
$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda8 293555 100562 177332 37% /
/dev/hda9 30075 4648 23823 17% /boot ***** one kernel, self-made initrd *****
/dev/mapper/vg0-debian_home
100269 57915 38095 61% /home
/dev/mapper/vg0-debian_opt
628411 399744 208638 66% /opt ***** a few local compiles *****
/dev/mapper/vg0-debian_tmp
95952 4141 86691 5% /tmp
/dev/mapper/vg0-debian_usr
2925148 2548843 282671 91% /usr
/dev/mapper/vg0-debian_var
1462324 222971 1176930 16% /var
50mb for /opt??? openoffice2 wouldn't even fit in there..?!
again, no point making swap outside of LVM... just limits you in the future.
in general assuming a normal sized drive, all those defined LV's are too small really. no point having less than 4gb for /usr, 1gb for /. of course that's one of the best features of LVM, being that you can arbitrarily increase them later if need be.
50mb for /opt??? openoffice2 wouldn't even fit in there..?!
It must depend on your distro, and what you initially install off the CD's. I have OpenOffice on both of my systems. It's installed under /usr on Debian. If I remember correctly, my /opt was darn near empty after the install (maybe a few things, but very very little). What's there now is what I've put there myself (with local compiles, etc.) You're right about swap. No reason NOT to put that on LVM too. I can't see using 1Gb on /, at least not with my current setups (which only use 100Mb [edit]Oops - I meant 400Mb[/edit] and 150Mb respectively), but 1Gb is so small these days it's probably best to go ahead and allocate that to be safe. This is another one that might depend on distro.
Probably a good idea for the OP to get suggestions for filesystem sizes from people running the same distros being considered.
i think that's pretty awful really.. !... you should never just install a distro onto just / you should at least have a seperate /home partition, especially if you want two distro's, then you can have a shared /home between the two.
What's getting more and more common is the use of LVM.
What he said
- Friggin Mods, always coming up with the right answer first.
I'm an LVM convert and haven't regretted it. I'm also a fan of sharing the /home partition between distros. Saves you from having to do browser, desktop, app re-configuration for each distro you install.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.