This guide offers detailed instructions for migrating your home directory into its own dedicated partition. Setting up /home on a separate partition is beneficial because your settings, files, and desktop will be maintained if you upgrade, (re)install Ubuntu or another distro. This works because /home has a subdirectory for each user’s settings and files which contain all the data & settings of that user. Telling Ubuntu to use an existing home partition can be done by selecting “Manual Partitioning” during the installation of Ubuntu and specifying that you want your home partitions mount point to be /home, ensure you mark your /home partition not be formatted in the process. You should also make sure the usernames you enter for accounts during installation match usernames that existed in a previous installation.
This guide will follow these 8 basic steps:
- Set-up your new partition
- Find the uuid (=address) of the new partition
- Backup and edit your fstab to mount the new partition as /media/home (just for the time being) and reboot.
- Use rsync to migrate all data from /home into /media/home
- Check copying worked!
- Move /home to /old_home to avoid confusion later!
- Edit fstab again so the new partition mounts as /home instead of as /media/home
- Reboot or remount all. Check system seems to be working well
- Delete the /old_home after a while
The guide is written in such a way so that at any point in time if there is a system failure, power outage or random restart that it will not have a negative impact on the system and SHOULD safeguard against the possibility of the user accidentally deleting their home directory in the process.