/usr/share/grub/default/grubvs. 有/etc/default/grub什么用?我应该编辑哪一个以使 grub 行为不同?(如果您知道,两个不同的 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_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"
Run Code Online (Sandbox Code Playgroud)
小智 6
不同之处在于/usr/share目录中的所有文件都是示例配置文件。它们是可以复制到/etc目录中的文件,该目录是系统使用的所有配置文件所在的位置。/etc/default/grub是您编辑以进行更改的文件GRUB。完成对文件的更改后,运行grub-updategrub 更新并使用新设置。
GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
Run Code Online (Sandbox Code Playgroud)
这些是我唯一真正编辑过的。该DEFAULT告诉操作系统在默认情况下启动; 通常从不编辑这个。在TIMEOUT_STYLE这里告诉它隐藏GRUB菜单; 有一个菜单放在那里。TIMEOUT告诉 grub 在引导默认条目之前等待几秒钟。该CMDLINE_LINUX_DEFAULT条目告诉它在没有文本滚动 ( quiet) 和启动画面 ( splash)的情况下启动;删除那些有的"",你会看到启动时滚动的启动消息。非常方便地查看它的故障位置,并且如果您确实在那里看到奇怪的故障,如果它不影响系统的功能,则没有理由完全失控。最后,CMDLINE_LINUX,我从来没有真正需要编辑;它是您添加需要在启动时传递到内核以启用内核中的功能或纠正启动时的怪癖的选项的地方。
| 归档时间: |
|
| 查看次数: |
520 次 |
| 最近记录: |