You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

执行grub-mkconfig命令更新GRUB时出现“quiet: not found”错误的解决求助

执行grub-mkconfig命令更新GRUB时出现“quiet: not found”错误的解决求助

我在运行以下命令更新GRUB配置时:

grub-mkconfig -o /boot/grub/grub.cfg

收到了这个错误提示:

/usr/sbin/grub-mkconfig: 12: /etc/default/grub: quiet: not found

我已经在各大论坛搜索过解决方案,但都没能修复问题,希望有人能帮忙排查一下。

相关系统与GRUB信息

GRUB安装状态

  • GRub2(v2.00)安装在/dev/sda的MBR中,核心映像core.img位于同磁盘的扇区1,指向(,msdos1)/boot/grub
  • 嵌入的模块:fshelp ext2 part_msdos biosdisk

磁盘分区详情

分区文件系统用途关键信息
sda1ext4Ubuntu 22.10系统分区挂载为/,包含/boot/grub/menu.lst、/boot/grub/grub.cfg、/etc/default/grub等引导文件
sda2扩展分区容器分区包含swap分区sda5
sda5swap交换分区UUID:5d36fa99-ed26-4cec-9329-015463d13ad7

当前系统状态

  • 系统:Ubuntu 22.10
  • 启动模式:Legacy/BIOS/CSM(非UEFI)
  • 当前启动内核:/boot/vmlinuz-5.19.0-28-generic,启动参数:root=UUID=a00cbbed-d379-43df-b765-0dcd83fd91bd ro quiet splash

关键配置文件内容

/etc/default/grub(过滤后)

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=menu
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT=â€ipv6.disable=1 quiet splashâ€
GRUB_CMDLINE_LINUX=â€ipv6.disable=1″

/etc/fstab(过滤后)

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=a00cbbed-d379-43df-b765-0dcd83fd91bd /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=5d36fa99-ed26-4cec-9329-015463d13ad7 none            swap    sw              0       0

Boot-Repair工具建议修复方案

  • 清理/boot中的遗留文件,重新将sda1的grub2安装到sda的MBR
  • 额外修复:取消隐藏启动菜单并设置10秒超时

备注:内容来源于stack exchange,提问作者Atul Modi

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.23 09:02:59