• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. Jonathan Cool
    3. Posts
    • Profile
    • Following 0
    • Followers 1
    • Topics 19
    • Posts 171
    • Best 10
    • Controversial 0
    • Groups 0

    Posts made by Jonathan Cool

    • RE: Windows 7 : universal image with Postdownload script : issues

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

      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
      

      And now, the feedback … :

      • “mkdir C:\TestSetupComplete” : no folder was created …
      • sc config FOGService start= auto : FOG is always disabled
      • dism : maybe it’s good because i have no drivers problems
      • shutdown : just after the deploy, i not sure if the computer really reboot …
      posted in Windows Problems
      Jonathan CoolJ
      Jonathan Cool
    • RE: Windows 7 : universal image with Postdownload script : issues

      @george1421 said in Windows 7 : universal image with Postdownload script : issues:

      @Jonathan-Cool I would also test from cmd prompt that sc config FOGService start= auto works as expected with your OS.

      @george1421 Yes, it’s works. I already tried 😉

      posted in Windows Problems
      Jonathan CoolJ
      Jonathan Cool
    • RE: Windows 7 : universal image with Postdownload script : issues

      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
      posted in Windows Problems
      Jonathan CoolJ
      Jonathan Cool
    • RE: Windows 7 : universal image with Postdownload script : issues

      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
      
      posted in Windows Problems
      Jonathan CoolJ
      Jonathan Cool
    • RE: Windows 7 : universal image with Postdownload script : issues

      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 ?

      posted in Windows Problems
      Jonathan CoolJ
      Jonathan Cool
    • RE: Windows 10 driver injection doesn't install during sysprep

      i think there is a misunderstanding.
      The HP8000 is an old computer and there is no drivers for the Win10 OS.
      So, I didn’t copy any files in my FOG Drivers folder.
      I ran a task with this computer just ONLY to see if the reg hack work.

      posted in Windows Problems
      Jonathan CoolJ
      Jonathan Cool
    • RE: Windows 7 : universal image with Postdownload script : issues

      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 😞

      posted in Windows Problems
      Jonathan CoolJ
      Jonathan Cool
    • RE: Windows 10 driver injection doesn't install during sysprep

      Hi,

      First, informations about my stuff :

      Server :

      FOG Version : Running Version 1.3.5-RC-8 ; SVN Revision: 6066
      OS : Debian GNU/Linux 8

      Specifications :

      • all images are on a Synology NAS storage : mounted with NAS_ip:/images
      • french user 🙂

      I discover recently the drivers injection method with scripts fog.postdownloadscript and fog.drivers.
      With Win7x64, it’s work by using the hack registry method to add C:\Windows\DRV in the DevicePath.
      I read in this topic some people have troubles to inject drivers on a Win10x64 computer using this method.
      I just realize quick test with 3 models (Optiplex7010, 820G1, HP8000) and it’s seem to works … :
      Just after the deploy, i check if the C:\Windows\DRV contained files, check if the registry hack has been realize and i check if all drivers are installed …

      Optiplex7010 :

      • C:\Windows\DRV : OK
      • registry hack : OK
      • all drivers are installed

      HP8000 :
      i didn’t find Win10x64 drivers for this computer BUT after the deploy, i can see the registry hack has work …

      HP820G1:

      • C:\Windows\DRV : OK
      • registry hack : OK
      • some drivers are absents … maybe i forgotten some files when i created the folder drivers on NAS …

      To conclude, i ask some questions to myself … this method work or this method NOT work for Win10x64 ? That’s is the question !

      Enc : Screenshot of my Optiplex7010 results …
      link text

      posted in Windows Problems
      Jonathan CoolJ
      Jonathan Cool
    • RE: Windows 7 : universal image with Postdownload script : issues

      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 ?

      posted in Windows Problems
      Jonathan CoolJ
      Jonathan Cool
    • RE: Windows 7 : universal image with Postdownload script : issues

      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 !

      posted in Windows Problems
      Jonathan CoolJ
      Jonathan Cool
    • RE: Windows 7 : universal image with Postdownload script : issues

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

      posted in Windows Problems
      Jonathan CoolJ
      Jonathan Cool
    • RE: Windows 7 : universal image with Postdownload script : issues

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

      posted in Windows Problems
      Jonathan CoolJ
      Jonathan Cool
    • RE: Windows 7 : universal image with Postdownload script : issues

      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 …

      posted in Windows Problems
      Jonathan CoolJ
      Jonathan Cool
    • RE: Windows 7 : universal image with Postdownload script : issues

      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.

      posted in Windows Problems
      Jonathan CoolJ
      Jonathan Cool
    • RE: Windows 7 : universal image with Postdownload script : issues

      Hello,
      After some research and an very interessting discuss with George, i’m back to understand why the drivers injections works with my Optiplex 7010 and not with my HP 8000 EliteBook.
      The facts :
      I use another fog.postdownload (https://forums.fogproject.org/topic/8889/fog-post-install-script-for-win-driver-injection/7) to find the good partition for the mount /ntfs :

      #!/bin/bash
      . /usr/share/fog/lib/funcs.sh
      [[ -z $postdownpath ]] && postdownpath="/images/postdownloadscripts/"
      case $osid in
          5|6|7|9)
              clear
              [[ ! -d /ntfs ]] && mkdir -p /ntfs
              getHardDisk
              if [[ -z $hd ]]; then
                  handleError "Could not find hdd to use"
              fi
              getPartitions $hd
              for part in $parts; do
                  umount /ntfs >/dev/null 2>&1
                  fsTypeSetting "$part"
                  case $fstype in
                      ntfs)
                          dots "Testing partition $part"
                          ntfs-3g -o force,rw $part /ntfs
                          ntfsstatus="$?"
                          if [[ ! $ntfsstatus -eq 0 ]]; then
                              echo "Skipped"
                              continue
                          fi
                          if [[ ! -d /ntfs/windows && ! -d /ntfs/Windows && ! -d /ntfs/WINDOWS ]]; then
                              echo "Not found"
                              umount /ntf >/dev/null 2>&1
                              continue
                          fi
                          echo "Success"
                          break
                          ;;
                      *)
                          echo " * Partition $part not NTFS filesystem"
                          ;;
                  esac
              done
              if [[ ! $ntfsstatus -eq 0 ]]; then
                  echo "Failed"
                  debugPause
                  handleError "Failed to mount $part ($0)\n    Args: $*"
              fi
              echo "Done"
              debugPause
              #. ${postdownpath}fog.log
              . ${postdownpath}fog.drivers
             # . ${postdownpath}fog.ad
              umount /ntfs
              ;;
          *)
              echo "Non-Windows Deployment"
              debugPause
              return
              ;;
      esac
      

      On the HP 8000 EliteBook, i ran a debug task with an Windows 7 x64 image.
      I hit “CTRL+C” just after the “Preparing Drivers” process :

      • cd /ntfs : i see boot files (BOOTSEC.BAK, Boot, System Volume Information, bootmgr), not the Windows partition files
      • lsblk : the wrong partition is mounted (/dev/sda1 instead of /dev/sda2)
      • i type “reboot”. i go back into Windows 7. I can’t seen anyfiles into C:\Windows\DRV. None driver installed (i think of Win7 tried install drivers with generic drivers).

      Same operation with Optiplex 7010 :
      I hit “CTRL+C” just after the “Preparing Drivers” process :

      • cd /ntfs : i see boot files, not the Windows partition files
      • lsblk : the wrong partition is mounted (/dev/sda1 instead of /dev/sda2)
      • i type “reboot”. Go back into Windows 7. I CAN seen drivers files into C:\Windows\DRV.

      One question : why, with the same script, it’s work for the Optiplex7010 and not for the HP 8000 ?
      I don’t undersand why i saw the wrong partition with “lsblk” in command prompt of Optiplex 7010 but, it finally works …

      posted in Windows Problems
      Jonathan CoolJ
      Jonathan Cool
    • RE: Windows 7 : universal image with Postdownload script : issues

      @george1421
      Thanks you for your answer.
      I need to learn more about the SetupComplete.cmd to populate it correctly.
      I know what is OOBE and why it exist but i don’t kown how to use it correctly.
      I will do some tests with it and with my VM.

      But, i have no time to do it … i hope i could do new tests soon …

      posted in Windows Problems
      Jonathan CoolJ
      Jonathan Cool
    • RE: Windows 7 : universal image with Postdownload script : issues

      @Tom-Elliott Many thanks for your detailed answer Tom !

      posted in Windows Problems
      Jonathan CoolJ
      Jonathan Cool
    • RE: Windows 7 : universal image with Postdownload script : issues

      Hi,
      Alright, i understood why it didn’t work.

      I tried another fog.postdownload :
      fog.postdownload :

      #!/bin/bash
      . /usr/share/fog/lib/funcs.sh <-- i forgot to add this line in my first attempt ... but i think, it's essential !!
      case $osid in
          [5-7]|9)
      	clearScreen
      	getHardDisk
      	getPartitions $hd
      	if [[ ! -d /ntfs ]]; then
      	    mkdir -p /ntfs >/dev/null 2>&1
      	    [[ ! $? -eq 0 ]] && echo " * Failed to Mount Device"
      	fi
      	for part in $parts; do
      	    umount /ntfs >/dev/null 2>&1
      	    ntfs-3g -o remove_hiberfile,rw $part /ntfs >/dev/null 2>&1
      	    [[ ! $? -eq 0 ]] && continue
      	done
      	. ${postdownpath}fog.drivers
      	umount /fog /ntfs /images >/dev/null 2>&1
      	;;
      esac
      

      And it’s seem to work !
      No error during the drivers copy process on the OptiPlex 7010.
      After the reboot, i need to insert admin id …
      Next, Windows install the drivers and i can show the files into C:\Windows\DRV\

      Now, i need to search a solution to reboot the computer AFTER the drivers installation …
      I know the trick to open the administrator session once time (AutoAdminLogoon in registry) …

      Next steps :

      • autologin in administrator once to open a session for drivers installation
      • find a way to reboot computer after drivers installation
      • try with others models.

      Just a question : can i create my own CAB ? Especially for HP … ?

      posted in Windows Problems
      Jonathan CoolJ
      Jonathan Cool
    • Windows 7 : universal image with Postdownload script : issues

      Hi,

      I had read some tutos and understood many things but its not working correctly …

      Informations about my stuff :

      Server :

      FOG Version : Running Version 1.3.5-RC-8 ; SVN Revision: 6066
      OS : Debian GNU/Linux 8

      Specifications : all images are on a Synology NAS storage : mounted with NAS_ip:/images

      The AIM : create universal image. After a deploy, want to FOS will able to install drivers for the good model. Her, just a test with an Optiplex 7010.

      Other informations : upload and dowload tasks work like a charm. This topic is only for a downloadpostscript problem.

      On NAS, there is :
      /images : many images of differents devices
      /images/dev/postinitscripts/fog.postint with

      Code : /dev/postinitscripts/fog.postint

      #!/bin/bash
      ## This file serves as a starting point to call your custom pre-imaging/post init loading scripts.
      ## <SCRIPTNAME> should be changed to the script you're planning to use.
      ## Syntax of post init scripts are
      #. ${postinitpath}<SCRIPTNAME>
      

      /images/postdownloadscripts with 2 files : fog.postdownload and fog.drivers :

      Code : fog.postdownload :

      #!/bin/bash
      ## blabla 
      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 
              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
      

      Code : fog.drivers :

      #!/bin/sh
       
      ceol=`tput el`;
      machine=`dmidecode -s system-product-name`; # Gets machine model
      machine="${machine%"${machine##*[![:space:]]}"}" #Removes Trailing Space
      system64="/ntfs/Windows/SysWOW64/regedit.exe"; # dirty way to determine if it's 64bit or not
      if [ -f "$system64" ]; then
          setarch="x64"
      else
          setarch="x86"
      fi
      #############################################
      if [ $osid == "5" ]; then
          osn="Win7"
      elif [ $osid == "6" ]; then
          osn="Win8"
      elif [ $osid == "7" ]; then
          osn="Win8.1"
      fi
      #############################################
      dots "Preparing Drivers";
      mkdir /ntfs/Windows/DRV &>/dev/null;
      echo -n "In Progress";
       
      cabextract -d /ntfs/Windows/DRV "/images/Drivers/$osn/${machine}"/*.CAB &>/dev/null;
       
      regfile="/ntfs/Windows/System32/config/SOFTWARE"
      key="\Microsoft\Windows\CurrentVersion\DevicePath"
      devpath="%SystemRoot%\inf;%SystemRoot%\DRV";
      reged -e "$regfile" &>/dev/null <<EOFREG
      ed $key
      $devpath
      q
      y
      EOFREG
      echo -e "\b\b\b\b\b\b\b\b\b\b\b${ceol}Done"; # this just removes "In Progress and replaces it with done :-)"
      
      folder with the Dell .CAB file : /images/Drivers/Win7/OptiPlex 7010/7010-win7-A09-NWJXJ.CAB (i checked the folder name with the FOG interface, Inventory section of the host)
      

      i created a win7 image with VirutalBox with :

      • small install of win7
      • folder C:\Windows\DRV
      • not in domain

      I saved this image with FOG on the NAS.
      When i tries to deploy it on my OptiPlex 7010, they are some issues : (debug task mode)

      • ntfs-3g : No mountpoint is specified : where the value $part is defined ?
      • Préparing Drivers …… Done
      • umount : can’t umount /ntfs : invalid argument
      • Mounting Directory ……… Done
      • /usr/share/fig/lib/funcs.sh : line 895 → 905 : write error : No Space Left On Device
      • Mounting Directory ……… Done
      • Changing hostname ………………………………… < Freeze

      After a “CTRL+C” break :

      • ls /ntfs/Windows/DRV : 0 files

      If i run manually ./images/postdownloadscript/fog.drivers :-

      • fog.drivers : line 23 : dots : command not found
      • hard disk computer seem to write some datas …. « Done »
      • ls /ntfs/Windows/DRV : 7010 with
        –> win7/x64
        –> audio
        –> chipset
        –> ect

      After a reboot by ctrl+alt+suppr : i can run Windows 7 but there are 0 files into C:\Windows\DRV

      What’s wrong with my setup ?

      posted in Windows Problems
      Jonathan CoolJ
      Jonathan Cool
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 6 / 9