Boot crash using systemd-boot from Debian systemd 257-2

I just upgraded one of my units from Bookworm to Trixie/Sid. This box uses systemd-boot for EFI booting. The upgraded included systemd 257-2.

After the upgrade, the box fails to boot with this output:

"Synchronous Abort" handler, esr 0x96000021
elr: 000000836630b80c lr : 0000008366307fd8 (reloc)
elr: 00000083dffd680c lr : 00000083dffd2fd8
x0 : 8000000000000003 x1 : 00000083dd677000
x2 : 000000000292ddb4 x3 : 000000000000006b
x4 : 0000000000000010 x5 : 000000000000006b
x6 : 00000000fb9c5878 x7 : 0000000000000006
x8 : 0000000000000001 x9 : 00000083dfffb088
x10: 00000083dfffb058 x11: 0000000000000003
x12: 00000083dffc7040 x13: 0000000000000003
x14: 00000000fb9c5b38 x15: 0000000000000002
x16: 00000000fbd54c0c x17: 0000000000000008
x18: 0000000000000000 x19: 00000083dd675040
x20: 000000000000006b x21: 0000000000000000
x22: 00000083dffe4000 x23: 000000000000017c
x24: 00000083dffe7000 x25: 00000000fb9c5788
x26: 000000000000292e x27: 00000083dd673040
x28: 00000083dffe7030 x29: 00000000fb9c5680

Code: f9400661 b4000241 aa0303f4 b40002a4 (f9400060) 
UEFI image [0x00000083dffcb000:0x00000083dffebfff] pc=0xb80c '/efi\boot\bootaa64.efi'
UEFI image [0x00000083d9524000:0x00000083db643fff] '/\4bbc40d5323d4fe5acdb56519a45ae0d\6.11.10-arm64\linux'
Resetting CPU ...

### ERROR ### Please RESET the board ###

Reverting bootaa64.efi to the version from systemd 252.31-1~deb12u1 restores the ability to boot.

I can try upgrading this box to the 0.9.1 ā€˜testingā€™ firmware, although thatā€™s over a year old now. As long as itā€™s possible to revert to the 0.8.10 firmwareā€¦

Wellā€¦ it is now working, and I havenā€™t made any changes to software versions. The only guess I can make is that somehow the copy of BOOTAA64.EFI that was on the ESP was corrupted, and while reinstalling the latest kernel package (same version) an uncorrupted copy was put in place.

FWIW Iā€™m seeing the same error on the older firmware (with systemd-boot 257-2), but it works completely fine on the newer one.

You can revert to the old version by flashing it back from recovery*, the main thing to be careful of is that you will need to setup your U-Boot environment and any other changes (like replacement device trees) again.

(* In fact, all you really need to do is swap the bl3/fip.bin between the two firmware versions, and clear/reset the u-boot environment)

I consider the ā€œtestingā€ firmware to be very stable, though there are some rough edges for certain use cases (like those booting OpenWrt out of the NAND flash). In fact we are putting that version on new units being shipped out to distributors.
I havenā€™t been able to keep up with U-Boot developments much in the last year, but Iā€™m planning to spend some time on this in January.

Whatever new version that comes out wonā€™t be drastically different from the current testing branch, but some features that didnā€™t reach upstream (like the device tree overlay setup) might have to be reworked.

1 Like

The DT overlay feature is one of the primary reasons Iā€™d want to switch to the new firmware :slight_smile:

Do these match what you have on a failing-to-boot system? The size of BOOTAA64.EFI increased quite a bit in the new systemd version, so Iā€™m pretty sure I am currently booting with the 257-2 versionā€¦ but itā€™s also the same size as the one which failed, which you are also seeing:

kpfleming@core23-a:~$ ls -l /efi/EFI/BOOT/BOOTAA64.efi 
-rwxr-xr-x 1 root root 127530 Dec 15 16:33 /efi/EFI/BOOT/BOOTAA64.efi
kpfleming@core23-a:~$ sha1sum /efi/EFI/BOOT/BOOTAA64.efi 
f778d1351139c7b0e1d06220baee322621cbb98f  /efi/EFI/BOOT/BOOTAA64.efi

Thatā€™s interesting, mine are different to yours:

-rwxr-xr-x 1 root root  114176 Dec 11 18:31 BOOTAA64.EFI
a2f407f2ac34eee166c6709dd6f196305a27758a  efi/EFI/BOOT/BOOTAA64.EFI

I understand the systemd-boot package will copy (in itā€™s ā€˜postinstā€™ step) the .efi file from /usr/lib/systemd/boot.
Does the copy on your EFI partition match the system copy?

-rw-r--r-- 1 root root 114176 Dec 11 18:31 /usr/lib/systemd/boot/efi/systemd-bootaa64.efi

It doesnā€™t, I was mistaken :slight_smile:

The system with the problem still has the manually-copied bootloader from systemd 255.3 (approximately); the system wonā€™t replace it until a new version of systemd-boot is installed, or until I force it to do so. Since Iā€™ve upgraded to the 0.9.1 firmware now, I can update systemd-boot in the ESP too.

Confirmed on my system; bootloader from systemd 257-2 works perfectly with the 0.9.1 firmware.

1 Like