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