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+f2
to new TTY. Log in as root (having set root password to allow this). Mount encryped volume at/home/me
- Back at TTY7, log in as me and work from correctly mounted home
- Log out to login screen,
ctrl+alt+f2
back to terminal, log in as root and unmount/home/me
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?
shutdown -h now
) should unmount it correctly. – Melebius Feb 14 '17 at 12:41service lightdm stop
does allow theumount
. Overall process still messy. – Sqerstet Feb 14 '17 at 13:01/etc/fstab
? My worry is that this will prompt for the passphrase straight after booting, as my hardware has an issue where the keyboard is not available early in the boot process. – Sqerstet Feb 14 '17 at 13:15