How to troubleshoot the failure of "net use" to map a network drive in Ghost start.bat
| Article:HOWTO32413 | | | Created: 2010-09-25 | | | Updated: 2010-10-07 | | | Article URL http://www.symantec.com/docs/HOWTO32413 |
Question/Issue:
When using "net use" to map a network drive in Ghost start.bat, the command might fail with a system error like following.
e.g.
System error 53 - The network path was not found.
System error 67 - The network name cannot be found.
System error 85 - The local device name is already in use.
However, any standard and error outputs regarding Ghost start.bat are not displayed during WinPE boots because "echo off" is set on top of startnet.cmd, which is executed automatically and executes the start.bat during WinPE boots.
How do you troubleshoot the failure of "net use" to map a network drive in Ghost start.bat?
Answer:
- Click "Start editing" button on the page titled "Symantec Ghost Boot Wizard - Review" in the Ghost Boot Wizard.
- To add commands to troubleshoot the failure and to get the standard and error output as follows,
edit "start.bat".
--- snip of start.bat ---
set path=%path%;x:\ghost
rem --- To check network connections. ---
netsh interface ipv4 show interface >> x:\ghost\startlog.txt
rem --- To check network configuration. ---
ipconfig >> x:\ghost\startlog.txt
rem --- To check workstartion is started. ---
net config >> x:\ghost\startlog.txt 2>&1
rem --- Create script for diskpart command ---
echo list volume >> x:\ghost\dpscript.txt
rem --- To check which drive is already used. ---
echo diskpartStart >> x:\ghost\startlog.txt
diskpart /s x:\ghost\dpscript.txt >> x:\ghost\startlog.txt 2>&1
echo diskpartEnd >> x:\ghost\startlog.txt
rem --- To execute net use to map a network drive. ---
echo netUseStart >> x:\ghost\startlog.txt
net use G: \\machinename\sharename /user:ghost ghost >> x:\ghost\startlog.txt 2>&1
net use >> x:\ghost\startlog.txt
echo netUseEnd >> x:\ghost\startlog.txt
x:
cd \ghost
rem --- This will create primary OS drive configuration ---
ghost32.exe /setosdrives /blind >> x:\ghost\startlog.txt
start ghost32.exe
--- snip of start.bat ---
- Finish the creation of the Ghost boot disk containing the start.bat.
- Start Ghost executable with the Ghost boot disk.
- Quit Ghost executable.
- To check standard and error outputs, open startlog.txt on command prompt.
x:\ghost> notepad startlog.txt
- Backup startlog.txt to persistent storage before WinPE is shutting down if needed.
- Modify "net use" command or start.bat depending on system error
on the page titled "Symantec Ghost Boot Wizard - Review" in the Ghost Boot Wizard.
e.g.
Check diskpart output in the startlog.txt and which drive is already used if the following error occurs,
then change drive name for "net use" command properly.
System error 85 - The local device name is already in use.
|
|
Article URL http://www.symantec.com/docs/HOWTO32413
Terms of use for this information are found in Legal Notices









Thank you.