Go from a separate /home
partition in the HDD to the default configuration where /home
is a folder in /
, which is in the SSD
We will do this from a Live USB running Ubuntu 18.04 so that we can work with the /home
partition and mount it as /internal_home
.
Step 1: Boot from a Live USB Ubuntu
Select the Try Ubuntu without Installing option as we want to run Ubuntu from the USB, not the internal SSD.
Step 2: Find the uuid of the /home
and /
Partitions
Open a terminal by pressing Ctrl+Alt+T and enter:
sudo blkid > myUUIDs.txt
Keep the terminal open and go to Files (also known as Nautilus) and find the file myUUIDs.txt
and open it by double clicking so that you can easily copy and paste the UUIDs of your internal drives' /home
and /
partitions. You will need them later.
Step 3: Mount the /home
and /
Partitions
As this is just temporary, it does not matter what the mount points are. You can use Nautilus to click and mount them. However, the autogenerated mountpoints are hard to type. So we will use command line to create 2 mountpoints and mount the two partitions there.
First, make some temporary folders as mount points
sudo mkdir /internal_root
sudo mkdir /internal_home
Second, mount the two internal partitions
I assume:
1234-UUID-OF-SYSTEM-PARTITION
is your internal /
(root) partition
and
1234-UUID-OF-HOME-PARTITION
is your current home partition.
Copy and paste the correct UUIDs into the terminal from Step 2 above before using.
sudo mount --uuid 1234-UUID-OF-SYSTEM-PARTITION /internal_root
sudo mount --uuid 1234-UUID-OF-HOME-PARTITION /internal_home
Step 4: Copy the home folder from its own partition to SSD under /
Use the following command to copy everything in the old /home
partition to the new /home
folder. Note, you don't need to create the folder as it was created as a mountpoint for the partition.
sudo rsync -aXS --exclude='/*/.gvfs' /internal_home/. /internal_root/home/.
Step 5: Create a new mountpoint for the old home
We need a new pountpoint for the old home so that we can use it to store data I will call it oldhome
. Use the following command:
sudo mkdir //internal_root/oldhome
Note: I don't recommend mounting the old home under /media
. This folder is usually reserved for the system to autmetically mount partitions temporarily.
An alternate would be to create the oldhome
folder under the existing /mnt
folder with the command:
sudo mkdir //internal_root/mnt/oldhome
Step 6: Edit /etc/fstab
to mount the oldhome
automatically when Ubuntu starts
Use the following command to open /etc/fstab
in gedit with administrative privilages.
sudo -H gedit /internal_root/etc/fstab
Look for the line like line with the UUID of your home partition. See Step 2 for the UUID. Change it to look like this:
UUID=1234-UUID-OF-HOME-PARTITION /oldhome ext4 defaults 0 2
where 1234-UUID-OF-HOME-PARTITION
is the UUID number of the old /home
partition as found on Step 2. Note, in this file we don't include the /internal_root/
prefix as when we created the oldhome
folder.
Save the file and exit gedit
.
Step 7: Restart the computer and boot to the internal SSD
If all goes well your /home
is not in the default location in the SSD.
To access the /oldhome
partition with Nautilus you will need to go to Other Locations on the left margin and click on the Computer icon and navigate to oldhome
.
Hope this helps
/
and/home
or/home
itself ? – Liso Jun 03 '19 at 02:15/home
immediately as that's already a mounted partition. Once you've moved your home area, you can mount the HD as/mnt/storage
and follow the previous guide again, substituting/home
as the final destination. – SHawarden Jun 03 '19 at 02:37