grubby/boot/isos.cfg.d/debian.cfg

73 lines
1.7 KiB
INI
Raw Normal View History

2020-11-13 03:43:10 +01:00
# Debian GNU/Linux Grub config
# from GLIM
set this_isopath="${isodev}${isopath}/debian"
2020-11-13 03:43:10 +01:00
# abuse for to check for existence
for isofile in ${this_isopath}/debian-*-netinst.iso ${this_isopath}/debian-live-*.iso; do
2020-11-13 03:43:10 +01:00
if [ ! -e "$isofile" ]; then break; fi
echo "Found Debians in ${isopath}"
submenu "Debian GNU/Linux >" "${this_isopath}" --class debian {
this_isopath=$2
2020-11-13 03:43:10 +01:00
# NetInstall
for isofile in ${this_isopath}/debian-*-netinst.iso; do
2020-11-13 03:43:10 +01:00
if [ ! -e "$isofile" ]; then break; fi
regexp \
--set 1:isoname \
--set 2:version \
--set 3:arch \
--set 4:variant \
"^.*/(debian-([^-]+)-([^-]+)-([^-]+)\.iso)\$" "${isofile}"
2020-11-13 03:43:10 +01:00
menuentry "Debian NetInstall ${version} ${arch}" "${isofile}" "${isoname}" --class debian {
set isofile=$2
set isoname=$3
regexp \
--set 1:isodev \
--set 2:isofile \
"^(\(.*\))?(.*)\$" "${isofile}"
2020-11-13 03:43:10 +01:00
echo "Using ${isoname}..."
loopback loop "${isodev}${isofile}"
2020-11-13 03:43:10 +01:00
linux (loop)/live/vmlinuz-* findiso=${isofile}
initrd (loop)/live/initrd.img-*
}
done
# Live CD
for isofile in ${this_isopath}/debian-live-*.iso; do
2020-11-13 03:43:10 +01:00
if [ ! -e "$isofile" ]; then break; fi
regexp \
--set 1:isoname \
--set 2:version \
--set 3:arch \
--set 4:variant \
"^.*/(debian-live-([^-]+)-([^-]+)-([^-]+)\.iso)\$" "${isofile}"
2020-11-13 03:43:10 +01:00
menuentry "Debian Live ${version} ${arch} ${variant}" "${isofile}" "${isoname}" --class debian {
set isofile=$2
set isoname=$3
regexp \
--set 1:isodev \
--set 2:isofile \
"^(\(.*\))?(.*)\$" "${isofile}"
2020-11-13 03:43:10 +01:00
echo "Using ${isoname}..."
loopback loop "${isodev}${isofile}"
2020-11-13 03:43:10 +01:00
linux (loop)/live/vmlinuz-* boot=live findiso=${isofile} components
initrd (loop)/live/initrd.img-*
}
done
}
# kill for loop
break
done