submenu "Addons ->" --class=submenu { # EFI: if [ "${grub_platform}" == "efi" ] ; then # arm64 doesn't provide the cpuid command, and we also # don't have any memtest* efi files available, so only # run on architectures other than arm64 (amd64 + i386) if [ "${grub_cpu}" != "arm64" ] ; then # try to detect amd64 by checking whether CPU supports 64-bit (long) mode if cpuid -l ; then if test -e /boot/addons/memtest86+x64.efi ; then menuentry "Memory test (memtest86+x64.efi)" { chainloader /boot/addons/memtest86+x64.efi } fi else # assume i386 if test -e /boot/addons/memtest86+ia32.efi ; then menuentry "Memory test (memtest86+ia32.efi)" { chainloader /boot/addons/memtest86+ia32.efi } fi fi fi fi # BIOS/non-EFI: if [ "${grub_platform}" != "efi" ] ; then # try to detect amd64 by checking whether CPU supports 64-bit (long) mode if cpuid -l ; then if test -e /boot/addons/memtest86+x64.bin ; then menuentry "Memory test (memtest86+x64.bin)" { insmod linux16 linux16 /boot/addons/memtest86+x64.bin } elif test -e /boot/addons/memtest ; then # fallback to old memtest menuentry "Memory test (memtest86+)" { insmod linux16 linux16 /boot/addons/memtest } fi else # assume i386 if test -e /boot/addons/memtest86+ia32.bin ; then menuentry "Memory test (memtest86+ia32.bin)" { insmod linux16 linux16 /boot/addons/memtest86+ia32.bin } elif test -e /boot/addons/memtest ; then # fallback to old memtest menuentry "Memory test (memtest86+)" { insmod linux16 linux16 /boot/addons/memtest } fi fi fi menuentry "iPXE - boot via network/PXE" { if [ "${grub_platform}" == "efi" ] ; then chainloader /boot/addons/ipxe.efi else insmod linux16 linux16 /boot/addons/ipxe.lkrn fi } menuentry "Netboot.xyz" { if [ "${grub_platform}" == "efi" ] ; then chainloader /boot/addons/netboot.xyz.efi else insmod linux16 linux16 /boot/addons/netboot.xyz.lkrn fi } if [ "${grub_platform}" != "efi" ] ; then menuentry "Netboot.xyz" { insmod linux16 linux16 /boot/addons/netboot.xyz.lkrn } menuentry "GRUB - all in one image" { insmod linux16 linux16 /boot/addons/memdisk initrd16 /boot/addons/allinone.img } menuentry "FreeDOS" { insmod linux16 linux16 /boot/addons/memdisk initrd16 /boot/addons/balder10.imz } if [ ${iso_path} ] ; then # assume loopback.cfg boot menuentry "MirOS bsd4grml (via loopback)" { multiboot /boot/addons/bsd4grml/ldbsd.com module /boot/addons/bsd4grml/bsd.rd bsd module /boot/addons/bsd4grml/loopback.0 boot.cfg module /boot/addons/bsd4grml/loopback.1 boot.1 module /boot/addons/bsd4grml/loopback.2 boot.2 module /boot/addons/bsd4grml/loopback.3 boot.3 module /boot/addons/bsd4grml/loopback.4 boot.4 module /boot/addons/bsd4grml/loopback.5 boot.5 module /boot/addons/bsd4grml/loopback.6 boot.6 } else # assume grub.cfg boot menuentry "MirOS bsd4grml (regular method)" { multiboot /boot/addons/bsd4grml/ldbsd.com } menuentry "MirOS bsd4grml (fallback method)" { multiboot /boot/addons/bsd4grml/ldbsd.com module /boot/addons/bsd4grml/bsd.rd bsd.rd module /boot/addons/bsd4grml/boot.1 boot.1 module /boot/addons/bsd4grml/boot.2 boot.2 module /boot/addons/bsd4grml/boot.3 boot.3 module /boot/addons/bsd4grml/boot.4 boot.4 module /boot/addons/bsd4grml/boot.5 boot.5 module /boot/addons/bsd4grml/boot.6 boot.6 module /boot/addons/bsd4grml/boot.cfg boot.cfg module /boot/grub/grub.img grub.img } fi # iso_path fi # efi mode } if [ "${grub_platform}" == "efi" ] ; then menuentry "UEFI Firmware Settings" { fwsetup } fi # efi mode menuentry "Boot from next device" { exit }