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

58 lines
1.4 KiB
INI

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