Nixos-install fails

I’m trying to install nixos on a computer that used to have it. I have to reinstall it because one of my drives failed, so I sent it to the manufacturer for repair. Now that I have the repaired drive, I’m trying to install nixos without success. I’m having issues at the nixos-install stage. Specifically, bootctl fails with the error “Failed to test system token validity: No data available”.

For instance, if I run nixos-enter then bootctl —path /boot install I see this error. Has anyone seen this before on a new install, or have an idea of what it means. I didn’t have much luck with a google search. Is it possible there’s still an issue with my drive? I didn’t have issues while partitioning or making the filesystem. Let me know if you need more info. Thanks!

install ubuntu or arch as a test, see if that works. If it does it’s not your drive.

UEFI boot? What is this machine?

Maybe secure boot is enabled sometimes disabling any kind of secure boot can get you up and going.

Installing Ubuntu worked fine, so I guess the drive isn’t the issue. Thanks for that suggestion.

It’s a system76 Oryx Pro 4. And I am using UEFI. Was that your question?

I admittedly don’t know much about this, but if the issue were secure boot, wouldn’t that have shown up when I installed nixos the last time?

Seems to be mentioned here.

https://github.com/NixOS/nixpkgs/issues/97426

and upstream in systemd.

https://github.com/systemd/systemd/issues/17041
https://github.com/systemd/systemd/pull/17048

I think your bootloader UEFI firmware has been upgraded, or they have given you a different motherboard/machine, that now exhibits this ‘bug’.

What version of nixos are you running?

It seems nixos systemd https://github.com/NixOS/nixpkgs/blob/9a284fc0c21beb11cbb8763cb927df31719b8ceb/pkgs/os-specific/linux/systemd/default.nix is built from this repo. GitHub - systemd/systemd-stable: Backports of patches from systemd git to stable distributions

A matter of waiting for this fix to be patch in systemd-stable, and for nixos to bump the systemd version and rebuild.

or create a patch file for in the meantime.

Thanks for pointing those out. That does look like the issue.

I only sent my SSD in. The motherboard was untouched and I actually haven’t updated the firmware in over a year (before I experienced this issue).

I’ve tried this with the live CD image for 20.03 stable and a few-week-old unstable.

Yeah looks like waiting might be the way to go. Fortunately, this isn’t my main computer so it’s not too urgent.

Sorry I haven’t noticed this before. My solution was to temporarily switch to grub2. I forgot to mention it in the original issue. Even in my case this was not caused by change in firmware. I think there was some change in bootctl that caused this to be an error.