"could not find any previously installed systemd-boot"

Well are of nixos-rebuild wrongly(?) thinks systemd-boot is "not installed in ESP" · Issue #93454 · NixOS/nixpkgs · GitHub. However, even after doing:

sudo bootctl install

the same problem keeps occurring, and I am simply not able to update my system. Any direction warmly appreciated.

Also, would it be possible to add a “support” section to these forums? Not quite the same thing as “Learn” in terms of the intended audience.

1 Like

Are you getting this error by chance:

Unable to write 'LoaderSystemToken' EFI variable (firmware problem?), ignoring: Invalid argument

Can you try with bootctl install --graceful ?

1 Like

You might be running into this: nixos/systemd-boot: Fix installed version regexp by jrobsonchase · Pull Request #140046 · NixOS/nixpkgs · GitHub

1 Like

@peterhoeg @olmokramer I apologize for wasting your time: the problem instantly vanished 1-2 reboots after the first occurrence. My love and admiration for NixOS have just increased.

I cannot seem to fix this and it’s positively maddening. I’ve tried sudo bootctl install as well as its --graceful option; I’ve rebooted (many times) and all. I can’t seem to update my system. :frowning:

Update: nevermind! I was having an unrelated hang on reboot but I fixed it.

Hi,

I’m having this issue too. Previously I couldn’t even upgrade using nixos-rebuild switch because it would just quit the DE during upgrade. Rebooting/Shuting down would also hang.

I tried sudo bootctl install and it partially solved the issue - rebooting/booting/shuting down no longer hangs and I’m able to log in. But I still cannot upgrade the system at all. Every time I do nixos-rebuild switch it would just give me could not find any previously installed systemd-boot and exit. Does anyone have any idea how to fix this? Thanks so much!

1 Like

Yeah I’m getting the error again.

UPDATE on my previous comment:

I tried sudo bootctl install and it partially solved the issue - rebooting/booting/shuting down no longer hangs and I’m able to log in. But I still cannot upgrade the system at all. Every time I do nixos-rebuild switch it would just give me could not find any previously installed systemd-boot and exit.

After doing sudo bootctl install then a few times of rebooting (more than 3 times), the issue went away and I was able to do nixos-rebuild switch. I’m not sure if the issue is completely gone forever or just temporarily.

2 Likes

UPDATE UPDATE:

The issue came back. I posted a separate topic here.

But basically I tried to upgrade the system using nixos-rebuild switch and during the process it just crashed/quit the window manager and showed a blackscreen and white cursor and just hang there. I forced the machine to shutdown and boot again. It successfully boot into the WM but when I tried nixos-rebuild again it showed the message

could not find any previously installed systemd-boot

Wasn’t this issue already solved? Am I missing something or doing something wrong? Please help!

Thank you!

I also face the same issue. Do anyone here solve it yet? bootctl install and rebot doesn’t solve problem quite well. Now my system is unable to upgrade or install packages.

If you are the same “hoping star” who also posted their error message into the discord, I think your problems is unrelated. Please lets either continue the problem in the discord or open a new thread here where you post the error message, the config snippet you posted there as well as the output of lsblk | grep /boot and/or your fileSystems.* that are boot related.

Sorry for bother. NobbZ replied to me in Discord 30 minutes ago and now my problem is solved. I won’t touch on this discussion anymore.

Just for anyone finding this after manually installing any firmware across systems, you have to remount /boot or you will get this error.