LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 02-28-2006, 02:02 PM   #1
rollo
Member
 
Registered: Apr 2004
Location: France
Distribution: Debian Sid (Kanotix)
Posts: 237

Rep: Reputation: 30
What's a good partition strategy for running two distros?


I'm looking for advice on how to partition before installing two distros. (Probably Ubuntu and Suse.)

What do people think about this one:
  • /dev/hda1: /boot and /install-image (to install the distros from .iso images)
  • /dev/hda2: / (distro 1)
  • /dev/hda3: / (distro 2)
  • /dev/hda4: swap

If that is reasonable, then the final step would simply be to mount /dev/hda1 from within the respective installed filesystem, right?

Advice appreciated.
 
Old 02-28-2006, 02:38 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
i think that's pretty awful really.. !

/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.
 
Old 03-01-2006, 01:22 PM   #3
rollo
Member
 
Registered: Apr 2004
Location: France
Distribution: Debian Sid (Kanotix)
Posts: 237

Original Poster
Rep: Reputation: 30
Yes I suppose I meant a partition for /boot and including /boot/install-image.

Thanks for the feedback. Some more questions...

Is there any reason why the boot partition should be small?

Where is a good place for the swap partition?
 
Old 03-01-2006, 01:47 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
/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.
 
Old 03-01-2006, 02:44 PM   #5
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
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
 
Old 03-01-2006, 02:48 PM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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.
 
Old 03-01-2006, 03:16 PM   #7
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
Quote:
Originally Posted by acid_kewpie
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.

Last edited by haertig; 03-01-2006 at 03:22 PM.
 
Old 03-01-2006, 03:20 PM   #8
Dragineez
Member
 
Registered: Oct 2005
Location: Annapolis
Distribution: Ubuntu
Posts: 278

Rep: Reputation: 41
Moderators Always Get In First

Quote:
Originally Posted by acid_kewpie
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Any good strategy handiling dependency? ahaji Linux - Software 11 08-27-2005 03:11 PM
Partition strategy for 120 Gb ext. drive oomfoofoo Linux - General 4 08-26-2005 01:09 PM
How do I know which partition my distros are on? (Multi distros) glenn69 Linux - Newbie 3 06-18-2005 02:43 AM
Any good strategy games for SUSE linux? izquierdista Linux - Games 8 05-27-2005 06:15 PM
Is this the correct partition strategy for a database? cstovall Linux - General 1 03-03-2003 03:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration