From 5dec35648aa3923a0d657c6d1fee1a34984d1f64 Mon Sep 17 00:00:00 2001 From: Denis 'GNUtoo' Carikli Date: Mon, 21 Aug 2023 18:02:06 +0200 Subject: [PATCH] GRUB: config from HDD/SSD: try grub.cfg after *_grub.cfg The "Load Operating System (incl. fully encrypted disks) [o]" GRUB entry tries to load grub configuration files from the hard disk or SSD partitions. It tries various files in /boot, /grub, /grub2, /boot/grub, /boot/grub2. Before it tried 'grub.cfg' before other more specific files, and if users created a file like that, they more likely want it to override the distribution's grub.cfg, especially because by default, some GNU/Linux distributions handle the creation of /boot/grub/grub.cfg automatically. Signed-off-by: Denis 'GNUtoo' Carikli --- resources/grub/config/grub.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/grub/config/grub.cfg b/resources/grub/config/grub.cfg index 4f5177b..a849c66 100644 --- a/resources/grub/config/grub.cfg +++ b/resources/grub/config/grub.cfg @@ -34,7 +34,7 @@ keymap usqwerty function try_user_config { set root="${1}" for dir in boot grub grub2 boot/grub boot/grub2; do - for name in '' gnuboot_ osboot_ autoboot_ coreboot_; do + for name in gnuboot_ osboot_ autoboot_ coreboot_ '' ; do if [ -f /"${dir}"/"${name}"grub.cfg ]; then unset superusers configfile /"${dir}"/"${name}"grub.cfg