|
rose4cat
初级用户
 
积分 46
发帖 20
注册 2008-10-10
状态 离线
|
『楼 主』:
挑战技术难题!
使用 LLM 解释/回答一下
本人欲制作一种利用PXE安装系统的方案,以前用服务器列表手动准备GHOSTSRV,不方便,现增加用DOS界面来选择镜像内容的功能
方法如下:
服务器用DHCP与TFTP ,结合PXE启动方法
服务器读一文件夹下GHO文件列表,并提示用户选择以准备GHOSTSRV会话
客户端PXE启动后,驱动网卡自动从服务器下载ghost映象文件列表,用wbat读取内容并提示选择,选择后将结果回传服务端(暂时用TFTP上传)
服务端轮询上传文件内容,根据回传数据启动相关GHOSTSRV会话,并建立文件表示准备OK,等待客户端连接来网克
客户端得到准备OK文件后下载到本地,并比较两文件内容是否相同,如果相同则启动GHOST连接网克,如不同,再等待或重上传选择文件。
服务器网克OK后删除准备文件,重头循环
现有难题:
一、 服务器无相关软件,自编VBS软件提示选择时便使程序暂停,无法轮询客户端上传的文件,便失去服务界面 的选择功能。
二、纯DOS下无法使用FOR /f in 功能,取不到选择文件与准备文件的内容,无法得知服务器是否准备好
现请教纯DOS下设置变量为TFTP服务器IP地址的方法
以便其具有移植性
另请教用批处理读其它两文本文件的内容来进行比较的方法
I want to make a PXE-based system installation solution. Previously, it was inconvenient to manually prepare GHOSTSRV using a server list. Now, the function of selecting image content through the DOS interface is added.
The method is as follows:
The server uses DHCP and TFTP, combined with the PXE boot method.
The server reads the list of GHO files in a folder and prompts the user to select to prepare the GHOSTSRV session.
After the client PXE boots, the network card driver automatically downloads the list of ghost image files from the server, uses wbat to read the content and prompt for selection. After selection, the result is uploaded back to the server (temporarily using TFTP upload).
The server polls the uploaded file content, starts the relevant GHOSTSRV session according to the returned data, and establishes a file indicating that it is ready, waiting for the client to connect for network disk cloning.
After the client gets the ready file, it downloads it locally and compares whether the contents of the two files are the same. If they are the same, it starts the GHOST connection for network disk cloning. If not, it waits or re-uploads the selected file.
After the server's network disk cloning is OK, it deletes the ready file and starts the cycle again.
Existing difficulties:
1. The server has no relevant software. When the self-written VBS software prompts for selection, it pauses the program, unable to poll the file uploaded by the client, thus losing the selection function of the service interface.
2. FOR /f in cannot be used under pure DOS, unable to obtain the content of the selected file and the ready file, unable to know whether the server is ready.
Now, I ask for the method of setting the variable as the TFTP server IP address under pure DOS to make it portable.
Also, I ask for the method of using batch processing to read the contents of other two text files for comparison.
|
|
2008-11-2 20:06 |
|
|
xugaohui
高级用户
   
积分 774
发帖 293
注册 2003-4-16 来自 湖北仙桃
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
难道1,客户端不是可以通过tftp上传选择项吗?
2,dos下获取服务器的文件列表太简单了,精通批处理就行.通过不断的tftp下载GhostLog.txt文件来确认服务端是否准备好了.
获取tftp服务器的ip请看:
http://cn-dos.net/forum/viewthread.php?tid=19003&fpage=2
这个软件支持与服务端tftp上传下载.你多看看run.txt,也就是一个dos批处理.用于与服务端配合使用的.
比较文本文件可以使用fc命令.
Last edited by xugaohui on 2008-11-3 at 12:59 ]
Is it that 1, the client can not select items through tftp upload?
2, getting the file list of the server under DOS is too simple, just be proficient in batch processing. Confirm whether the server is ready by continuously downloading the GhostLog.txt file via tftp.
For getting the IP of the tftp server, please see:
http://cn-dos.net/forum/viewthread.php?tid=19003&fpage=2
This software supports uploading and downloading with the server's tftp. You can read run.txt more, which is a DOS batch processing. It is used to cooperate with the server.
The fc command can be used to compare text files.
Last edited by xugaohui on 2008-11-3 at 12:59 ]
|

下载
09年7月7日 更新
感谢网友 囧HQY 提供空间 |
|
2008-11-3 12:55 |
|
|
rose4cat
初级用户
 
积分 46
发帖 20
注册 2008-10-10
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
Originally posted by xugaohui at 2008-11-3 12:55:
难道1,客户端不是可以通过tftp上传选择项吗?
2,dos下获取服务器的文件列表太简单了,精通批处理就行.通过不断的tftp下载GhostLog.txt文件来确认服务端是 ...
谢谢回复,功能基本实现了,但不完美,请帮忙完善。
http://upload.cn-dos.net/img/1049.rar
下面是我的部分代码,代码内相关程序有 ghostsrv 和一个有着几个GHO文件的文件夹 我的为 G:\BoDoS_Systems\
我是赤壁人,现在广东 QQ 411527203 ,有空常联系
Originally posted by xugaohui at 2008-11-3 12:55:
Isn't the client able to upload options via TFTP?
2, Getting the file list of the server under DOS is too simple, just be proficient in batch processing. By continuously downloading the GhostLog.txt file via TFTP to confirm that the server side is ...
Thanks for the reply. The function is basically implemented, but it's not perfect. Please help improve it.
http://upload.cn-dos.net/img/1049.rar
The following is part of my code. The related programs in the code are ghostsrv and a folder with several GHO files. Mine is G:\BoDoS_Systems\
I'm from Chibi, now in Guangdong. QQ 411527203. Let's keep in touch when free.
|
|
2008-11-3 20:36 |
|
|
rose4cat
初级用户
 
积分 46
发帖 20
注册 2008-10-10
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
另外,好像用hanewin的tftp 并不支持上传,不知是不是我没设置好
In addition, it seems that hanewin's tftp does not support uploading. I don't know if I didn't set it up properly.
|
|
2008-11-3 20:40 |
|
|
xugaohui
高级用户
   
积分 774
发帖 293
注册 2003-4-16 来自 湖北仙桃
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
hanewin tftp就支持上传文件.你的目的是在dos下可选择克隆的任务吧?用一个简单的批处理选择就好了.ghost有客户端达到多少个时才开网克的功能.
Last edited by xugaohui on 2008-11-3 at 21:21 ]
hanewin tftp supports uploading files. Is your purpose to select cloning tasks under DOS? Just use a simple batch processing selection. At how many clients does Ghost have the network cloning function enabled.
Last edited by xugaohui on 2008-11-3 at 21:21 ]
|

下载
09年7月7日 更新
感谢网友 囧HQY 提供空间 |
|
2008-11-3 21:12 |
|
|
rose4cat
初级用户
 
积分 46
发帖 20
注册 2008-10-10
状态 离线
|
『第 6 楼』:
使用 LLM 解释/回答一下
对,我的是用来做自助安装系统的,但难点在于服务器只开两个会话,不要所有的全开会话,要根据客户机的选择来准备相应的会话。
我的 hanewin dhcp 与tftp server都 有,有一个问题是好像用了TFTP,就提示 dhcp要注册
Yes, mine is used for self-service system installation, but the difficulty is that the server only opens two sessions, not all full sessions, and it needs to prepare corresponding sessions according to the client's selection.
I have both hanewin dhcp and tftp server. There is a problem that it seems that if TFTP is used, it prompts that dhcp needs to be registered
|
|
2008-11-3 21:24 |
|
|
rose4cat
初级用户
 
积分 46
发帖 20
注册 2008-10-10
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
对于你的%TPTPIP%是在autoexec.bat之前取的 还是用什么工具软件的配置文件读取的,能否在autoexec.bat内就直接使用%tftpip%
For your %TPTPIP% is it taken before autoexec.bat or read from the configuration file of some tool software? Can %tftpip% be directly used within autoexec.bat
|
|
2008-11-3 21:27 |
|
|
xugaohui
高级用户
   
积分 774
发帖 293
注册 2003-4-16 来自 湖北仙桃
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
同时网克多个不同会话的可能性比较小.
注册码好找.hane dhcp的tftp只能提供下载服务,
编辑run.txt,用choice提示客户机选择不同的ghost任务就好了.做的很自动化,也是要在客户端提示选择的.
run.txt是放在tftp根目录下面的.是一个批处理,在windows下编辑它,里面写入启动网络后要执行的命令.所以就不是autoexec.bat中就能直接使用这个变量.dos安全模式也不执行autoexec.bat的.
通过编辑run.txt.就可以给dos配置启动网络后要执行的命令了.
Last edited by xugaohui on 2008-11-3 at 21:46 ]
It is relatively unlikely to simultaneously network clone multiple different sessions.
Registration codes are easy to find. The tftp of hane dhcp can only provide download services.
Edit run.txt and use choice to prompt the client to select different ghost tasks. It is made very automated, and it also needs to prompt the selection on the client side.
run.txt is placed under the tftp root directory. It is a batch file. Edit it under Windows, and write the commands to be executed after starting the network in it. So it is not that this variable can be directly used in autoexec.bat. DOS safe mode also does not execute autoexec.bat.
By editing run.txt, you can configure the commands to be executed after the network is started for DOS.
Last edited by xugaohui on 2008-11-3 at 21:46 ]
|

下载
09年7月7日 更新
感谢网友 囧HQY 提供空间 |
|
2008-11-3 21:40 |
|
|
rose4cat
初级用户
 
积分 46
发帖 20
注册 2008-10-10
状态 离线
|
『第 9 楼』:
使用 LLM 解释/回答一下
请有时间看一个我的脚本, 我是想服务器自动搜寻一个GHOST文件库,然后返回给客户端选择,根据选择自动准备会话,
要求服务器一直在后台运行,不同的机器随时可以来安装
本意为电脑公司装机用,自建各种不同主板的GHO文件,以便新装机节省大量时间
如有好的文案请不惕赐教
Please have a look at my script when you have time. I want the server to automatically search for a GHOST file library and then return it for the client to choose from. According to the choice, it will automatically prepare the session. The requirement is that the server has been running in the background, and different machines can come to install at any time. The original intention is for computer companies to install systems. Build various GHO files for different motherboards by themselves, so as to save a lot of time for new system installations. If there is a good copywriting, please don't hesitate to give advice.
|
|
2008-11-3 22:30 |
|
|
rose4cat
初级用户
 
积分 46
发帖 20
注册 2008-10-10
状态 离线
|
『第 10 楼』:
使用 LLM 解释/回答一下
有一点不明白,你下载RUN.txt时就要用到 tftp服务器的IP,此时应该就有%TFTPIP%这个变量了呀? 我想要求我的服务端有便携性,绿色,任何地方只要安装好DHCP与TFTP,客户端就直接可以选择网克我们的GHO包
There is a point I don't understand. When you download RUN.txt, you need to use the IP of the TFTP server. At this time, there should be the %TFTPIP% variable. I want my server to be portable and green. Anywhere, as long as DHCP and TFTP are installed, the client can directly select to network boot our GHO image.
|
|
2008-11-9 19:43 |
|
|
xugaohui
高级用户
   
积分 774
发帖 293
注册 2003-4-16 来自 湖北仙桃
状态 离线
|
『第 11 楼』:
使用 LLM 解释/回答一下
这个变量是dos下启动网络后才有的.不是在进dos就能有的.
This variable is only available after starting the network under DOS, not when entering DOS.
|

下载
09年7月7日 更新
感谢网友 囧HQY 提供空间 |
|
2008-11-9 23:31 |
|
|
rose4cat
初级用户
 
积分 46
发帖 20
注册 2008-10-10
状态 离线
|
『第 12 楼』:
使用 LLM 解释/回答一下
谢谢回复,
弱弱的问下,你是通过netset这个软件获得tftpip变量吗,我光运行此程序说少文件,
Thanks for the reply,
弱弱的问下, are you getting the tftpip variable through the netset software? I just run this program and it says there are missing files.
|
|
2008-11-10 18:20 |
|