关于grub的那些事(一)
/etc/default/grub里的秘密:
# If you change this file, run 'update-grub' afterwards to update # /boot/grub/grub.cfg. 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_LINUX_RECOVERY="true" # Uncomment to get a beep at grub start #GRUB_INIT_TUNE="480 440 1"
- GRUB_DEFAULT - 设定缺省启动的清单项目。值可以为项目编号 (由 0 开始)、完整项目标题或 saved。例如:
GRUB_DEFAULT=0 GRUB_DEFAULT="Ubuntu, Linux 2.6.31-9-generic" GRUB_DEFAULT=saved
- GRUB_SAVEDEFAULT - 设定为 true 会自动把上一次在清单中被选择的项目作为下次的缺省启动项目。
GRUB_SAVEDEFAULT=true
- GRUB_HIDDEN_TIMEOUT - 设定启动 GRUB 未显示启动清单的等待时间。一般 GRUB 启动时会显示一个空白的萤幕,待使用在此指定时间内按任何建时才显示启动清单,否则会直接启动缺省项目。0 值表示直接动缺省项目而不等待按键。
GRUB_HIDDEN_TIMEOUT=0 GRUB_HIDDEN_TIMEOUT=5
- GRUB_HIDDEN_TIMEOUT_QUIET - 设定是否在未显示启动清单时显示倒数时间。true 表示不显示倒数时间,false 则显示。
GRUB_HIDDENT_TIMEOUT_QUIET=true
- GRUB_TIMEOUT - 设定启动清单的时间。-1 表示没有限时,等待直至使用者选择任何清单。
- GRUB_DISTRIBUTOR - 设定取得清单名称的命令,例如 Debian、Ubuntu 或 Fedora 等。
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
- GRUB_CMDLINE_LINUX -
- GRUB_CMDLINE_LINUX_DEFAULT -
- GRUB_TERMINAL -
- GRUB_DISABLE_LINUX_UUID
- GRUB_GFXMODE -
- GRUB_DISABLE_LINUX_RECOVERY -
- GRUB_INIT_TUNE -
- GRUB_DISABLE_OS_PROBER -