Why I don’t recommend it

Every now and again someone sends an e-mail or leaves a comment about retaining a home directory on reinstallation. To be honest, I invariably advise against it.

There’s a distinction to be made up front though: If you’re reinstalling the same distribution (or perhaps an update, like the next Ubuntu release), I see no harm in it. I think it’s probably common for most seasoned Linux users to dedicate a separate partition to their home files, and rely on that between upgrades.

On the other hand, if you’re switching distros, I say thumbs-down.

I’m in panic mode today, transferring about 8GB of music, 2 or 3GB of ISOs and easily 30 or 40GB of DVD backups across my house network, because I am, occasionally, too willing to be a guinea pig.

I was running Crux on my Thinkpad until last night, when I decided I would prefer to jump to Arch with it. The reasons are immaterial right now (it’s that darn floor noise error on that wireless card, if you must know), and to be honest, I wish I had thought it through a little better before I did it.

Installation went very well (the latest Arch ISO has some considerable improvements, but a new, small set of inconveniences … as is always the case), and rather than transfer that huge gob of files off beforehand, I just retained the home directory and installed Arch into the standing partition arrangement.

Which was fine until reboot, when Arch claimed the superblock for the home directory was reporting an incalculably large size. I managed to get the system on its feet by setting the “pass” digit to zero for that drive in /etc/fstab. I even checked the drive manually, from a live environment with e2fsck, and got no errors.

But unfortunately now, when I try to access some of those files, I get kernel errors spewing into the console space, claiming inode blocks are unreadable, etc., etc. It’s a bad feeling.

Mostly because I had ample opportunity beforehand to move all those files off the drive, and because I knew well enough to do so, but didn’t, and so now I’m kicking myself, and half of it has disappeared or is inaccessible now, and all of this could have been avoided with minimal effort. … :evil:

Oh well. It’s just stuff. The music is redownloadable from Jamendo, and I can rebuild the DVD rips, if it’s really necessary. I don’t watch most of those movies all that often anyway.

But that’s my story, and I’m sticking to it. My advice is that you can keep a home directory if it’s the same distro, or an upgrade. But if you’re going to jump between distributions, at least back the stuff up first. I know, technically it should be fine. But for me, it wasn’t. :(

About these ads

8 thoughts on “Why I don’t recommend it

  1. JakeT

    It’s always a permissions thing that kills me–on the new distro, my new UID is never the same, so it can’t write to my home dir and barfs when I try to login.

    So I rename my home dir to name-old just before I start the install, then copy everything over. It gives me a chance to sort through and only get the stuff I need.

    I’m still looking for a more elegant way to do it, though.

    Reply
  2. Richard

    You sould always back upp your home directory. But instead of reusing it, you sould simply copy over the config files needed as you install programs. And change the owner/user etc.

    It does’nt take that long to get all the files you need, but it results in a mush cleaner /~

    Reply
  3. Ridgeland

    This is for my home PC, not some corporate server.

    My approach has long been a /Data partition of 100+ GB for music, photos, downloads etc. And 10 GB for /UserHome. Distros are installed to partitions of 10 GB (I have twenty on my two hard drives). /home only has settings, not data and I don’t upgrade distros just do fresh installs with a new /home. There are just a few settings ~/.something that I keep the old one. Firefox is kept in /UserHome/.mozilla/myfirefox.default Once a new distro is installed on a partition, if it uses Firefox 3 I just ln -s /UserHome/Firefox/.mozilla ~/.mozilla. I do that before even trying Firefox for the first time. Then all bookmarks etc are shared between many distros. A new bookmark I make in Mandriva shows up the next time I boot to Ubuntu. I do the same for Thunderbird, just bookmarks for gftp, and just a few other settings like .bashrc

    I started with Fedora Core 4 and my user ID is 500. With Mandriva I just set the first user as 500 in install. With Ubuntu I use an initial userID (like almostroot) then as soon as it boots $ sudo gedit /etc/login.defs to change min user ID to 500, reboot and create my usual ID with user 500. Ubuntu’s default min user is 1000 which is a problem.

    I find it hard to believe users would put data in /home. To me /home is OS user preferences and nothing more. Things like mp3s, jpegs etc are totally OS independent and should be on a different partition.

    Reply
  4. Pingback: A visit with Arch « Motho ke motho ka botho

  5. Daniel Moerner

    I always follow a simple system: When I install the new system, I don’t add the other partition as /home in the installer. Next, I boot up the new system in single-user mode, and:

    mv /media/old-home/.* /media/old-home/configs

    Then I cp -a /home/$USER/.* /media/old-home. Then I rm -rf /home/* and mount the old-home on /home. Then I perform a hand merge between the configs directory and the new dot-files, and add the partition to fstab. This avoids problems with the installer and inconsistent dotfiles.

    Reply
  6. thealphanerd

    What I would do is create a server and copy it there, using it as the universal home directory, or as a backup mechanism.

    Reply
  7. steve

    I never *ever* put important data on a partition that gets mounted at boot, that’s just asking for trouble when you wanna distro hop. For my money it’s always best to have a few boot partitions available for distro hopping and the vast bulk of data stored on a separate partition that has to be manually mounted. I lost a truckload of data thanks to not observing this rule during Ubuntu upgrades. But then Ubuntu is another steaming pile I’d rather not talk about.

    cheers & beers
    Steve

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s