无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站投放广告、加入VIP会员,请联系 微信:wuyouceo
查看: 6095|回复: 14
打印 上一主题 下一主题

关于grub4dos pxe装载startrom.com和NTLDR路径问题的请教

[复制链接]
跳转到指定楼层
1#
发表于 2009-5-25 21:10:36 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
grub4dos pxe加载多个pe或者ris 通常使用下面的命令
title [6]  ris
   pxe keep
   chainloader --force (pd)\test\startrom.0
但是下一个tftp下载的ntldr和winnt.sif是会在tftproot而不会在tftproot\test目录中去查找, 经过测试其实ntldr和winnt.sif使用了dhcp option 67, 也就是bootfile grldr的路径, 假设dhcp option 67使用aaa\grldr,  则tftp下载ntldr和winnt.sif会在tftproot\aaa目录中查找, 现在问题是我们可否更改pxe bootfile这个值呢,如果可以,就可以支持多个pe启动,而不用修改ntldr和winnt.sif的名字,可以放到任意目录中.
grub> pxe
blksize : 1048
basedir : /
bootfile : grldr.0
我测试了下面的代码,结果发现是不行的,
pxe bootfile aaa/grldr.0
显示无效参数,只有basedir是可以更改的
我不知道如何去修改这个值来欺骗startrom.com,  可以指导一下吗,谢谢。
2#
 楼主| 发表于 2009-5-28 11:49:23 | 只看该作者
看来是没有人对这个问题感兴趣, 在google中反复搜索, 终于搜索到一些相关信息,grub4dos称为bootfile, pxelinux中成为tftp prefix, 应该都是通过调用pxe api - pxenv_cache_info获取的, 估计是很难修改了

Now you should be able to call the PXE API. The next step is to get some information about the network. Specifically, you will need the TFTP server's IP address, but you may also want the DHCP server's IP address, the client machine's IP address and the client's MAC address. To get this information (and more) you need to call the PXE API's "Get Cached Info" function. Setup the "t_PXENV_CACHED_INFO" structure as described in the specification and call the PXE API with the address of this structure and 0x0071 as the opcode parameter. For the packet type field in this structure, use "type = 2" and leave everything else set to zero (if you just want the address where the information already is, instead of having the information copied to your own buffer).

不管怎样,microsoft的oschooser加载器确实是修改了pxe启动的这些参数,然后重新加载菜单中选择的特定路径的startrom.com或者其他pxebootloader, 这个可以用oschooser加载pxelinux.0可以看出来(加载grldr失败,可能是兼容性问题)

2009-05-28 09:21:33       0s 192.168.226.200 Get/octet  D:\RemoteInstall\OSChooser\i386\startrom.com
2009-05-28 09:21:35       0s 192.168.226.200 Get/octet  D:\RemoteInstall\OSChooser\i386\NTLDR (专用的ntldr 172k)
2009-05-28 09:21:35       0s 192.168.226.200 Get/octet  D:\RemoteInstall\OSChooser\i386\winnt.sif(内容好像是txtsetup.sif,不知道有什么用,删除也可以启动)
中间使用upd传输了一些验证和文本菜单的信息(不使用tftp传输,pxe api只能支持udp),看下面的pxelinux.cfg, 路径和pxelinux.0相同,而不是tftproot
2009-05-28 09:21:41       0s 192.168.226.200 Get/octet  D:\RemoteInstall\Setup\Chinese\IMAGES\xp-chs\i386\templates\pxelinux.0
2009-05-28 09:21:41  E   192.168.226.200 Get        1 File not found D:\RemoteInstall\Setup\Chinese\IMAGES\xp-chs\i386\templates\pxelinux.cfg\01-00-0c-29-0f-55-68
2009-05-28 09:21:41  E   192.168.226.200 Get        1 File not found D:\RemoteInstall\Setup\Chinese\IMAGES\xp-chs\i386\templates\pxelinux.cfg\C0A8E2C8
2009-05-28 09:21:41  E   192.168.226.200 Get        1 File not found D:\RemoteInstall\Setup\Chinese\IMAGES\xp-chs\i386\templates\pxelinux.cfg\C0A8E2C
2009-05-28 09:21:41  E   192.168.226.200 Get        1 File not found D:\RemoteInstall\Setup\Chinese\IMAGES\xp-chs\i386\templates\pxelinux.cfg\C0A8E2
2009-05-28 09:21:41  E   192.168.226.200 Get        1 File not found D:\RemoteInstall\Setup\Chinese\IMAGES\xp-chs\i386\templates\pxelinux.cfg\C0A8E
2009-05-28 09:21:41  E   192.168.226.200 Get        1 File not found D:\RemoteInstall\Setup\Chinese\IMAGES\xp-chs\i386\templates\pxelinux.cfg\C0A8
2009-05-28 09:21:41  E   192.168.226.200 Get        1 File not found D:\RemoteInstall\Setup\Chinese\IMAGES\xp-chs\i386\templates\pxelinux.cfg\C0A
2009-05-28 09:21:41  E   192.168.226.200 Get        1 File not found D:\RemoteInstall\Setup\Chinese\IMAGES\xp-chs\i386\templates\pxelinux.cfg\C0
2009-05-28 09:21:41  E   192.168.226.200 Get        1 File not found D:\RemoteInstall\Setup\Chinese\IMAGES\xp-chs\i386\templates\pxelinux.cfg\C
2009-05-28 09:21:41       0s 192.168.226.200 Get/octet  D:\RemoteInstall\Setup\Chinese\IMAGES\xp-chs\i386\templates\pxelinux.cfg\default
2009-05-28 09:21:41  Error   192.168.226.200 Get        1 File not found D:\RemoteInstall\Setup\Chinese\IMAGES\xp-chs\i386\templates\bootmsg.txt

客户端屏幕上显示 tftp prefix: Setup\Chinese\IMAGES\xp-chs\i386\templates\ , 而不是通常的tftp prefix: (空白即tftproot根目录)
回复

使用道具 举报

3#
 楼主| 发表于 2009-5-28 19:51:17 | 只看该作者
谢谢提醒,我知道路径可以改, 不过ntldr就5个字符,加路径限制太多了
回复

使用道具 举报

4#
发表于 2009-8-7 13:47:35 | 只看该作者
请教一下楼主这个问题解决了么?
我最近也想把原来ris设定好的xp安装 移植 到grub4dos里
回复

使用道具 举报

5#
 楼主| 发表于 2009-8-7 16:29:54 | 只看该作者
原帖由 adehmily 于 2009-8-7 13:47 发表
请教一下楼主这个问题解决了么?
我最近也想把原来ris设定好的xp安装 移植 到grub4dos里



没有解决, 只是一个xp安装没有问题啊, 你的问题应该说是用一个程序部分替代微软的ris服务, 和grub4dos没有直接关系,grub4dos只是一个选择菜单。

参考 http://oss.netfarm.it/guides/pxe.php, MS BINL Protocol 是个复杂的私有协议,ris-linux-0.4.tar.gz 用来模拟这个协议
回复

使用道具 举报

6#
发表于 2009-8-7 16:45:44 | 只看该作者

回复 #7 jamesdai2002 的帖子

我的意思是我原来用ris去引导,然后安装xp的,安装文件相当于 D:\RemoteInstall\Setup\Chinese\IMAGES\xp-chs\i386\

然后我想改用grub4dos,但是grub 的title怎么写才会调用原来的安装过程?
回复

使用道具 举报

7#
 楼主| 发表于 2009-8-7 19:53:10 | 只看该作者

回复 #8 adehmily 的帖子

这个没有尝试过,把grldr改名startrom.com也许可以,没有试过。

不过可以用ris调用grub4dos或者pxelinux,  把grub4dos或者pxelinux作为一个菜单项, ris本身就是一个pxelinux 或者grub4dos类似的引导器, 可以做菜单的
回复

使用道具 举报

8#
发表于 2009-8-10 13:43:57 | 只看该作者
用grub4dos调用ris的windows 安装看来有点困难
好吧,那我试试ris 菜单调用grub4dos
回复

使用道具 举报

9#
发表于 2009-8-10 13:55:59 | 只看该作者
试试直接chainloader --force (pd)/i386/setupldr.bin行不行?
回复

使用道具 举报

10#
发表于 2009-8-10 14:51:30 | 只看该作者

回复 #11 xianglang 的帖子

你的答复真的让人感觉独树一帜啊。
回复

使用道具 举报

11#
发表于 2009-8-10 15:01:52 | 只看该作者
没办法,我就老是幻想着可以这样简单就能够象CD启动一样安装XP——我是没条件试,要不早试了。
回复

使用道具 举报

12#
发表于 2009-8-10 15:19:51 | 只看该作者

回复 #11 xianglang 的帖子

哇,你的答案让我测试到现在
哈哈哈
还准备贴图给你呢
回复

使用道具 举报

13#
发表于 2009-8-10 15:22:48 | 只看该作者

回复 #1 jamesdai2002 的帖子

如果我没有记错,jamesdai2002朋友曾经在sysoft论坛就同样的问题以Public用户身份提问,很可惜,当时我没有看懂他在说什么,以为他只是询问如何通过pxe启动多个PE的问题,因此,建议他通过google搜索来解决,而且,因为其他的事情发生了一些不愉快,但现在再重新回头看楼主的帖子,显然不是我当初想象的情况,事实上通过最近这一段时间看楼主的发言,楼主实际上是pxe启动及WDS方面的高手,在这方面的知识和经验远远超过我这初入门者。因此,有什么不恭敬的地方还希望楼主原谅。

楼主的问题涉及到修改pxe的启动环境变量,这已经远远超出我的能力范畴,不过,如果楼主有能力进行编程的话,应该可以通过修改grub4dos的源代码(或者pxelinux的源代码,当然,我还是推荐从grub4dos入手)来解决,既然ris有能力修改这个环境变量,那么就没有理由其他软件不可以。
回复

使用道具 举报

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

本版积分规则

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

闽公网安备 35020302032614号

GMT+8, 2025-2-28 06:30

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

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