u,xp,win7!启动时我只想直接引导u,其他需附加操作才可以选择,能做到吗?

启动讨论 grub/grub2/syslinux/grub4dos/Lilo
回复
头像
xiaguanzsg
帖子: 49
注册时间: 2009-05-14 18:13

u,xp,win7!启动时我只想直接引导u,其他需附加操作才可以选择,能做到吗?

#1

帖子 xiaguanzsg » 2009-09-13 11:21

我学生,用台机!同学老来打游戏,有密码不说又不好!我想直接启动引导到u,如果要进其他,启动时需要附加操作进入选择菜单的,怎么设置才能这样啊???

谢谢指教!!


这是menu.lst文件
# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

## 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

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 10

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

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=241ae20e-32f1-4467-8a06-82faad8f12a3 ro locale=zh_CN

## default grub root device
## e.g. groot=(hd0,0)
# groot=296f8fa2-bb97-4b53-8bb9-00692119a444

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all

## specify if running in Xen domU or have grub detect automatically
## update-grub will ignore non-xen kernels when running in domU and vice versa
## e.g. indomU=detect
## indomU=true
## indomU=false
# indomU=detect

## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## 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-15-generic
uuid 296f8fa2-bb97-4b53-8bb9-00692119a444
kernel /vmlinuz-2.6.28-15-generic root=UUID=241ae20e-32f1-4467-8a06-82faad8f12a3 ro locale=zh_CN quiet splash
initrd /initrd.img-2.6.28-15-generic
quiet

title Ubuntu 9.04, kernel 2.6.28-15-generic (recovery mode)
uuid 296f8fa2-bb97-4b53-8bb9-00692119a444
kernel /vmlinuz-2.6.28-15-generic root=UUID=241ae20e-32f1-4467-8a06-82faad8f12a3 ro locale=zh_CN single
initrd /initrd.img-2.6.28-15-generic

title Ubuntu 9.04, memtest86+
uuid 296f8fa2-bb97-4b53-8bb9-00692119a444
kernel /memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Microsoft Windows XP Professional
rootnoverify (hd0,0)
savedefault
makeactive
chainloader +1
其实神也是人!!
头像
注册太麻烦
帖子: 106
注册时间: 2009-09-06 22:52

Re: u,xp,win7!启动时我只想直接引导u,其他需附加操作才可以选择,能做到吗?

#2

帖子 注册太麻烦 » 2009-09-13 11:23

[quote]title Microsoft Windows XP Professional
rootnoverify (hd0,0)
savedefault
makeactive
chainloader +1/quote]
#之
人生如梦
头像
xiaguanzsg
帖子: 49
注册时间: 2009-05-14 18:13

Re: u,xp,win7!启动时我只想直接引导u,其他需附加操作才可以选择,能做到吗?

#3

帖子 xiaguanzsg » 2009-09-13 11:27

注册太麻烦 写了:
title Microsoft Windows XP Professional
rootnoverify (hd0,0)
savedefault
makeactive
chainloader +1/quote]
#之
不明白!
其实神也是人!!
头像
xiaguanzsg
帖子: 49
注册时间: 2009-05-14 18:13

Re: u,xp,win7!启动时我只想直接引导u,其他需附加操作才可以选择,能做到吗?

#4

帖子 xiaguanzsg » 2009-09-13 11:29

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

我把timeout直接设成0,默认启动应该是u吧!!那这个hiddenmenu怎么应用???
其实神也是人!!
头像
注册太麻烦
帖子: 106
注册时间: 2009-09-06 22:52

Re: u,xp,win7!启动时我只想直接引导u,其他需附加操作才可以选择,能做到吗?

#5

帖子 注册太麻烦 » 2009-09-13 11:29

就是把这几行都注释了
人生如梦
头像
注册太麻烦
帖子: 106
注册时间: 2009-09-06 22:52

Re: u,xp,win7!启动时我只想直接引导u,其他需附加操作才可以选择,能做到吗?

#6

帖子 注册太麻烦 » 2009-09-13 11:34

xiaguanzsg 写了:## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

我把timeout直接设成0,默认启动应该是u吧!!那这个hiddenmenu怎么应用???
#hidemenu 去掉#
人生如梦
头像
Kandu
帖子: 108
注册时间: 2008-12-24 12:02
联系:

Re: u,xp,win7!启动时我只想直接引导u,其他需附加操作才可以选择,能做到吗?

#7

帖子 Kandu » 2009-09-13 11:42

楼上的方法可行,但是麻烦。
其实可以这样做:
如果你是grub,编辑 /boot/grub/menu.lst,添加一行字符 hiddenmenu就好了
如果是grub2,编辑同样目录下的grub.cfg,同样添加上述一行

最好把timeout设置短点比如 timeout 5
这样等待5秒就启动了首选的系统

如果要启动其他os,比如windows,那么,趁这5秒(timeout 5)没过,按下 esc 键就可以调出列表的
头像
Kandu
帖子: 108
注册时间: 2008-12-24 12:02
联系:

Re: u,xp,win7!启动时我只想直接引导u,其他需附加操作才可以选择,能做到吗?

#8

帖子 Kandu » 2009-09-13 11:45

看了楼主的menu.lst
把第13行的timeout改改小点
把第17行的#hidemenu那行开头的#去掉
就可以搞定啦

把timeout设置成0的话,就和把其他列表都注释掉一样,麻烦。
头像
xiaguanzsg
帖子: 49
注册时间: 2009-05-14 18:13

Re: u,xp,win7!启动时我只想直接引导u,其他需附加操作才可以选择,能做到吗?

#9

帖子 xiaguanzsg » 2009-09-13 12:43

Kandu 写了:看了楼主的menu.lst
把第13行的timeout改改小点
把第17行的#hidemenu那行开头的#去掉
就可以搞定啦

把timeout设置成0的话,就和把其他列表都注释掉一样,麻烦。

谢谢!!
其实神也是人!!
头像
xiaguanzsg
帖子: 49
注册时间: 2009-05-14 18:13

Re: u,xp,win7!启动时我只想直接引导u,其他需附加操作才可以选择,能做到吗?

#10

帖子 xiaguanzsg » 2009-09-13 12:43

注册太麻烦 写了:就是把这几行都注释了
明白!谢谢!!!
其实神也是人!!
回复