2020-11-13 03:43:10 +01:00
|
|
|
# Fedora Grub Config
|
|
|
|
|
2020-11-20 12:00:32 +01:00
|
|
|
set isopath_fedora="${isopath}/fedora"
|
2020-11-13 03:43:10 +01:00
|
|
|
export isopath_fedora
|
|
|
|
|
|
|
|
# abuse for to check for existence
|
|
|
|
for isofile in ${isopath_fedora}/Fedora-*.iso; do
|
|
|
|
if [ ! -e "$isofile" ]; then break; fi
|
|
|
|
|
|
|
|
submenu "Fedora >" --class fedora {
|
|
|
|
|
|
|
|
for isofile in ${isopath_fedora}/Fedora-*.iso; do
|
|
|
|
if [ ! -e "$isofile" ]; then break; fi
|
|
|
|
|
|
|
|
regexp \
|
|
|
|
--set 1:isoname \
|
|
|
|
--set 2:variant \
|
|
|
|
--set 3:arch \
|
|
|
|
--set 4:version \
|
|
|
|
"^${isopath_fedora}/(Fedora-([^-]+)-Live-([^-]+)-([^-]+)-[^-]+\.iso)\$" "${isofile}"
|
|
|
|
|
|
|
|
menuentry "Fedora ${version} ${arch} ${variant}" "${isofile}" "${isoname}" --class fedora {
|
|
|
|
set isofile=$2
|
|
|
|
set isoname=$3
|
|
|
|
echo "Using ${isoname}..."
|
|
|
|
loopback loop $isofile
|
|
|
|
probe --set isolabel --label (loop)
|
2020-11-20 12:00:32 +01:00
|
|
|
linux (loop)/isolinux/vmlinuz root=live:CDLABEL=${isolabel} rd.live.image iso-scan/filename=${isofile} rhgb ro
|
2020-11-13 03:43:10 +01:00
|
|
|
initrd (loop)/isolinux/initrd.img
|
|
|
|
}
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
# kill for loop
|
|
|
|
break
|
|
|
|
done
|