Skip to content

Commit

Permalink
更新 boot.sh,优化 kexec 命令,添加 kexecboot 参数
Browse files Browse the repository at this point in the history
  • Loading branch information
wjz304 committed Nov 8, 2024
1 parent f2e334b commit 74e0af0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions files/initrd/opt/rr/boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ if [ "${DIRECT}" = "true" ]; then
grub-editenv ${USER_GRUBENVFILE} set next_entry="direct"

_bootwait || exit 0

echo -e "\033[1;33m$(TEXT "Reboot to boot directly in DSM")\033[0m"
reboot
exit 0
Expand Down Expand Up @@ -322,7 +323,7 @@ else
done

_bootwait || exit 0

echo -e "\033[1;37m$(TEXT "Loading DSM kernel ...")\033[0m"

DSMLOGO="$(readConfigKey "dsmlogo" "${USER_CONFIG_FILE}")"
Expand All @@ -343,7 +344,7 @@ else
echo -e "\033[1;33m$(TEXT "Warning, running kexec with --noefi param, strange things will happen!!")\033[0m"
KEXECARGS+=" --noefi"
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"
# show warning message
Expand Down

0 comments on commit 74e0af0

Please sign in to comment.