
我正在使用在我的/etc/overlayroot.conf 中配置的overlayroot overlayroot=tmpfs:swap=1,recurse=0
。
Overlayroot 正在按預期工作。我已經成功地通過簡單地禁用overlayroot然後重新啟用它來更新grub(我正在設置圖像,因此我一路上做了很多更改)
問題是,重新啟動後,無論我如何設定 grub 配置,grub 選單都會顯示 30 秒。哦,我應該提到,每次我運行 update-grub 並且不處於唯讀模式時。
這是我的 grub 配置。我也嘗試過沒有效果GRUB_DISABLE_OS_PROBER=true
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'
GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
# Disable OS Prober for selecting dual boot scenarios.
GRUB_DISABLE_OS_PROBER=true
我認為正在發生的事情是,overlayroot 更改了掛載點。因此,當 Overlayroot 被停用時,它會在啟動時不顯示 grub 選單,而啟用它後,它會看到更多掛載點並決定載入選單。
我也嘗試過這篇文章中接受的答案:https://serverfault.com/questions/549166/how-to-update-grub-on-a-system-running-overlayroot但是我仍然收到錯誤“/usr/sbin/grub-probe:錯誤:無法獲取“/dev/mmcblk0p2”的規範路徑。”
答案1
好的,解決了,停用overlayroot並添加以下內容:
/etc/預設/grub
GRUB_RECORDFAIL_TIMEOUT=$GRUB_TIMEOUT
然後更新grub
update-grub
重新啟用overlayroot並重新啟動