更新 boot.sh,优化 kexec 命令,添加 kexecboot 参数

This commit is contained in:
Ing 2024-11-08 23:15:17 +08:00
parent f2e334b682
commit 74e0af058e

View File

@ -250,6 +250,7 @@ if [ "${DIRECT}" = "true" ]; then
grub-editenv ${USER_GRUBENVFILE} set next_entry="direct" grub-editenv ${USER_GRUBENVFILE} set next_entry="direct"
_bootwait || exit 0 _bootwait || exit 0
echo -e "\033[1;33m$(TEXT "Reboot to boot directly in DSM")\033[0m" echo -e "\033[1;33m$(TEXT "Reboot to boot directly in DSM")\033[0m"
reboot reboot
exit 0 exit 0
@ -343,7 +344,7 @@ else
echo -e "\033[1;33m$(TEXT "Warning, running kexec with --noefi param, strange things will happen!!")\033[0m" echo -e "\033[1;33m$(TEXT "Warning, running kexec with --noefi param, strange things will happen!!")\033[0m"
KEXECARGS+=" --noefi" KEXECARGS+=" --noefi"
fi fi
kexec ${KEXECARGS} -l "${MOD_ZIMAGE_FILE}" --initrd "${MOD_RDGZ_FILE}" --command-line="${CMDLINE_LINE}" >"${LOG_FILE}" 2>&1 || dieLog kexec ${KEXECARGS} -l "${MOD_ZIMAGE_FILE}" --initrd "${MOD_RDGZ_FILE}" --command-line="${CMDLINE_LINE} kexecboot" >"${LOG_FILE}" 2>&1 || dieLog
echo -e "\033[1;37m$(TEXT "Booting ...")\033[0m" echo -e "\033[1;37m$(TEXT "Booting ...")\033[0m"
# show warning message # show warning message