您的位置:首页 > 其它

menu.lst详解

2015-10-20 11:02 218 查看
打开终端,先备份一下:sudo cp /boot/grub/menu.lst /boot/grub/menu.lst.backup

然后输入:sudo gedit /boot/grub/menu.lst

然后就可以看见很长很长的一段代码, 大家可以仔细看一下,里面带#号的都是解释性的文字,看懂后就知道该怎么修改了,这个因为我们设置安装的分区不同,所以修改后的文件都是不一样的,我的修改后是这样子的,虽然这么多代码,但重要的就那几行开头没#的。

我给大家解释一下修改(为方便大家浏览,我把无关紧要的都给去掉了,但实际上还是要保留的)

## default num

# Set the default entry to the entry number NUM. Numbering starts from 0, and

# the entry number 0 is the default if the command is not used.

#

# You can specify 'saved' instead of a number. In this case, the default entry

# is the entry saved with the command 'savedefault'.

# WARNING: If you are using dmraid do not use 'savedefault' or your

# array will desync and will not let you boot your system.

default        0(修改为1,表示默认选择第二项启动)

## timeout sec

# Set a timeout, in SEC seconds, before automatically booting the default entry

# (normally the first entry defined).

timeout        3(设置在自动启动缺省菜单前所等待的秒数)

## hiddenmenu

# Hides the menu by default (press ESC to see the menu)

hiddenmenu(隐藏菜单,即使设置了自动选择,我仍希望每次都能看到系统选择菜单,于是就给把这句给删掉了)

[size=10.5pt]## should update-grub create memtest86 boot option

## e.g. memtest86=true

##      memtest86=false

# memtest86=true(这句改为[size=10.5pt]false,表示取消开机内存检查)

## should update-grub adjust the value of the default booted system

## can be true or false

# updatedefaultentry=false

[size=10.5pt]title        Windows 95/98/NT/2000

root        (hd0,0)

makeactive

chainloader    +1(删掉所有在“End Default Options”之前出现的这些title,因为重复了)

## should update-grub add savedefault to the default options

## can be true or false

# savedefault=false

## ## End Default Options ##

title        Ubuntu 9.04, kernel 2.6.28-11-generic

uuid        7efed1ff-1412-4525-a761-ecc1bdec16d3

kernel        /vmlinuz-2.6.28-11-generic root=UUID=30c8c1ad-b13a-408f-ad1a-590549142e5c ro quiet splash

initrd        /initrd.img-2.6.28-11-generic

quiet

title        Ubuntu 9.04, kernel 2.6.28-11-generic (recovery mode)

uuid        7efed1ff-1412-4525-a761-ecc1bdec16d3

kernel        /vmlinuz-2.6.28-11-generic root=UUID=30c8c1ad-b13a-408f-ad1a-590549142e5c ro  single

initrd        /initrd.img-2.6.28-11-generic

title        Windows 95/98/NT/2000

root        (hd0,0)

makeactive

chainloader    +1

### END DEBIAN AUTOMAGIC KERNELS LIST
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: