Ubuntu – Using existing home directory from a bootable external drive

external-hddhome-directoryusb

My wife's old computer is an Atom Mini ITX motherboard stuffed into a Chinese cooky tin. She runs Ubuntu from a USB3 external drive, (plugged into the USB2 ports).

When we travel, she plugs the bootable external drive into whatever computer is available and she is happy.

For her birthday I bought her a new Gigabyte Brix with plenty of USB3 ports and an i7 processor.

I want to do a setup that uses the Brix SSD for "/" and continues to use the home directory on the bootable external drive.

I do not want to have to sync home folders before and after traveling, just unplug the external drive and go, with everything already up to date.

What is the safest way to make such a setup?

Best Answer

  • Since the home directory on the external disk has it's own partition, that partition may be mounted at the /home/usernme on the SSD's system. Get the UUID of the filesystem on the home partition:

    sudo blkid
    

    and use that in a line appended to /etc/fstab

    UUID=<whatever blkid output for it> /home/<username>   ext4    defaults        0       0
    

    Replace ext4 in the above with whatever was used (ext3?, ext2?) for the actual filesystem.

    On a 10 year old traveling disk, backups should be frequent. Monitor the smartctl -a output for the disk to see if problems are occurring (like the G-sense error rate). An SSD in the enclosure would avoid the mechanical problems, but I've had problems develop after 9 mo. on an encrypted section of an SSD (and you do encrypt the traveling disk, don't you?). Anyway, SSD over USB cannot do TRIM, so you'd need an esata port also and on your home system.