From e2a235f206fcb77d6dff1f8f8d1bdb9b2bf3d988 Mon Sep 17 00:00:00 2001 From: Nikolas Garofil Date: Mon, 13 Apr 2026 10:31:25 +0200 Subject: [PATCH 1/2] Support for Debian Netinst --- grub2/inc-debian.cfg | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/grub2/inc-debian.cfg b/grub2/inc-debian.cfg index a9066829..8051e51b 100644 --- a/grub2/inc-debian.cfg +++ b/grub2/inc-debian.cfg @@ -1,5 +1,6 @@ # Debian GNU/Linux -function add_menu { +# Live ISOs - The regular method +function add_live_menu { isofile="$1" regexp \ @@ -18,7 +19,28 @@ function add_menu { } } -for_each_sorted add_menu "$isopath"/debian/debian-live-*.iso +# Netinst ISOs - Lots of options, so chain its own grub.cfg +function add_netinst_menu { + isofile="$1" + + regexp \ + --set 1:isoname \ + --set 2:version \ + --set 3:arch \ + "^${isopath}/debian/(debian-([^-]+)-([^-]+)-netinst\.iso)\$" "${isofile}" + menuentry "Debian Netinst ${version} ${arch}" "${isofile}" "${isoname}" --class debian { + set isofile=$2 + set isoname=$3 + use "${isoname}" + loop $isofile + change_root (loop) + configfile /boot/grub/grub.cfg + restore_root + } +} + +for_each_sorted add_live_menu "$isopath"/debian/debian-live-*.iso +for_each_sorted add_netinst_menu "$isopath"/debian/debian-*-netinst.iso # Special mini.iso installer - Lots of options, so chain its own grub.cfg if [ -e "$isopath/debian/mini.iso" ]; then From 9646a104b6a2bfe6cae4faf875c5e5d3bb9c8b66 Mon Sep 17 00:00:00 2001 From: Nikolas Garofil Date: Mon, 13 Apr 2026 18:18:57 +0200 Subject: [PATCH 2/2] Make sure to also find Netinst when no other Debian iso's are present --- grub2/grub.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub2/grub.cfg b/grub2/grub.cfg index c8908b40..6247d38a 100644 --- a/grub2/grub.cfg +++ b/grub2/grub.cfg @@ -187,7 +187,7 @@ if any_exists ${isopath}/clonezilla/clonezilla-live-*.iso; then } fi -if any_exists ${isopath}/debian/debian-live-*.iso ${isopath}/debian/mini.iso; then +if any_exists ${isopath}/debian/debian-live-*.iso ${isopath}/debian/debian-*-netinst.iso ${isopath}/debian/mini.iso; then menuentry "Debian >" --class debian { configfile "${prefix}/inc-debian.cfg" }