• 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.
    • THEMCVT
      THEMCV @george1421
      last edited by

      @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 Reply Quote 0
      • Q
        Quazz Moderator @THEMCV
        last edited by Quazz

        @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
        • THEMCVT
          THEMCV
          last edited by

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

          Q Wayne WorkmanW 2 Replies Last reply Reply Quote 0
          • Q
            Quazz Moderator @THEMCV
            last edited by

            @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
            • Wayne WorkmanW
              Wayne Workman @THEMCV
              last edited by

              @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
              • THEMCVT
                THEMCV
                last edited by

                @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 george1421G 2 Replies Last reply Reply Quote 0
                • Q
                  Quazz Moderator @THEMCV
                  last edited by

                  @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
                  • george1421G
                    george1421 Moderator @THEMCV
                    last edited by

                    @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!

                    THEMCVT 1 Reply Last reply Reply Quote 0
                    • THEMCVT
                      THEMCV @george1421
                      last edited by

                      @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 Reply Quote 0
                      • Q
                        Quazz Moderator @THEMCV
                        last edited by

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

                        THEMCVT 1 Reply Last reply Reply Quote 0
                        • THEMCVT
                          THEMCV @Quazz
                          last edited by

                          @Quazz I just have

                          . ${postdownpath}fog.drivers
                          

                          Is that good?

                          Q 1 Reply Last reply Reply Quote 0
                          • Q
                            Quazz Moderator @THEMCV
                            last edited by

                            @THEMCV Yes, that’s fine.

                            THEMCVT 1 Reply Last reply Reply Quote 0
                            • THEMCVT
                              THEMCV @Quazz
                              last edited by

                              @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 george1421G 2 Replies Last reply Reply Quote 0
                              • Q
                                Quazz Moderator @THEMCV
                                last edited by

                                @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
                                • george1421G
                                  george1421 Moderator @THEMCV
                                  last edited by george1421

                                  @THEMCV OK what I think I would do at this point is insert a debug pause after the error generator.

                                  #/fog/Drivers/Win7/Latitude E5410/x86
                                  rsync -aqz "$remotedriverpath" "$clientdriverpath" >/dev/null 2>&1
                                  [[! $? -eq 0]] && handleError "Failed to download driver information"
                                  
                                  debugPause
                                  

                                  After the handleError line after the rsync.

                                  Then go back and schedule a deployment to this computer but pick the debug deployment checkbox.

                                  Then pxe boot the target computer. It will print out a bunch of text but drop you to a command prompt. From there key in fog This will single step you through the deployment process. When you get to the point of the error press crtl-C to exit the installer script. This will leave you at a linux command prompt. From there we should be able to check the disk size and what not.

                                  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!

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

                                    Wait, I just found a flaw in the script from Lee’s page (note: not a script Lee created though) for Windows 10, for Win7 its correct since the last partition on disk 0 is the windows partition.

                                            getPartitions $hd
                                            for part in $parts; do
                                                true
                                            done
                                            dots "Mounting partition $part"
                                    

                                    This loosely gives me the last partition for Win10. But that is NOT the windows partition. In the case of the system I’m testing there are 3 partitions, but partition 2 is the windows partition. I’m not using rsync but just regular copy that threw the error.

                                    I think more intelligence needs to be built into this loop, where it should check to see if the /windows directory exists before exiting.

                                    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!

                                    Q 1 Reply Last reply Reply Quote 0
                                    • Q
                                      Quazz Moderator @george1421
                                      last edited by

                                      @george1421 I personally use

                                      echo -n " * Mounting Windows File System...................";
                                      if [ -b /dev/sda4 ]
                                       then
                                          mount.ntfs-3g /dev/sda4 /ntfs 2>/tmp/mntfail
                                       else
                                          mount.ntfs-3g /dev/sda2 /ntfs 2>/tmp/mntfail
                                      fi
                                      

                                      Logic: If the system has 4 partitions (or more), then (assuming singleboot windows) it is a GTP installation and Windows is on partition 4. Otherwise it’s a MBR installation and it will generally be on partition 2.

                                      This is incredibly over simplistic, however and only reliably works on clean microsoft images, not OEM or the like.

                                      A loop function would need to be created to check for the windows folder or something.

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

                                        @Quazz I had a similar simple conditional test, until I ran into a NVMe drive with its crazy disk naming of /dev/nvme0n1[partition]

                                        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!

                                        Q 1 Reply Last reply Reply Quote 0
                                        • Q
                                          Quazz Moderator @george1421
                                          last edited by

                                          @george1421 Good point, we mostly deal in refurbished hardware and my script is non critical, so it hasn’t been a big deal for me so far.

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

                                            @Quazz Unless the @Senior-Developers can come up with a brilliant way to find the windows partition, I think we are going to have to mount each partition, in order, until we find one that has the /Windows directory on it. That is kind of an expensive way to do that (in CPU time).

                                            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!

                                            Q Tom ElliottT 2 Replies Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 2 / 4
                                            • First post
                                              Last post

                                            273

                                            Online

                                            12.0k

                                            Users

                                            17.3k

                                            Topics

                                            155.2k

                                            Posts
                                            Copyright © 2012-2024 FOG Project