/etc/default/grub 中的 GRUB_TIMEOUT 不改变 LVM 的等待时间

muc*_*lux 9 boot grub2 lvm 18.10

首先:是的,我sudo update-grub在更改值后运行。

在空磁盘上新安装 Ubuntu 18.10 后,grub 菜单的等待时间为 30 秒(半个永恒!)。

GRUB_TIMEOUT/etc/default/grub的值为0。将其更改为10并没有改变等待时间,它仍然是 30 秒。

有任何想法吗?

Pil*_*ot6 9

最近,一个补丁已合并,用于在 lvm 或 btrfs 上使用 /boot 将 UEFI 系统的 grub 超时菜单修复为 30 秒。

在某些情况下,用户无法访问启动菜单的原因。grub无法写入 lvm 或 btrfs。

如果引导失败,grub 无法将其记录到 LVM 或 btrfs,因此您不太可能无法进入安全模式等的 grub 菜单。

有关更多详细信息,请参阅此错误报告

如果你查看grub.cfg,你会看到这个:

if [ "${recordfail}" = 1 ] ; then
  set timeout=30
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=hidden
    set timeout=0
  # Fallback hidden-timeout code in case the timeout_style feature is
  # unavailable.
  elif sleep --interruptible 0 ; then
    set timeout=0
  fi
fi
if [ $grub_platform = efi ]; then
  set timeout=30
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=menu
  fi
fi
Run Code Online (Sandbox Code Playgroud)

您可以手动更改它,但它将在 上恢复update-grub

这可以通过设置来修复

GRUB_RECORDFAIL_TIMEOUT=0
Run Code Online (Sandbox Code Playgroud)

/etc/default/grub后面跟着sudo update-grub命令。

如果您确定可以访问 UEFI 设置。如果不太确定,请将其设置为 5 或 10。

另一种解决方法是/boot在 LVM 或 btrfs 之外创建一个单独的分区。