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

45 lines
1 KiB
INI
Raw Normal View History

2020-11-13 03:43:10 +01:00
# Alpine Linux Grub config
set this_isopath="${isodev}${isopath}/alpine"
2020-11-13 03:43:10 +01:00
# abuse for to check for existence
for isofile in ${this_isopath}/alpine-standard*.iso; do
2020-11-13 03:43:10 +01:00
if [ ! -e "$isofile" ]; then break; fi
echo "Found Alpines in ${this_isopath}"
2020-11-13 03:43:10 +01:00
submenu "Alpine Linux >" "${this_isopath}" --class alpine {
this_isopath=$2
for isofile in ${this_isopath}/alpine-standard*.iso; do
2020-11-13 03:43:10 +01:00
if [ ! -e "$isofile" ]; then break; fi
regexp \
--set 1:isoname \
--set 2:variant \
--set 3:version \
--set 4:arch \
"^.*/(alpine-([^-]+)-([^-]+)-([^-]+)\.iso)\$" "${isofile}"
2020-11-13 03:43:10 +01:00
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
2020-11-13 03:43:10 +01:00
}
done
}
# kill for loop
break
done