Drivers script
-
What a symbolic link is (its similar to join in windows) it allows you to map one directory to another location.
so in the ln command you are saying to create a shortcut from that long path full of variables to the /nfs/Drivers… wait your link is wrong it should be to /tmp/mydrivers directory. You are trying to create a symbolic link to the target computer’s hard drive. What you will want to do after the link is established is to copy the content of /tmp/mydrivers to /ntfs/Drivers. Thus moving the drivers from the FOG server disk to the target computer disk.
[edit] your inserted picture is showing the link was created OK. Actually I had to use the link command to get around the devices having a space in the name (your welcome). Otherwise this script would have fallen down.
-
@george1421
Ok so:-
the ln command is the same as net use to windows. Except here it is ln -s <SP> <DP> where in windows it is net use x: \server\share<rest of path if needed>
-
Being mydrivers is a symbolic link, it doesn’t technically have a directory, just a location to point to.
3.the ls -la /tmp command shows the OptiPlex 790 having a space. Does this mean the folder on the server needs to have a space as well?
- If the link is there, and pointing to the correct location, what is casuing this to not pull the files from the server to the ntfs mount.
-
-
@adukes40 not sure if I can explain this well, but
- No the net use command is for connecting to network attached storage. This is different (at this point in the script) what is equivalent to the net use command nfsmount command
- In the case of this script the symbolic link (directory) is a representation of the correct driver for this deployment.
- No because you are copying the “contents” of that location and not the directory and its contents.
- ??
You have to remember this script (when its tested) will execute from the perspective of the target computer. This script establishes a nfs mount back to the images share on the FOG server and it mounts the local windows partition. Then based on the model name it finds in smbios it creates a symbolic link from a known location to a location built based on the information its collected during execution. The last bit is to copy the files from the known location /tmp/mydrivers/* to the windows partition mounted under /nfs/Drivers. That is the general concept of the script. Of course there is some error checking along the way to ensure things are where they are suppose to be but that is the script in a nut shell.
-
since the /tmp/mydrivers link is created make sure you can list the contents of
ls /ntfs/Drivers
If both checkout then just issue the copy command manuallycp -R /tmp/mydrivers/* /ntfs/Drivers
That should copy the files to the windows drive.