Working ISO configs for ArchLinux and TinyCore

This commit is contained in:
Eric Teunis de Boone 2020-11-13 03:22:54 +01:00
parent 2ac9f558dd
commit b17f2a6268
4 changed files with 141 additions and 3 deletions

View file

@ -1,4 +1,6 @@
# Load ISO configuration files
#
insmod regexp
set isopath="/boot/isos"
export isopath
@ -8,10 +10,22 @@ export isoconfdir
if [ -d "${isoconfdir}" ]; then
echo "${isoconfdir} is a directory"
for conf in isoconfdir/*.cfg; do
for conf in ${isoconfdir}/*.cfg; do
if [ ! -f "$conf" ]; then
echo "No valid configuration to read"
break;
fi
echo "Sourcing $conf "
source "$conf"
source "${conf}"
done
menuentry ' ' { true }
menuentry "[Esc] Back to Menu" {
configfile "${prefix}/grub.cfg"
}
else
echo "Cannot read ${isoconfdir}"
fi

View file

@ -0,0 +1,50 @@
# This is the ArchLinux Grub config
# from GLIM
set isopath_archlinux="${isopath}/archlinux"
export isopath_archlinux
# abuse for to check for existence
for isofile in $isopath_archlinux/archlinux*.iso $isopath_archlinux/ipxe*; do
if [ ! -e "$isofile" ]; then break; fi
submenu "ArchLinux >" --class arch {
menuentry "ArchLinux BIOS netboot" --class arch {
echo "Booting ArchLinux BIOS netboot"
linux16 $isopath_archlinux/ipxe.419cd003a298.lkrn
}
if [ ${grub_platform} == "efi" ]; then
menuentry "ArchLinux EFI netboot" --class arch {
echo "Booting ArchLinux EFI netboot"
chainloader $isopath_archlinux/ipxe.176077d7fccb.efi
}
fi
menuentry "" { true }
for isofile in $isopath_archlinux/archlinux-*.iso; do
if [ ! -e "$isofile" ]; then break; fi
regexp \
--set 1:isoname \
--set 2:version \
--set 3:arch \
"^${isopath_archlinux}/(archlinux-([^-]+)-([^-]+)\.iso)\$" "${isofile}"
menuentry "Arch Linux ${version} ${arch}" "${isofile}" "${isoname}" --class arch {
set isofile=$2
set isoname=$3
echo "Using ${isoname}..."
loopback loop $isofile
linux (loop)/arch/boot/x86_64/vmlinuz-linux img_dev=/dev/disk/by-uuid/${rootuuid} img_loop=${isofile}
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

37
boot/isos.cfg.d/tails.cfg Normal file
View file

@ -0,0 +1,37 @@
# Tails Grub config
# from GLIM
set isopath_tails="${isopath}/tails"
export isopath_tails
# abuse for to check for existence
for isofile in $isopath_tails/tails-*.iso; do
if [ ! -e "$isofile" ]; then break; fi
submenu "Tails" --class tails {
for isofile in $isopath_tails/tails-*.iso; do
if [ ! -e "$isofile" ]; then break; fi
echo "$isofile exists"
regexp \
--set 1:isoname \
--set 2:arch \
--set 3:version \
"^${isopath_tails}/(tails-([^-]+)-([^-]+)\.iso)\$" "${isofile}"
menuentry "Tails ${version} ${arch}" "${isofile}" "${isoname}" --class tails {
set isofile=$2
set isoname=$3
echo "Using ${isoname}..."
loopback loop $isofile
linux (loop)/live/vmlinuz boot=live live-media=removable findiso=${isofile} config apparmor=1 security=apparmor nopersistence noprompt timezone=Etc/UTC block.events_dfl_poll_msecs=1000 splash noautologin module=Tails kaslr slab_nomerge slub_debug=FZP mce=0 vsyscall=none page_poison=1 union=aufs quiet
initrd (loop)/live/initrd.img
}
done
}
# kill for loop
break
done

View file

@ -0,0 +1,37 @@
# TinyCore Grub Config
set isopath_tinycore="${isopath}/tinycore"
export isopath_tinycore
# abuse for to check for existence
for isofile in $isopath_tinycore/*.iso; do
if [ ! -e "$isofile" ]; then break; fi
submenu "TinyCore Linux >" --class tinycore {
for isofile in ${isopath_tinycore}/*Core*.iso; do
if [ ! -e "$isofile" ]; then break; fi
regexp \
--set 1:isoname \
--set 2:variant \
--set 3:version \
"^${isopath_tinycore}/((.*Core[^-]*)-(.+)\.iso)\$" "${isofile}"
menuentry "${variant} ${version}" "${isofile}" "${isoname}" --class tinycore {
set isofile=$2
set isoname=$3
echo "Using ${isoname}..."
loopback loop $isofile
# ideas to add for CorePlus: loglevel=3 cde showapps desktop=flwm_topside
linux (loop)/boot/vmlinuz
initrd (loop)/boot/core.gz
}
done
}
# kill for loop
break
done