I tried to solve a problem with ChatGPT without really understanding what I was doing. As a result, I filled up my 100MB bootloader partition, and it only has a single generation.
Running sudo nix-collect-garbage -d didn’t remove anything, so I tried to resize the bootloader partition. I did resize it, but the filesystem still showed as 100MB instead of using the whole partition (5GB). So, in a similar manner, I tried to fix the problem by formatting the partition as ext4, extending the filesystem to 5GB, and then formatting it back to FAT32. That did work, but the bootloader doesn’t bootload no more. I’m writing this from a live CD.
How do I fix this? What information should I provide?
FAT32 can’t address more than 4GB IIRC. Also it is not clear to me why you went through ext4 inbetween…
Anyway, you very likely deleted all the bootloaders in the process.
If you have done what I think you have done, the following will very likely help:
boot into the rescue disk
close the graphical installer
use gparted to ensure the designated boot is marked as “esp” or “boot” (or both)
mount all your partitions
nixos-generate-config
make sure to move the generated hardware config into the location you usually keep the config
use sudo nixos-install to install your config. if your config is not in /mnt/etc/nixos/configuration.nix you might have to take extra steps and args to tell nixos-install where to find the config