[sf-lug] /home on separate partition (was Sunday meeting)

Akkana Peck akkana at shallowsky.com
Mon Mar 5 19:02:09 PST 2018


jim writes:
>     the explanation as to why is in the
> paragreaph: to be able to mount the
> device to the /home/ directory of
> whichever Linux is booted. That way
> users can boot any Linux and expect
> their files to be as they expect.
>     Note this requires that the users'
> UID is the same for all Linux systems.

I've done this for years, and recommend it (with caveats).
Here's a longer explanation:

When I get a new disk, I make one /boot partition, several small
(say, 15-20G) partitions, a swap partition (or not), and the rest
of the disk is /home. Then I can reboot into alternate distros and
still have all my files available.

Caveats:

0. The UID issue Jim already mentioned. Since distro installers
usually want to create a user, I let them create a test user, then
once the system is up and running I create my own user by hand with
my correct UID and home directory.

1. If you're using grub2, you have to disable auto-updating of
anything in /boot on all but one distro. Grub2 doesn't tolerate
other versions of grub2 writing to the same /boot and you'll
eventually end up with 100 lines in your boot menu and maybe
a system that doesn't boot at all. There are several options:

- Have one distro be the "master" that owns /boot, and on the
  others, either disable grub2 updates, or just don't mount your
  /boot partition and let them think that /boot on their own root
  partition is the real /boot. You'll have to update kernels by hand,
  though.

- Have no distro be the master, and update your grub2 files in /boot
  by hand (they're actually perfectly readable and editable).

- Use a more civilized bootloader that can coexist with other
  distros, like extlinux or grub1 or ?? Depending on your distro
  you may still have to update the kernel in your boot menu by hand.
  For instance, after typing that, I checked and discovered that
  I'm running 3.16.0-4-amd64 but my system is up to 4.14.0-3-amd64.
  Oops! I guess I should check that more often. I wish Debian made
  a link pointing to the latest kernel like some distros.

2. When you boot into another distro, some applications will be at a
different version, and that can cause config file problems. For
instance, if you run Firefox, or Gnome, or KDE, when you reboot into
a different distro, Firefox will want to rewrite a bunch of config
files to reflect the current version. So every time you reboot
you'll be shifting back and forth between versions and probably
eventually your config files will probably get messed up. 

You can solve this with symlinks: for instance, make a /localhome
(lives on the root partition, not /home) and have .mozilla, .gnome
etc. be symlinks to /localhome/yourname/.mozilla etc. But with
gnome it gets complicated because they don't keep everything in
one directory: you'll probably have to make a bunch of symlinks
and it isn't always easy to figure out which directories need it.
(That's one of many reasons I switched to using simple window
managers with config files you can edit and control.)
With browsers it's easier, or you can just use different profiles.

So it might not be a good option for someone who likes full-featured
desktops and doesn't understand things like symlinks, but it works
great if you don't mind taking a more hands-on approach.

Now excuse me while I reboot into a newer kernel. :-)

        ...Akkana



More information about the sf-lug mailing list