Closed axgfn closed 3 years ago
Thanks! I also added it to the wiki.
Maybe we need to fix upstream to resize partitions by label instead of just resizing the second partition.
I am trying to fix the image resizing here. Maybe you can test the code: https://github.com/NixOS/nixpkgs/pull/105732
I'd be happy to test it, but it may be a few days before I can get around to it.
I can at least confirm that after running the following commands on my rockpro64, $partNum
's value is 3:
rootPart=$(findmnt -n -o SOURCE /)
bootDevice=$(lsblk -npo PKNAME $rootPart)
partNum=$(lsblk -npo MAJ:MIN $rootPart | awk -F: '{print $2}')
So it should work fine, assuming it still yields 2 on the raspberry pi 3 and other devices. Let me know if you also need me to test an sd-image.
I can at least confirm that after running the following commands on my rockpro64,
$partNum
's value is 3:rootPart=$(findmnt -n -o SOURCE /) bootDevice=$(lsblk -npo PKNAME $rootPart) partNum=$(lsblk -npo MAJ:MIN $rootPart | awk -F: '{print $2}')
So it should work fine, assuming it still yields 2 on the raspberry pi 3 and other devices. Let me know if you also need me to test an sd-image.
This is also how I tested it ;) But I can also run those command on a raspberry pi.
it does work:
joerg@matchbox> rootPart=$(findmnt -n -o SOURCE /) ~
joerg@matchbox> bootDevice=$(lsblk -npo PKNAME $rootPart) ~
joerg@matchbox> partNum=$(lsblk -npo MAJ:MIN $rootPart | awk -F: '{print $2}') ~
joerg@matchbox> echo $partNum ~
2
Now I only need to wait for https://github.com/NixOS/nixpkgs/commit/1d957fd0233fd3a9b3fffccdefc28b1192941556 to hit a nixos channel to update the used image here.
Just wanted to leave some feedback that I got this working on my RockPro64. I did update the aarch64-image to https://hydra.nixos.org/job/nixos/release-20.09/nixos.sd_image_new_kernel.aarch64-linux/latest first, using the "new kernel" variant because it supports the hardware better. (I also had to manually resize the root partition, because the boot scripts that try to do it for you expect it to be on the 2nd partition, not the 3rd.)
Thanks for the work you put into this, you saved me a lot of time getting NixOS up and running on this thing! Hopefully upstream NixOS will have better install options for ARM devices some day soon.