From 1f2a90b5521eec74569c8d6f1a9902fc0aa44bbf Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 6 Jun 2018 12:06:54 +0100 Subject: [PATCH] flash-image: Make sure that GRUB boots the first entry This is required when importing an image into AWS EC2 or the import of the image fails. Signed-off-by: Michael Tremer --- lfs/flash-images | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lfs/flash-images b/lfs/flash-images index f2ac6a34a1..79fa75ba80 100644 --- a/lfs/flash-images +++ b/lfs/flash-images @@ -163,6 +163,9 @@ ifeq "$(BOOTLOADER)" "grub" mkdir -pv $(MNThdd)/boot/grub chroot $(MNThdd) grub-mkconfig -o /boot/grub/grub.cfg + # Boot the first kernel by default + chroot $(MNThdd) grub-set-default 0 + # Insert the UUID because grub-mkconfig often fails to # detect that correctly sed -i $(MNThdd)/boot/grub/grub.cfg \ -- 2.39.2