grubby/boot/isos.cfg.d/alpine.cfg

44 lines
1 KiB
INI

# Alpine Linux Grub config
set this_isopath="${isodev}${isopath}/alpine"
# abuse for to check for existence
for isofile in ${this_isopath}/alpine-standard*.iso; do
if [ ! -e "$isofile" ]; then break; fi
echo "Found Alpines in ${this_isopath}"
submenu "Alpine Linux >" "${this_isopath}" --class alpine {
this_isopath=$2
for isofile in ${this_isopath}/alpine-standard*.iso; do
if [ ! -e "$isofile" ]; then break; fi
regexp \
--set 1:isoname \
--set 2:variant \
--set 3:version \
--set 4:arch \
"^.*/(alpine-([^-]+)-([^-]+)-([^-]+)\.iso)\$" "${isofile}"
menuentry "Alpine Linux ${variant} ${version} ${arch}" "${isofile}" "${isoname}" --class alpine {
set isofile=$2
set isoname=$3
regexp \
--set 1:isodev \
--set 2:isofile \
"^(\(.*\))?(.*)\$" "${isofile}"
echo "Using ${isoname}..."
loopback loop "${isodev}${isofile}"
linux (loop)/boot/grsec initrd=/boot/grsec.gz iso-scan/filename=${isofile} alpine_dev=usbdisk:exfat modules=loop,cramfs,sd-mod,usb-storage
initrd (loop)/boot/grsec.gz
}
done
}
# kill for loop
break
done