2020-11-13 03:22:54 +01:00
|
|
|
# This is the ArchLinux Grub config
|
|
|
|
# from GLIM
|
|
|
|
|
2023-04-07 19:45:36 +02:00
|
|
|
set this_isopath="${isodev}${isopath}/archlinux"
|
2020-11-13 03:22:54 +01:00
|
|
|
|
|
|
|
# abuse for to check for existence
|
2023-04-07 19:45:36 +02:00
|
|
|
for isofile in ${this_isopath}/archlinux*.iso ${this_isopath}/ipxe*; do
|
2020-11-13 03:22:54 +01:00
|
|
|
if [ ! -e "$isofile" ]; then break; fi
|
|
|
|
|
2023-04-07 19:45:36 +02:00
|
|
|
echo "Found Arches in ${this_isopath}"
|
|
|
|
|
|
|
|
submenu "ArchLinux >" "${this_isopath}" --class arch {
|
|
|
|
this_isopath=$2
|
2020-11-13 03:22:54 +01:00
|
|
|
|
2023-04-07 22:06:47 +02:00
|
|
|
# find the uuid for this isopath
|
|
|
|
regexp \
|
|
|
|
--set 1:isodev \
|
|
|
|
"^(\(.*\)).*\$" "${this_isopath}"
|
|
|
|
|
|
|
|
probe -u ${isodev} --set this_uuid
|
|
|
|
|
|
|
|
|
2020-11-13 03:22:54 +01:00
|
|
|
menuentry "ArchLinux BIOS netboot" --class arch {
|
|
|
|
echo "Booting ArchLinux BIOS netboot"
|
2023-04-07 19:45:36 +02:00
|
|
|
linux16 ${this_isopath}/ipxe.419cd003a298.lkrn
|
2020-11-13 03:22:54 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if [ ${grub_platform} == "efi" ]; then
|
|
|
|
menuentry "ArchLinux EFI netboot" --class arch {
|
|
|
|
echo "Booting ArchLinux EFI netboot"
|
2023-04-07 19:45:36 +02:00
|
|
|
chainloader ${this_isopath}/ipxe.176077d7fccb.efi
|
2020-11-13 03:22:54 +01:00
|
|
|
}
|
|
|
|
fi
|
|
|
|
|
|
|
|
menuentry "" { true }
|
|
|
|
|
2023-04-07 19:45:36 +02:00
|
|
|
for isofile in ${this_isopath}/archlinux-*.iso; do
|
2020-11-13 03:22:54 +01:00
|
|
|
if [ ! -e "$isofile" ]; then break; fi
|
|
|
|
|
|
|
|
regexp \
|
|
|
|
--set 1:isoname \
|
|
|
|
--set 2:version \
|
|
|
|
--set 3:arch \
|
2023-04-07 19:45:36 +02:00
|
|
|
"^.*/(archlinux-([^-]+)-([^-]+)\.iso)\$" "${isofile}"
|
2020-11-13 03:22:54 +01:00
|
|
|
|
|
|
|
menuentry "Arch Linux ${version} ${arch}" "${isofile}" "${isoname}" --class arch {
|
|
|
|
set isofile=$2
|
|
|
|
set isoname=$3
|
2023-04-07 19:45:36 +02:00
|
|
|
|
|
|
|
regexp \
|
|
|
|
--set 1:isodev \
|
|
|
|
--set 2:isofile \
|
|
|
|
"^(\(.*\))?(.*)\$" "${isofile}"
|
|
|
|
|
2020-11-13 03:22:54 +01:00
|
|
|
echo "Using ${isoname}..."
|
2023-04-07 19:45:36 +02:00
|
|
|
loopback loop "${isodev}${isofile}"
|
2023-04-07 22:06:47 +02:00
|
|
|
linux (loop)/arch/boot/x86_64/vmlinuz-linux img_dev=/dev/disk/by-uuid/${this_uuid} img_loop=${isofile}
|
2020-11-13 03:22:54 +01:00
|
|
|
initrd (loop)/arch/boot/intel-ucode.img (loop)/arch/boot/amd-ucode.img (loop)/arch/boot/x86_64/initramfs-linux.img
|
|
|
|
}
|
|
|
|
done
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
# kill for loop
|
|
|
|
break
|
|
|
|
done
|