一、Grub 2包含如下几部分内容:
1、/boot/grub/grub.cfg 文件
2、/etc/grub.d/ 文件夹
3、/etc/default/grub 文件
二、配置和意义:
1、修改grub文件路径为/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菜单的时间
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"
2、修改后执行update-grub,/boot/grub/grub.cfg文件会被更新;
3、若想修改/boot/grub/grub.cfg内文件内容,需先更改其权限,将默认生成的444权限改为777权限。