无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站广告联系 微信:wuyouceo QQ:184822951
查看: 2293|回复: 2
打印 上一主题 下一主题

如何根据CHKPCI 结果选择 加载menu.lst

[复制链接]
跳转到指定楼层
1#
发表于 2012-10-24 23:43:47 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
如何根据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
2#
发表于 2012-10-25 08:36:43 | 只看该作者
参考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 编辑 ]
回复

使用道具 举报

3#
 楼主| 发表于 2012-10-25 12:24:16 | 只看该作者
谢谢楼上的兄弟。


work like a charm
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2024-9-23 00:31

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表