You are not logged in.

#1 2018-04-10 20:45:28

lightstream
Member
From: Britain
Registered: 2011-10-30
Posts: 64

System upgrade post-transaction hooks: systemd-boot errors on EFI copy

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

#2 2018-04-10 21:08:44

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,427

Re: System upgrade post-transaction hooks: systemd-boot errors on EFI copy

This is your own hook, so look at what you are executing there.

Offline

#3 2018-04-10 22:45:44

lightstream
Member
From: Britain
Registered: 2011-10-30
Posts: 64

Re: System upgrade post-transaction hooks: systemd-boot errors on EFI copy

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

#4 2018-04-10 22:57:53

lightstream
Member
From: Britain
Registered: 2011-10-30
Posts: 64

Re: System upgrade post-transaction hooks: systemd-boot errors on EFI copy

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

#5 2018-04-11 00:57:23

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,427

Re: System upgrade post-transaction hooks: systemd-boot errors on EFI copy

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

#6 2018-04-11 01:00:49

loqs
Member
Registered: 2014-03-06
Posts: 17,196

Re: System upgrade post-transaction hooks: systemd-boot errors on EFI copy

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:

lightstream wrote:

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

#7 2018-04-12 11:28:05

lightstream
Member
From: Britain
Registered: 2011-10-30
Posts: 64

Re: System upgrade post-transaction hooks: systemd-boot errors on EFI copy

loqs wrote:

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

Board footer

Powered by FluxBB