-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A single bad generation prevents systemd-boot-builder.py from building later generations #93694
Comments
In my case, this was the exact issue:
|
Yeah, some exception handling might need to be integrated in there. |
I marked this as stale due to inactivity. → More info |
still important to me |
I marked this as stale due to inactivity. → More info |
Still valid: #144811 (comment) |
I also had this issue. Workaround I used: To list generations: To delete old generations: Note: When using the live CD installer remember to update path with prefix of where your (not the live CD) system root partition was mounted. In my case, I had to add |
Just had to help another person get around this issue. It's a really ugly newbie trap. |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/need-help-on-failure-of-building-my-configuration/16842/26 |
The removed lines converted the flake path passed by the command line from `/some/path` to `git+file:///some/path`. This technically shouldn't cause any issues, however running `nixos-rebuild switch` inside a directory `/nix/store` will cause the switch to fail and leave a partially construct generation (see issue #144811 for details). By itself this shouldn't be too much of an issue, however thanks to another issue in `systemd-boot-builder.py` this can leave the system in a broken state for those using `boot.loader.systemd-boot` (AFAIK the default), where future `nixos-rebuild switch` will fail (see issue #93694 for details). The issue can be fixed by running `nix-env -p /nix/var/nix/profiles/system --delete-generations old`, however this makes newbies very confused and it is showing in our support threads in Matrix and Discourse (see https://discourse.nixos.org/t/need-help-on-failure-of-building-my-configuration/16842). Keep in mind this is a workaround. The actual issue seems to be in nix itself (see: NixOS/nix#5510). See also #150065 for an alternative fix that caused other issues. Kudos for @figsoda for figuring out this fix. (cherry picked from commit c274d04)
Describe the bug
If you have a "bad generation" for certain reason, it can break your ability to fix by switching to a new generation.
To Reproduce
Steps to reproduce the behavior:
switch-to-configuration switch
on a system build that is meant for an aarch64.Expected behavior
It works. And
systemd-boot-builder.py
skips any generations that are bad.Additional context
The problem basically came down to
initrd-append-secrets
failing as bad of the 'bad generation' assystemd-boot-builder.py
iterates over all system generations to build the boot entries.I would suggest that maybe
systemd-boot-builder.py
should emit warnings but ultimatelycontinue
on failures such as failing to runinitrd-append-secrets
.The text was updated successfully, but these errors were encountered: