2

Following a default minimal installation of 18.04, I now want to move my /home directory to an EXT4 formatted USB flash drive.

By default in 18.04 the /home directory is mounted as part of the / partition.

Is there a clean and safe way to move/reconfigure my /home directory to the USB flash drive, or would it be cleaner/safer to reinstall Ubuntu and configure the /home directory on USB during the install process? Or, is having your /home folder on a separate USB drive ill-advised?

I've looked at many similar questions/answers, but can't find a contemporary clean and clear solution.

4
  • 3
    Don't. Just don't. Just use the normal tools to move your --directories-- to the USB. See ~./config/users-dirs.dirs. Leave home on a fixed disk. If the USB ever errors out and does not mount you are screwed: and need to fix the problem outside your installation :P
    – Rinzwind
    Commented Aug 3, 2018 at 12:53
  • @Rizwind I appreciate your candor, tx Commented Aug 3, 2018 at 12:56
  • By the way, there is no directory named Home in a regular Linux installation. You may be thinking of /home.
    – AlexP
    Commented Aug 3, 2018 at 13:20
  • mkusb now has an easy to use option for backing up home directories on a persistent flash drive. I generally use grsync, (GUI rsync), for copying home directory. After you can edit /etc/fstab to add the UUID of the new home partition. The guide timanix shows is good. See also askubuntu.com/questions/991189/… Commented Aug 3, 2018 at 16:46

1 Answer 1

1

Copy home to Portable USB drive

Format flash drive to ext4.

As root use Grsync to copy home/{username} from internal drive to the flash drive. Preserving owner, permissions and group works for me.

enter image description here

Copy or write down UUID of the new partition.

Edit /etc/fstab on the internal drive to add the /home UUID:

UUID={UUID from above} /home   ext4    defaults        0       0

It might be a good idea to use an encrypted home when traveling.

Thanks to ubfan1 for hint

10
  • 2
    You can delete the answer for now, and undelete it when ready.
    – wjandrea
    Commented Aug 3, 2018 at 17:28
  • In the past I have spent days making an answer just to have the thread closed before I could post it. I prefer to reserve a spot if I see :"possible duplicate" in the comments. Commented Aug 3, 2018 at 17:48
  • 2
    @C.S.Cameron For the future, if this is not a full complete answer, then you should not post it as an answer just to "reserve a spot". That's not how the system works.
    – Thomas Ward
    Commented Aug 3, 2018 at 20:37
  • 2
    Thanks @ Thomas Ward: Is there a way to post, delete and resurrect an answer? If I spend the time researching and writing and testing an answer I would like to know that I can publish it. Commented Aug 3, 2018 at 21:02
  • @C.S.Cameron That would be a good question for Ask Ubuntu Meta, I think.
    – wjandrea
    Commented Aug 4, 2018 at 16:07

Not the answer you're looking for? Browse other questions tagged .