14.04 /etc/default/grub 文件的默认内容是什么?

Nic*_*k T 11 grub2 14.04

我和这个家伙一样,也意外地破坏了我的/etc/default/grub文件,尽管我是通过使用>而不是>>在配置脚本中做到的。提供的答案看起来与我记忆中的 14.04 桌面默认grub文件不同......它包含什么?

教鱼……有没有一些资源/方法可以让我自己找到答案,而不必重新安装 14.04 才能找出答案?

Pro*_*kup 12

问题“教给鱼…… ”的部分仍然有可能的答案:

...可以用来自己找到答案,而不必重新安装 14.04 才能找出答案?

/etc/default/grubhttp://packages.ubuntu.com/#search_contents上进行了搜索:

抱歉,您的搜索没有结果

剥离了第一个/etc,所以第二个源包名称搜索是/default/grub. 结果大受打击:

/usr/share/grub/default/grub grub2-common

我的 Ubuntu 机器上还有这个文件吗?

$ sudo ls /usr/share/grub/default/grub
/usr/share/grub/default/grub
Run Code Online (Sandbox Code Playgroud)

或者,例如:

$ sudo [ -f /usr/share/grub/default/grub ] && echo Found || echo Not\ found
Found
Run Code Online (Sandbox Code Playgroud)

事实上,它就在那里。

它的内容是什么?

$ sudo cat /usr/share/grub/default/grub
# 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=10
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"
Run Code Online (Sandbox Code Playgroud)

正如您可能已经发现的那样,与Rinzwind 的回答的输出相比,有一条更明显的不同行:

#GRUB_HIDDEN_TIMEOUT=0
Run Code Online (Sandbox Code Playgroud)


Rin*_*ind 5

干得好:

# 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=10
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"
Run Code Online (Sandbox Code Playgroud)