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

    Windows 7 : universal image with Postdownload script : issues

    Scheduled Pinned Locked Moved Solved
    Windows Problems
    5
    40
    9.8k
    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 @Lee Rowlett
      last edited by

      @Lee-Rowlett said in Windows 7 : universal image with Postdownload script : issues:

      that the first partition was a system recovery partition

      Then maybe its safe to assume that there IS a /Windows directory on that recover partition?? If so that would explain why the detection code is failing (Ugh!)

      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!

      Tom ElliottT george1421G 2 Replies Last reply Reply Quote 0
      • Tom ElliottT
        Tom Elliott @george1421
        last edited by

        @george1421 I think the typo didn’t allow the NTFS directory to me unmounted leaving the last mounted partition in place when it tried to do any action.

        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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        1 Reply Last reply Reply Quote 1
        • Q
          Quazz Moderator @Jonathan Cool
          last edited by Quazz

          Well, I think why that script won’t work 100% is because the script has a tiny bug in it.

                              if [[ ! -d /ntfs/windows && ! -d /ntfs/Windows && ! -d /ntfs/WINDOWS ]]; then
                                  echo "Not found"
                                  umount /ntf >/dev/null 2>&1
                                  continue
                              fi
          

          Should be

                              if [[ ! -d /ntfs/windows && ! -d /ntfs/Windows && ! -d /ntfs/WINDOWS ]]; then
                                  echo "Not found"
                                  umount /ntfs >/dev/null 2>&1
                                  continue
                              fi
          

          The problem being that when the script loops through the mounting of parts, but can’t find the Windows folder, it fails to unmount the ntfs folder, which will not allow the system to then mount anything else to it, and thusly it fails.

          Not sure why it would work for your optiplex, but fix that and try again, imo.

          edit: Did not see Tom’s post, I essentially posted the same thing.

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

            @george1421 I think we need to identify if the HP recovery partition contains a /Windows directory. If so, then the script’s logic test is wrong. We may have to find another check to identify the true 😄 drive from a recovery partition.

            Right now the script may be fundamentally flawed,

            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
            • Jonathan CoolJ
              Jonathan Cool
              last edited by

              Hello,
              Thank you all for your answer : quick reply :

              • there is any recovery partition because, when i create a master image, i always delete all partitions. The first partition is the boot partiyon of Windows 7 (called “Partition System Reserved”).

              • i will try after edit the typo. Thank you, i missed it.

              I will come back with the resultats.

              My stuff :
              Server :
              FOG Version : Running Version 1.5.9
              OS : Debian GNU/Linux 10
              FOG Client Version : 0.12
              Specifications :
              > All images are on a Synology NAS storage : mounted with NAS_ip:/images
              > French user :)
              > “If everything would work the first time, what would you have learned?”
              Challenges make knowledge growth … by George1421 ;)

              1 Reply Last reply Reply Quote 0
              • Jonathan CoolJ
                Jonathan Cool
                last edited by

                Hi,
                I’m back with the results … and they are the same …
                Maybe with the output of SSH, that can help you …

                [http://txt.do/drvaa](link url)

                Also, i have an other idea : just for the HP8000, i could hard-coded the good partition directly into the fog.postdownload script ?
                Like that : “if $model = HP Compaq 8000 Elite USDT PC” (i don’t know if this var really exist, it’s just an example)
                do
                umount /ntfs
                mount /dev/sda2 /ntfs

                or somethink like that …

                My stuff :
                Server :
                FOG Version : Running Version 1.5.9
                OS : Debian GNU/Linux 10
                FOG Client Version : 0.12
                Specifications :
                > All images are on a Synology NAS storage : mounted with NAS_ip:/images
                > French user :)
                > “If everything would work the first time, what would you have learned?”
                Challenges make knowledge growth … by George1421 ;)

                Jonathan CoolJ 1 Reply Last reply Reply Quote 0
                • Jonathan CoolJ
                  Jonathan Cool @Jonathan Cool
                  last edited by

                  @Jonathan-Cool
                  I wrong, it’s seem to work …
                  I just do few tests to confirm this (test with Opti7010 and HP8000) and i will go back …

                  My stuff :
                  Server :
                  FOG Version : Running Version 1.5.9
                  OS : Debian GNU/Linux 10
                  FOG Client Version : 0.12
                  Specifications :
                  > All images are on a Synology NAS storage : mounted with NAS_ip:/images
                  > French user :)
                  > “If everything would work the first time, what would you have learned?”
                  Challenges make knowledge growth … by George1421 ;)

                  Jonathan CoolJ 1 Reply Last reply Reply Quote 0
                  • Jonathan CoolJ
                    Jonathan Cool @Jonathan Cool
                    last edited by

                    @Jonathan-Cool I’m going crazy … after reboot the computer and retry a debug task, it’s didn’t work at this point …

                    My stuff :
                    Server :
                    FOG Version : Running Version 1.5.9
                    OS : Debian GNU/Linux 10
                    FOG Client Version : 0.12
                    Specifications :
                    > All images are on a Synology NAS storage : mounted with NAS_ip:/images
                    > French user :)
                    > “If everything would work the first time, what would you have learned?”
                    Challenges make knowledge growth … by George1421 ;)

                    1 Reply Last reply Reply Quote 0
                    • Jonathan CoolJ
                      Jonathan Cool
                      last edited by Jonathan Cool

                      It’s working now !
                      I did a mistake …
                      This is what I did to find my mistake

                      • create a debug Task
                      • at the prompt, add root password
                      • with SSH, run the fog command
                      • CTRL+C after “Preparing Drivers”
                      • run “. /usr/share/fog/lib/funcs.sh”
                      • cd /images/postdownloadscripts
                      • sh -x fog.postdownload
                      • copy / paste the output in a txt file to debug
                      • analyze the code
                      • find a mistake with rsync
                        I copied the ini folder into “/images/Drivers/Win7/HP Compaq 8000 Elite USDT PC/” BUT the good path is “/images/Drivers/Win7/HP Compaq 8000 Elite USDT PC/x64”.
                        I tried after move the files in the good folder … and it’s works !

                      Now, i have a little other strange problem with domain on the HP 8000.
                      i can’t join the domain and fog.log said :

                      02/05/2017 13:39 Middleware::Authentication ERROR: Could not get security token
                      02/05/2017 13:39 Middleware::Authentication ERROR: Could not find file 'C:\Program Files (x86)\FOG\token.dat'
                      

                      If I go into the folder, i can’t see the token.dat file.

                      With the same image and with the Optiplex7010, domain jonction works perfectly … strange !

                      My stuff :
                      Server :
                      FOG Version : Running Version 1.5.9
                      OS : Debian GNU/Linux 10
                      FOG Client Version : 0.12
                      Specifications :
                      > All images are on a Synology NAS storage : mounted with NAS_ip:/images
                      > French user :)
                      > “If everything would work the first time, what would you have learned?”
                      Challenges make knowledge growth … by George1421 ;)

                      Tom ElliottT george1421G 2 Replies Last reply Reply Quote 0
                      • Tom ElliottT
                        Tom Elliott @Jonathan Cool
                        last edited by

                        @Jonathan-Cool The token.dat message is a “normal” thing and likely not the problem you’re seeing with domain not joining.

                        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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                        1 Reply Last reply Reply Quote 1
                        • george1421G
                          george1421 Moderator @Jonathan Cool
                          last edited by

                          @Jonathan-Cool said in Windows 7 : universal image with Postdownload script : issues:

                          I tried after move the files in the good folder … and it’s works !

                          So it WAS the french guys fault…

                          Good job finding the issue!!

                          For your domain join, did the network adapter drivers load correctly? I have seen the no network thing cause a problem. This was on an intel nuc where the network drivers where not signed properly and you must accept the unsigned certificate for windows to load the drivers. I’m not saying this is your case now, only one place to check.

                          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
                          • Jonathan CoolJ
                            Jonathan Cool
                            last edited by

                            You right, it’s was me … 😉
                            But, the script contained a little typo, remember 😉
                            And now, i understood why the domain fail … simply because i CTRL+C for debug … and after, i rebooted the computer … but, the hostname changer process didin’t run ! And i has a bad hostname …
                            I just want to thanks all of you for your help.
                            With this post, i understood many thinks and i improve myself day after day 😉
                            I’m very happy to learned news features with FOG and new knowledge 😉
                            It’s solved !

                            PS : this script works with Windows 10 ?

                            My stuff :
                            Server :
                            FOG Version : Running Version 1.5.9
                            OS : Debian GNU/Linux 10
                            FOG Client Version : 0.12
                            Specifications :
                            > All images are on a Synology NAS storage : mounted with NAS_ip:/images
                            > French user :)
                            > “If everything would work the first time, what would you have learned?”
                            Challenges make knowledge growth … by George1421 ;)

                            Tom ElliottT 1 Reply Last reply Reply Quote 3
                            • Tom ElliottT
                              Tom Elliott @Jonathan Cool
                              last edited by

                              @Jonathan-Cool Ideally yes. But won’t know until it’s tested.

                              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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                              Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                              Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                              1 Reply Last reply Reply Quote 0
                              • Jonathan CoolJ
                                Jonathan Cool
                                last edited by

                                Hi,
                                It’s me again …
                                I just need a precision about drivers : in this case, for Win7x64 and a HP820G3 (seem to be the same problem for Win10x64) : after the deploy and the unique reboot to join the domain, i can see in “Manage Device”, two “other” devices.

                                IF I right-click on theses devices, update Drivers … and choose the C:\Windows\DRV location, Windows “finish” the installation.
                                Why Windows can’t do this installation just after the deploy ?
                                Is it a signature problem with theses devices ? (Wifi and Display Audio Driver).
                                This problem break my dream of a Golden Full-automated Windows Image 😞

                                My stuff :
                                Server :
                                FOG Version : Running Version 1.5.9
                                OS : Debian GNU/Linux 10
                                FOG Client Version : 0.12
                                Specifications :
                                > All images are on a Synology NAS storage : mounted with NAS_ip:/images
                                > French user :)
                                > “If everything would work the first time, what would you have learned?”
                                Challenges make knowledge growth … by George1421 ;)

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

                                  @Jonathan-Cool It is possible that these two devices are hidden behind another device. I am just giving a random example.

                                  Its possible that the wifi and audio chips on the motherboard are connect via a usb3 controller on the motherboard. You will not be able to see or load the drivers for the wifi or audio until the driver for the usb3 controller is loaded. The driver load process is only one pass (my guess). In that once it installs all known drivers it doesn’t look a second time for new devices that show up because the device in front was loaded.

                                  It is hard to explain but I see it perfectly in my mind…

                                  So what can you do?

                                  This is just a guess, you can try in the setupcompleted.cmd file run DISM to force the drivers to load for all missing ones.

                                  something like: dism /online /add-driver /driver: "c:\windows\drv"

                                  But I have to warn this is only a guess. I have not had to do this my self. We only buy Dells and they work every time, no funny business.

                                  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
                                  • Jonathan CoolJ
                                    Jonathan Cool
                                    last edited by

                                    Hi,
                                    Thank you @george1421 🙂
                                    After some tests, it seem to work but not at 100 per cent.
                                    What i did :
                                    On the Win7x64 Vbox image :

                                    • add a script SetupComplete.cmd with this line :
                                      dism /Online /add-driver /driver:C:\Windows\DRV /Recurse

                                    I reUP the image on FOG server and tried on the 820G3 : it’s seem to work ! … but … the domain jonction seem to be broken.

                                    I said “What is going on now ???”
                                    I tried the same image on the same computer (820G3) and … same result.
                                    I tried the image on the Opti7010 and … same resultat : the domain jonction feature didn’t work anymore.
                                    I said “I am going crazy ?”
                                    I Googled this fact … and i find some answers (on this link : https://wiki.fogproject.org/wiki/index.php?title=FOG_Client#FOG_Client_with_Sysprep)

                                         Disable FOGService: Windows Control Pannel -> View by Small Icons -> Administrative Tools -> Services -> Right click FOGService -> Properties -> Startup Type -> Disabled
                                    Re-enable FOGService post-imaging:
                                    
                                    Create the below file.
                                    
                                    C:\Windows\Setup\scripts\SetupComplete.cmd
                                    
                                    Place these lines within the file, and then save.
                                    
                                    sc config FOGService start= auto
                                    shutdown -t 0 -r
                                    

                                    Well, if i add theses lines on my SetupComplete.cmd, it’s will work this time (Drivers AND domain jonction) ? Or i am in the wrong way ?

                                    My stuff :
                                    Server :
                                    FOG Version : Running Version 1.5.9
                                    OS : Debian GNU/Linux 10
                                    FOG Client Version : 0.12
                                    Specifications :
                                    > All images are on a Synology NAS storage : mounted with NAS_ip:/images
                                    > French user :)
                                    > “If everything would work the first time, what would you have learned?”
                                    Challenges make knowledge growth … by George1421 ;)

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

                                      @Jonathan-Cool There is two ways to have the target computers to connect to domain.

                                      1. Have unattend.xml do this. You must provide the domain connection information in your unattend.xml. I do it this way because we have a complicated OU structure and we I have some scripts in the post install that decide where (physical location) the target computer is being installed and type of computer (desktop, laptop) to calculates the OU where the computer will exist. Once the target OU is calculated the unattend.xml file is updated using a sed expression. Then during OOBE, windows setup connects the computer to the domain.
                                      2. Have the fog client connect the computer to the domain. To do this, you must install the fog client into your reference image but disable the service. You must disable the service to keep the fog client from starting too early in OOBE in the windows setup process. Then use the setupcomplete.cmd batch file to re-enable the fog client service. This is the script you posted below. You must also have the fog client options enabled in the FOG web gui.

                                      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
                                      • Jonathan CoolJ
                                        Jonathan Cool
                                        last edited by

                                        Hi,
                                        I used the 2nd method but, in the fog.log on the client, error 1355 …
                                        It’s strange because, with an other image without any SetupComand.cmd and a classic install of FOG Client into the image reference, it’s works.

                                        I used the Global settings to set ID of my domain. It’s not a typo …

                                        With the image using the SetupComplete.cmd, domain jonction feature fail …

                                        I think Windows correctly reads the SetupComands.cmd because the first problem seem solved (Drivers Injection). But, after the reboot, in services, i seen “FOGService : Disabled”.

                                        My SetupComplete.cmd :

                                        rem Injection des pilotes avant le premier Login Screen
                                        dism /Online /add-driver /driver:C:\Windows\DRV /Recurse
                                        
                                        rem Demarrage du service FOG avant le premier Login Screen
                                        sc config FOGService start= auto
                                        shutdown -t 5 -r
                                        

                                        My stuff :
                                        Server :
                                        FOG Version : Running Version 1.5.9
                                        OS : Debian GNU/Linux 10
                                        FOG Client Version : 0.12
                                        Specifications :
                                        > All images are on a Synology NAS storage : mounted with NAS_ip:/images
                                        > French user :)
                                        > “If everything would work the first time, what would you have learned?”
                                        Challenges make knowledge growth … by George1421 ;)

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

                                          @Jonathan-Cool So your current problem is that the fog service is not turning back on in the setupcomplete.cmd?

                                          What happens if you change the order in the setupcomplete.cmd file. Make the sc command come first maybe dism is doing something right, but causing the sc command to fail. The sc command looks right and should work.

                                          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
                                          • Jonathan CoolJ
                                            Jonathan Cool
                                            last edited by Jonathan Cool

                                            2 side problems with SetupComplete.cmd :

                                            • the fog service is not turning back on
                                            • IF i turn the service at “start” manuelly, the domain jonction feature fail with error 1355

                                            I have not theses problems without SetupComplete.cmd.

                                            I tried to put the dism command-line in second and the sc config in first … same result.
                                            Strange 😞

                                            Now, i ask my self if the SetupComplete is really executed …

                                            Edit : i will try this script :

                                            mkdir C:\TestSetupComplete
                                            sc config FOGService start= auto
                                            dism /Online /add-driver /driver:C:\Windows\DRV /Recurse /ForceUnsigned
                                            shutdown -t 5 -r

                                            My stuff :
                                            Server :
                                            FOG Version : Running Version 1.5.9
                                            OS : Debian GNU/Linux 10
                                            FOG Client Version : 0.12
                                            Specifications :
                                            > All images are on a Synology NAS storage : mounted with NAS_ip:/images
                                            > French user :)
                                            > “If everything would work the first time, what would you have learned?”
                                            Challenges make knowledge growth … by George1421 ;)

                                            george1421G Jonathan CoolJ 2 Replies Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post

                                            142

                                            Online

                                            12.0k

                                            Users

                                            17.3k

                                            Topics

                                            155.2k

                                            Posts
                                            Copyright © 2012-2024 FOG Project