Skip to content

Commit

Permalink
feat(flexbox): migrate to new 4TB drive =)
Browse files Browse the repository at this point in the history
  • Loading branch information
workflow committed Jan 16, 2024
1 parent 953a671 commit ae69718
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,13 @@ services.xserver = {
1. Mount the new boot partition in-place: `sudo mount $NEWBOOT /boot`
1. Install the new configuration, including bootloader: `sudo nixos-rebuild boot --install-bootloader --flake .#my-machine`
1. Reboot into an installation disk
1. Mount the old root parition at `/mnt/olddrive`
1. Mount the new root parition at `/mnt/newdrive`
1. Copy everything over:
1. Mount the old root parition at `/mnt/old`
1. Mount the new root parition at `/mnt/new`
1. Copy everything over, preserving creation times with `-N` for syncthing:
```bash
rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} /mnt/olddrive/ /mnt/newdrive
rsync -aAXvN --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} /mnt/old/ /mnt/new
```
1. Reboot into the new drive and enjoy =)


## Useful notes
Expand Down
6 changes: 3 additions & 3 deletions machines/flexbox/hardware-scan.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@

fileSystems."/" =
{
device = "/dev/disk/by-uuid/feff7366-5589-4ea2-9b2e-40f714642892";
device = "/dev/disk/by-uuid/e5687086-9188-42e8-aa57-423df9cbb863";
fsType = "ext4";
};

fileSystems."/boot" =
{
device = "/dev/disk/by-uuid/A874-9F10";
device = "/dev/disk/by-uuid/8483-92D7";
fsType = "vfat";
};

swapDevices =
[{ device = "/dev/disk/by-uuid/58d90289-edea-4ffe-a89c-baad70b15f6b"; }];
[{ device = "/dev/disk/by-uuid/0fb837c4-ba4e-437d-a54c-ff25312af20c"; }];

powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
}
2 changes: 1 addition & 1 deletion machines/flexbox/system.nix
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ in
# LVM on LUKS
boot.initrd.luks.devices = {
root = {
device = "/dev/nvme0n1p4";
device = "/dev/nvme1n1p2";
preLVM = true;
};
};
Expand Down

0 comments on commit ae69718

Please sign in to comment.