Repository navigation
Unable to successfully run nixos-install with xbootldrMountPoint option #296059
Description
Describe the bug
nixos-install fails when using the boot.loader.systemd-boot.xbootldrMountPoint parameter.
Steps To Reproduce
Steps to reproduce the behaviour:
- Create a custom ISO with
nixpkgs-unstable - Partition disk to use
a. a512GB8300partitionext4formatted mounted at/
b. a4GBEF02partitionfat32formatted mounted at/boot
c. a512MBEF00partitionfat32formatted mounted at/boot/efi - Modify
configuration.nixto add theboot.loader.efi.efiSysMountPoint = "/boot/efi";andboot.loader.systemd-boot.xbootldrMountPoint = "/boot";lines - Use
nixos-install
Expected behaviour
2 things here.
- I expected the nixos installer to raise an error and quit after the
bootctl installcommand failed. It raised an error and still continued with the installation. But that is not the reason I'm here. - I'm unable to understand this
Partition has wrong PART_ENTRY_TYPE=c12a7328-f81f-11d2-ba4b-00a0c93ec93b for XBOOTLDR partitionerror. Alsoc12a7328-f81f-11d2-ba4b-00a0c93ec93bdoes 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
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
sdht0 commentedon Mar 15, 2024
The
/bootpartition should beea00instead.codingCoffee commentedon Mar 15, 2024
Facing a new error
/dev/nvme0n1p2is mounted on/boot/dev/nvme0n1p1is mounted on/boot/efisdht0 commentedon Mar 15, 2024
'--esp-path=/boot', '--boot-path=/boot/efi': looks like your definitions got switched somehow.Btw it is recommended to mount the EFI partition at
/efiinstead of/boot/efi.codingCoffee commentedon Mar 15, 2024
Ahhh! My bad!