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

Advanced users • Re: partitioning nvme

$
0
0
I installed my brand new RB5 with an nvme drive and I'm really happy with that.
Now I want to partition the nvme a bit in order to have separated home partition.
What is the best approach?
  1. Boot from an SD card or USB drive (you may have to change your bootloader config to enable this).
  2. Make sure the partitions on the NVMe drive are not mounted
  3. Run gparted (you might have to install that from apt first)
  4. Select the NVMe drive
  5. Reduce the size of its second partition
  6. Create a new partition formatted to ext4 in the now empty space
  7. Apply changes
  8. Shutdown
  9. Remove SD card/USB drive
  10. Boot
  11. Copy the existing home directories:
    1. Mount the third partition of the NVMe drive on /mnt. Desktop users may have to unmount/eject it from where the automounter put it first.
    2. Code:

      sudo rsync -axrvH /home/* /mnt/
  12. Add an entry for the new partition to your /etc/fstab to mount it on /home (Hint: Using fstab A Beginner's Guide)
  13. Reboot
Next time I need to reinstall the OS will my partitioning scheme be respected?

Depends. If you follow the usual method and write a .img to the drive (or use SD card copier) your partition table will be replaced as will all references to your data.

Statistics: Posted by thagrol — Wed Mar 13, 2024 4:32 pm



Viewing all articles
Browse latest Browse all 5045

Trending Articles