mirror of
https://github.com/RROrg/rr.git
synced 2025-06-21 05:51:05 +08:00
fix reboot to BIOS
This commit is contained in:
parent
31321a4bef
commit
3623600ac2
@ -362,7 +362,7 @@ function delCmdline() {
|
||||
# Rebooting
|
||||
# 1 - mode
|
||||
function rebootTo() {
|
||||
local MODES="config recovery junior"
|
||||
local MODES="config recovery junior bios memtest"
|
||||
if [ -z "${1}" ] || ! echo "${MODES}" | grep -qw "${1}"; then exit 1; fi
|
||||
# echo "Rebooting to ${1} mode"
|
||||
GRUBPATH="$(dirname $(find ${PART1_PATH}/ -name grub.cfg 2>/dev/null | head -1))"
|
||||
|
@ -3613,9 +3613,9 @@ else
|
||||
echo "x \"$(TEXT "Reboot to RR")\"" >>"${TMP_PATH}/menu"
|
||||
echo "y \"$(TEXT "Reboot to Recovery")\"" >>"${TMP_PATH}/menu"
|
||||
echo "z \"$(TEXT "Reboot to Junior")\"" >>"${TMP_PATH}/menu"
|
||||
if efibootmgr | grep -q "^Boot0000"; then
|
||||
#if efibootmgr | grep -q "^Boot0000"; then
|
||||
echo "b \"$(TEXT "Reboot to BIOS")\"" >>"${TMP_PATH}/menu"
|
||||
fi
|
||||
#fi
|
||||
echo "s \"$(TEXT "Back to shell")\"" >>"${TMP_PATH}/menu"
|
||||
echo "e \"$(TEXT "Exit")\"" >>"${TMP_PATH}/menu"
|
||||
|
||||
@ -3657,8 +3657,9 @@ else
|
||||
b)
|
||||
DIALOG --title "$(TEXT "Main menu")" \
|
||||
--infobox "$(TEXT "Reboot to BIOS")" 0 0
|
||||
efibootmgr -n 0000 >/dev/null 2>&1
|
||||
reboot
|
||||
#efibootmgr -n 0000 >/dev/null 2>&1
|
||||
#reboot
|
||||
rebootTo bios
|
||||
exit 0
|
||||
;;
|
||||
s)
|
||||
|
@ -123,6 +123,15 @@ menuentry 'Configure loader' --id config {
|
||||
echo "Booting..."
|
||||
}
|
||||
|
||||
menuentry 'Enter BIOS Setup' --id bios {
|
||||
fwsetup
|
||||
}
|
||||
|
||||
menuentry 'Start Memtest86+' --id memtest {
|
||||
echo "Loading memtest86+..."
|
||||
linux ${prefix}/memtest
|
||||
}
|
||||
|
||||
if [ ${vesa_mode} = 1 ]; then
|
||||
menuentry 'Change vesa to text video mode' --id videomode {
|
||||
set vesa_mode=0
|
||||
@ -137,8 +146,3 @@ else
|
||||
configfile ${prefix}/grub.cfg
|
||||
}
|
||||
fi
|
||||
|
||||
menuentry 'Start Memtest86+' --id memtest {
|
||||
echo "Loading memtest86+..."
|
||||
linux ${prefix}/memtest
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user