still working on ipxe

This commit is contained in:
2021-01-21 18:15:20 -05:00
parent 084a0fca69
commit 4f7c370499
9 changed files with 466 additions and 257 deletions

View File

@@ -1,5 +1,4 @@
#!/bin/sh
# TODO: other entries
# Copy this file to /etc/grub.d/40_custom_grml with mode 0755 and run grub-mkconfig -o /boot/grub/grub.cfg
exec tail -n +3 $0
# GRML
@@ -7,9 +6,8 @@ exec tail -n +3 $0
# Details:
# https://grml.org/docs/
# http://grml.org/cheatcodes/
submenu 'GRML' {
submenu 'GRML >' {
# Does this work?
load_video
insmod gzio
insmod part_gpt
@@ -19,187 +17,226 @@ submenu 'GRML' {
set gfxpayload=keep
search --no-floppy --fs-uuid {{ disk_uuid }} --set=root
set isofile='{{ iso_path }}'
set variant={{ variant }}
set ver={{ ver_str }}
set arch={{ arch }}
set bootid=grml${arch}${variant}${ver}
set imgdevpath="/dev/disk/by-uuid/{{ disk_uuid }}"
loopback loop (${root})/${isofile}
submenu 'GRML Rescue >' {
set variant={{ variant }}
set ver={{ ver_str }}
set arch={{ arch }}
set bootid=grml${arch}${variant}${ver}
set imgdevpath="/dev/disk/by-uuid/{{ disk_uuid }}"
menuentry 'Default options' {
linux (loop)/boot/grml${arch}${variant}/vmlinuz \
apm=power-off \
boot=live \
live-media-path=/live/grml${arch}-${variant}/ \
bootid=${bootid} \
findiso=${isofile} \
nomce \
net.ifnames=0
initrd (loop)/boot/grml${arch}${variant}/initrd.img
}
menuentry 'Predictable network interface names' {
linux (loop)/boot/grml${arch}${variant}/vmlinuz \
apm=power-off \
boot=live \
live-media-path=/live/grml${arch}-${variant}/ \
bootid=${bootid} \
findiso=${isofile} \
nomce
initrd (loop)/boot/grml${arch}${variant}/initrd.img
}
menuentry 'Enable persistency' {
linux (loop)/boot/grml${arch}${variant}/vmlinuz \
apm=power-off \
boot=live \
live-media-path=/live/grml${arch}-${variant}/ \
bootid=${bootid} \
findiso=${isofile} \
nomce \
net.ifnames=0 \
persistence
initrd (loop)/boot/grml${arch}${variant}/initrd.img
}
menuentry 'Run from RAM' {
linux (loop)/boot/grml${arch}${variant}/vmlinuz \
apm=power-off \
boot=live \
live-media-path=/live/grml${arch}-${variant}/ \
bootid=${bootid} \
findiso=${isofile} \
nomce \
net.ifnames=0 \
toram=grml64-full.squashfs
initrd (loop)/boot/grml${arch}${variant}/initrd.img
}
menuentry 'Copy entire ISO to RAM' {
linux (loop)/boot/grml${arch}${variant}/vmlinuz \
apm=power-off \
boot=live \
live-media-path=/live/grml${arch}-${variant}/ \
bootid=${bootid} \
findiso=${isofile} \
nomce \
net.ifnames=0 \
toram
initrd (loop)/boot/grml${arch}${variant}/initrd.img
}
menuentry 'Start X' {
linux (loop)/boot/grml${arch}${variant}/vmlinuz \
apm=power-off \
boot=live \
live-media-path=/live/grml${arch}-${variant}/ \
bootid=${bootid} \
findiso=${isofile} \
nomce \
net.ifnames=0 \
startx
initrd (loop)/boot/grml${arch}${variant}/initrd.img
}
menuentry 'No framebuffer' {
linux (loop)/boot/grml${arch}${variant}/vmlinuz \
apm=power-off \
boot=live \
live-media-path=/live/grml${arch}-${variant}/ \
bootid=${bootid} \
findiso=${isofile} \
nomce \
net.ifnames=0 \
video=ofonly \
radeon.modeset=0 \
i915.modeset=0 \
nouveau.modeset=0 \
cirrus.modeset=0 \
mgag200.modeset=0 \
nomodeset
initrd (loop)/boot/grml${arch}${variant}/initrd.img
}
menuentry 'No kernel modeset' {
linux (loop)/boot/grml${arch}${variant}/vmlinuz \
apm=power-off \
boot=live \
live-media-path=/live/grml${arch}-${variant}/ \
bootid=${bootid} \
findiso=${isofile} \
nomce \
net.ifnames=0 \
radeon.modeset=0 \
i915.modeset=0 \
nouveau.modeset=0 \
cirrus.modeset=0 \
mgag200.modeset=0 \
nomodeset
initrd (loop)/boot/grml${arch}${variant}/initrd.img
}
menuentry 'Forensic mode' {
linux (loop)/boot/grml${arch}${variant}/vmlinuz \
apm=power-off \
boot=live \
live-media-path=/live/grml${arch}-${variant}/ \
bootid=${bootid} \
findiso=${isofile} \
nomce \
net.ifnames=0 \
read-only \
nofstab \
noraid \
nodmraid \
nolvm \
noautoconfig \
noswap \
raid=noautodetect
initrd (loop)/boot/grml${arch}${variant}/initrd.img
}
menuentry 'Debug mode' {
linux (loop)/boot/grml${arch}${variant}/vmlinuz \
apm=power-off \
boot=live \
live-media-path=/live/grml${arch}-${variant}/ \
bootid=${bootid} \
findiso=${isofile} \
nomce \
net.ifnames=0 \
initcall \
verbose \
debug=vc \
systemd.log_level=debug \
systemd.log_target=kmsg \
log_buf_len=1M
initrd (loop)/boot/grml${arch}${variant}/initrd.img
}
menuentry 'Serial mode' {
linux (loop)/boot/grml${arch}${variant}/vmlinuz \
apm=power-off \
boot=live \
live-media-path=/live/grml${arch}-${variant}/ \
bootid=${bootid} \
findiso=${isofile} \
nomce \
net.ifnames=0 \
video=vesafb:off \
console=tty1 \
console=ttyS0,9600n8
initrd (loop)/boot/grml${arch}${variant}/initrd.img
}
menuentry 'Default options' {
loopback loop (${root})/${isofile}
linux (loop)/boot/grml${arch}${variant}/vmlinuz \
apm=power-off \
boot=live \
live-media-path=/live/grml${arch}-${variant}/ \
bootid=${bootid} \
findiso=${isofile} \
nomce \
net.ifnames=0
initrd (loop)/boot/grml${arch}${variant}/initrd.img
}
menuentry 'Predictable network interface names' {
loopback loop (${root})/${isofile}
linux (loop)/boot/grml${arch}${variant}/vmlinuz \
apm=power-off \
boot=live \
live-media-path=/live/grml${arch}-${variant}/ \
bootid=${bootid} \
findiso=${isofile} \
nomce
initrd (loop)/boot/grml${arch}${variant}/initrd.img
}
submenu 'GRML Addons >' {
menuentry 'Enable persistency' {
loopback loop (${root})/${isofile}
linux (loop)/boot/grml${arch}${variant}/vmlinuz \
apm=power-off \
boot=live \
live-media-path=/live/grml${arch}-${variant}/ \
bootid=${bootid} \
findiso=${isofile} \
nomce \
net.ifnames=0 \
persistence
initrd (loop)/boot/grml${arch}${variant}/initrd.img
}
insmod linux16
menuentry 'Run from RAM' {
loopback loop (${root})/${isofile}
linux (loop)/boot/grml${arch}${variant}/vmlinuz \
apm=power-off \
boot=live \
live-media-path=/live/grml${arch}-${variant}/ \
bootid=${bootid} \
findiso=${isofile} \
nomce \
net.ifnames=0 \
toram=grml64-full.squashfs
initrd (loop)/boot/grml${arch}${variant}/initrd.img
}
menuentry 'Memtest86+' {
linux16 (loop)/boot/addons/memtest
}
menuentry 'Copy entire ISO to RAM' {
loopback loop (${root})/${isofile}
linux (loop)/boot/grml${arch}${variant}/vmlinuz \
apm=power-off \
boot=live \
live-media-path=/live/grml${arch}-${variant}/ \
bootid=${bootid} \
findiso=${isofile} \
nomce \
net.ifnames=0 \
toram
initrd (loop)/boot/grml${arch}${variant}/initrd.img
}
menuentry 'iPXE' {
linux16 (loop)/boot/addons/ipxe.lkrn
}
menuentry 'Start X' {
loopback loop (${root})/${isofile}
linux (loop)/boot/grml${arch}${variant}/vmlinuz \
apm=power-off \
boot=live \
live-media-path=/live/grml${arch}-${variant}/ \
bootid=${bootid} \
findiso=${isofile} \
nomce \
net.ifnames=0 \
startx
initrd (loop)/boot/grml${arch}${variant}/initrd.img
}
menuentry 'Netboot.XYZ' {
linux16 (loop)/boot/addons/netboot.xyz.lkrn
}
menuentry 'No framebuffer' {
loopback loop (${root})/${isofile}
linux (loop)/boot/grml${arch}${variant}/vmlinuz \
apm=power-off \
boot=live \
live-media-path=/live/grml${arch}-${variant}/ \
bootid=${bootid} \
findiso=${isofile} \
nomce \
net.ifnames=0 \
video=ofonly \
radeon.modeset=0 \
i915.modeset=0 \
nouveau.modeset=0 \
cirrus.modeset=0 \
mgag200.modeset=0 \
nomodeset
initrd (loop)/boot/grml${arch}${variant}/initrd.img
}
menuentry 'Grub All-In-One' {
linux16 (loop)/boot/addons/allinone.img
}
menuentry 'No kernel modeset' {
loopback loop (${root})/${isofile}
linux (loop)/boot/grml${arch}${variant}/vmlinuz \
apm=power-off \
boot=live \
live-media-path=/live/grml${arch}-${variant}/ \
bootid=${bootid} \
findiso=${isofile} \
nomce \
net.ifnames=0 \
radeon.modeset=0 \
i915.modeset=0 \
nouveau.modeset=0 \
cirrus.modeset=0 \
mgag200.modeset=0 \
nomodeset
initrd (loop)/boot/grml${arch}${variant}/initrd.img
}
menuentry 'FreeDOS' {
linux16 (loop)/boot/addons/memdisk
loopback balder (loop)/boot/addons/balder10.imz
initrd (balder)+2880
}
menuentry 'Forensic mode' {
loopback loop (${root})/${isofile}
linux (loop)/boot/grml${arch}${variant}/vmlinuz \
apm=power-off \
boot=live \
live-media-path=/live/grml${arch}-${variant}/ \
bootid=${bootid} \
findiso=${isofile} \
nomce \
net.ifnames=0 \
read-only \
nofstab \
noraid \
nodmraid \
nolvm \
noautoconfig \
noswap \
raid=noautodetect
initrd (loop)/boot/grml${arch}${variant}/initrd.img
}
menuentry 'MirOS bsd4grml' {
multiboot (loop)/boot/addons/bsd4grml/ldbsd.com
module (loop)/boot/addons/bsd4grml/bsd.rd bsd.rd
module (loop)/boot/addons/bsd4grml/boot.1 boot.1
module (loop)/boot/addons/bsd4grml/boot.2 boot.2
module (loop)/boot/addons/bsd4grml/boot.3 boot.3
module (loop)/boot/addons/bsd4grml/boot.4 boot.4
module (loop)/boot/addons/bsd4grml/boot.5 boot.5
module (loop)/boot/addons/bsd4grml/boot.6 boot.6
module (loop)/boot/addons/bsd4grml/boot.cfg boot.cfg
module (loop)/boot/grub/grub.img grub.img
}
menuentry 'Debug mode' {
loopback loop (${root})/${isofile}
linux (loop)/boot/grml${arch}${variant}/vmlinuz \
apm=power-off \
boot=live \
live-media-path=/live/grml${arch}-${variant}/ \
bootid=${bootid} \
findiso=${isofile} \
nomce \
net.ifnames=0 \
initcall \
verbose \
debug=vc \
systemd.log_level=debug \
systemd.log_target=kmsg \
log_buf_len=1M
initrd (loop)/boot/grml${arch}${variant}/initrd.img
}
# We don't include the "Boot from first disk" option because presumably you have that in the main menu.
menuentry 'Serial mode' {
loopback loop (${root})/${isofile}
linux (loop)/boot/grml${arch}${variant}/vmlinuz \
apm=power-off \
boot=live \
live-media-path=/live/grml${arch}-${variant}/ \
bootid=${bootid} \
findiso=${isofile} \
nomce \
net.ifnames=0 \
video=vesafb:off \
console=tty1 \
console=ttyS0,9600n8
initrd (loop)/boot/grml${arch}${variant}/initrd.img
}
}