systemd-boot-builder only ignores OSError "invalid argument"#206445
Merged
nlewo merged 1 commit intoNixOS:masterfrom Apr 16, 2023
Merged
systemd-boot-builder only ignores OSError "invalid argument"#206445nlewo merged 1 commit intoNixOS:masterfrom
nlewo merged 1 commit intoNixOS:masterfrom
Conversation
10 tasks
Member
|
Could the test be even automated in |
Member
Author
|
I hit this issue again and i have now been able to test this PR. Before the boot entries are not created and the script succeeds: With this patch, it fails with:
@RaitoBezarius I'm not able to find time to work on testing this part :( However, i think this patch improves the current situation where the |
Member
|
Agreed, I'm in favor of merging it as-is. |
RaitoBezarius
approved these changes
Apr 3, 2023
nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py
Outdated
Show resolved
Hide resolved
In order to fix NixOS#114552 (profile name with special characters), all OSError have been ignored while only the OSError with errno 22 (invalid argument) could has been ignored. The drawback of ignoring all OSError is that the "No space left on device" error is also ignored. When the /boot doesn't have enough available disk space, the switch-to-configuration script succeeds while the boot menu has not been updated: the user thinks it's system has been updated, but on the next reboot it is actually rollbacked.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In order to fix
#114552 (profile name with special characters), all OSError have been ignored while only the OSError with errno 22 (invalid argument) could has been ignored.
The drawback of ignoring all OSError is that the "No space left on device" error is also ignored. When the /boot doesn't have enough available disk space, the switch-to-configuration script succeeds while the boot menu has not been updated: the user thinks it's system has been updated, but on the next reboot it is actually rollbacked.
Description of changes
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)nixos/doc/manual/md-to-db.shto update generated release notes