Skip to content

Latest commit

 

History

History
16 lines (13 loc) · 976 Bytes

MOVING.md

File metadata and controls

16 lines (13 loc) · 976 Bytes

Moving to a new disk

  1. Prepare the new disk according to the Partitioning Information up to the point just before mounting the swap/disks
  2. Update the hardware configuration (e.g. nixos-config/machines/my-machine/hardware-scan.nix and maybe nixos-config/machines/my-machine/system.nix) to point to the new partitions
  3. Mount the new boot partition in-place: sudo mount $NEWBOOT /boot
  4. Install the new configuration, including bootloader: sudo nixos-rebuild boot --install-bootloader --flake .#my-machine
  5. Reboot into an installation disk
  6. Mount the old root parition at /mnt/old
  7. Mount the new root parition at /mnt/new
  8. Copy everything over, preserving creation times with -N for syncthing:
rsync -aAXvN --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} /mnt/old/ /mnt/new
  1. Reboot into the new drive and enjoy =)