grub, isolinux: add nomodeset menuentries, more hotkeys
add hotkeys for: - speech + nomodeset (g) - memtest (m) - uefi firmware (f) - reboot (b) - poweroff (p) the nomodeset entry will be useful in cases like the nvidia 6.6 issue, where boot fails due to graphics drivers issues. dracut/vmklive: add hook that disables display manager services if nomodeset is set fixes: #160
This commit is contained in:
parent
f3d5188b7c
commit
380f0fd3c4
|
@ -28,4 +28,5 @@ install() {
|
||||||
inst_hook pre-pivot 02 "$moddir/getty-serial.sh"
|
inst_hook pre-pivot 02 "$moddir/getty-serial.sh"
|
||||||
inst_hook pre-pivot 03 "$moddir/locale.sh"
|
inst_hook pre-pivot 03 "$moddir/locale.sh"
|
||||||
inst_hook pre-pivot 04 "$moddir/accessibility.sh"
|
inst_hook pre-pivot 04 "$moddir/accessibility.sh"
|
||||||
|
inst_hook pre-pivot 05 "$moddir/nomodeset.sh"
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||||
|
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||||
|
|
||||||
|
type getargbool >/dev/null 2>&1 || . /lib/dracut-lib.sh
|
||||||
|
|
||||||
|
if getargbool 0 nomodeset; then
|
||||||
|
for dm in lightdm sddm gdm; do
|
||||||
|
if [ -e "${NEWROOT}/etc/runit/runsvdir/default/${dm}" ]; then
|
||||||
|
touch "${NEWROOT}/etc/runit/runsvdir/default/${dm}/down"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
|
@ -51,6 +51,15 @@ if [ cpuid -l ]; then
|
||||||
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@@) (graphics disabled)" --id "linuxnogfx" {
|
||||||
|
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@@ nomodeset
|
||||||
|
initrd (${voidlive})/boot/initrd
|
||||||
|
}
|
||||||
menuentry "@@BOOT_TITLE@@ @@KERNVER@@ (@@ARCH@@) with speech" --hotkey s --id "linuxa11y" {
|
menuentry "@@BOOT_TITLE@@ @@KERNVER@@ (@@ARCH@@) with speech" --hotkey s --id "linuxa11y" {
|
||||||
set gfxpayload="keep"
|
set gfxpayload="keep"
|
||||||
linux (${voidlive})/boot/vmlinuz \
|
linux (${voidlive})/boot/vmlinuz \
|
||||||
|
@ -69,12 +78,21 @@ if [ cpuid -l ]; then
|
||||||
locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@ live.accessibility live.autologin rd.live.ram
|
locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@ live.accessibility live.autologin rd.live.ram
|
||||||
initrd (${voidlive})/boot/initrd
|
initrd (${voidlive})/boot/initrd
|
||||||
}
|
}
|
||||||
|
menuentry "@@BOOT_TITLE@@ @@KERNVER@@ (@@ARCH@@) (graphics disabled)" --hotkey g --id "linuxa11ynogfx" {
|
||||||
|
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 nomodeset
|
||||||
|
initrd (${voidlive})/boot/initrd
|
||||||
|
}
|
||||||
if [ "${grub_platform}" == "efi" ]; then
|
if [ "${grub_platform}" == "efi" ]; then
|
||||||
menuentry "Run Memtest86+ (RAM test)" --id memtest {
|
menuentry "Run Memtest86+ (RAM test)" --hotkey m --id memtest {
|
||||||
set gfxpayload="keep"
|
set gfxpayload="keep"
|
||||||
linux (${voidlive})/boot/memtest.efi
|
linux (${voidlive})/boot/memtest.efi
|
||||||
}
|
}
|
||||||
menuentry 'UEFI Firmware Settings' --id uefifw {
|
menuentry 'UEFI Firmware Settings' --hotkey f --id uefifw {
|
||||||
fwsetup
|
fwsetup
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -84,12 +102,12 @@ if [ cpuid -l ]; then
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
menuentry "System restart" --id restart {
|
menuentry "System restart" --hotkey b --id restart {
|
||||||
echo "System rebooting..."
|
echo "System rebooting..."
|
||||||
reboot
|
reboot
|
||||||
}
|
}
|
||||||
|
|
||||||
menuentry "System shutdown" --id poweroff {
|
menuentry "System shutdown" --hotkey p --id poweroff {
|
||||||
echo "System shutting down..."
|
echo "System shutting down..."
|
||||||
halt
|
halt
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,11 @@ MENU LABEL @@BOOT_TITLE@@ @@KERNVER@@ @@ARCH@@ (RAM)
|
||||||
KERNEL /boot/vmlinuz
|
KERNEL /boot/vmlinuz
|
||||||
APPEND initrd=/boot/initrd root=live:CDLABEL=VOID_LIVE init=/sbin/init ro rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@ rd.live.ram
|
APPEND initrd=/boot/initrd root=live:CDLABEL=VOID_LIVE init=/sbin/init ro rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@ rd.live.ram
|
||||||
|
|
||||||
|
LABEL linuxnogfx
|
||||||
|
MENU LABEL @@BOOT_TITLE@@ @@KERNVER@@ @@ARCH@@ (graphics disabled)
|
||||||
|
KERNEL /boot/vmlinuz
|
||||||
|
APPEND initrd=/boot/initrd root=live:CDLABEL=VOID_LIVE init=/sbin/init ro rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@ nomodeset
|
||||||
|
|
||||||
LABEL linuxa11y
|
LABEL linuxa11y
|
||||||
MENU LABEL @@BOOT_TITLE@@ @@KERNVER@@ @@ARCH@@ with ^speech
|
MENU LABEL @@BOOT_TITLE@@ @@KERNVER@@ @@ARCH@@ with ^speech
|
||||||
KERNEL /boot/vmlinuz
|
KERNEL /boot/vmlinuz
|
||||||
|
@ -40,19 +45,24 @@ MENU LABEL @@BOOT_TITLE@@ @@KERNVER@@ @@ARCH@@ with speech (^RAM)
|
||||||
KERNEL /boot/vmlinuz
|
KERNEL /boot/vmlinuz
|
||||||
APPEND initrd=/boot/initrd root=live:CDLABEL=VOID_LIVE init=/sbin/init ro rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@ live.accessibility live.autologin rd.live.ram
|
APPEND initrd=/boot/initrd root=live:CDLABEL=VOID_LIVE init=/sbin/init ro rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@ live.accessibility live.autologin rd.live.ram
|
||||||
|
|
||||||
|
LABEL linuxa11ynogfx
|
||||||
|
MENU LABEL @@BOOT_TITLE@@ @@KERNVER@@ @@ARCH@@ with speech (^graphics disabled)
|
||||||
|
KERNEL /boot/vmlinuz
|
||||||
|
APPEND initrd=/boot/initrd root=live:CDLABEL=VOID_LIVE init=/sbin/init ro rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@ live.accessibility live.autologin nomodeset
|
||||||
|
|
||||||
LABEL c
|
LABEL c
|
||||||
MENU LABEL Boot first HD found by BIOS
|
MENU LABEL Boot first HD found by BIOS
|
||||||
COM32 chain.c32
|
COM32 chain.c32
|
||||||
APPEND hd0
|
APPEND hd0
|
||||||
|
|
||||||
LABEL memtest
|
LABEL memtest
|
||||||
MENU LABEL Run Memtest86+ (RAM test)
|
MENU LABEL Run ^Memtest86+ (RAM test)
|
||||||
LINUX /boot/memtest.bin
|
LINUX /boot/memtest.bin
|
||||||
|
|
||||||
LABEL reboot
|
LABEL reboot
|
||||||
MENU LABEL Reboot
|
MENU LABEL Re^boot
|
||||||
COM32 reboot.c32
|
COM32 reboot.c32
|
||||||
|
|
||||||
LABEL poweroff
|
LABEL poweroff
|
||||||
MENU LABEL Power Off
|
MENU LABEL ^Power Off
|
||||||
COM32 poweroff.c32
|
COM32 poweroff.c32
|
||||||
|
|
Loading…
Reference in New Issue