Memo to Ubuntu Devs: Make Separate Home Default
Twice a year, when it comes time to upgrade to the newest Ubuntu release, I’m reminded of how nice it is to have my /home directories on separate partitions from the system directories–except when they’re not, because I chose the default Ubuntu partitioning scheme instead of configuring it manually. Indeed, life would be much simpler if the Ubuntu installer gave /home a dedicated partition automatically. Here’s why.
One of the nicest features of modern Linux is its strict separation of user data from system files, which makes it easy to upgrade the operating system to a newer version without losing personal files and settings. By keeping /home on a dedicated partition, upgrading is trivially simple–users need only to run the Ubuntu installer, configure partitions manually so that / is wiped out while /home is not, and then boot into the new system without having to reconfigure any personal settings. Even the desktop wallpaper is left untouched.
Granted, even without a separate /home partition, it’s still possible to back up the directory to removable media, reinstall the system, then put the files from /home back into place. But that’s a tedious process that requires access to a sizeable external hard disk and generally means fighting with file permissions in order to get things working. Definitely not for non-geeks, or for geeks who have better things to do.
Separate /home by default
In most cases–the exceptions being systems with very small hard disks–there’s no reason not to set up the /home directory on a dedicated partition when first installing Ubuntu. It makes things much easier if a user decides to upgrade to a newer version of the operating system at a later date, and doesn’t entail any negative consequences besides slightly reducing the amount of disk space available for personal files–which matters less and less in a world where storage is becoming cheaper by the day.
Unfortunately, separate /home is an option that only geeks are likely to choose, since it requires manual partitioning, which will frighten most normal people away (with good reason, since there’s a real possibility of destroying data on a multi-boot system if the user doesn’t know what she’s doing).
As Alan Pope wrote on Ubuntu brainstorm almost two years ago, the lives of many users would be simpler if the ubiquity installer placed /home on a separate partition by default–or at least offered that choice as an autoconfigured option, rather than one available only through manual setup.
Recent releases have seen excellent improvements to ubiquity’s default behavior–the Ubuntu 9.10 installer even allows one-click setup of an encrypted /home directory–and easy configuration of a separate partition for personal files would be another great step on the usability front. Let’s home the Ubuntu developers see the light soon.
This would be too cool. I’ve loved having my /home on a separate partition, made things so much easier. If they added this to the default installation, it would really give the distro a boost for the non-geeks. For example, my mom would love this, but she won’t dare to try this on her own.
The developers argue that it is quite tricky to set the partition size automatically. People needs tend to vary. Some people install many programs, some do not. Some have large data, some do not. Question for all: what size of system and data partition would you recomend and (importantly) tell why.
When I set mine up a couple years back I evenly divided the remaining space between / and /home. /home always ends up with more space used than / but my drive is large enough that neither gets near full.
I agree with the assertion that determining the size of these partitions can be tricky. My /home generally has loads of pictures from my camera, my virtual box guest(s) and the normal documents and such. I may move to vmware and it defaults to storing the guests elsewhere but I’ll no doubt move them to /home so they don’t get lost during upgrades.
Obviously everyone is not doing the same things as I am so they may prefer smaller /home, but a 50/50 scheme is probably still reasonable.
The easiest way to do Ubuntu upgrades is to just run an upgrade via Update Manager, and not reinstalling from scratch. Then it doesn’t matter if /home is on a separate partition or not.
Using a partition for /home introducing sizing concerns that are not easy to deal with.
Using an LVM logical volume for /home, on the other hand, would make sizing concerns easier to deal with. Use a very small root filesystem and a reasonably sized /home, and provide tools that notify the user when a volume is filling up, and make it easy to grow the volume.
Or wait for btrfs.
I’m a huge fan of the /home partition. And it should be relatively easy to provide a small pull down menu with a couple options. (Do you have use only a few programs but have a large music/photo collection? / Small music/photo collection but many programs or games? / Both music and games? Each would adjust the proportions respectively. When all else fails advise that if people are mot comfortable with it than do a default install.
While I think the /home partition should be an easily accessible option, I don’t think it should be THE default because of the risks decumanus brings up.
I have to agree with Anden above. I’m a total Linux newbie, but I do use Ubuntu 9.04 on a secondary laptop. I had it pretty heavily customized with the AWN dock (in place of the taskbar), Mac4Lin skin, and my own wallpaper. I upgraded to 9.10 using the Update Manager, and all of my customizations survived the process just fine. So the separate /home partition may not be necessary for the novice user like me, who is more likely to use the Update Manager to upgrade anyway.
Anden and John: I don’t always have such good luck upgrading between Ubuntu releases. I prefer to do a clean install, because in the past when I’ve tried to upgrade I’ve ended up spending more time putting the pieces of the system back together than it would have taken to do a reinstall. But maybe I’ve just had bad luck. Also, it’s probably easier for most non-geeks to just press the upgrade button than have to burn a CD and reinstall Ubuntu from scratch, which is another point I didn’t consider.
On the other hand, keeping /home separate allows you to switch to a different Linux distribution easily, or to use the same /home for different systems (though not at the same time, of course, in most cases). But again, only geeks care about stuff like this.
The point raised by others about not knowing how much space users will need in /home versus in / is a good one. I didn’t think about it too much, because I tend to use mostly the default application stack in Ubuntu, with only a few added extras.
That said, the default footprint of / on a Karmic system is under 3 gigabytes, so even if you triple that with additional applications, you’re still not talking about a very large partition compared to what most people have in /home these days if they use it to store music, video, etc. I would think that in most cases, if the installer gave 20 gigabytes to / and the rest to /home (with a little for swap in between), that would be way more space in / than even the geekiest users would need. That might not work on all systems, especially older ones with smaller hard disks or netbooks with tiny solid-state drives, but in most cases it would be fine.
[…] http://www.workswithu.com/2009/11/06/memo-to-ubuntu-devs-make-separate-home-default/ a few seconds ago from Gwibber […]
This is so long overdue, that it should be seen by Mr. Shuttleworth as an embarrassment.
Do note that the ubuntu installer is supposed to keep around /home (along with /srv and /root) even when getting installed over top an an existing (not newly created) all-in-one partition; see the blueprint at https://blueprints.launchpad.net/ubuntu/+spec/ubiquity-preserve-home. This was supposedly implemented in the hardy (8.04) time-frame. That said, I create all my non-throwaway systems with separate /homes manually, and I’d backup data first before trying it
Perhaps a test to check the size of the host drive:
gt;80GB then 20GB /, 10GB swap, 50+GB /home
lt;80GB then use one partition
My desktop uses the first example. My netbook has a 4GB SD card with UNR on it using the second example.
Yes, this is needed.
The details to get a good ad-hoc partitioning default scheme can be worked out
The other thing that has been in Mandriva since the early 2000’s, and still missing here, is intelligent detection of existing accounts in /home at install time, and importing them. You need to scan /home, figure out usernames, groupnames, basic info, and just generate one account for each entry, with no password initially.
I help people A LOT in forums, and I can’t tell you HOW MUCH we need this!
Leo, is there a spec or brainstorm-proposal for that functionality?
BTW: there is no 100% reliable way to detect usernames amp; groupnames by scanning /home, but I suppose they guess them from the directories they find under /home ?
JanC, AFAIK there is one for using /home and it;s been deprecated, and I haven;t seen one for the user detection. And yes, you need to do heuristics, but if you also find a / you can scan the config files in /etc (shadow, groups, etc)
Leo, migration-assistant (part of ubiquity) is supposed to do that, though I’m not entirely sure of its limitations; I think it only does it on side-by-side installs. Please file bugs where it’s not doing the right thing.
I didn’t mention how to get the installer to keep /home around; I believe you go into manual partitioning and tell it to use the existing partition (as whatever type it is) without formating it. Then it should not delete the toplevel directories I listed above.
Memo to Ubuntu Devs: Please Don’t Make Separate Home Default
We’ve been through this how many times before? Regular users can’t know how much space they’ll need for a home partition and how much they’ll need for their system. We know you nerds don’t actually use your Home partitions for anything, like storing documents and files, but the rest of us do. Splitting it into two partitions just ensures we’ll run out of space on one of them faster than we would have otherwise.
“which makes it easy to upgrade the operating system to a newer version without losing personal files and settings”
There’s this new thing. It’s called “Update Manager”.
“Unfortunately, separate /home is an option that only geeks are likely to choose, since”
… it’s something only geeks are likely to need. Please don’t force your geekiness on the rest of us.
Easy test. If the drive is smaller than say 60GB, leave it one partition. If it’s larger, set aside 30GB for /, 8GB for swap, and whatever’s left over for /home.
Here’s one possible answer:
What I pray Ubuntu will do is to make a REAL LiveCD ala Knoppix. Sadly Klaus Knopper has quietly left the building and it seems to be at least in part because he thinks Ubuntu is stealing all the glory. This is messed up because the LiveCD, or let’s say LiveDistro since they’re often on USB these days, is so awesome at enforcing the concept of separating the user files from the system files.
The genius of the LiveCD with UNIONFS is that you can leave your system entirely independent of your user files while still having the ability to add packages and customize settings that get stored in a big fat file in the user partition. The file is nothing more than a compressed file that is still manually editable when the system is off-line and when the system is live you can edit the files “in place” just where you would expect to find them in a standard version of the distro. The latter part is made possible through UNIONFS. I’m sure that most users don’t get this. Most people think that LiveCD means rescue CD or demo mode and that’s that. It’s so not the case. I use LiveCDs exclusively on literally dozens of machines and have for years precisely because it enables the clean separation of the user and system data. Once you get used to it, it makes migration, cloning and upgrading painless as can be imagined.
So, what would be sweet is to see Ubuntu simply make a separate “real” LiveCD version for users who know why they would want it. Even better, Shuttleworth should just hire Klaus Knopper and add another iso download option for people who know what they want.
As mentioned above, the install CD has no problem leaving /home alone even if it is not on a a separate partition. It’s pretty rare for a normal user to actually have to reformat their partition, so this wouldn’t really make sense to implement, given the pain it causes when you run out of space on one partition and not the other. I used to run my system with separate partitions for the reasons you stated, and it was a major pain all the time, but worth it because I could reinstall easily, but there are few reasons for it any longer. The only reason to use a separate partition now is for performance (only under certain circumstances), to have it be a different fs type, or for quota-ing, though there’s probably a better solution for the last one.
@Hmm,
I don’t know, I am pretty new user of Ubuntu (installed it on my secondary laptop in January ’09). When 9.04 was released, I tried to update using the Update Manager and it didn’t work at all. I just reinstalled 8.10 and decided never to update again (since it’s just a secondary laptop anyway). I even talked to various Ubuntu users about this, and they all told me that they reinstall from scratch rather than using the Update Manager. This sounds like a reasonable solution for a non-geek to me, if it means I can reinstall a newer version without using Update Manager, and without losing any of my files.
But I guess since I’m a regular user, you assume I can’t know how much space I’ll need for each partition, and furthermore you assume I am somehow bowing to some sort of geek indoctrination from the author. I think you’ve misjudged on both fronts.
This is definitely true, every system I own has a partitioned HDD. The very first thing I do with a new install is to redirect all the “home”, “pictures”, “music” etc links to my D drive.
It makes moving between versions, OSs or even computer a snap. Everything I want to keep is in one place, anything I can live without stays on the wipeable area.
Disclaimer: I am a geek. I know what a separate /home is good for, and have run systems with and without them. Without them, I have run into the overwrite problem, and have done the backups necessary, with the headaches generally associated therewith.
On systems where I have used them, I have run into the space problems which most know so well.
However, I am sadly hearing more and more these days, of problems with Ubuntu upgrades, and the need for fresh installs to compensate. That is rare for me, but I use apt-get natively to upgrade things, and my skills are sufficient to solve the majority of problems which do indeed happen, or research the answers via forums. Since I mostly work with server class installations, problems are more frequent than I think are generally seen on the desktop front, but I have associates with a CLI skill nearing or exceeding my own, who have upgraded desktop systems via update-manager and synaptic, had them go south, and who have thrown up their hands and reinstalled.
So this is a definite issue, expert or “I want it to just work” user.
So what is the solution? Some combination of separate /home, LVM, and automatic resizing, I suspect. I am definitely in favor of the idea expressed in the article, more of the ideas in some of the comments re prompting the user with different potential ways of setting it up, to deal with the initial size issues.
If LVM is successfully implemented, most of the size issues go away. If done right, this could even be an advantage in competition with M$, et al.
What is ultimately needed, for those do not know enough to turn it off, is a variable (dynamic-seeming) boundary between / and /home, so that one grows and shrinks the other, based upon perceived need–keeping, for example, a 30% overhead in both, and complaining that disk space is getting low, when this balance can no longer be maintained.
Just my inflation adjusted $0.013.
Tacticus
I agree with Chris. Normally it’s great having all your data totally separate from the OS on it’s own little partition. It’s normally great not to have to reconfigure your desktop just the way you like it.
But on this occasion that wasn’t great. Some old settings were causing my newly upgraded OS to behave very strangely. It was so slow. Like a geriatric on downers. The only way i could fix it was to start completely fresh. Obviously I could still back up my documents and stuff. But no system settings. No desktop settings. That all had to go since I couldn’t figure out what was causing the problem and didn’t fancy spending the next month racking my brain over it.
Still it wasn’t all bad. The Live CD can now handle dual graphics cards again and RAID arrays like Nvidia stripe as well. Which is a very welcome step forward.
I’m also curious as to how you can run out of space on the OS partition. 10GB is generally more than enough. Overly generous even. What are people doing with their PCs that they manage to fill a 10GB partition with an OS and application software? Linux apps, even the ones written with Mono aren’t generally that big.
So the space calculation is simple. 10GB for /. 500MB to 1GB for swap and everything else for /home.
Now most laptop and desktop PCs come with anything from 100GB+ to 500GB of hard drive space. 11GB out of that lot for the OS and apps is hardly going to be missed.
If your the sort that likes to rip DVDs to the hard drive the remaining 489GB won’t last long. But then again if you’re that sort I’d expect you to understand how to use USB drives and NAS drives. Most folk fill their PCs with photos, documents and MP3s. For which 489GB is normally plenty for most people. Granted there are always exceptions.
But I am curious. Are my assumptions wrong?
@aikiwolfie:
Currently my / has 28 GiB on it (/home is on another disk), so at least your assumptions are not always currect. 😉
There are several reasons why 10 GiB is not always enough, including some games that come with a lot of artwork for example.
Ubiquity can already do a new install without destroying /home, /root amp; /srv on the same partition, and if improvements to that can be made, you should file bugs… 😉
[…] http://www.workswithu.com/2009/11/06/memo-to-ubuntu-devs-make-separate-home-default/ a few seconds ago from web […]
Lets start off with the idea that Ubuntu is branded “for human beings.” In the beginning, many years ago when I started using Linux, I totally loved the idea of having home mapped on a different partition. This was because I had my root partition trashed more than once by bad default configuration or kernel build, and generally doing things the hard way. As time went by I begun to appreciate the single partition idea, which I believe is perfectly ok for systems with limited hard drive space, and conceptually easy to understand for newbies.
1. There’s an art and science to mapping partitions to the folder tree.
2. It is difficult to mentally conceive the notion that the system’s running out of hard drive space while there is still have space left in a new user’s home directory.
3. Perfectly legitimate user programs routinely fill up /tmp and /var to the tune of several gigs when those are mapped to the root partition.
Anyway I believe the primary reason is for maintainers to provide a consistent default experience, just like Fedora uses LVM to ensure a default install consistency to cover many application use cases rather than how easy it is for the newb to grasp the concepts and benefits of LVM.
Ultimately, when it comes to the average user, Ubuntu can provide any experience it wants to by default provided that there is consistency in its application.
My opinion is that separating directories by partitions adds to the complexity for average users who are not aware that there is more to this world than drive c. Experienced users always have the opportunity to research prior to installing. For instance I have tried multiboot with multiple roots for different distros with a single /home partition, but there are way too many gotchas that can weave problems into your life and rob you of days out your life that you’ll never get back.
@JanC: Yeah I keep my /home on it’s own physical disk as well. I suppose my point is people need to learn to build systems that suit their needs.
If you’re the sort that uses a lot of disk space then there’s really no way around running out of storage capacity unless you plan ahead to meet your future needs.
One of the cruellest sales tricks the PC industry plays on people at the moment is to actively encourage people to buy systems that their needs will out strip in a very short space of time.
If you have your OS and data on separate partitions but on the same physical disk then gparted can be used to play around with the partition sizes and layout even after installation. That might sound a bit advanced. But gparted makes that task as easy as it could get I think.
If you’re using separate physical disks then creating more space is even easier. Different key locations on the OS hard disk can be moved to other disks. /var, /etc and /opt are all good candidates for moving to their own physical disks.
Adding a secondary disk for data is even easier. It’s simply a matter of setting up permissions properly to protect that data.
I don’t think any of these solutions is particularly hard for a anybody to implement. What is difficult is getting people to actually do something for themselves. Most people want computers to “just work”. And I confess a lot of the time that is what I’m looking for as well. But sometimes you need to be a bit more proactive.
This idea would work even better in conjunction with LVM.
I think most people here agree that partitioning requires some competence. If the installer knows what to do, then the facilities for partitioning are already provided. If the installer is ignorant then maximum simplicity is called for. Please leave the installation defaults as they are.
There’s something folks tend to miss here in the discussion — this point relates to the fact that users are /upgrading/ their systems by reinstalling the system from scratch (something that is, iMHO horribly broken and something that definately needs more attention by the devs). While using apt/synaptic/etc. to do the upgrade is ideal, there is a better option noone has touched on: stop repartitioning and reformatting!
During install, the system does three things:
1. Partition
2. Format
3. Copy files to the newly formatted disk
The first two steps can be solved simply and easily by instead mounting the old system (according to grub configs and reading /etc/fstab), and then simply rm-ing everything save /home (while preserving user-specific files like bits of /etc/{passwd,shadow,group}. After this is done, the final step is exactly the same. There’s a bit of extra forensics involved to mount the fs and capture the additional users out of passwd, but this kind of “upgrade” is indeed possible (most embedded systems do it this way) and quite common. Further, by working it this way, you alleviate the “geek” problem of partitioning an extra /home and the non-geek problem of running out of space.
Why ubiquity doesn’t support this option is beyond my understanding… =o/
Mounting the old file systems and then removing the old files would probably take longer. Then of course we have the new ext4 file system. It is possible to convert an existing file system like ext3 to ext4 (I think) but that would take so much longer.
Format doesn’t care what’s on the disk. It just clobbers everything in one go. Fast, efficient, reliable, tried and tested.
Bad idea.
A separate /home is at best useless, because you need external backups anyway. On an external USB hard disk, DVD or such. Not only for your documents, but also for some critical configuration settings (.mozilla, .mozilla-thunderbird for example).
At the level of “minor annoyance” is the matter of disk space waste. Everything on one partition is a more efficient use of disk space.
And at worst a separate /home is a pain when performing a fresh installation: old faulty configuration settings which plague you.
Regards, Pjotr.
Totally agree. I personally am tired of having backup and restore my home folder while installing new versions of Linux (mostly Ubuntu). Now I’ve partitioned by boot to 20 GB and the rest for home directory. I’ve set symbolic links to map the home directory to the separate partition. Now my data is safe during any new installation.
Ubuntu giving this option during installation time is a great option. My vote with you.
Are people skipping Steve Beattie’s post here? (number 11.) It’s very relevant to the whole discussion here.
The best solution is for the installer to simply look for a home folder. Then give you the option to “import” it with the new install or just wipe it.
If you want a separate partition, the Ubuntu installer makes it easy to set up and gives that option in a friendly GUI manner. If you change your mind, use gparted. A little disclaimer here, I’ve been dist-upgrading (and using update manager) to go through the alphas, betas and full installs for several years… So I haven’t run the Ubuntu installer in while, but it was certainly slick enough when I did…
I’ve personally always made a separate /home partition, my laptop of 4 years is running off the same one. No problems, if there is some old config, I can delete the .folder or .file (only time I’ve ever done that was with .pulse, but that’s for another rant I guess…)
The main reason I prefer the default method now (especially since it lets you partition things as you please anyway…) is for space efficiency.
It doesn’t matter much if you have a big hard drive or several drives. But, with the popularity of netbooks, and SSD drives (which tend to be smaller for now, I’m sure that will change as the price drops…) I’d rather Ubuntu, rightfully, decide to make an default install which lets you utilize as much space as necessary, rather than guessing and putting some proportion which may inconvenience and upset some users (Hey where is my space in home! Why can’t I install or burn a large DVD, /tmp etc.) to just not being the right ratio for power users (or people that want several partitions for example…)
So my memo to the Ubuntu developers is, keep doing what you are doing. Just work to make Ubuntu easy to use, customize, efficient, and continue to offer great defaults for those who want a system as is.
“Everything on one partition is a more efficient use of disk space.”
It’s just not an issue when you have 1.5TB of internal HDD space. Most people aren’t looking at efficiency. They are after convenience.
I agree it’s not a substitute for regular backups. But it can make upgrades so much easier, simpler and faster. And my gut feeling on this issue is that is what increasingly matters to people.
Just a random thought how about a fake partition?
it behaves and looks like a partition but its safe to resize and such like.
yes I understand then comes the drama of the installer knowing about fake partitions.
By default System76 computers come with 15 GB for root, swap as large as RAM, and the rest for /home. This is the way I have my computer set up, the way I have it set up for others, and it seems to work for everyone involved.
Don’t think it can work, as many have pointed out user’s needs vary too much. Some examples: Fluke just mentioned 15GB for /. I had a laptop setup that way, and found it to be plenty of space, so did the same on a newer desktop. After trying and failing to do some video encoding I learned that my app was trying to use /tmp to prep files, and was running out of space.
Ryan says lets give 30GB to / if the drive is over 80GB. OK, but then user y knows she has a 100GB drive, so she can store her 80GB of music no prob and still have 20 for apps, except oops, Ubuntu only left her 70GB for home, so even though she’s only using 7GB on / the rest is wasted.
There is no one size fits all. Leave the manual /home to those who know they want it and how to divide it.
Dear Fluke (39) and you all,
What are System39 computers? If you are talking about a private label of computers, please specify in order to be much more accurate. I have a Dell Vostro 1700 laptop and an LG X110 netbook (both came with Windows and now have Ubuntu 9.10), and even though they are manufactured by other companies, these brands are well known enough, I think (indeed the LG netbook is supposed to be manufactured by MSI; I did not search about the Dell…); but System39, what is it?… Come on! Is it your store round the corner? Let’s be more specific when offering information…
Never heard of them…
For the rest of normal computers and netbooks, my experience and vote goes to setting up a separate /home partition. That way I feel comfortable no matter what problem, issue, upgrade, etc., can happen to your / root partition.
Moreover, I did a fresh clean install because I had some troubles and I did want to start from zero, and I was amazed that Ubuntu recognized all the settings and configuration, even if it was not my initial purpose. And I do not risk my personal data stored “at home”.
Definitely, setup a separate home partition. You will feel much more relaxed, regardless of whatever problems or updates you would have in the future.
Regards,
Looking back on your comments 4 months later:
Do not justify your actions by what you imagine other people want. Strive for excellence and let other people discover new possibilities for themselves — perhaps ones you never imagined.