What partitioning scheme do you recommend for a desktop? I've always created three or four primary partitions -- root, swap, home, and sometimes a separate boot partition. Ubuntu's default install offers LVMs. I've never had to add additional drives or space, so it never seemed like a big deal. Whenever I do a fresh install, though, I always think there might be a better way.
closed as primarily opinion-based by Braiam, user117103, Warren Hill, Eric Carvalho, chaskes Nov 13 '13 at 3:22
Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.
/(i.e. the root filesystem)
The biggest reason to do this is that you can do anything to your Ubuntu install and it won't affect your music/videos/whatever in your home. I especially enjoy this when a upgrade to a new Ubuntu version and the installation goes weird.
Generally speaking, you shouldn't bother with a separate
/boot partition unless you're running multiple Linux distributions at once.
The Ubuntu installers for both the desktop CD and server/alternate CD have the ability to install over an existing system, preserving your home directory (and the local system driectories:
/var/local). This functionality also reuses the user ID and group ID of an existing user, if it has the same username as the user you're creating during installation.
To use this option when installing, choose the option for advanced partitioning, then select your existing
/home partition. In the box that appears, make sure the filesystem selected matches the existing filesystem of that partition, and that the format box is not checked. Proceed as normal through the rest of the options.
In Ubuntu 10.10 we had hoped to add an option to the installer that detected when you had an existing copy of Ubuntu installed and offered to replace it with the newer version you were attempting to install (using the aforementioned functionality behind the scenes). While it did not make the final cut, it is likely to arrive in Ubuntu 11.04.
As for a separate
/boot partition, that's a relic of hardware constraints of the past (the bootloader 1024 cylinder limit). I can think of no practical advantage a separate /boot would have on a modern system, and if not given an arguably excessive amount of space, it will potentially fill up and create problems of its own, given that Ubuntu does not automatically remove old kernels.
/(i.e. root filesystem) - for your operating system
swap- swap space, which should be a little larger than the amount of RAM you have
/home- for your data files
You only really need a separate
/boot partition if you are using the alternate installer to set up full disk encryption. Currently the files in
/boot need to be unencrypted so the operating system can start.
Generally speaking, you might add other partitions if you want to:
Preserve the partition through a re-installation of the operating system - this is the usual reason for having a separate
/homepartition. A separate
/optmight also be useful if you install lots of applications by compiling them from source.
Limit the space that files on a partition can use - for example, a separate
/homepartition will prevent your operating system grinding to a halt when you fill up your
homedirectory because you will still be able to log in as root and delete some files from your home directory.
Use a different file system - I use a faster, less resilient file system for
/tmp, but I keep
/homeon a slower, journaling file system for better data protection.
As suggested by Asmerito, you should consider putting all your partitions other than
/boot on LVM. This will allow increased flexibility in resizing your partitions or even expanding them on to other disks. But you might not expect to require this functionality.
If you use the full disk encryption in the alternate installer, it will automatically create a
/boot partition, a
swap partition and another partition to hold the encrypted data. This encrypted partition is then used to hold a LVM partition. This LVM partition is then used to hold all your additional partitions. Initially this is just your root partition.
Hope this all helps.
Well, at a minimum you need a root partition and a swap partition. I highly recommend a home partition because then when you run out of space on your home partition, it won't affect your applications and more importantly, core components.
I discovered this the hard way when I ran out of space on the root partition - and I couldn't even start the Gnome desktop. I had to log in through the terminal and delete some stuff :(
For server installations, best practice is to use LVM, so you can expand your storage space easily if you run out of free space. My suggestion is:
- LVM (if you add more disks, just resize LVM and there you go).
NOTE: if you use multi-user environment, it is good practice to create
/home on LVM.
/boot= 1 GB
Extended partition with LVM:
/= 5 GB
/var= 3 GB
/var/spool/cache= 2 GB ReiserFS (local squid disk cache for all my browsers)
/home= +500 GB for users including a public folder (shared both locally and remotely with smb).
/tmp= 128 MB (ramFS).
swap= twice my RAM.
I've been using this scheme for years and I'm very happy with it. Suggestions always welcomed.
On my home server, I prefer to create
/var/log. Since I do run a firewall and log all activity to
/var/log, creating the log as a separate partition ensures that even if the logs run rampart, it won't block me from booting.
I always do a fresh install of newer versions of Ubuntu, so for me it makes sense to have a separate
/home, since I won't have to backup my home folder every time.
If you plan to install several distributions and want to use the same home folder you can install with a separate
/home partition and use the same username for each distro. But if you are only using Ubuntu there is no need to have a separate
On my Notebook Desktop:
8GB allocated to
/(i.e. root of the filesystem)
2 times installed RAM allocated for
swap(e.g. 3GB RAM = 6GB allocated for swap)
Remained of disk allocated to
/mnt/storage-- somewhere to store any media that you download. If it gets full if won't fill up root. (I guess that this is similar to the idea of making
/homea separate partition.)