You are not logged in.
I just ran a full system upgrade which produced the following output in the "Running post-transaction hooks..." section:
...
(13/24) Updating systemd-boot...
Copied "/usr/lib/systemd/boot/efi/systemd-bootx64.efi" to "/boot/EFI/systemd/systemd-bootx64.efi".
Copied "/usr/lib/systemd/boot/efi/systemd-bootx64.efi" to "/boot/EFI/BOOT/BOOTX64.EFI".
error: command failed to execute correctly
...
I tried re-installing systemd with verbose output switched on, but the output was exactly the same. I ran diff against all three of the files in quesiton, and they are all apparently identical.
What could be the cause of this error?
Offline
This is your own hook, so look at what you are executing there.
Offline
Hmm you're right.
This appears to be something I added from the wiki when I switched to systemd-boot a few months ago.
I've confirmed my hook does match what the wiki says:
[Trigger]
Type = Package
Operation = Upgrade
Target = systemd
[Action]
Description = Updating systemd-boot...
When = PostTransaction
Exec = /usr/bin/bootctl update
If I run bootctl update on its own, it outputs the same two lines about copying the EFI files, and shows no error.
However, it returns an errorlevel of 1. I assume that is what is causing pacman to display the error message.
Offline
From the bootctl man page:
bootctl update updates all installed versions of systemd-boot, if the current version is newer than the version installed in the EFI system partition.
...
On success, 0 is returned, a non-zero failure code otherwise.
So perhaps if systemd-boot is not itself updated, bootctl update might be returning 1 as the current version is not newer than that installed in the boot partition?
The timestamps on all three files are March 22 which might back this idea up.
Last edited by lightstream (2018-04-10 22:59:39)
Offline
Quite likely, I assume the bootctl version number only changes for major number releases, and the stable branch updates/package releases Arch has don't change that.
Offline
https://github.com/systemd/systemd/blob … tl.c#L1089
any error from the above is converted to 1 by
https://github.com/systemd/systemd/blob … tl.c#L1178
Edit:
From the bootctl man page:
bootctl update updates all installed versions of systemd-boot, if the current version is newer than the version installed in the EFI system partition. ... On success, 0 is returned, a non-zero failure code otherwise.
So perhaps if systemd-boot is not itself updated, bootctl update might be returning 1 as the current version is not newer than that installed in the boot partition?
The code will return on the first error encountered and not attempt further operations so if it considered a version upgrade on the EFI binary an error it would not continue to install the configs or check the NVRAM for presence of an entry.
Last edited by loqs (2018-04-11 21:13:19)
Offline
The code will return on the first error encountered and not attempt further operations
As far as I can tell, install_binaries must be completing successfully (I can see the the "Copied <source> to <target>" message at the end of copy_file_with_version_check - it seems if that message is being displayed, then that part must return zero).
Which leaves install_variables() as the only candidate for the error. Strange that it's erroring somewhere but not displaying any message. No errors appear in journalctl output either.
Offline