Having a separate partition for /home is certainly possible but will seriously complicate things when you need to (re)install the OS. Putting /home on a separate physcial device is a better option.
Because of the way OS images are shipped and installed installing a new OS will cause the loss of everything on the target device not just the contents of the boot and root partitions but everything.
Your primary take away from this experience is backup, backup, and backup again. Then install a new OS image onto new boot media.
It's also not just /home that may need to be backed up. There are a lot of config file sin /etc and other places too.
If you want a separate /home I suggest you do the following:
Because of the way OS images are shipped and installed installing a new OS will cause the loss of everything on the target device not just the contents of the boot and root partitions but everything.
Your primary take away from this experience is backup, backup, and backup again. Then install a new OS image onto new boot media.
It's also not just /home that may need to be backed up. There are a lot of config file sin /etc and other places too.
If you want a separate /home I suggest you do the following:
- Get a USB3 flash drive
- Format it to ext4
- Temporarily mount it somewhere (e.g. on /mnt)
- Use rsync to copy everything under /home to the new drive.should do it.
Code:
sudo rsync -axrvH /home/ /mnt
- Unmount the new drive
- Add it to /etc/fstab so it is mounted on /home during boot. (you may find Using fstab A Beginner's Guide to be of use)
- reboot
Statistics: Posted by thagrol — Wed Jul 24, 2024 9:35 pm