修改 GRUB 啟動時的預設等待時長
環境
作業系統:Ubuntu Kylin 優麒麟 21.10、Debian 11 Bullseye
適用架構:ARM64(鯤鵬、飛騰)、AMD64(海光、兆芯)、MIPS64EL 龍芯
問題
當使用 UEFI 啟動作業系統時,從 EFI 分割槽引導 GRUB 檔案,會有 30 秒的等待。
解決方法
首先檢視 /boot/grub/grub.cfg
if [ $grub_platform = efi ];then set timeout=30
if [ x $feature_timeout_style = xy ] ;
then set timeout_style=menu
fi
fi
這很奇怪,其實這個設定在 /etc/grub.d/00_header
if [ "$recordfail_broken" = 1 ];then cat << EOF
if [ \ $grub_platform = efi ];
then set timeout= ${GRUB_RECORDFAIL_TIMEOUT:-30}
if [ x\ $feature_timeout_style = xy ] ;
then set timeout_style=menu
fi
fi
EOF
fi
如果沒有定義 GRUB_RECORDFAIL_TIMEOUT 或者為空,那麼預設設定為 30 。
因此,可以新增 GRUB_RECORDFAIL_TIMEOUT="5" 至 /etc/default/grub。這樣超時將從 30 秒改為 10 秒。
不要忘記更新 GRUB。
sudo update-grub
更多內容請參考《GRUB2 基礎教程-修訂版》
參考文獻:
《Remove EFI grub timeout》,https://www.tomica.net/blog/2019/02/remove-efi-grub-timeout/
「其他文章」
- Github 國內映象網站
- PPSSPP
- ExaGear 映象系統的使用指南
- Wine for ARM 的使用指南
- ExaGear 二進位制動態翻譯
- Desktop Entry 桌面入口檔案簡介
- 修改 GRUB 啟動時的預設等待時長
- 符號連線的層數過多
- 修改 Deb 安裝包的依賴關係
- Linus 訪談,在 Linux 誕生 30 週年之際
- 安裝鴻蒙字型
- CuteFish 桌面環境的安裝
- LoongNix 20 的安裝
- 關機或重啟等待90秒(1分30秒)的問題
- 架設 DNS 伺服器
- Linux 設定開機啟動
- Apt 安裝或更新軟體時的“段錯誤”
- PDFCreator 批量生成 PDF 檔案
- SQL Server 2019 分散式事務(DTS)
- 優麒麟虛擬機器中安裝 Windows 10 ARM64