I have noticed that when installing Ubuntu some people create multiple partitions for directories. Like one for root, one for home, one for boot. What is the advantage to doing this over installing them all on one partition, assuming there is only one hard drive?
|
feedback
|
|
There are several reasons:
| |||||||||||||
feedback
|
|
I typically create one for root, one for swap, and one for home. The advantage of this is that it allows you to leave your documents (also music, video, pictures, etc) untouched if you need to reinstall the OS. Because you can completely over write the OS partition (root) without touching the home partition, your files are safe and there is no need to perform the time consuming process of transferring them to another media and then back to your fresh machine. It makes reformatting/imaging much more elegant Here is some more info on the benefits. Although its written about windows, the principle is the same. | |||||
feedback
|
|
Having | |||
|
feedback
|
|
I used to overdo the Partitioning thing in my good old windows days because I thought it might be more clear. One drive letter for a certain topic (e.g. Music, Pictures, Work etc.). But even there separating your data and the system already made sense: Should the system crash you can just format you system partition and reinstall without losing all your data. Unix like systems and Ubuntu don't have drive letters, partitions just get mounted in any empty folder. So the thing that actually makes sense in my eyes is:
Imho more than 4 separate partitions don't make sense in Ubuntu (4 is the maximum number of primary partitions you can create) - it's just a matter of personal preference. | |||||||
feedback
|
|
A separate /boot partition allows me to boot and repair my root file system, even if the root file system is corrupt. If I put all the boot files in the root file system, and it gets corrupted, it might not boot at all. There is also more flexibility. Later, I can put a second disk in, put swap on that, and delete the swap partition from the root disk and expand the root filesystem into that space. Creating a hard swap partition instead of one in the filesystem, is just UNIX-style sysadmin. There's no real reason not to make it just a file in the filesystem, except that some user will come alone with sudo powers and try to rm it. As Babu and Mike said, a separate /home allows me to update or change distros without losing all my data. | |||
|
feedback
|
|
Keeping the home directories on a separate partition prevents the users from accidentally filling up the root partition. This is good because if you fill up the root partition, you end up with problems (system logs, for instance, are often in the root partition). While it's not actually possible for non-root users to use the last bits of space on a disk (the system won't let them), it is possible for them to fill it up most of the way, and then for automated system processes to finish the job, making it annoying to get everything back into operation. | |||
|
feedback
|
|
Keeping a separate home partition lets you keep your files should you reinstall your linux distro.
| |||||
feedback
|