dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

Blame SOURCES/0137-Set-the-first-boot-menu-entry-as-default-when-using-.patch

8631a2
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
8631a2
From: Javier Martinez Canillas <javierm@redhat.com>
8631a2
Date: Fri, 6 Apr 2018 14:08:36 +0200
8631a2
Subject: [PATCH] Set the first boot menu entry as default when using BLS
8631a2
 fragments
8631a2
8631a2
When BootLoaderSpec configuration files are used, the default boot menu
8631a2
entry is always set to the first entry as sorted by the blscfg command.
8631a2
8631a2
Suggested-by: Peter Jones <pjones@redhat.com>
8631a2
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
8631a2
---
8631a2
 util/grub.d/10_linux.in | 1 +
8631a2
 1 file changed, 1 insertion(+)
8631a2
8631a2
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
8631a2
index 839f1fdb655..89cd71d852d 100644
8631a2
--- a/util/grub.d/10_linux.in
8631a2
+++ b/util/grub.d/10_linux.in
8631a2
@@ -144,6 +144,7 @@ if [ -s \$prefix/grubenv ]; then
8631a2
 fi
8631a2
 EOF
8631a2
 
8631a2
+    ${grub_editenv} - set saved_entry=0
8631a2
     ${grub_editenv} - set kernelopts="root=${linux_root_device_thisversion} ro ${args}"
8631a2
 
8631a2
     exit 0