LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   what is the best partitioning methode? (http://www.linuxquestions.org/questions/linux-general-1/what-is-the-best-partitioning-methode-4175425123/)

ilali 09-01-2012 09:27 AM

what is the best partitioning methode?
 
i want to format my laptop hard drive totally (it is 250 Gb) and then istall ubuntu 12.04, opensuse 12.2 and maybe arch linux. (i do not want to install windows). what is the best partitioning methode in such a situation?

i know that installing multiple linux distro alongside each other with a shared /home partition lead to creation of these directories: /home/openSUSE, /home/Ubuntu and /home/Arch. and inside these directories i will have following folders:
Videos, Musics, dcuments, Desktop, etc.

but i dislike this structure because i do not want to have for example 3 video directory or 3 music directory. i want to have only one video, one music, and one document, ... directory shared between all distros.

please help me, if you were me, how do you partitioning you hard?

mennohellinga 09-01-2012 11:00 AM

I would do something like this:

partition size filesystem mountpoint
/dev/sda1 1 GiB ext3 boot partition, /boot
/dev/sda2 memory*2 swap none, swap partition
/dev/sda5 20 GiB ext4 Ubuntu /
/dev/sda6 20 GiB ext4 OpenSUSE /
/dev/sda7 20 GiB ext4 Archlinux /
/dev/sda4 all remaining space ext4 /home/yourusername/doc

Every OS will have 1 partition for its files and a small home directory which contains you config files, etc.
/dev/sda4 will be mounted as /home/yourusername/doc in every distro and contains 'Documents', 'Music' and 'Videos', this will allow you to share them between distros (/dev/sda4 is mounted as a subdirectory of all the home dirs) as long as you make sure you have the same numeric user ID on all of them.
Ubuntu uses Unity and the other 2 distros don't, so you might not be able to share you Desktop dir.

pingu 09-01-2012 11:05 AM

"/home/openSUSE, /home/Ubuntu and /home/Arch" - well, that is if you mount the /home partition during install and add users openSUSE, Arch & Ubuntu respectively.

First of all, let all distros use same swap - it saves space and is no problem at all.

I have chosen the setup with only one /home-partition for all distros, but it's a matter that's worth thinking about:
* Problem 1: You want to access all your files from every distro.
* Solution 1: Use only one /home partition, same for all distros
* Problem 2: All configuration is stored under the home-directory - but different distros don't use same version of every program.
* Solution 2: Use one /home partition for each distro
.... See what I mean? ...

I can see 3 ways to handle this:
Either use one home-partition, then you have to put configuration somewhere else & link it in. (That's what I do today.)
It takes a few minutes to setup, not really difficult.

Or use several partitions and link all personal directories (like Documents, My Music etc).
A variant is to
1) Use one /home for each distro. Needn't be big, you don't need a separate partition for it.
2) Create one separate partition where you store your user data. Mount that partition somewhere. Let's call it /usr/local/myhome here.
3) Disciplin needed! Always store everything under /usr/local/myhome, never in homedir!

OH Yes, important!
How could I forget? Make sure your username has the same uid & gid in all distros!

And btw, I never moun t my /home during installation!
It should be 100% safe but I never trust an installation program!

jefro 09-01-2012 01:38 PM

I just let the installer do what it wants usually.

You might run into a primary limit so watch out for that.

ilali 09-07-2012 12:14 PM

give me more explanation please.
 
Quote:

Originally Posted by pingu (Post 4769980)
"/home/openSUSE, /home/Ubuntu and /home/Arch" - well, that is if you mount the /home partition during install and add users openSUSE, Arch & Ubuntu respectively.

First of all, let all distros use same swap - it saves space and is no problem at all.

I have chosen the setup with only one /home-partition for all distros, but it's a matter that's worth thinking about:
* Problem 1: You want to access all your files from every distro.
* Solution 1: Use only one /home partition, same for all distros
* Problem 2: All configuration is stored under the home-directory - but different distros don't use same version of every program.
* Solution 2: Use one /home partition for each distro
.... See what I mean? ...

I can see 3 ways to handle this:
Either use one home-partition, then you have to put configuration somewhere else & link it in. (That's what I do today.)
It takes a few minutes to setup, not really difficult.

Or use several partitions and link all personal directories (like Documents, My Music etc).
A variant is to
1) Use one /home for each distro. Needn't be big, you don't need a separate partition for it.
2) Create one separate partition where you store your user data. Mount that partition somewhere. Let's call it /usr/local/myhome here.
3) Disciplin needed! Always store everything under /usr/local/myhome, never in homedir!

OH Yes, important!
How could I forget? Make sure your username has the same uid & gid in all distros!

And btw, I never moun t my /home during installation!
It should be 100% safe but I never trust an installation program!

OK, as i understand, i should create a swap for all. and i should create a / for every distro (here i need 3 / for 3 distros), also i need a small /home for every distro (how much size it should be?). and i need a big shared partition (or directory, i do not know which and what is the difference) for my personal files such as musics, documents, videos etc.
can you give me more step by step details and guidance?
Thanks.

mennohellinga 09-07-2012 12:29 PM

/dev/sda5 20 GiB ext4 Ubuntu /
contains /bin, /dev, /home, /mnt, /opt, /root, /srv, /usr, /etc, /lib, /media, /proc, /sbin and /tmp for Ubuntu
/dev/sda6 20 GiB ext4 OpenSUSE /
contains the same stuff for OpenSUSE
/dev/sda7 20 GiB ext4 Archlinux /
contains the same stuff for Arch

The /home's are only used for the dotfiles, /dev/sda4 contains all your personal files and is mounted as a subdirectory of the /home's.
Just unleash the Ubuntu and OpenSUSE installers on the / partitions for those distros and do not have them create home or boot partitions.
Then edit each distro's /etc/fstab to mount /dev/sda4 as a subdirectory to the distro's /home/yourusername. Make sure you have the same numeric ID on each distro and all should be fine.

ReaperX7 09-07-2012 05:06 PM

Here's my simplified setup to use on my personal systems

/dev/sda2 ntfs /windows
/dev/sda3 ext4 /boot *boot*
/dev/sda4 btrfs /
/dev/sda5 swap swap
/dev/sda6 fat32 /system-backup

yancek 09-07-2012 07:41 PM

You don't need a separate /home partition for each distro. You could simplify this by just installing the first system to one partition (/) and creating a swap partition. Create additional partitions for each of your installations of other systems and one large one for your data (music, documents, videos). Since you are going to have at least 5 partitions, somewhere in the process you will need to create an Extended partition on which to put the logical partition for at least your data. You can create a mount point in each partition and put an entry in the /etc/fstab file of each distribution to access the data partition from each distribution.

Ygrex 09-07-2012 08:38 PM

I would install OpenVZ and placed all OS installations on the same partition; it would be much more simple to work with all of them at once; also you could share your home directory


All times are GMT -5. The time now is 05:44 PM.