Summarizing…
1
Log out of the Plasma GUI completely, and when you see the login screen reappear, press Ctrl+Alt+F2. You will now see a character-mode login prompt. Log in as the root user.
If you did not set a separate password for the root account during installation, you may need an extra step, because it is imperative that you are not logged into any other account than the root account.
So if you set the same password for root as for your regular account at installation time, then you need to first re-enable the root account. You do this by logging in at the character mode console as yourself and then issuing…
sudo -i
Then you must set the root user’s password ─ make sure that it is a different one to the one you use for your regular user account.
passwd
You will be asked to type the password again for confirmation. When it is done, issue the following command…
systemctl isolate rescue.target
The system will now switch over to single-user maintenance mode. You will be prompted for the root password. At this point, you no longer have a network connection and no GUI, so make sure you can read this post from another device, or print it out.
2
Now we are going to create the new subvolume and migrate your data.
cd /
mv /home /home2
btrfs-subvolume create @home
cp -RPpv /home2/* /home/
Verify that everything has been copied over. The copying process is verbose, so you should already be able to see it during the copying, but still, it doesn’t hurt to check twice.
If everything has been copied over, then you must edit /etc/fstab
and add an entry for the new subvolume.
nano /etc/fstab
This entry will largely be the same as for the root filesystem ─ including the UUID
─ but instead of the mountpoint being /
, it must be /home
, and instead of the subvol=/@
mount option, you must now specify subvol=/@home
. Also make sure, if you include subvolid=
that you use the correct one, because that will be different from the one for the root subvolume.
Exit the editor with Ctrl+O followed by Enter and then Ctrl+X.
Now you can delete the contents of the /home2
directory.
rm -rf /home2 && sync && systemctl reboot