Fix migration from Barebox GRUB (#1767)
* Fix migration from Barebox GRUB Create GRUB env which defaults to the boot slot we are updating to. This makes sure that the newly installed OS version will be booted on next reboot even if installed on boot slot B.
This commit is contained in:
@@ -54,6 +54,12 @@ if [ "${RAUC_SLOT_CLASS}" = "boot" ]; then
|
||||
# Update
|
||||
cp -rf "${BOOT_NEW}"/* "${BOOT_MNT}/"
|
||||
|
||||
# If grubenv is missing, initialize with boot order which will try the right
|
||||
# boot slot
|
||||
if [ -d "${BOOT_NEW}"/EFI/BOOT/ ] && [ ! -f "${BOOT_NEW}"/EFI/BOOT/grubenv ]; then
|
||||
cp -f "${BOOT_NEW}/EFI/BOOT/grubenv-${RAUC_SLOT_BOOTNAME}" "${BOOT_NEW}"/EFI/BOOT/grubenv
|
||||
fi
|
||||
|
||||
# Restore boot config
|
||||
cp -f "${BOOT_TMP}"/*.txt "${BOOT_MNT}/"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user