Skip to content

Unable to successfully run nixos-install with xbootldrMountPoint option #296059

Description

@codingCoffee

Describe the bug

nixos-install fails when using the boot.loader.systemd-boot.xbootldrMountPoint parameter.

Steps To Reproduce

Steps to reproduce the behaviour:

  1. Create a custom ISO with nixpkgs-unstable
  2. Partition disk to use
    a. a 512GB 8300 partition ext4 formatted mounted at /
    b. a 4GB EF02 partition fat32 formatted mounted at /boot
    c. a 512MB EF00 partition fat32 formatted mounted at /boot/efi
  3. Modify configuration.nix to add the boot.loader.efi.efiSysMountPoint = "/boot/efi"; and boot.loader.systemd-boot.xbootldrMountPoint = "/boot"; lines
  4. Use nixos-install

Expected behaviour

2 things here.

  1. I expected the nixos installer to raise an error and quit after the bootctl install command failed. It raised an error and still continued with the installation. But that is not the reason I'm here.
  2. I'm unable to understand this Partition has wrong PART_ENTRY_TYPE=c12a7328-f81f-11d2-ba4b-00a0c93ec93b for XBOOTLDR partition error. Also c12a7328-f81f-11d2-ba4b-00a0c93ec93b does not match the UUID of any of my partitions.

Screenshots

[nixos@nixos:/mnt]$ sudo nix-install
installing the boot loader...
setting up /etc...
Initializing machine ID from random generator.
/dev/nvme0n1p2: Partition has wrong PART_ENTRY_TYPE=c12a7328-f81f-11d2-ba4b-00a0c93ec93b for XBOOTLDR partition.
Traceback (most recent call last):
  File "/nix/store/712p6sw61vw33f5dcqrf7ryv9gmg5lkg-systemd-boot/bin/systemd-boot-builder", line 394, in <module>
    main()
  File "/nix/store/712p6sw61vw33f5dcqrf7ryv9gmg5lkg-systemd-boot/bin/systemd-boot-builder", line 377, in main
    install_bootloader(args)
  File "/nix/store/712p6sw61vw33f5dcqrf7ryv9gmg5lkg-systemd-boot/bin/systemd-boot-builder", line 292, in install_bootloader
    subprocess.check_call([f"{SYSTEMD}/bin/bootctl", f"--esp-path={EFI_SYS_MOUNT_POINT}"] + bootctl_flags + ["install"])
  File "/nix/store/3v2ch16fkl50i85n05h5ckss8pxx6836-python3-3.11.8/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/nix/store/klc3y2c97sc22wsv1cjwf4dfwcws095l-systemd-255.2/bin/bootctl', '--esp-path=/boot/efi', '--boot-path=/boot', 'install']' returned non-zero exit status 1.
setting up /etc...
setting up /etc...
setting root password...
New password:
Retype new password:
passwd: password updated successfully
installation finished!

Additional context

Referencing this PR #285401, since that is the feature I'm trying to use.

I would've preferred to use ext4 for the /boot partition, and I did, but that too had failed, only to later realize systemd-boot in and of itself still doesn't have an ext4/btrfs/non-fat driver. (Ref)
I'm unsure if my partitioning scheme is incorrect, or if I need to add any additional configuration. Please do ask for any other information to help debug the issue.

Also, just a sidenote, I'm not using ext4 for /. I'm using BTRFS on LUKS. I mentioned ext4 for simplicity. But I don't think it should be relevant in this case. Please do ask for more information if needed.

Notify maintainers

@sdht0

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[nixos@nixos:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.21, NixOS, 24.05 (Uakari), 24.05.20240312.0ad13a6`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - channels(root): `"nixos-24.05.20240312.0ad13a6"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs`

Add a 👍 reaction to issues you find important.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions