linux grub etc,Ubuntu 14.04 /etc/default/grub文件

1、打开文件:

$ gedit /etc/default/grub

2、(修改)文件内容:

### 如果更改这个文件,就在命令行输入:sudo update-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'

### 默认启动项,如在选择界面查看为N,则改为N-1;也可改为saved,保存上次启动项

GRUB_DEFAULT=0

### 菜单不显示,但会显示空白界面,设定时间内按任意键出现菜单

#GRUB_HIDDEN_TIMEOUT=0

### 显示显示空白界面时是否不出现倒计时

GRUB_HIDDEN_TIMEOUT_QUIET=true

### 启动选择等待时间,可改为-1,无限等待

GRUB_TIMEOUT=3

### 不知道

GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`

### 内核启动参数,默认为"quiet splash"

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

### 设置图形界面分辨率

### 只能使用显卡支持的分辨率,具体可以在grub模式下输入vbeinfo查看

# 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

### 设置是否使用UUID引导,即是否使用root=/dev/sda×而不用root=UUDI=xxx

### 详见/boot/grub/grub.cfg文件

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux

#GRUB_DISABLE_LINUX_UUID=true

### 设置是否启用RECOVERY模式(修复模式)

# Uncomment to disable generation of recovery mode menu entries

#GRUB_DISABLE_RECOVERY="true"

### grub菜单出现时声音提醒(参数意义不知道)

# Uncomment to get a beep at grub start

#GRUB_INIT_TUNE="480 440 1"

3、使修改内容生效:

$ sudo update-grub

4、注意:

不要手动修改/boot/grub/grub.cfg文件,而是要修改/etc/default/grub文件,然后sudo update-grub