From 119b192b3ea3ab2b71e9bd86cbc2dcf900ab5b52 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Thu, 17 Dec 2020 14:59:32 +0100 Subject: grub: Fix backwards compatibility with OSTree Before NFVA 2.3.0, OSTree only checked for the existence of /boot/grub2/grub.cfg, skipping creating grub.cfg if that file was not present. In NFVA 2.3.0, only /boot/grub/grub.cfg is created, leading to issues when trying to downgrade to an older NFVA release. To maintain backwards compatibility with OSTree versions that only check the old path, create both /boot/{grub,grub2} as symlinks to the loader directory managed by OSTree. Signed-off-by: Alexandru Avadanii Change-Id: Ic2c89930794e4c9d3ee3b2468d1331e5d7f63834 --- classes/override_image_types_ota.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/classes/override_image_types_ota.inc b/classes/override_image_types_ota.inc index ded70dd..da920c1 100644 --- a/classes/override_image_types_ota.inc +++ b/classes/override_image_types_ota.inc @@ -34,6 +34,7 @@ IMAGE_CMD_otaimg () { if [ "${OSTREE_BOOTLOADER}" = "grub" ]; then ln -s loader ${PHYS_SYSROOT}/boot/grub + ln -s loader ${PHYS_SYSROOT}/boot/grub2 touch ${PHYS_SYSROOT}/boot/grub/grub.cfg elif [ "${OSTREE_BOOTLOADER}" = "u-boot" ]; then touch ${PHYS_SYSROOT}/boot/loader/uEnv.txt -- cgit v1.2.3-54-g00ecf