Changing to execute kexec on poweroff

This commit is contained in:
Fabio Belavenuto
2023-01-09 21:14:52 -03:00
parent 3a13b66c7a
commit 8875aa160b
6 changed files with 68 additions and 34 deletions

Binary file not shown.

View File

@@ -1,15 +1,50 @@
insmod search
insmod echo
insmod terminal
insmod test
terminal_input console
terminal_output console
insmod font
insmod loadenv
insmod serial
insmod usb_keyboard
insmod linux
insmod gzio
insmod fat
insmod ext2
set default="boot"
set timeout="5"
set timeout_style="menu"
insmod loadenv
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
if loadfont unicode ; then
set gfxmode=auto
load_video
insmod gfxterm
#set gfxpayload=800x600
fi
terminal_output gfxterm
#set menu_color_normal=cyan/blue
#set menu_color_highlight=white/blue
if serial --unit=0 --speed=115200; then
terminal_input --append serial_com0
terminal_output --append serial_com0
fi
if [ -s $prefix/grubenv ]; then
load_env
fi
@@ -22,34 +57,18 @@ if [ "${next_entry}" ]; then
save_env next_entry
fi
insmod usb_keyboard
insmod part_msdos
insmod ext2
insmod fat
insmod linux
insmod gzio
set gfxmode=auto
if [ "${grub_platform}" = "efi" ]; then
insmod efi_gop
insmod efi_uga
else
insmod vbe
insmod vga
fi
insmod serial
if serial --unit=0 --speed=115200; then
terminal_input --append serial_com0
terminal_output --append serial_com0
fi
insmod search
set TERM=tty2
search --set=root --label "ARPL3"
if [ -s /zImage-dsm -a -s /initrd-dsm ]; then
if [ "${default}" = "direct" ]; then
set timeout="1"
menuentry 'Boot DSM kernel directly' --id direct {
load_video
echo "Loading DSM kernel..."
linux /zImage-dsm console=ttyS0,115200n8 earlyprintk log_buf_len=32M earlycon=uart8250,io,0x3f8,115200n8 root=/dev/md0 loglevel=15 ${dsm_cmdline}
echo "Loading DSM initramfs..."
@@ -58,15 +77,17 @@ if [ -s /zImage-dsm -a -s /initrd-dsm ]; then
}
fi
menuentry 'Boot DSM' --id boot {
load_video
echo "Loading kernel..."
linux /bzImage-arpl console=tty2 net.ifnames=0 biosdevname=0
linux /bzImage-arpl console=${TERM} net.ifnames=0
echo "Loading initramfs..."
initrd /initrd-arpl
echo "Booting..."
}
menuentry 'Force re-install DSM' --id junior {
load_video
echo "Loading kernel..."
linux /bzImage-arpl console=tty2 net.ifnames=0 biosdevname=0 force_junior
linux /bzImage-arpl console=${TERM} net.ifnames=0 force_junior
echo "Loading initramfs..."
initrd /initrd-arpl
echo "Booting..."
@@ -76,8 +97,9 @@ else
fi
menuentry 'Configure loader' --id config {
load_video
echo "Loading kernel..."
linux /bzImage-arpl console=tty2 net.ifnames=0 biosdevname=0 IWANTTOCHANGETHECONFIG
linux /bzImage-arpl console=${TERM} net.ifnames=0 IWANTTOCHANGETHECONFIG
echo "Loading initramfs..."
initrd /initrd-arpl
echo "Booting..."