Backup! Backup!! Backup!!!
Backup all your important files and folders. It seems you already have backups but this needs repeating for anyone who may be reading this answer later.
Find the UUID
UUIDs are Universally Unique IDentifiers. You need to find the UUD for the old /home
partition. Open a terminal and enter:
sudo blkid
You will see a bunch of output among it you will find a line like:
/dev/sda2: UUID="26810f5a-83c7-4184-8bba-dafc9684fe73" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="bb712651-dcf5-4ca4-aac1-cd225fec9b7f"
Note the first part /dev/sda2
. This should match the /home
partition in the HDD. Copy the part that looks like UUID="26810f5a-83c7-4184-8bba-dafc9684fe73"
and save it in a file. The actual numbers and letters of the UUID for you will be different. Do not copy the UUID from this answer.
Edit the /etc/fstab
Make a backup copy
Before editing the /etc/fstab
make a backup copy:
sudo cp /etc/fstab /etc/fstab.original
Now if things go wrong you should be able to get back to the original fstab
.
Edit the file
Open the file /etc/fstab
in a text editor of your choice. You will need the sudo
prefix or Edit as an Administrator option in the context menu. For example, you can use the nano
editor:
sudo nano /etc/fstab
At the end of the file add a couple of lines like:
# /home was on /dev/sda2 during past installation
UUID=26810f5a-83c7-4184-8bba-dafc9684fe73 /home ext4 defaults 0 2
The first line is a comment to remind you what the next line is for. Do not copy 26810f5a-83c7-4184-8bba-dafc9684fe73
. Replace it with the UUID you have found and saved earlier.
Use Ctrl+O to save the changes followed by Ctrl+X to exit nano
.
Restart your computer
If you have used the same username
in your new installation as you did in your old installation, and if all went well, you should have your old /home
back.
Hope this helps