Quote:
Originally Posted by joe_2000
The overall procedure is still wrong though as it lacks the mounting of the new home partition prior to rsyncing...
|
Sorry for the brevity of this comment, I was posting from the mobile and did not since then get the chance to elaborate a bit further.
So as tolino_surfer suggested, your procedure in its current state would only move data around and not achieve what you desire.
The part he got wrong (and I failed to mention in my earlier post) was the reason, which isn't the renaming of the mount point I suggested but the fact that you never actually mount the new partition.
At this point I think this discussion probably caused more confusion than clarity, so let me try to suggest a revised procedure.
It may be worth noting that when operating from within a live system, entries in the target system's fstab will not affect the running session. In other words, you have to manually mount the new partition after mounting the root file system.
For the mount operations I find it less ambiguous to do it on the command line, as we don't know where the partitions show up when mounting with "the file viewer".
For the below steps I will assume that your current operating system partition is /dev/sdx1 and your new drive (that should be the new home partition) is /dev/sdy1. You will have to replace these device names with your real device names. (See bold text below)
So...
1. Make backups using Timeshift and the native LM Backup Tool
2. Reboot from a USB stick
3. Open a root shell, or open a shell and run
4. Create mount point for root partition of the os
5. Mount the root partition.
Change the device name!
Code:
mount /dev/sdx1 /mnt/mint
You should now see the contents of the root partition under /mnt/mint. Verify this before proceeding
6. Backup the old /home as follows:
Code:
mv /mnt/mint/home /mnt/mint/old_home
7. Rename your mount point for the new home:
Code:
mv /mnt/mint/newhome /mnt/mint/home
8. Edit the /mnt/mint/etc/fstab line changing "/newhome" to "/home" as follows:
Code:
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx /home ext4 defaults 0 2
9. Mount the new home partition.
Change the device name!
Code:
mount /dev/sdy1 /mnt/mint/home
10. Copy data using the following:
Code:
rsync -aXSHv /mnt/mint/old_home /mnt/mint/home/
11. Verify that /mnt/mint/old_home and /mnt/mint/home have the same file permissions.
Reboot with fingers crossed. :-)
I should add one last disclaimer: I have never personally used ecryptfs for a home partition. But others in this thread have stated that this does not affect the procedure.
It might be worth checking that the actual data lives somewhere below /home. It's probably a hidden directory named .private or so but that's just an assumption.