Skip to content

Commit

Permalink
fix: Make sure mender_grub_storage_device is exported to next script.
Browse files Browse the repository at this point in the history
In grub.d mode (when integrated into the `/etc/grub.d` framework), the
variable `mender_grub_storage_device` is set in the `grub.cfg` from
the boot partition but is also used in the config from the root
partition. Since it is never set there, the boot can fail.

Reported-by: @chgabriel79 on Github,
https://github.com/mendersoftware/grub-mender-grubenv/issues/33

Changelog: Fix boot failure because `mender_grub_storage_device` is
not exported correctly.

Ticket: None

Signed-off-by: Kristian Amlie <kristian.amlie@northern.tech>
  • Loading branch information
kacf committed Feb 27, 2023
1 parent eeb7ebd commit 67caddc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions grub.d/00_05_mender_setup_env_grub
Expand Up @@ -6,5 +6,6 @@ if [ "$GRUB_MENDER_GRUBENV_CFG_GENERATION" != "true" ]; then
mender_check_and_restore_env
mender_load_env_with_rollback
regexp (.*),(.*) $root -s mender_grub_storage_device
export mender_grub_storage_device
EOF
fi

0 comments on commit 67caddc

Please sign in to comment.