Manually partitioned graphical installation of NixOS doesn't boot: "EFI system partition configured incorrectly"

Hello :slight_smile:,
I hope I may receive advice on what I should try doing differently to manage installing NixOS the way I intend to, or ideas where I might have gone wrong.
Thank you so much in advance for all help!

I am trying to install NixOS using the graphical installation method from the Plasma Desktop, 64-bit Intel/AMD iso. (The checksum of which, I have compared to the one on the website).
This is being done onto real hardware: an UEFI laptop with 2 drives (a SSD and a HDD).

My intent is to have everything – except for the EFI partition – be full-block LUKS encrypted.
I am setting up disk partitions using the “manual partitioning” method in the NixOS Installer, as following.
Sda (SDD):

Sdb (HDD):

  • Sdb1 (/home)
  • Sdb2 (linuxswap)

Immediately after finishing partitioning and pressing the button Next, I’m running into a setback.
I’m presented with the message dialogue:

EFI system partition configured incorrectly

An EFI system partition is necessary to start NixOS.

To configure an EFI system partition, go back and select or create a suitable filesystem. The filesystem must have type FAT32. The filesystem must have flag boot set.

You can continue without setting up an EFI system partition but your system may fail to start.

This is despite picking the fat32 filesystem and assigning the flag boot to the partition that I gave the mount point of /efi.
I have tried repeating the partitioning and the entire installation process several times. Including after rebooting. Each time being faced with the above warning dialogue, and upon installing, a system that does not boot and instead immediately enters the UEFI settings.

In the UEFI setting secure boot is off and boot order has the storage drive set as first on the list.
Thank you again for taking the time to read this.

The systemd-boot wants the efi partition to be mounted to /boot.
This is how an efi partition itself should look like (look at the Type)

% sudo fdisk /dev/sda

Welcome to fdisk (util-linux 2.39.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Command (m for help): p

Disk /dev/sda: 120 GiB, 128849018880 bytes, 251658240 sectors
Disk model: BlockVolume
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 1048576 bytes
Disklabel type: gpt
Disk identifier: 26F8B72D-1D98-DA4E-969E-3673CE4222AA

Device       Start       End   Sectors   Size Type
/dev/sda1     2048   1050623   1048576   512M EFI System
/dev/sda2  1050624 251658206 250607583 119.5G Linux filesystem

Command (m for help):
1 Like

Yea, you just want /boot, you don’t want a separate /efi. You can do that sort of thing with systemd-boot, but then /boot is called the XBOOTLDR partition and it still has to be something the firmware can read since systemd-boot just uses the UEFI’s file system drivers. But NixOS doesn’t support this right now, so you’re stuck only having the ESP and no XBOOTLDR, meaning you should just have /boot formatted with vfat and marked as an ESP. It should be large enough to store all the kernels/initrds used by all the NixOS generations you intend to keep around. 512M is usually sufficient but I’d recommend 1G

1 Like

Thank you very very much for the help and replying so quickly!
Making the EFI & the partition with kernels one and the same, then mounting it to /boot made the system boot flawlessly!

Only thing I’d like to avoid is the new warning that came up, stating that the kernels would not be encrypted at rest… but I think I understand that doing so would have the downside of a more complex setup.

Thank you so so very much for carefully explaining this to me!
Making the EFI & the partition with kernels one and the same, then mounting it to /boot made the system boot flawlessly. :partying_face:

Thank you as well for taking the time to share the link to that pull request.
You seem very knowledgeable on this!