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.
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.
