]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
flash-image: Make sure that GRUB boots the first entry
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 6 Jun 2018 11:06:54 +0000 (12:06 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 21 Jun 2018 15:45:40 +0000 (16:45 +0100)
This is required when importing an image into AWS EC2 or
the import of the image fails.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
lfs/flash-images

index f2ac6a34a154579214fc9ac522919d9c66a78ead..79fa75ba8062771d683c8b590a56e44e9e2824b8 100644 (file)
@@ -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 \