Compare commits

..

No commits in common. "056e1bee759063e01376b167e0a7366d47a4be3c" and "509669cdca838ccce4711e6bd1f4c7de0898f48b" have entirely different histories.

14 changed files with 86 additions and 301 deletions

View file

@ -50,12 +50,6 @@ menuentry "[c] CPU info " --hotkey=c {
sleep --interruptible 10
}
if [ -f "/boot/tinycore/tinycore.cfg" ]; then
menuentry "[t] Tiny Core" --hotkey=t {
configfile /boot/tinycore/tinycore.cfg
}
fi
menuentry "[l] Local Boot" --hotkey=l {
insmod chain

View file

@ -2,70 +2,30 @@
#
insmod regexp
set isopath="/boot/isos"
export isopath
set isoconfdir="${isoconfig}.d"
export isoconfdir
if [ ! -d "${isoconfdir}" ]; then
echo "Cannot read ${isoconfdir}"
exit
fi
# Loop over both FAT32 and ExFAT filesystems
isouuids="EAB6-E0E9 0BB2-9158"
for isouuid in $isouuids
do
echo ""
echo "Searching isoroot on UUID=${isouuid}"
search --no-floppy --fs-uuid --set=isodev $isouuid
set isopath="/isos"
set isoroot="(${isodev})${isopath}"
if [ ! -d "${isoroot}" ]; then
echo "Ignoring invalid iso root at ${isoroot}"
sleep 1
continue
fi
# split isoroot again
echo "Found iso root at ${isoroot}"
regexp \
--set 1:isodev \
--set 2:isopath \
"^(\(.*\))?(.*)\$" "${isoroot}"
echo "isodev: ${isodev}"
echo "isopath: ${isopath}"
# Export the variables
export isoroot
export isopath
export isodev
# Read appropriate iso configs
echo "Reading ${isoconfdir}"
if [ -d "${isoconfdir}" ]; then
echo "${isoconfdir} is a directory"
for conf in ${isoconfdir}/*.cfg; do
if [ ! -f "$conf" ]; then
echo "No valid configuration to read"
break;
fi
#echo "Sourcing $conf "
echo "Sourcing $conf "
source "${conf}"
done
sleep 1
done
# let the echos be readable
echo "Waiting for 5 seconds..."
sleep 5
menuentry ' ' { true }
menuentry "[Esc] Back to Menu" {
configfile "${prefix}/grub.cfg"
}
else
echo "Cannot read ${isoconfdir}"
fi

View file

@ -1,18 +1,14 @@
# Alpine Linux Grub config
set isopath_alpine="${isopath}/alpine"
export isopath_alpine
set this_isopath="${isodev}${isopath}/alpine"
# abuse for to check for existence
for isofile in ${this_isopath}/alpine-standard*.iso; do
for isofile in ${isopath_alpine}/alpine-standard*.iso; do
if [ ! -e "$isofile" ]; then break; fi
echo "Found Alpines in ${this_isopath}"
submenu "Alpine Linux >" --class alpine {
submenu "Alpine Linux >" "${this_isopath}" --class alpine {
this_isopath=$2
for isofile in ${this_isopath}/alpine-standard*.iso; do
for isofile in ${isopath_alpine}/alpine-standard*.iso; do
if [ ! -e "$isofile" ]; then break; fi
regexp \
@ -20,21 +16,15 @@ for isofile in ${this_isopath}/alpine-standard*.iso; do
--set 2:variant \
--set 3:version \
--set 4:arch \
"^.*/(alpine-([^-]+)-([^-]+)-([^-]+)\.iso)\$" "${isofile}"
"^${isopath_alpine}/(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/vmlinuz-lts iso-scan/filename=${isofile} alpine_dev=usbdisk:vfat modules=loop,squashfs,cramfs,sd-mod,usb-storage
initrd (loop)/boot/initramfs-lts
loopback loop $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

View file

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

View file

@ -1,37 +1,29 @@
# Bodhi Linux Grub Config
# NOTE: As of 5.0.0 the "legacy" image can't mount FAT32 (charset error)
set this_isopath="${isodev}${isopath}/bodhi"
set isopath_bodhi="bodhi"
export isopath_bodhi
# abuse for to check for existence
for isofile in ${this_isopath}/bodhi-*.iso; do
for isofile in ${isopath_bodhi}/bodhi-*.iso; do
if [ ! -e "$isofile" ]; then break; fi
echo "Found Bodhis in ${this_isopath}"
submenu "Bodhi Linux >" --class bodhi {
submenu "Bodhi Linux >" "${this_isopath}" --class bodhi {
this_isopath=$2
for isofile in ${this_isopath}/bodhi-*.iso; do
for isofile in ${isopath_bodhi}/bodhi-*.iso; do
if [ ! -e "$isofile" ]; then break; fi
regexp \
--set 1:isoname \
--set 2:version \
--set 3:variant \
"^.*/(bodhi-([^-]+)-(.+)\.iso)\$" "${isofile}"
"^${isopath_bodhi}/(bodhi-([^-]+)-(.+)\.iso)\$" "${isofile}"
menuentry "Bodhi ${version} ${variant}" "${isofile}" "${isoname}" --class bodhi {
set isofile=$2
set isoname=$3
regexp \
--set 1:isodev \
--set 2:isofile \
"^(\(.*\))?(.*)\$" "${isofile}"
echo "Using ${isoname}..."
loopback loop "${isodev}${isofile}"
loopback loop $isofile
linux (loop)/casper/vmlinuz iso-scan/filename=${isofile} file=/cdrom/preseed/custom.seed boot=casper quiet splash
initrd (loop)/casper/initrd*
}

View file

@ -1,19 +1,17 @@
# Debian GNU/Linux Grub config
# from GLIM
set this_isopath="${isodev}${isopath}/debian"
set isopath_debian='debian'
export isopath_debian
# abuse for to check for existence
for isofile in ${this_isopath}/debian-*-netinst.iso ${this_isopath}/debian-live-*.iso; do
for isofile in ${isopath_debian}/debian-*-netinst.iso ${isopath_debian}/debian-live-*.iso; do
if [ ! -e "$isofile" ]; then break; fi
echo "Found Debians in ${isopath}"
submenu "Debian GNU/Linux >" "${this_isopath}" --class debian {
this_isopath=$2
submenu "Debian GNU/Linux >" --class debian {
# NetInstall
for isofile in ${this_isopath}/debian-*-netinst.iso; do
for isofile in ${isopath_debian}/debian-*-netinst.iso; do
if [ ! -e "$isofile" ]; then break; fi
regexp \
@ -21,26 +19,20 @@ for isofile in ${this_isopath}/debian-*-netinst.iso; do
--set 2:version \
--set 3:arch \
--set 4:variant \
"^.*/(debian-([^-]+)-([^-]+)-([^-]+)\.iso)\$" "${isofile}"
"^${isopath_debian}/(debian-([^-]+)-([^-]+)-([^-]+)\.iso)\$" "${isofile}"
menuentry "Debian NetInstall ${version} ${arch}" "${isofile}" "${isoname}" --class debian {
set isofile=$2
set isoname=$3
regexp \
--set 1:isodev \
--set 2:isofile \
"^(\(.*\))?(.*)\$" "${isofile}"
echo "Using ${isoname}..."
loopback loop "${isodev}${isofile}"
loopback loop $isofile
linux (loop)/live/vmlinuz-* findiso=${isofile}
initrd (loop)/live/initrd.img-*
}
done
# Live CD
for isofile in ${this_isopath}/debian-live-*.iso; do
for isofile in ${isopath_debian}/debian-live-*.iso; do
if [ ! -e "$isofile" ]; then break; fi
regexp \
@ -48,19 +40,13 @@ for isofile in ${this_isopath}/debian-live-*.iso; do
--set 2:version \
--set 3:arch \
--set 4:variant \
"^.*/(debian-live-([^-]+)-([^-]+)-([^-]+)\.iso)\$" "${isofile}"
"^${isopath_debian}/(debian-live-([^-]+)-([^-]+)-([^-]+)\.iso)\$" "${isofile}"
menuentry "Debian Live ${version} ${arch} ${variant}" "${isofile}" "${isoname}" --class debian {
set isofile=$2
set isoname=$3
regexp \
--set 1:isodev \
--set 2:isofile \
"^(\(.*\))?(.*)\$" "${isofile}"
echo "Using ${isoname}..."
loopback loop "${isodev}${isofile}"
loopback loop $isofile
linux (loop)/live/vmlinuz-* boot=live findiso=${isofile} components
initrd (loop)/live/initrd.img-*
}

View file

@ -1,18 +1,15 @@
# Fedora Grub Config
set this_isopath="${isodev}${isopath}/fedora"
set isopath_fedora="${isopath}/fedora"
export isopath_fedora
# abuse for to check for existence
for isofile in ${this_isopath}/Fedora-*.iso; do
for isofile in ${isopath_fedora}/Fedora-*.iso; do
if [ ! -e "$isofile" ]; then break; fi
echo "Found Fedoras in ${this_isopath}"
submenu "Fedora >" --class fedora {
submenu "Fedora >" "${this_isopath}" --class fedora {
this_isopath=$2
for isofile in ${this_isopath}/Fedora-*.iso; do
for isofile in ${isopath_fedora}/Fedora-*.iso; do
if [ ! -e "$isofile" ]; then break; fi
regexp \
@ -20,22 +17,16 @@ for isofile in ${this_isopath}/Fedora-*.iso; do
--set 2:variant \
--set 3:arch \
--set 4:version \
"^.*/(Fedora-([^-]+)-Live-([^-]+)-([^-]+)-[^-]+\.iso)\$" "${isofile}"
"^${isopath_fedora}/(Fedora-([^-]+)-Live-([^-]+)-([^-]+)-[^-]+\.iso)\$" "${isofile}"
menuentry "Fedora ${version} ${arch} ${variant}" "${isofile}" "${isoname}" --class fedora {
set isofile=$2
set isoname=$3
regexp \
--set 1:isodev \
--set 2:isofile \
"^(\(.*\))?(.*)\$" "${isofile}"
echo "Using ${isoname}..."
loopback loop "${isodev}${isofile}"
loopback loop $isofile
probe --set isolabel --label (loop)
linux (loop)/images/pxeboot/vmlinuz root=live:CDLABEL=${isolabel} rd.live.image iso-scan/filename=${isofile} rhgb ro
initrd (loop)/images/pxeboot/initrd.img
linux (loop)/isolinux/vmlinuz root=live:CDLABEL=${isolabel} rd.live.image iso-scan/filename=${isofile} rhgb ro
initrd (loop)/isolinux/initrd.img
}
done
}

View file

@ -1,52 +1,37 @@
# Kali Grub config
# from GLIM
set this_isopath="${isodev}${isopath}/kali"
set isopath_kali="kali"
export isopath_kali
# abuse for to check for existence
for isofile in ${this_isopath}/kali-linux-*.iso; do
if [ ! -e "$isofile" ]; then break; fi
for isofile in $isopath_kali/kali-linux-*.iso; do
echo "Found Kali Linuxes in ${this_isopath}"
submenu "Kali Linux >" --class kali {
submenu "Kali Linux >" "${this_isopath}" --class kali {
this_isopath=$2
for isofile in ${this_isopath}/kali-linux-*.iso; do
for isofile in ${isopath_kali}/kali-linux-*.iso; do
if [ ! -e "$isofile" ]; then break; fi
regexp \
--set 1:isoname \
--set 2:version \
--set 3:arch \
"^.*/(kali-linux-([^-]+)-([^-]+)\.iso)\$" "${isofile}"
"^${isopath_kali}/(kali-linux-([^-]+)-([^-]+)\.iso)\$" "${isofile}"
menuentry "Kali ${version} ${arch}" "${isofile}" "${isoname}" --class kali {
set isofile=$2
set isoname=$3
regexp \
--set 1:isodev \
--set 2:isofile \
"^(\(.*\))?(.*)\$" "${isofile}"
echo "Using ${isoname}..."
loopback loop "${isodev}${isofile}"
linux (loop)/live/vmlinuz-*-amd64 fromiso=${isofile} boot=live components splash username=root hostname=kali
loopback loop $isofile
linux (loop)/live/vmlinuz-*-amd64 findiso=${isofile} boot=live components splash username=root hostname=kali
initrd (loop)/live/initrd.img-*-amd64
}
menuentry "Kali ${version} ${arch} (forensic mode)" "${isofile}" "${isoname}" --class kali {
set isofile=$2
set isoname=$3
regexp \
--set 1:isodev \
--set 2:isofile \
"^(\(.*\))?(.*)\$" "${isofile}"
echo "Using ${isoname}..."
loopback loop "${isodev}${isofile}"
linux (loop)/live/vmlinuz-*-amd64 fromiso=${isofile} boot=live components splash username=root hostname=kali noswap noautomount
loopback loop $isofile
linux (loop)/live/vmlinuz-*-amd64 findiso=${isofile} boot=live components splash username=root hostname=kali noswap noautomount
initrd (loop)/live/initrd.img-*-amd64
}
done

View file

@ -1,38 +1,31 @@
# Tails Grub config
# from GLIM
set this_isopath="${isodev}${isopath}/tails"
set isopath_tails="${isopath}/tails"
export isopath_tails
# abuse for to check for existence
for isofile in ${this_isopath}/tails-*.iso; do
for isofile in $isopath_tails/tails-*.iso; do
if [ ! -e "$isofile" ]; then break; fi
echo "Found Tailses in ${this_isopath}"
submenu "Tails" --class tails {
submenu "Tails" "${this_isopath}" --class tails {
this_isopath=$2
for isofile in ${this_isopath}/tails-*.iso; do
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 \
"^.*/(tails-([^-]+)-([^-]+)\.iso)\$" "${isofile}"
"^${isopath_tails}/(tails-([^-]+)-([^-]+)\.iso)\$" "${isofile}"
menuentry "Tails ${version} ${arch}" "${isofile}" "${isoname}" --class tails {
set isofile=$2
set isoname=$3
regexp \
--set 1:isodev \
--set 2:isofile \
"^(\(.*\))?(.*)\$" "${isofile}"
echo "Using ${isoname}..."
loopback loop "${isodev}${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 quiet
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

View file

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

View file

@ -1,44 +0,0 @@
# Ubuntu Grub Config
set this_isopath="${isodev}${isopath}/ubuntu"
# abuse for to check for existence
for isofile in ${this_isopath}/ubuntu-*.iso; do
if [ ! -e "$isofile" ]; then break; fi
echo "Found Ubuntus in ${this_isopath}"
submenu "Ubuntu >" "${this_isopath}" --class ubuntu {
this_isopath=$2
for isofile in ${this_isopath}/ubuntu-*.iso; do
if [ ! -e "$isofile" ]; then break; fi
regexp \
--set 1:isoname \
--set 2:version \
--set 3:variant \
--set 4:arch \
"^.*/(ubuntu-([^-]+)-(.*)-([^-]+)\.iso)\$" "${isofile}"
menuentry "Ubuntu ${version} ${arch} ${variant}" "${isofile}" "${isoname}" --class ubuntu {
set isofile=$2
set isoname=$3
regexp \
--set 1:isodev \
--set 2:isofile \
"^(\(.*\))?(.*)\$" "${isofile}"
echo "Using ${isoname}..."
loopback loop "${isodev}${isofile}"
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=${isofile} quiet splash
initrd (loop)/casper/initrd*
}
done
}
# kill for loop
break
done

View file

@ -1,12 +0,0 @@
# TinyCore
Unpack a TinyCore iso file to this directory.
TinyCore downloads: http://www.tinycorelinux.net/
Minimal tree:
```
.
├── boot
└── cde
```

View file

@ -1,26 +0,0 @@
# Adapted from isolinux.cfg in *.iso file
menuentry "TinyCore command line only" --class=core {
linux /boot/tinycore/boot/vmlinuz loglevel=3 base
initrd /boot/tinycore/boot/core.gz
}
menuentry "TinyCore CDE" --class=core {
linux /boot/tinycore/boot/vmlinuz loglevel=3 cde
initrd /boot/tinycore/boot/core.gz
}
# Core Plus
if true; then
menuentry "Core Plus (default)" --class=core --class=gui {
# Values for desktop: flwm_outside, jwm, icewm, fluxbox, hackedbox, openbox, flwm
linux /boot/tinycore/boot/vmlinuz loglevel=3 cde showapps desktop=flwm_topside
initrd /boot/tinycore/boot/core.gz
}
menuentry "Core Plus with X/GUI + Wifi + Firmware" --class=core {
#
linux /boot/tinycore/boot/vmlinuz loglevel=3 cde showapps lst=xfbase.lst desktop=flwm_topside
initrd /boot/tinycore/boot/core.gz
}
fi