Skip to content

Commit

Permalink
balena-rollback/rollback-health: Allow old OS hooks to access efivars
Browse files Browse the repository at this point in the history
This fixes rollback-health failures for boards like the Jetson Seeeed
J4012, which updates efivars for capsule updates from container hooks
and not from the current OS hooks.

While the actual HUP works because of /sys being bindmounted by
hostapp-update, rollbacks will fail to run the old OS hooks unless
efivarfs is mounted.

Change-type: patch
Signed-off-by: Alexandru Costache <alexandru@balena.io>
  • Loading branch information
acostach committed Feb 2, 2024
1 parent 282df4b commit df9d998
Showing 1 changed file with 5 additions and 0 deletions.
Expand Up @@ -42,6 +42,11 @@ run_hooks_from_inactive () {
mount --bind /mnt/sysroot/inactive/ "${old_rootfs}/mnt/sysroot/inactive/"
mount -t sysfs sysfs "${old_rootfs}/sys/"

# Allow old OS hooks to access efivars
if [ -d /sys/firmware/efi/efivars ]; then
mount -t efivarfs efivarfs "${old_rootfs}/sys/firmware/efi/efivars" || true
fi

# In case of secure boot the boot and EFI partitions are split apart
# The EFI partition must be bind-mounted as well to be able to deploy
# files under /mnt/boot/EFI
Expand Down

0 comments on commit df9d998

Please sign in to comment.