双系统下grub的相关设置

我的电脑是装了两个系统,一个是 win8.1,另一个是 ubuntu 14.04。默认情况下,每次开机时,电脑会显示grub菜单等待30秒,默认是选中ubuntu的,这个太浪费时间了。

查了一下资料,原来通过设置可以将grub设置为每次默认选中上次进入的系统,而且还可以设定等待时间。

  1. 首先在终端输入命令:sudo gedit /etc/default/grub
  2. 然后修改其内如下,我在下面贴出了文件中的前面几行,后面的都没动,其实后面也都是注释而已。
  3. 最后还要运行 sudo update-grub 命令,提交本次修改的设置。

/etc/default/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=saved  # 每次默认的系统是上次进入的系统
GRUB_SAVEDEFAULT=true # 上面设置了 saved 值,就要写上这句
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=3 # 默认等待的时间设为 3 秒,可以根据自己的习惯调整
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

 

偶然发现这个文件ubuntu-logo.grub,可以直接修改grub背景颜色

修改Grub背景颜色

sudo gedit /lib/plymouth/themes/ubuntu-logo/ubuntu-logo.grub
#原来的紫色
#if background_color 44,0,30; then
#  clear
#fi#改成黑色
if background_color 0,0,0; then
clear
fi
#链接关系:
#/etc/alternatives/default.plymouth.grub /lib/plymouth/themes/ubuntu-logo/ubuntu-logo.grub
#/lib/plymouth/themes/default.grub /etc/alternatives/default.plymouth.grub

———————-

参考资料:

http://blog.csdn.net/zhang_hui_cs/article/details/8570253

http://www.xuebuyuan.com/1945828.html