Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 2438

Raspberry Pi OS • Re: not having a dedicated /home ptation is driving me "Strange"

$
0
0
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:
  1. Get a USB3 flash drive
  2. Format it to ext4
  3. Temporarily mount it somewhere (e.g. on /mnt)
  4. Use rsync to copy everything under /home to the new drive.

    Code:

    sudo rsync -axrvH /home/ /mnt
    should do it.
  5. Unmount the new drive
  6. 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)
  7. reboot
Next time you need to reinstall the OS just update the new fstab and reboot.

Statistics: Posted by thagrol — Wed Jul 24, 2024 9:35 pm



Viewing all articles
Browse latest Browse all 2438

Trending Articles