Hello, everyone!
I’m really new to Linux and Majaro, so I’ve been having a few issues with setting up my OS. I’ve partitioned my SSD for dualbooting previously, but I’ve formatted the Windows portion and converted it to an ext4 format. Since that partition is much larger than the one I’m currently using (900 gb vs 200gb) I wanted to migrate /home to it. I’d appreciate a bit of step by step instruction since I’m worried about messing up and losing my files (although I did back most of them up beforehand).
I’ve been using Aragorn’s tutorial, although I have a few questions about the process since I’m not used to modifying my system via terminal.
The first step is to go to terminal and use the lsblk command to check my hard drives. The disk I want to use is called sda and nvme0n1 contains the /home.
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 4K 1 loop /var/lib/snapd/snap/bare/5
loop1 7:1 0 164.8M 1 loop /var/lib/snapd/snap/gnome-3-28-1804/161
loop2 7:2 0 82.9M 1 loop /var/lib/snapd/snap/discord/130
loop3 7:3 0 65.2M 1 loop /var/lib/snapd/snap/gtk-common-themes/1519
loop4 7:4 0 249.6M 1 loop /var/lib/snapd/snap/brave/133
loop5 7:5 0 55.4M 1 loop /var/lib/snapd/snap/core18/2128
loop6 7:6 0 251.3M 1 loop /var/lib/snapd/snap/brave/134
loop7 7:7 0 32.4M 1 loop /var/lib/snapd/snap/snapd/13270
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 529M 0 part
├─sda2 8:2 0 99M 0 part
├─sda3 8:3 0 16M 0 part
└─sda4 8:4 0 930.9G 0 part /run/media/symberzite/c8f38c00-5edd-4e61-864f-0bcc385d3211
nvme0n1 259:0 0 238.5G 0 disk
└─nvme0n1p1 259:1 0 238.5G 0 part /
From here I can tell that the UUID of the target hard drive is c8f38c00-5edd-4e61-864f-0bcc385d3211. Obviously I wrote it down on a piece of paper. Afterwards I enter the mode that cancels all process beyond the root shell and some other basic programs via the following command:
sudo systemctl isolate rescue.target
I’m a bit confused here because I wonder if I’ll still be able to look at the tutorial in this mode? Will I be able to copy-paste text in the last stage or should I write down all of the code from this point by hand? Anyway, then I type my administrator password and continue. The next stage is to mount the drive.
mount -t ext4 -o sync /dev/sda4/mnt
This part says to take the mount -t ext4 -o sync /dev/sdb1 /mnt
command and replace /dev/sdb1 / with the actual name of the hard drive. I presume it will be /dev/sda4/ although I’d appreciate if someone would correct me on that.
After that I just use the mv /home/* /mnt/ && sync
command to just move all of my files to the other partition. If all is done correctly, that’s the moment when I go and brew some coffee since the process may take a few minutes depending on my hard drive.
After that’s done I start to add stitches by going to the fstab file through the command
nano /etc/fstab
Here I have a few questions. First, to quote the tutorial.
If you already had
/home
on a separate partition before this move, then comment out the entry for that partition by putting a#
in front of the line.
Is my current /home drive on a separate partition? If so, how do I check. Does my former dualboot system count as being on a separate partition? I don’t want to accidentally comment out the wrong line of code.
Then I go to the bottom of the file and just paste the following:
UUID=c8f38c00-5edd-4e61-864f-0bcc385d3211 /home ext4 auto,nouser,defaults,nodev,relatime 0 0
The UUID being of the target drive from earlier. Afterwards I press Ctrl+O, then Ctrl+X to save then exit. After that’s done I go back to the terminal and systemctl reboot
to restart my computer. If all is done correctly, the /home should be placed in a different partition, all files intact.
Apologies if I’m repeating the obvious, I’m just trying to idiot-proof myself. Some clarification would be appreciated. Also, if someone wants to tell the the specific commands I need to type to pull this off, that would be appreciated. Thanks in advance.