From 33d8b538adc8c55a63805fecdd86715cd68012f6 Mon Sep 17 00:00:00 2001 From: Cyprien Laplace Date: Thu, 4 Jul 2024 04:14:47 -0400 Subject: [PATCH] Fix rauc hook to save and restore the grub environment (#3451) Without a machine-id, the next boot will be considered as a first boot, and any external data disk will be disabled. Fixes #3247. --- buildroot-external/ota/rauc-hook | 2 ++ 1 file changed, 2 insertions(+) diff --git a/buildroot-external/ota/rauc-hook b/buildroot-external/ota/rauc-hook index 0b97191ba..757933f83 100755 --- a/buildroot-external/ota/rauc-hook +++ b/buildroot-external/ota/rauc-hook @@ -34,11 +34,13 @@ install_boot() { else # Backup boot config cp -f "${BOOT_MNT}"/*.txt "${BOOT_TMP}/" || true + cp -f "${BOOT_MNT}"/EFI/BOOT/grubenv "${BOOT_TMP}/" || true cp -rf "${BOOT_NEW}"/* "${BOOT_MNT}/" # Restore boot config cp -f "${BOOT_TMP}"/*.txt "${BOOT_MNT}/" || true + cp -f "${BOOT_TMP}"/grubenv "${BOOT_MNT}"/EFI/BOOT/ || true fi }