China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-25 06:50
中国DOS联盟论坛 » DOS媒体世界 & 网络技术 (多媒体室) » Challenge technical difficulties! View 2,880 Replies 11
Original Poster Posted 2008-11-02 20:06 ·  中国 广东 中山 电信
初级用户
Credits 46
Posts 20
Joined 2008-10-10 16:00
17-year member
UID 127997
Gender Male
Status Offline
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.
Floor 2 Posted 2008-11-03 12:55 ·  中国 广东 揭阳 电信
高级用户
★★
Credits 774
Posts 293
Joined 2003-04-16 00:00
23-year member
UID 1579
Gender Male
From 湖北仙桃
Status Offline
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 提供空间
Floor 3 Posted 2008-11-03 20:36 ·  中国 广东 中山 电信
初级用户
Credits 46
Posts 20
Joined 2008-10-10 16:00
17-year member
UID 127997
Gender Male
Status Offline
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.
Floor 4 Posted 2008-11-03 20:40 ·  中国 广东 中山 电信
初级用户
Credits 46
Posts 20
Joined 2008-10-10 16:00
17-year member
UID 127997
Gender Male
Status Offline
In addition, it seems that hanewin's tftp does not support uploading. I don't know if I didn't set it up properly.
Floor 5 Posted 2008-11-03 21:12 ·  中国 广东 揭阳 电信
高级用户
★★
Credits 774
Posts 293
Joined 2003-04-16 00:00
23-year member
UID 1579
Gender Male
From 湖北仙桃
Status Offline
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 提供空间
Floor 6 Posted 2008-11-03 21:24 ·  中国 广东 中山 电信
初级用户
Credits 46
Posts 20
Joined 2008-10-10 16:00
17-year member
UID 127997
Gender Male
Status Offline
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
Floor 7 Posted 2008-11-03 21:27 ·  中国 广东 中山 电信
初级用户
Credits 46
Posts 20
Joined 2008-10-10 16:00
17-year member
UID 127997
Gender Male
Status Offline
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
Floor 8 Posted 2008-11-03 21:40 ·  中国 广东 揭阳 电信
高级用户
★★
Credits 774
Posts 293
Joined 2003-04-16 00:00
23-year member
UID 1579
Gender Male
From 湖北仙桃
Status Offline
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 提供空间
Floor 9 Posted 2008-11-03 22:30 ·  中国 广东 中山 电信
初级用户
Credits 46
Posts 20
Joined 2008-10-10 16:00
17-year member
UID 127997
Gender Male
Status Offline
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.
Floor 10 Posted 2008-11-09 19:43 ·  中国 广东 中山 电信
初级用户
Credits 46
Posts 20
Joined 2008-10-10 16:00
17-year member
UID 127997
Gender Male
Status Offline
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.
Floor 11 Posted 2008-11-09 23:31 ·  中国 广东 揭阳 电信
高级用户
★★
Credits 774
Posts 293
Joined 2003-04-16 00:00
23-year member
UID 1579
Gender Male
From 湖北仙桃
Status Offline
This variable is only available after starting the network under DOS, not when entering DOS.
下载
09年7月7日 更新
感谢网友 囧HQY 提供空间
Floor 12 Posted 2008-11-10 18:20 ·  中国 广东 中山 电信
初级用户
Credits 46
Posts 20
Joined 2008-10-10 16:00
17-year member
UID 127997
Gender Male
Status Offline
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.
Forum Jump: