From 2b4b7f4b1a4078fab22d1ce3bd7b4462c20a17db Mon Sep 17 00:00:00 2001 From: BodgeMaster <> Date: Wed, 21 Jun 2023 07:26:51 +0200 Subject: [PATCH] grub-config: Fix paths of default linux --- opt/grub-config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/opt/grub-config b/opt/grub-config index dc72741..a386e0c 100644 --- a/opt/grub-config +++ b/opt/grub-config @@ -11,12 +11,14 @@ if [ ! -f "$DEFAULT_LINUX" ]; then # in cases where it’s a .gz or .xz or whatever DEFAULT_LINUX=$(find /boot -type l -name "vmlinu*" 2>/dev/null | sort | head -n1) fi +DEFAULT_LINUX="$(sed 's|^/boot/||' <<< "$DEFAULT_LINUX")" DEFAULT_INITRAMFS=/boot/initramfs.img if [ ! -f "$DEFAULT_INITRAMFS" ]; then # hope to find anything named initramfs or initrd DEFAULT_INITRAMFS=$(find /boot -type l -name "init*" 2>/dev/null | sort | head -n1) fi +DEFAULT_INITRAMFS="$(sed 's|^/boot/||' <<< "$DEFAULT_INITRAMFS")" function make_menuentry { # $1 is the kernel path