Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lightsail: /boot partition will not be mounted correctly #217

Open
LostAttractor opened this issue Sep 16, 2024 · 1 comment
Open

lightsail: /boot partition will not be mounted correctly #217

LostAttractor opened this issue Sep 16, 2024 · 1 comment

Comments

@LostAttractor
Copy link

LostAttractor commented Sep 16, 2024

In amazon-image.nix, ESP Partition mount to /boot via a file system label 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

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.

@LostAttractor
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant