|
回复 #121 不点 的帖子
不点大侠,我想问一个问题:
我看内置中有一个不带参数的configfile,这个是不是代表configfile menu.lst,即是指以menu.lst为外置默认菜单。既然是这样,应该就可省略的,只是不同时再用这个语句。
我进行了测试(本意是调用外置的 /H3_MENU.LST):
pxe detect
configfile
default 0
timeout 1
title find /h3_menu.lst, /boot/grub/h3_menu.lst, /grub/h3_menu.lst
errorcheck off
configfile /H3_MENU.LST
configfile /BOOT/GRUB/H3_MENU.LST
configfile /GRUB/H3_MENU.LST
find --set-root --ignore-floppies --ignore-cd /h3_menu.lst && configfile /h3_menu.lst
find --set-root --ignore-floppies --ignore-cd /boot/grub/h3_menu.lst && configfile /boot/grub/h3_menu.lst
find --set-root --ignore-floppies --ignore-cd /grub/h3_menu.lst && configfile /grub/h3_menu.lst
errorcheck on
commandline
title commandline
commandline
title reboot
reboot
title halt
halt
如果根下有menu.lst就执行了,不会执行H3_MENU.LST,但将第二行改成
configfile /H3_MENU.LST
就可以了。
===================
我又测试了一下,基本弄清楚了。
1、configfile不带参数的作用就是cofigfile /menu.lst
2、如果取消这一行,grldr在没有碰到configfile之前将不知道外置菜单的名称。这样就会出内置菜单。
3、要让grldr以其他外置文件作菜单,就在configfile后加这个菜单名作参数,即:“configfile /菜单文件名”
这样看来,这个命令在内置菜单中不能省,而且configfile是一个不返回调用,一旦文件存在则后续语句将不再执行。不知我的说法对不对。
[ 本帖最后由 hhh333 于 2010-5-13 19:02 编辑 ] |
|