• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Drivers script

    Scheduled Pinned Locked Moved
    General
    2
    24
    5.5k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • george1421G
      george1421 Moderator
      last edited by george1421

      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.

      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

      adukes40A 1 Reply Last reply Reply Quote 0
      • adukes40A
        adukes40 @george1421
        last edited by

        @george1421
        Ok so:

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

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

        1. 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.
        george1421G 1 Reply Last reply Reply Quote 0
        • george1421G
          george1421 Moderator @adukes40
          last edited by

          @adukes40 not sure if I can explain this well, but

          1. 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
          2. In the case of this script the symbolic link (directory) is a representation of the correct driver for this deployment.
          3. No because you are copying the “contents” of that location and not the directory and its contents.
          4. ??

          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.

          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

          1 Reply Last reply Reply Quote 0
          • george1421G
            george1421 Moderator
            last edited by

            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 manually cp -R /tmp/mydrivers/* /ntfs/Drivers That should copy the files to the windows 😄 drive.

            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

            1 Reply Last reply Reply Quote 0
            • 1
            • 2
            • 2 / 2
            • First post
              Last post

            218

            Online

            12.0k

            Users

            17.3k

            Topics

            155.2k

            Posts
            Copyright © 2012-2024 FOG Project