I'm trying to do something which seems obvious but nobody else seems to be doing. I want to keep my home directory on an encrypted USB drive, to be plugged and unplugged "on top of" a vanilla home directory on a vanilla Ubuntu installation.
It does work, sort of. My current workflow:
- At login screen, do
ctrl+alt+f2to new TTY. Log in as root (having set root password to allow this). Mount encryped volume at
- Back at TTY7, log in as me and work from correctly mounted home
- Log out to login screen,
ctrl+alt+f2back to terminal, log in as root and unmount
But at step 3, on trying to unmount my home directory I get
Device busy, and doing an
lsof reveals hundreds of processes using it. It seems this is because Ubuntu does not log you out when you "Log out" to the login screen. So instead I am just shutting down directly, not unmounting first. Seems not very clean.
NB: I have a hardware issue which makes my machine unusable if I modify the
grub config to boot to a shell prompt. And anyway, that is supposedly not the Ubuntu way.
But there has to be a better way to do this. An idea?