Ubuntu 开机引导文件 /etc/default/grub
2012-12-09 20:09
260 查看
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true
#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_LINUX_RECOVERY="true"
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
对于grub2,ubuntu给了一个官方的配置文件/etc/default/grub。大部分情况下grub2的设置都可以在这个文件中搞定,而且这个文件结构也比较简单,修改起来也容易。完全没有必要直接改/boot/grub/grub.cfg或者/etc/grub.d/下的文件。
修改/etc/default/grub只需简单一个命令:sudo
gedit /etc/default/grub
下面是系统默认的内容,以及最常用的修改菜单显示时间和默认操作系统的方法:
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
GRUB_DEFAULT=0 #将0改为saved,可让grub记住上次启动时选择的系统
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT="5" #显示启动选择菜单的时间
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
# 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 entrys
#GRUB_DISABLE_LINUX_RECOVERY="true"
修改完成后使用命令:
代码:sudo update-grub
会自动更新/boot/grub/grub.cfg,这样做最大的好处是当系统更新内核时,你的设置不会被覆盖掉。
另外对于从9.10 beta及以前一路升级上来的朋友,如果确定想使用grub2,手动运行:
代码:sudo apt-get install grub2
升级并确保grub2正确配置。(我全新安装的9.10 beta,一路升级上来后,系统中的grub工具居然还是老版,运行这个命令后才正常)
其实Ubuntu官方wiki上对这些都有说明:
https://wiki.ubuntu.com/Grub2
PS: 官方文件只说/boot/grub/grub.cfg不要手工修改,这个文件是运行update-grub自动生成的,/etc/default/grub和/etc/grub.d/ (folder)都很重要。
要修改配置文件的只要打开/boot/grub/grub.cfg文件,找到想修改的地方,然后根据注释找到相应的/etc/default/grub或/etc/grub.d/ (folder)进行修改,很方便滴。
File Structure
/boot/grub/grub.cfg This is in keeping with the intent that the file should not be edited manually.
/etc/default/grub
/etc/grub.d/ (folder)
# /boot/grub/grub.cfg.
GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true
#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_LINUX_RECOVERY="true"
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
对于grub2,ubuntu给了一个官方的配置文件/etc/default/grub。大部分情况下grub2的设置都可以在这个文件中搞定,而且这个文件结构也比较简单,修改起来也容易。完全没有必要直接改/boot/grub/grub.cfg或者/etc/grub.d/下的文件。
修改/etc/default/grub只需简单一个命令:sudo
gedit /etc/default/grub
下面是系统默认的内容,以及最常用的修改菜单显示时间和默认操作系统的方法:
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
GRUB_DEFAULT=0 #将0改为saved,可让grub记住上次启动时选择的系统
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT="5" #显示启动选择菜单的时间
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
# 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 entrys
#GRUB_DISABLE_LINUX_RECOVERY="true"
修改完成后使用命令:
代码:sudo update-grub
会自动更新/boot/grub/grub.cfg,这样做最大的好处是当系统更新内核时,你的设置不会被覆盖掉。
另外对于从9.10 beta及以前一路升级上来的朋友,如果确定想使用grub2,手动运行:
代码:sudo apt-get install grub2
升级并确保grub2正确配置。(我全新安装的9.10 beta,一路升级上来后,系统中的grub工具居然还是老版,运行这个命令后才正常)
其实Ubuntu官方wiki上对这些都有说明:
https://wiki.ubuntu.com/Grub2
PS: 官方文件只说/boot/grub/grub.cfg不要手工修改,这个文件是运行update-grub自动生成的,/etc/default/grub和/etc/grub.d/ (folder)都很重要。
要修改配置文件的只要打开/boot/grub/grub.cfg文件,找到想修改的地方,然后根据注释找到相应的/etc/default/grub或/etc/grub.d/ (folder)进行修改,很方便滴。
File Structure
/boot/grub/grub.cfg This is in keeping with the intent that the file should not be edited manually.
/etc/default/grub
/etc/grub.d/ (folder)
相关文章推荐
- Ubuntu 开机引导文件 /etc/default/grub
- Ubuntu 12.04LTS 系统 /etc/default/grub文件详解
- 转:Ubuntu 12.04LTS 系统 /etc/default/grub文件详解
- ubuntu6.10下竟然没有/etc/grub.conf文件
- liveCD安装ubuntu开机引导grub
- Ubuntu由于修改etc/profile文件导致开机无法登陆问题解决办法(仅供参考)
- ubuntu 修改/etc/fstab文件,取消ubuntu开机硬盘自检
- ubuntu16.10 设置grub菜单的默认等待时间,开机时显示详细的引导信息
- Ubuntu 10.10 修改开机启动顺序 | 9.10 grub2的启动配置文件grub.cfg
- 安装Win7和Ubuntu12.04双系统后,意外删除Ubuntu12.04引导文件,出现error:unknown filesystem;grub rescue>错误的解决方案
- 如何将Ubuntu16.4.0的接口名改成传统的eth0 /etc/default/grub
- Ubuntu 16.04没有/etc/default/rcS文件的UTC设置选项的问题解决
- 【原】安装wingrub后,用grub引导安装RedHat失败,无法进入windows!!!&&又一次无法进入windows,在grub rescue模式寻找grub文件,重新引导进入ubuntu
- grub2的/etc/default/grub文件详解
- 关于双系统安装ubuntu16.04开机出现GRUB引导问题
- Ubuntu 下通过修改/etc/grub.d/40_custom 文件硬盘安装debian8
- 配置GRUB 2:调整Ubuntu Server 9.10中的启动程序_/etc/default/GRUB分析
- 怎样修复grub开机引导以及在Ubuntu中添加win7开机启动项
- 配置文件详解: /etc/default/grub
- 解决Ubuntu开机出现speech-dispatcher disabled: /etc/default/speech-dispatcher