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

fog.drivers script will not run correctly in postdownloadscripts

Scheduled Pinned Locked Moved Solved
FOG Problems
7
69
31.7k
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.
  • G
    george1421 Moderator @Quazz
    last edited by george1421 Nov 3, 2016, 8:53 AM Nov 3, 2016, 2:51 PM

    @Quazz That is what I was just trying to reverse engineer. Where did the /fog directory come from? The only nfs share is /images.

    The info that is missing here is that I the mount isn’t happening in this script but in the fog postdownload script from here: https://forums.fogproject.org/topic/4278/utilizing-postscripts-rename-joindomain-drivers-snapins/29

    [edit] Side note, I found that my post install scripts fail when deploying to NVMe disks since the disk structure is different. I was looking at merging some of the code magic Tom created into my scripts too.

    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!

    T 1 Reply Last reply Nov 3, 2016, 3:02 PM Reply Quote 1
    • T
      THEMCV @Quazz
      last edited by Nov 3, 2016, 3:00 PM

      @Quazz The IP is correct. I must have gotten things turned around looking at the Auto install script on the FOG wiki.

      So I need to make a fog directory in root like this, correct?

      /fog/Drivers/Win7/OptiPlex 980/x64
      
      Q 1 Reply Last reply Nov 3, 2016, 3:03 PM Reply Quote 1
      • T
        THEMCV @george1421
        last edited by Nov 3, 2016, 3:02 PM

        @george1421 Just so I’m understanding, so the /fog directory should or should not exist? And if it does it is because of the script?

        G 1 Reply Last reply Nov 3, 2016, 3:05 PM Reply Quote 0
        • Q
          Quazz Moderator @THEMCV
          last edited by Quazz Nov 3, 2016, 9:09 AM Nov 3, 2016, 3:03 PM

          @THEMCV The fog directory does not exist by default, it must be manually created, given correct permissions and an entry in /etc/exports needs to be made to export it as a nfs share so it can be mounted on clients.

          mkdir /fog
          chmod 777 /fog
          chown fog:fog /fog
          nano /etc/exports
          
          add this line add the bottom:
          
          /fog *(ro,sync,no_wdelay,subtree_check,insecure_locks,no_root_squash,insecure,fsid=2
          
          then finally do the following command to export the directory:
          
          exportfs -a
          
          Check if it it is being exported with:
          
          showmount --exports
          
          

          Use sudo if necesary

          Do note that you still need to create diretories and add drivers yourself.

          T 1 Reply Last reply Nov 3, 2016, 3:09 PM Reply Quote 0
          • G
            george1421 Moderator @THEMCV
            last edited by george1421 Nov 3, 2016, 9:08 AM Nov 3, 2016, 3:05 PM

            @THEMCV OK, I understand you may be getting conflicting information here because we are coming at the same problem from different perspectives.

            In my scripts I have the drivers (on the fog server) in /images/drivers …
            That is what the scripts should be trying to mount. You can use /fog/drivers but you will need to setup an export in NFS to do that. Me being lazy I just used the /images share that was already there.

            Looking at the script from Lee’s page this is the line in question

            remotedriverpath="/images/drivers/$osn/$machine"
            

            In this case its saying the drivers are in /images/drivers/… on the fog server. Where is /fog/drivers coming from?

            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!

            T 1 Reply Last reply Nov 3, 2016, 3:18 PM Reply Quote 0
            • T
              THEMCV @Quazz
              last edited by THEMCV Nov 3, 2016, 9:17 AM Nov 3, 2016, 3:09 PM

              @Quazz Okay, I completed this and it’s finished. showmount --exports does show /fog is working. And I added in the drivers that I had in the other location.

              1 Reply Last reply Reply Quote 0
              • T
                THEMCV @george1421
                last edited by Nov 3, 2016, 3:18 PM

                @george1421 I really am not sure. I don’t see anything in the script that refers to /fog except in the notation. I added the folder and copied the drivers into there from /images/drivers and am testing it now.

                Q 1 Reply Last reply Nov 3, 2016, 3:22 PM Reply Quote 0
                • Q
                  Quazz Moderator @THEMCV
                  last edited by Quazz Nov 3, 2016, 9:25 AM Nov 3, 2016, 3:22 PM

                  @THEMCV Alright, well, I just realized none of this makes sense!

                  You are correct, the fog folder isn’t referenced anywhere.

                  I’m guessing the issue is REALLY in your /images/postdownloadscipts/fog.drivers

                  1 Reply Last reply Reply Quote 0
                  • T
                    THEMCV
                    last edited by Nov 3, 2016, 3:24 PM

                    the /fog mount error has disappeared from the process now @Quazz , but the same “Failed to download driver information”

                    Q W 2 Replies Last reply Nov 3, 2016, 3:26 PM Reply Quote 0
                    • Q
                      Quazz Moderator @THEMCV
                      last edited by Nov 3, 2016, 3:26 PM

                      @THEMCV Did you edit the fog.drivers you got from Tom?

                      Because the default version would mount /images/drivers

                      1 Reply Last reply Reply Quote 1
                      • W
                        Wayne Workman @THEMCV
                        last edited by Nov 3, 2016, 3:27 PM

                        @THEMCV Remove the >/dev/null 2>&1 part from that command in the script, the one that looks like this:
                        rsync -aqz "$remotedriverpath" "$clientdriverpath" >/dev/null 2>&1

                        Then we will be able to see an actual error.

                        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!
                        Daily Clean Installation Results:
                        https://fogtesting.fogproject.us/
                        FOG Reporting:
                        https://fog-external-reporting-results.fogproject.us/

                        1 Reply Last reply Reply Quote 0
                        • T
                          THEMCV
                          last edited by Nov 3, 2016, 3:31 PM

                          @Quazz I did not, no. I think I found the /fog reference though and might be our problem.

                          I think it might be my postdownload script itself.

                          #!/bin/sh
                          ## This file serves as a starting point to call your custom postimaging scripts.
                          ## <SCRIPTNAME> should be changed to the script you're planning to use.
                          ## Syntax of post download scripts are
                          #. ${postdownpath}<SCRIPTNAME>
                          
                          if [ $osid == "5" -o $osid == "6" -o $osid == "7" ]; then #only handling Win7/8/8.1
                              clearScreen;
                              mkdir /ntfs &>/dev/null
                              ntfs-3g -o force,rw $part /ntfs #mount image (remember this is mounting partition [U][B]after[/B][/U] new image is deployed)
                              mkdir /fog &>/dev/null
                              mount -o nolock,proto=tcp $storageip:/fog/ /fog #this is a share created on server under /fog which contains drivers, software etc.. (just add /fog to exports but you could use existing location i.e. /images and if you do, do not ne$
                              dots "Mounting Device";
                              if [ "$?" = "0" ]; then
                                  echo "Done";
                                  . ${postdownpath}fog.drivers # run fog.drivers script
                                  umount /ntfs; # unmount when all is done :-)
                              else
                                  echo "Failed To Mount Device";
                                  sleep 30;
                              fi
                          fi
                          

                          @Wayne-Workman I removed it and am testing it now.

                          Q G 2 Replies Last reply Nov 3, 2016, 3:33 PM Reply Quote 0
                          • Q
                            Quazz Moderator @THEMCV
                            last edited by Nov 3, 2016, 3:33 PM

                            @THEMCV I do not recommend having commands in the postdownloadscripts, only calls to your scripts.

                            Move the relevant information into another file, imo.

                            1 Reply Last reply Reply Quote 1
                            • G
                              george1421 Moderator @THEMCV
                              last edited by Nov 3, 2016, 3:33 PM

                              @THEMCV Well, hell now I understand where the /fog is coming from. That is NOT in the original script I was referencing. https://forums.fogproject.org/topic/4278/utilizing-postscripts-rename-joindomain-drivers-snapins/29

                              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!

                              T 1 Reply Last reply Nov 3, 2016, 3:42 PM Reply Quote 0
                              • T
                                THEMCV @george1421
                                last edited by Nov 3, 2016, 3:42 PM

                                @george1421 I feel like an idiot. I got them jumbled up in my early stages. Bleh. Okay, so should I take the script that is from your link and use it or do as @Quazz suggested and just include a call to it?

                                @Wayne-Workman: The message from removing the >/dev/null 2>&1

                                This rsync lacks old-style --compress due to its external zlib. Try --zz. Continuing without compression.
                                
                                rsync:` write failed on "/ntfs/Windows/DRV/OptiPlex 980/x64/chipset/PP0H5-A00-00.WUB7/JasperFo.uno": No space left on device (20)
                                rsync error: error in file IO (code 11) at receiver.c(393) [reciever=3.1.2]
                                

                                Which doesn’t make much sense as the device does have space.

                                Q 1 Reply Last reply Nov 3, 2016, 3:43 PM Reply Quote 0
                                • Q
                                  Quazz Moderator @THEMCV
                                  last edited by Nov 3, 2016, 3:43 PM

                                  @THEMCV Either works, I personally prefer having a more modular approach because it makes it easier to expand and debug, but it’s mostly personal taste.

                                  T 1 Reply Last reply Nov 3, 2016, 3:48 PM Reply Quote 0
                                  • T
                                    THEMCV @Quazz
                                    last edited by Nov 3, 2016, 3:48 PM

                                    @Quazz I just have

                                    . ${postdownpath}fog.drivers
                                    

                                    Is that good?

                                    Q 1 Reply Last reply Nov 3, 2016, 3:48 PM Reply Quote 0
                                    • Q
                                      Quazz Moderator @THEMCV
                                      last edited by Nov 3, 2016, 3:48 PM

                                      @THEMCV Yes, that’s fine.

                                      T 1 Reply Last reply Nov 3, 2016, 3:52 PM Reply Quote 0
                                      • T
                                        THEMCV @Quazz
                                        last edited by Nov 3, 2016, 3:52 PM

                                        @Quazz Okay, it’s in there. No change. Still acting like there’s no space left on the device which isn’t true at all. The image is only ~15GB.

                                        Q G 2 Replies Last reply Nov 3, 2016, 3:57 PM Reply Quote 0
                                        • Q
                                          Quazz Moderator @THEMCV
                                          last edited by Nov 3, 2016, 3:57 PM

                                          @THEMCV I’d have to guess your ntfs isn’t being mounted correctly on the client. Most likely it’s trying to rsync to the fog client (which is residing in RAM) which will of course not have space to write to.

                                          How do your scripts look like now?

                                          1 Reply Last reply Reply Quote 0
                                          • 1
                                          • 2
                                          • 3
                                          • 4
                                          • 2 / 4
                                          2 / 4
                                          • First post
                                            28/69
                                            Last post

                                          247

                                          Online

                                          12.0k

                                          Users

                                          17.3k

                                          Topics

                                          155.2k

                                          Posts
                                          Copyright © 2012-2024 FOG Project