/etc/default/grub 应该是一个空文件吗?还是我找错了地方?

/etc/default/grub 应该是一个空文件吗?还是我找错了地方?

我正在尝试对 22.04 上的 Grub 进行更改,因此文档,我编辑了 /etc/default/grub。但是,这个文件是空的,我所做的更改没有达到预期的效果。从我读到的所有内容来看,它应该包含一些内容。

作为参考,我尝试使用以下字符串通过 ixgbe 驱动程序启用不受支持的 SFP 收发器:

GRUB_CMDLINE_LINUX=”ixgbe.allow_unsupported_sfp=1″

按照说明这里

任何帮助将不胜感激!

答案1

我通过(重新?)安装 Grub 解决了这个问题:“sudo apt install grub2”。完成此操作后,/etc/default/grub 文件填充了基本配置,尽管不如 Rinzwind 建议的那么全面。

答案2

不是。默认情况下,文件包含以下内容:

# 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_TIMEOUT_STYLE=hidden
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"

相关内容