Open LostAttractor opened 1 month ago
In amazon-image.nix, ESP Partition mount to /boot via a file system label ESP.
amazon-image.nix
/boot
ESP
fileSystems."/boot" = mkIf (cfg.efi || cfg.zfs.enable) { # The ZFS image uses a partition labeled ESP whether or not we're # booting with EFI. device = "/dev/disk/by-label/ESP"; fsType = "vfat"; };
https://github.com/NixOS/nixpkgs/blob/nixos-24.05/nixos/modules/virtualisation/amazon-image.nix#L41
But it seems nixos-infect doesn't try to set the label. So grub-install will fail during nixos-switch I think it's simple to fix by using dosfslabel
grub-install
nixos-switch
dosfslabel
However, the EFI partition will indeed be mounted to /efi by some reason. I did not find any clear definition or reason. This is not expected.
/efi
Looks like I made a mistake, EC2 only uses EFI on arm instances. So there is no problem, but the ESP partition does exist. Maybe it would be better to set the label.
In
amazon-image.nix
, ESP Partition mount to/boot
via a file system labelESP
.https://github.com/NixOS/nixpkgs/blob/nixos-24.05/nixos/modules/virtualisation/amazon-image.nix#L41
But it seems nixos-infect doesn't try to set the label. So
grub-install
will fail duringnixos-switch
I think it's simple to fix by usingdosfslabel
However, the EFI partition will indeed be mounted to
/efi
by some reason. I did not find any clear definition or reason. This is not expected.