• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. Greg Plamondon
    3. Posts
    • Profile
    • Following 1
    • Followers 0
    • Topics 74
    • Posts 393
    • Best 14
    • Controversial 0
    • Groups 1

    Posts made by Greg Plamondon

    • RE: Wrong Partition is mounted during deployment. (FOG 1.5.7.56)

      @george1421
      Here is my fog.postdownload

      #!/bin/bash
      . /usr/share/fog/lib/funcs.sh
      curl -A "" -Lkso /tmp/hinfo.sh "${web}/service/hostinfo.php?mac=$mac"
      . /tmp/hinfo.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
                  true
              done
              dots "Mounting partition $part"
              ntfs-3g -o force,rw $part /ntfs >/dev/null 2>&1
              if [[ ! $? -eq 0 ]]; then
                  echo "Failed"
                  debugPause
                  handleError "Failed to mount $part ($0)\n    Args: $*"
              fi
              echo "Done"
              case $othertag in
                 [Bb][Aa][Yy])
                      . ${postdownpath}fog.log
                      . ${postdownpath}fog.replace-files_bay
                      . ${postdownpath}fog.drivers
                      . ${postdownpath}fog.ad_bay
                      . ${postdownpath}fog.DesktopInfo
                      ;;
                 [Mm][Pp][Mm][Ii])
                      . ${postdownpath}fog.log
                      . ${postdownpath}fog.replace-files_mpmi
                      . ${postdownpath}fog.drivers
                      . ${postdownpath}fog.ad_mpmi
                      . ${postdownpath}fog.DesktopInfo
                      ;;
                 [Hh][Oo][Mm][Ee])
                      . ${postdownpath}fog.log
                      . ${postdownpath}fog.replace-files_home
                      . ${postdownpath}fog.drivers
                      ;;
                 [Mm][Tt][Ss])
                      . ${postdownpath}fog.log
                      . ${postdownpath}fog.replace-files_fog
                      . ${postdownpath}fog.drivers
                      . ${postdownpath}fog.ad_bay
                      . ${postdownpath}fog.DesktopInfo
                      ;;
                   *)
      

      we use the $othertag to do different things for our sister companies.

      How is $part determined?

      posted in FOG Problems
      Greg PlamondonG
      Greg Plamondon
    • RE: Wrong Partition is mounted during deployment. (FOG 1.5.7.56)

      @george1421 do you mind sharing your complex post download script with me 🙂

      posted in FOG Problems
      Greg PlamondonG
      Greg Plamondon
    • RE: Wrong Partition is mounted during deployment. (FOG 1.5.7.56)

      well, I thought I had it licked but here is the issue with Windows 10 version 2004 MBR image.
      It creates 3 partitions but they are in the wrong order.

      Fog mounts /dev/sda3 which, in this case, is partition 3 the Recovery partition.

      alt text

      Here is the lsblk for the VM golden image.

      alt text

      posted in FOG Problems
      Greg PlamondonG
      Greg Plamondon
    • Wrong Partition is mounted during deployment. (FOG 1.5.7.56)

      I am using the postdownload scripts function to replace files on the os.
      I have recently created a golden image of Windows 10 build 2004 and something has changed.
      The image is a GPT image.
      When deploying the image to the client pc it fails with:
      alt text

      the OS partition is /dev/sda3

      any ideas on how to fix this?

      *** EDIT
      I went back to the golden image and used diskpart to delete partition 4 which is the Recovery Partition.

      diskpart
      select disk 0
      select partition 4
      delete partition override
      exit
      

      re-syspreped and uploaded to fogserver.

      posted in FOG Problems
      Greg PlamondonG
      Greg Plamondon
    • RE: Powershell script doesnt work when fog client executes it

      @Sebastian-Roth said in Powershell script doesnt work when fog client executes it:

      @Greg-Plamondon said in Powershell script doesnt work when fog client executes it:

      The problem I am seeing is that the following script works if I run it from a PowerShell window but not as a snapin.

      Do you see it being executed in the fog-client log? Just want to make sure!

      Are you aware of the fact that fog-client runs as SYSTEM account. Maybe this causes your script to behave different to what you expect?

      Not sure if this is playing a role in your case as well? https://forums.fogproject.org/topic/11671/powershell-snapin-and-registry

      Sorry just updated my original post with the log.

      posted in FOG Problems
      Greg PlamondonG
      Greg Plamondon
    • Powershell script doesnt work when fog client executes it

      I have the lock/logins screen set so that users know not to logon while the setup process is running.

      alt text

      I am using this PowerShell script in a snapin to change the image back to the default, the snapin is set to reboot.

      <#
      .SYNOPSIS
      	Change Lock Screen and Desktop Background in Windows 10 Pro.
      .DESCRIPTION
      	This script allows you to change logon screen and desktop background in Windows 10 Professional using GPO startup script.
      .PARAMETER LockScreenSource (Optional)
      	Path to the Lock Screen image to copy locally in computer.
          Example: "\\SERVER-FS01\LockScreen.jpg"
      .PARAMETER BackgroundSource (Optional)
      	Path to the Desktop Background image to copy locally in computer.
          Example: "\\SERVER-FS01\BackgroundScreen.jpg"
      .PARAMETER LogPath (Optional)
          Path where save log file. If it's not specified no log is recorded.
      .EXAMPLE
          Set Lock Screen and Desktop Wallpaper with logs:
          Set-Screen -LockScreenSource "\\SERVER-FS01\LockScreen.jpg" -BackgroundSource "\\SERVER-FS01\BackgroundScreen.jpg" -LogPath "\\SERVER-FS01\Logs"
      .EXAMPLE
          Set Lock Screen and Desktop Wallpaper without logs:
          Set-Screen -LockScreenSource "\\SERVER-FS01\LockScreen.jpg" -BackgroundSource "\\SERVER-FS01\BackgroundScreen.jpg"
      .EXAMPLE
          Set Lock Screen only:
          Set-Screen -LockScreenSource "\\SERVER-FS01\LockScreen.jpg" -LogPath "\\SERVER-FS01\Logs"
      .EXAMPLE
      	Set Desktop Wallpaper only:
          Set-Screen -BackgroundSource "\\SERVER-FS01\BackgroundScreen.jpg" -LogPath "\\SERVER-FS01\Logs"
      .NOTES 
      	Author: Juan Granados 
      	Date:   September 2018
      #>
      Param(
      		[Parameter(Mandatory=$false,Position=0)] 
      		[ValidateNotNullOrEmpty()]
      		[string]$LockScreenSource,
              [Parameter(Mandatory=$false,Position=1)] 
      		[ValidateNotNullOrEmpty()]
      		[string]$BackgroundSource,
              [Parameter(Mandatory=$false,Position=2)] 
      		[ValidateNotNullOrEmpty()]
      		[string]$LogPath
      	)
      
      #Requires -RunAsAdministrator
      
      if (-not [string]::IsNullOrWhiteSpace($LogPath)) {
          Start-Transcript -Path "$($LogPath)\$($env:COMPUTERNAME).log" | Out-Null
      }
      
      $ErrorActionPreference = "Stop"
      
      $RegKeyPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\PersonalizationCSP"
      
      $DesktopPath = "DesktopImagePath"
      $DesktopStatus = "DesktopImageStatus"
      $DesktopUrl = "DesktopImageUrl"
      $LockScreenPath = "LockScreenImagePath"
      $LockScreenStatus = "LockScreenImageStatus"
      $LockScreenUrl = "LockScreenImageUrl"
      
      $StatusValue = "1"
      $DesktopImageValue = "C:\Windows\System32\Desktop.jpg"
      $LockScreenImageValue = "C:\Windows\System32\LockScreen.jpg"
      
      if (!$LockScreenSource -and !$BackgroundSource) 
      {
          Write-Host "Either LockScreenSource or BackgroundSource must has a value."
      }
      else 
      {
          if(!(Test-Path $RegKeyPath)) {
              Write-Host "Creating registry path $($RegKeyPath)."
              New-Item -Path $RegKeyPath -Force | Out-Null
          }
          if ($LockScreenSource) {
              Write-Host "Copy Lock Screen image from $($LockScreenSource) to $($LockScreenImageValue)."
              Copy-Item $LockScreenSource $LockScreenImageValue -Force
              Write-Host "Creating registry entries for Lock Screen"
              New-ItemProperty -Path $RegKeyPath -Name $LockScreenStatus -Value $StatusValue -PropertyType DWORD -Force | Out-Null
              New-ItemProperty -Path $RegKeyPath -Name $LockScreenPath -Value $LockScreenImageValue -PropertyType STRING -Force | Out-Null
              New-ItemProperty -Path $RegKeyPath -Name $LockScreenUrl -Value $LockScreenImageValue -PropertyType STRING -Force | Out-Null
          }
          if ($BackgroundSource) {
              Write-Host "Copy Desktop Background image from $($BackgroundSource) to $($DesktopImageValue)."
              Copy-Item $BackgroundSource $DesktopImageValue -Force
              Write-Host "Creating registry entries for Desktop Background"
              New-ItemProperty -Path $RegKeyPath -Name $DesktopStatus -Value $StatusValue -PropertyType DWORD -Force | Out-Null
              New-ItemProperty -Path $RegKeyPath -Name $DesktopPath -Value $DesktopImageValue -PropertyType STRING -Force | Out-Null
              New-ItemProperty -Path $RegKeyPath -Name $DesktopUrl -Value $DesktopImageValue -PropertyType STRING -Force | Out-Null
          }  
      }
      
      if (-not [string]::IsNullOrWhiteSpace($LogPath)){Stop-Transcript}
      

      The problem I am seeing is that the following script works if I run it from a PowerShell window but not as a snapin.

      snapin settings:
      alt text

      Logfile for script:

      **********************
      Windows PowerShell transcript start
      Start time: 20200103154304
      Username: MTSTRANS\SYSTEM
      RunAs User: MTSTRANS\SYSTEM
      Configuration Name: 
      Machine: TV3270 (Microsoft Windows NT 10.0.18363.0)
      Host Application: powershell.exe -ExecutionPolicy Bypass -NoProfile -File C:\Program Files (x86)\FOG\tmp\Set-Screen.ps1 -LockScreenSource C:\Windows\Web\Screen\img100.jpg -LogPath c:\TEMP
      Process ID: 4196
      PSVersion: 5.1.18362.145
      PSEdition: Desktop
      PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.18362.145
      BuildVersion: 10.0.18362.145
      CLRVersion: 4.0.30319.42000
      WSManStackVersion: 3.0
      PSRemotingProtocolVersion: 2.3
      SerializationVersion: 1.1.0.1
      **********************
      Creating registry path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\PersonalizationCSP.
      Copy Lock Screen image from C:\Windows\Web\Screen\img100.jpg to C:\Windows\System32\LockScreen.jpg.
      Creating registry entries for Lock Screen
      **********************
      Windows PowerShell transcript end
      End time: 20200103154305
      **********************
      

      but the image never changes…

      fog.log

      ------------------------------------------------------------------------------
      ---------------------------------SnapinClient---------------------------------
      ------------------------------------------------------------------------------
       1/3/2020 4:29 PM Client-Info Client Version: 0.11.16
       1/3/2020 4:29 PM Client-Info Client OS:      Windows
       1/3/2020 4:29 PM Client-Info Server Version: 1.5.7.56
       1/3/2020 4:29 PM Middleware::Response Success
       1/3/2020 4:29 PM SnapinClient Running snapin SET-LOGON-SCREEN
       1/3/2020 4:29 PM Middleware::Communication Download: http://192.168.10.238//fog/service/snapins.file.php?mac=00:23:24:B3:BB:07|44:85:00:9A:20:2D|46:85:00:9A:20:2C|44:85:00:9A:20:2C|44:85:00:9A:20:30&taskid=10518
       1/3/2020 4:29 PM SnapinClient C:\Program Files (x86)\FOG\tmp\Set-Screen.ps1
       1/3/2020 4:29 PM Bus Emmiting message on channel: Notification
       1/3/2020 4:29 PM SnapinClient Starting snapin
       1/3/2020 4:29 PM SnapinClient Snapin finished
       1/3/2020 4:29 PM SnapinClient Return Code: 0
       1/3/2020 4:29 PM Bus Emmiting message on channel: Notification
       1/3/2020 4:29 PM Middleware::Communication URL: http://10fogserver/fog/service/snapins.checkin.php?taskid=10518&exitcode=0&mac=00:23:24:B3:BB:07|44:85:00:9A:20:2D|46:85:00:9A:20:2C|44:85:00:9A:20:2C|44:85:00:9A:20:30&newService&json
       1/3/2020 4:29 PM Power Creating shutdown request
       1/3/2020 4:29 PM Power Parameters: /r /c "Snapin requested restart" /t 0
       1/3/2020 4:29 PM Bus Emmiting message on channel: Power
       1/3/2020 4:29 PM Power Attempt 1/6 to shutdown computer
       1/3/2020 4:29 PM Power --> API call returned 1, will re-attempt in 5 minutes
      
      posted in FOG Problems
      Greg PlamondonG
      Greg Plamondon
    • RE: [Fog 1.6] checkin failure?

      @Tom-Elliott said in [Fog 1.6] checkin failure?:

      FOG_TZ_INFO

      Yes its set for America/Detroit

      posted in FOG Problems
      Greg PlamondonG
      Greg Plamondon
    • [Fog 1.6] checkin failure?

      I get this error when tasking a mchine to image.

      ===  ==========    =====      ====
         ==================================
         ===== Free Opensource Ghost ======
         ==================================
         ============ Credits =============
         = https://fogproject.org/Credits =
         ==================================
         == Released under GPL Version 3 ==
         ==================================
         Version: 1.5.7.820
         Init Version: 20191216
       * Verifying network interface configuration.........Done
       * Checking Operating System.........................Windows 10
       * Checking CPU Cores................................2
       * Send method.......................................NFS
       * Attempting to check in............................Failed
       * DateTime::__construct(): Failed to parse time string (No Data) at position 0
      (N): The timezone could not be found in the database (In line for )
       * Attempting to check in............................Failed
       * DateTime::__construct(): Failed to parse time string (No Data) at position 0
      (N): The timezone could not be found in the database (In line for 5)
       * Attempting to check in............................Failed
       * DateTime::__construct(): Failed to parse time string (No Data) at position 0
      (N): The timezone could not be found in the database (In line for 10)
      
      posted in FOG Problems
      Greg PlamondonG
      Greg Plamondon
    • RE: FOG 1.6 Client autoupdate issue

      @Sebastian-Roth I am positive we do not deploy the fog client with group policy.
      Even with group policy, it wouldn’t install over the existing without removing the old unless the installer permits it.

      posted in FOG Problems
      Greg PlamondonG
      Greg Plamondon
    • RE: FOG 1.6 Client autoupdate issue

      @Sebastian-Roth I think this was caused by me. I was having issues with fog on the working 1.6 so I rolled back to an older snaphot of the VM. I then went back to Working 1.6 after 2 days. I still don’t see how the fog installer would allow a downgrade install?

      posted in FOG Problems
      Greg PlamondonG
      Greg Plamondon
    • RE: FOG 1.6 Client autoupdate issue

      @Sebastian-Roth
      The strange thing is looking at the install dates, Version 11.17 was installed on the 12-13 and an older version installed on 12-16?

      Strange.

      alt text

      posted in FOG Problems
      Greg PlamondonG
      Greg Plamondon
    • RE: FOG 1.6 Client autoupdate issue

      @Sebastian-Roth

      Yes, I have started the long process of re-installing on all of the affected workstations.
      I am sure I can find another PC that has the same issue and post more of the log file.

      posted in FOG Problems
      Greg PlamondonG
      Greg Plamondon
    • FOG 1.6 Client autoupdate issue

      Clients started to update and throw errors

      alt text

      fog.log

      PS P:\> get-content -wait \\PC3151\c$\fog.log
       12/16/2019 11:30 PM Log Unhandled exception caught
       12/16/2019 11:30 PM Log     Terminating: True
       12/16/2019 11:30 PM Log     Hash code: System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
      File name: 'Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'
         at FOG.FOGSystemService.Load()
         at Zazzles.AbstractService.BootStrapModules()
         at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
         at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
         at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
         at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
         at System.Threading.ThreadHelper.ThreadStart()
      
      WRN: Assembly binding logging is turned OFF.
      To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.Note: There is some performance penalty associated with assembly bind failure logging.
      To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
      
       12/16/2019 11:31 PM Main Overriding exception handling
       12/16/2019 11:31 PM Main Bootstrapping Zazzles
       12/16/2019 11:31 PM Controller Initialize
       12/16/2019 11:31 PM Controller Start
      
       12/16/2019 11:31 PM Service Starting service
       12/16/2019 11:31 PM Log Unhandled exception caught
       12/16/2019 11:31 PM Log     Terminating: True
       12/16/2019 11:31 PM Log     Hash code: System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
      File name: 'Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'
         at FOG.FOGSystemService.Load()
         at Zazzles.AbstractService.BootStrapModules()
         at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
         at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
         at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
         at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
         at System.Threading.ThreadHelper.ThreadStart()
      
      WRN: Assembly binding logging is turned OFF.
      To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.Note: There is some performance penalty associated with assembly bind failure logging.
      To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
      
      posted in FOG Problems
      Greg PlamondonG
      Greg Plamondon
    • RE: Duplicate snapin task entries - working 1.6

      would you prefer i post bugs for working 1.6 elsewhere or are the forums fine?

      posted in FOG Problems
      Greg PlamondonG
      Greg Plamondon
    • Duplicate snapin task entries - working 1.6

      alt text

      posted in FOG Problems
      Greg PlamondonG
      Greg Plamondon
    • RE: FOG User Tracking -Search

      @Tom-Elliott said in FOG User Tracking -Search:

      1.6

      I have ## Version: 1.5.7.56 installed…
      what repo is 1.6 in?

      posted in FOG Problems
      Greg PlamondonG
      Greg Plamondon
    • RE: FOG User Tracking -Search

      @Daniel-Miller said in FOG User Tracking -Search:

      @Greg-Plamondon said in FOG User Tracking -Search:

      I checked the userTracking table in the fog database and it has 22104 records

      You can keep pushing execution time out, but it is quite possible that you may have too many entries for php to handle the data in a reasonable time frame, especially if this instance has been running for a while. If you don’t need the historical data, truncating the userTracking table (truncate table fog.usertracking) as suggested in https://forums.fogproject.org/topic/11713/503-service-unavailable-error/54 should get it up and running and will show data going forward until it gets too ungainly again.

      I was able to truncate the table and then run a report. I wish i was able to store more records.

      posted in FOG Problems
      Greg PlamondonG
      Greg Plamondon
    • RE: FOG User Tracking -Search

      @Daniel-Miller said in FOG User Tracking -Search:

      Good, the values are changing.

      It may take upwards of a minute or two depending on how many entries are getting pulled.

      I checked the userTracking table in the fog database and it has 22104 records
      By the way, this hasn’t worked for us for quite some time, I just never got around to reporting it.
      but now I have been getting a lot of requests for reports and it was nice to be able to quickly generate what time a user logged into the pc.

      posted in FOG Problems
      Greg PlamondonG
      Greg Plamondon
    • RE: FOG User Tracking -Search

      @Daniel-Miller said in FOG User Tracking -Search:

      Good, the values are changing.

      there is also an execution time limit that should be set in one of the ini / conf files as well. I believe the setting is max_execution_time which I think takes a value in seconds and defaults to 30. you may want to play with that value to see if you can get a response in a reasonable time. It may take upwards of a minute or two depending on how many entries are getting pulled.

      So far I have changed the /etc/php.ini max_execution_time = 300 with no luck.

      [Fri Dec 06 14:20:04.488209 2019] [proxy_fcgi:error] [pid 2045] (70007)The timeout specified has expired: [client 192.168.10.170:63425] AH01075: Error dispatching request to :, referer: http://10fogserver.mtstrans.com/fog/management/index.php?node=report&sub=file&f=dXNlciB0cmFja2luZw==```
      posted in FOG Problems
      Greg PlamondonG
      Greg Plamondon
    • 1 / 1