grub: add menu entries for screenreader, memtest, efi fw setup, reboot, poweroff
- also clean up indentation - set timeout to 15 seconds - play a sound on pc speaker when at grub menu, for accessibility - screenreader option can be selected with `s` hotkey
This commit is contained in:
parent
faa72f6a33
commit
b5a51edf94
|
@ -3,44 +3,94 @@ set pager="1"
|
||||||
set locale_dir="(${voidlive})/boot/grub/locale"
|
set locale_dir="(${voidlive})/boot/grub/locale"
|
||||||
|
|
||||||
if [ -e "${prefix}/${grub_cpu}-${grub_platform}/all_video.mod" ]; then
|
if [ -e "${prefix}/${grub_cpu}-${grub_platform}/all_video.mod" ]; then
|
||||||
insmod all_video
|
insmod all_video
|
||||||
else
|
else
|
||||||
insmod efi_gop
|
insmod efi_gop
|
||||||
insmod efi_uga
|
insmod efi_uga
|
||||||
insmod video_bochs
|
insmod video_bochs
|
||||||
insmod video_cirrus
|
insmod video_cirrus
|
||||||
fi
|
fi
|
||||||
|
|
||||||
insmod font
|
insmod font
|
||||||
|
|
||||||
if loadfont "(${voidlive})/boot/grub/fonts/unicode.pf2" ; then
|
if loadfont "(${voidlive})/boot/grub/fonts/unicode.pf2" ; then
|
||||||
insmod gfxterm
|
insmod gfxterm
|
||||||
set gfxmode="auto"
|
set gfxmode="auto"
|
||||||
|
|
||||||
terminal_input console
|
terminal_input console
|
||||||
terminal_output gfxterm
|
terminal_output gfxterm
|
||||||
|
|
||||||
insmod png
|
insmod png
|
||||||
background_image "(${voidlive})/boot/isolinux/@@SPLASHIMAGE@@"
|
background_image "(${voidlive})/boot/isolinux/@@SPLASHIMAGE@@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Set default menu entry
|
||||||
|
default=linux
|
||||||
|
timeout=15
|
||||||
|
timeout_style=menu
|
||||||
|
|
||||||
|
# GRUB init tune for accessibility
|
||||||
|
play 600 988 1 1319 4
|
||||||
|
|
||||||
if [ cpuid -l ]; then
|
if [ cpuid -l ]; then
|
||||||
menuentry "@@BOOT_TITLE@@ @@KERNVER@@ (@@ARCH@@)" {
|
menuentry "@@BOOT_TITLE@@ @@KERNVER@@ (@@ARCH@@)" --id "linux" {
|
||||||
set gfxpayload="keep"
|
set gfxpayload="keep"
|
||||||
linux (${voidlive})/boot/vmlinuz \
|
linux (${voidlive})/boot/vmlinuz \
|
||||||
root=live:CDLABEL=VOID_LIVE ro init=/sbin/init \
|
root=live:CDLABEL=VOID_LIVE ro init=/sbin/init \
|
||||||
rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 gpt add_efi_memmap \
|
rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 gpt add_efi_memmap \
|
||||||
vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ \
|
vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ \
|
||||||
locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@
|
locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@
|
||||||
initrd (${voidlive})/boot/initrd
|
initrd (${voidlive})/boot/initrd
|
||||||
}
|
}
|
||||||
menuentry "@@BOOT_TITLE@@ @@KERNVER@@ (@@ARCH@@) (RAM)" {
|
menuentry "@@BOOT_TITLE@@ @@KERNVER@@ (@@ARCH@@) (RAM)" --id "linuxram" {
|
||||||
set gfxpayload="keep"
|
set gfxpayload="keep"
|
||||||
linux (${voidlive})/boot/vmlinuz \
|
linux (${voidlive})/boot/vmlinuz \
|
||||||
root=live:CDLABEL=VOID_LIVE ro init=/sbin/init \
|
root=live:CDLABEL=VOID_LIVE ro init=/sbin/init \
|
||||||
rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 gpt add_efi_memmap \
|
rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 gpt add_efi_memmap \
|
||||||
vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ \
|
vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ \
|
||||||
locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@ rd.live.ram
|
locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@ rd.live.ram
|
||||||
initrd (${voidlive})/boot/initrd
|
initrd (${voidlive})/boot/initrd
|
||||||
}
|
}
|
||||||
|
menuentry "@@BOOT_TITLE@@ @@KERNVER@@ (@@ARCH@@) with speech" --hotkey s --id "linuxa11y" {
|
||||||
|
set gfxpayload="keep"
|
||||||
|
linux (${voidlive})/boot/vmlinuz \
|
||||||
|
root=live:CDLABEL=VOID_LIVE ro init=/sbin/init \
|
||||||
|
rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 gpt add_efi_memmap \
|
||||||
|
vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ \
|
||||||
|
locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@ live.accessibility live.autologin
|
||||||
|
initrd (${voidlive})/boot/initrd
|
||||||
|
}
|
||||||
|
menuentry "@@BOOT_TITLE@@ @@KERNVER@@ (@@ARCH@@) with speech (RAM)" --hotkey r --id "linuxa11yram" {
|
||||||
|
set gfxpayload="keep"
|
||||||
|
linux (${voidlive})/boot/vmlinuz \
|
||||||
|
root=live:CDLABEL=VOID_LIVE ro init=/sbin/init \
|
||||||
|
rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 gpt add_efi_memmap \
|
||||||
|
vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ \
|
||||||
|
locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@ live.accessibility live.autologin rd.live.ram
|
||||||
|
initrd (${voidlive})/boot/initrd
|
||||||
|
}
|
||||||
|
if [ "${grub_platform}" == "efi" ]; then
|
||||||
|
menuentry "Run Memtest86+ (RAM test)" --id memtest {
|
||||||
|
set gfxpayload="keep"
|
||||||
|
linux (${voidlive})/boot/memtest.efi
|
||||||
|
}
|
||||||
|
menuentry 'UEFI Firmware Settings' --id uefifw {
|
||||||
|
fwsetup
|
||||||
|
}
|
||||||
|
else
|
||||||
|
menuentry "Run Memtest86+ (RAM test)" --id memtest {
|
||||||
|
set gfxpayload="keep"
|
||||||
|
linux (${voidlive})/boot/memtest.bin
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
|
menuentry "System restart" --id restart {
|
||||||
|
echo "System rebooting..."
|
||||||
|
reboot
|
||||||
|
}
|
||||||
|
|
||||||
|
menuentry "System shutdown" --id poweroff {
|
||||||
|
echo "System shutting down..."
|
||||||
|
halt
|
||||||
|
}
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue