无忧启动论坛

标题: 如何根据CHKPCI 结果选择 加载menu.lst [打印本页]

作者: buypro    时间: 2012-10-24 23:43
标题: 如何根据CHKPCI 结果选择 加载menu.lst
如何根据CHKPCI 结果选择 加载menu.lst??


我的情况是这样的。几台机器pxe启动。需要加载的镜像是不同的
3g.img.gz ,3g1.img.gz  ........ 这是因为不同机器配置不同所以采用了不同
镜像.



但是原来的菜单只有一个是default值。如果加载别的镜像需要人工选择
不同的镜像无法达到开机后直接就进入到桌面的效果.

是否能根据 CHKPCI  判定网卡的id然后选择相应的menu.lst。以达到所有机器
都能开机自动进入桌面???

不知道CHKPCI 怎么用。谁能给个示范吗?
谢谢

default 0
timeout 5

title 3g.img.gz  default  ok version
map --mem (pd)/3g.img.gz (hd0)
map --hook
root (hd0,0)
chainloader /ntldr

title 3g1.img.gz  default  ok version
map --mem (pd)/3g1.img.gz (hd0)
map --hook
root (hd0,0)
chainloader /ntldr
作者: zhaohj    时间: 2012-10-25 08:36
参考grub4dos帮助文档:
You may also want to load a different menu.lst for different client. GRUB4DOS
will scan the following location for configuration file:

        [/mybootdir]/menu.lst
        [/mybootdir]/menu.lst/01-88-99-AA-BB-CC-DD
        [/mybootdir]/menu.lst/C000025B
        [/mybootdir]/menu.lst/C000025
        [/mybootdir]/menu.lst/C00002
        [/mybootdir]/menu.lst/C0000
        [/mybootdir]/menu.lst/C000
        [/mybootdir]/menu.lst/C00
        [/mybootdir]/menu.lst/C0
        [/mybootdir]/menu.lst/C
        [/mybootdir]/menu.lst/default

Here, we assume the network card mac for the client machine is
88:99:AA:BB:CC:DD, and the ip address is 192.0.2.91 (C000025B). /mybootdir is
the directory of the boot file, for example, if boot file is /tftp/grldr, then
mybootdir=tftp.
-------------------------------
楼主使用无盘系统?
如果使用ip,这个需mac与ip绑定

[ 本帖最后由 zhaohj 于 2012-10-25 08:40 编辑 ]
作者: buypro    时间: 2012-10-25 12:24
谢谢楼上的兄弟。


work like a charm




欢迎光临 无忧启动论坛 (http://bbs.c3.wuyou.net/) Powered by Discuz! X3.3