Gracece's Blog

生命不息,折腾不止。

grub2 配置备忘

首先打开grub配置目录:

sudo gedit /etc/default/grub

GRUB_DEFAULT=0 //默认启动项,第一个为0,照推。改为saved实现记录上一次启动项

#GRUB_HIDDEN_TIMEOUT=0

GRUB_HIDDEN_TIMEOUT_QUIET=true

GRUB_TIMEOUT=3 //更改默认等待时间时间

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=1024x768 //去掉前面的#号,使用背景图片

# 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

更改启动项顺序:

打开 /etc/grub.d  将os_prober 前面的数字改成 06 –09中任一个,可以实现将windows启动项改到最前面,具体说明请参考README

更改grub2背景:

选好一张图片,更改到1024X768 ,复制到/boot/grub ,实现更改grub2背景。

搞定所有,记得 sudo update-grub

参考文档:http://home.ustc.edu.cn/~sunxilin/f2/grubmanualchn.pdf

blog comments powered by Disqus