• 0 Votes
    3 Posts
    34 Views
    Tom ElliottT

    @DBailey635 This is now available on the Patches update channel (1.6.0.226 or later). No new agent version is needed; any current agent works.

    To use it:

    Install the agent in each OS as usual. The second OS appears under pending agents as “New OS on a host that already has an agent”. Approve it. If FOG deployed the image within the deploy window, both OSes enroll on their own. For an OS-specific snapin, set “Run on” in the snapin’s settings. A Windows snapin then waits until Windows boots. If the host is set to join a domain, the Windows install does the join. The Linux side is left alone, so the two do not fight over one computer account. The product key also goes only to Windows.

    One limit: two installs of the same OS on one disk share one agent key.

    If you try it, let me know how it goes.

  • 0 Votes
    2 Posts
    22 Views
    Tom ElliottT

    @lperoma Thanks for the detailed report. Your reading of the code is right. I opened https://github.com/FOGProject/fogproject/pull/2122 to fix both problems.

    On your open question: the first attempt did run. The server stores awaiting_reboot only when the agent reports that Windows accepted the join. Your state also has last_deploy_task_id equal to trigger_task_id (16923), and that is set only when the agent claims the plan. So the join ran after Deploy 16923, and Windows waited for a restart. The disk was reimaged by 16927 before that restart, so the agent never reported “verified”. That also explains why the computer account in AD looked healthy.

    What changes in #2122:

    A newer Deploy now supersedes an old attempt in started, awaiting_reboot, unknown or failed. Three things must be true: the agent has no marker for the old attempt, a newer Deploy has completed, and the machine booted after that Deploy ended. FOG then drops the old attempt, writes an audit entry, and plans a new join from the new Deploy. If the agent still has the marker, the old attempt stays. The “Clear directory operation review” checkbox no longer marks the newest Deploy as used. It uses up only the cleared attempt’s own Deploy. It also keeps the workgroup flag and the observation. If a newer Deploy exists, the next check-in can plan the join again. With the first change, a reimaged host no longer needs the checkbox, so I did not add a hint to the Active Directory panel.

    On queued tasks and snapins from the previous install: this PR changes only the directory join plans.

    The fix reaches the patches channel after the PR merges. Your hand-written state on test-uefi does no harm.

  • 0 Votes
    14 Posts
    216 Views
    Tom ElliottT

    @lperoma Thanks for the detail. There are two server fixes and one agent fix.

    Please update instead of copying files this time. This fix changes the database (schema step 465), and the code depends on it. Copied files without that step make enrollment saves fail in a new way. Your server is also now several changes past 1.6.0.158. Run the updater on the patches channel. It installs the files and runs the schema update together. Or wait for the stable release on December 11.

    Server (FOG PRs #2116 and #2118):

    Agent enrollment now follows the boot rule for a shared adapter. The firmware names one host, and the adapter’s MAC is on another host. If that other host’s stored serial differs from the reported serial, the firmware’s host wins. Your laptop then enrolls as its own host, with the normal “known-host-no-agent” reason. The firmware host must match the serial too. A copied UUID alone never wins over a MAC. Any other disagreement stays an identity conflict. The row is now saved with no host, instead of host 0, so the foreign key no longer refuses it. The agent gets “pending”, not 409, and the row shows in All Pending Agents. For a conflict, All Pending Agents now shows which other host has the MAC. After you remove the cause (for example the stray MAC), the next agent poll binds the request to the right host. Then you approve it. A conflict is never approved automatically, not by a token and not by a recent deploy (#2118 closes this for older agents too).

    Agent (fog-agent PR FOGProject/fog-agent#52): a key whose first request went in without the directory feature cannot add the feature later. That is deliberate on the server. The agent now makes a new key once when the server answers enrollment_upgrade_requires_new_key, and enrolls again. This is in agent v0.1.28. Agents update to it on their own.

  • 0 Votes
    6 Posts
    55 Views
    M

    @Tom-Elliott I checked again. I was mistaken; FOG 1.5 was not affected. Thanks again for the help.

  • FOG 1.6 – Dependencies between Software Management and Snapins?

    Unsolved FOG Problems
    6
    0 Votes
    6 Posts
    100 Views
    Tom ElliottT

    @lperoma Run before software is ready to test.

    Agent: FOG Agent v0.1.27 is released. It runs snapins marked Run before software first, then the software set, then the other snapins. Server: the Run before software checkbox is going into dev-branch now. You find it on the snapin’s General tab, under Snapin Arguments Hidden. It reaches stable with the December 11 release.

    For your VM test before then:

    Put the test server on dev-branch. Get the VM on v0.1.27. Set its Agent Update Ring to 0, or set its Desired Agent Version to 0.1.27. On the activation snapin, turn on Run before software, and queue it with the Avast package assigned.

    What you should see in the agent log on that check-in:

    the activation snapin’s result first; then the software lines, Avast included; then any other snapins.

    If the activation snapin comes back as a retry, the agent holds the software until the next check-in, so Avast does not install ahead of it.

    Two things to know:

    An agent older than v0.1.27 ignores the flag and still runs the snapin after the software. So check the agent version before you judge the result. If you import snapins from a CSV with no header row, the new column shifts the columns after Snapin Arguments Hidden. An export from the UI has a header row and is not affected.
  • 0 Votes
    29 Posts
    497 Views
    F

    I set my Master Storage Node and 2 Slave Nodes to 3 clients each. I then imaged 9 computers and everything went smoothly. each Node was imaging 3 clients. This was on Fog Dev 1.6.0.195

  • FOG Agent on new image PC not communicating with server

    Solved FOG Problems
    3
    0 Votes
    3 Posts
    81 Views
    rogalskijR

    @Tom-Elliott I believe that took care of it. As always thank you so much for this product and the wonderful support!

  • 1.6.0.158 unable to approve agent

    Solved FOG Problems
    12
    0 Votes
    12 Posts
    184 Views
    Tom ElliottT

    @chscduo Glad it works, and thanks for running each check so quickly.

    The fix is in dev-branch, so the next FOG update includes it. The update replaces the helper you installed by hand with the same code, so you have nothing to undo.

  • 0 Votes
    4 Posts
    119 Views
    L

    @Tom-Elliott Thanks!

  • 1.6.0.158 Unable to join machine to he domain and change Hostname

    Solved FOG Problems
    5
    0 Votes
    5 Posts
    98 Views
    Y

    @Tom-Elliott So that was all it took, thank you very much, the issue is resolved.

  • 1.6.0.167 Time wrong in logs

    Solved FOG Problems
    2
    0 Votes
    2 Posts
    85 Views
    Tom ElliottT

    @FlareImp yes, this is expected.

    All times are stored in UTC for consistency now and translated to whatever time is configured (by default) and each user can define their own timezone if they want it.

    https://docs.fogproject.org/en/latest/management/web/unadjusted-timestamps/

  • fixparts missing in 1.6.0-beta.5540 and also in 1.5.10

    Solved Bug Reports
    4
    0 Votes
    4 Posts
    301 Views
    D

    @Tom-Elliott

    Sorry for the late answer.

    I downloaded the kernel and init.xz EXP_20261021-160109 directly, via the fog web interface. fixparts is included and the capture of the windows 10 laptop was successful.
    Thank you!

  • fogproject.org issue with the download tab.

    General Problems
    2
    0 Votes
    2 Posts
    113 Views
    Tom ElliottT

    @IgniWarlock Must’ve been a github issue that was temporary as I’m seein ghte page load just fine now.

    Thanks!

  • Fog 1.6.14 Driver Replication Issue

    Solved FOG Problems
    17
    0 Votes
    17 Posts
    487 Views
    F

    @Tom-Elliott now it is showing

    [11-13-26 8:30:16 pm] * Starting Image Replication. [11-13-26 8:30:16 pm] * We are group ID: 8. We are group name: Nashport Storage Group [11-13-26 8:30:16 pm] * We are node ID: 13. We are node name: TVNE-Fog [11-13-26 8:30:16 pm] * Attempting to perform Group -> Group image replication.

    Replication seems to be working now. After replication completed I restarted the service and nothing was recopied.

  • 1 Votes
    5 Posts
    20k Views
    Tom ElliottT

    I just wanted to add some updates as 1.6 being released and with advent of Win 11 now.

    Wanted to have more capable set of scripts here. I know the thread is very old, but it’s still worth the update in my book.

    /images/postdownloadscripts/fog.postdownload

    #!/bin/bash . /usr/share/fog/lib/funcs.sh [[ -z $postdownpath ]] && postdownpath="/images/postdownloadscripts/" # FOS sets osClass from the image's OS (determineOS, FOS 20261110 or later). # On an older FOS kernel osClass is empty, so derive it from the osid. if [[ -z $osClass ]]; then case $osid in 5|6|7) osClass="win7" ;; 9|10|11) osClass="winmodern" ;; esac fi case $osClass in win7|winmodern) 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 /ntfs >/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.copydrivers # . ${postdownpath}fog.updateunattend umount /ntfs ;; *) echo "Non-Windows Deployment" debugPause return ;; esac

    /images/postdownloadscripts/fog.copydrivers

    #!/bin/bash ceol=`tput el`; manu=`dmidecode -s system-manufacturer`; dots "Identifying hardware" case $manu in [Ll][Ee][Nn][Oo][Vv][Oo]) machine=$(dmidecode -s system-version) ;; *I[Nn][Tt][Ee][Ll]*) # For the Intel NUC and intel mobo pick up the system type from the # baseboard product name machine=$(dmidecode -s baseboard-product-name) ;; *) # Dell and everything else machine=$(dmidecode -s system-product-name) ;; esac # if the machine isn't identified then no need to continue with this script, just return to caller if [[ -z $machine ]]; then echo "Unable to identify the hardware for manufacturer ${manu}"; debugPause; return; fi echo "${machine} Identified"; # Remove spaces from the machine name, works better with path definitions machine="${machine//[[:space:]]/}" dots "Verifying we've found the OS disk" if [[ ! -d /ntfs/windows && ! -d /ntfs/Windows && ! -d /ntfs/WINDOWS ]]; then echo "! OS root Not found !"; debugPause return; fi echo "Found"; dots "Verifying target Arch" system64="/ntfs/Windows/SysWOW64/" [[ ! -d $system64 ]] && arch="x86" || arch="x64" echo "${arch} found"; debugPause # Build the OS folder name from osname, which FOS sets from the image's OS. # "Windows 10" becomes win10, "Windows 8.1" becomes win8.1, "Windows 11" # becomes win11. So the folder names from the old osid table still match. osn="${osname,,}" osn="${osn//[[:space:]()]/}" osn="${osn/windows/win}" dots "Preparing Drivers" clientdriverpath="/ntfs/Drivers" remotedriverpath="/images/drivers/$machine/$osn/$arch" debugPause if [[ ! -d "${remotedriverpath}" ]]; then echo "failed"; echo " ! Driver package not found for ${machine}/$osn/$arch ! "; debugPause; return; fi echo "Ready"; debugPause [[ ! -d $clientdriverpath ]] && mkdir -p "$clientdriverpath" >/dev/null 2>&1 echo -n "In Progress" rsync -aqz "$remotedriverpath" "$clientdriverpath" >/dev/null 2>&1 [[ ! $? -eq 0 ]] && handleError "Failed to download driver information for [$machine/$osn/$arch]" debugPause # Windows 7, 8 and 8.1 only. Windows 10 and later read the OEM driver path # from the unattend.xml, so they skip the registry edit. [[ $osClass != win7 ]] && return regfile="/ntfs/Windows/System32/config/SOFTWARE" key="\Microsoft\Windows\CurrentVersion\DevicePath" devpath="%SystemRoot%\DRV;%SystemRoot%\inf;"; reged -e "$regfile" &>/dev/null <<EOFREG ed $key $devpath q y EOFREG

    /images/postdownloadscripts/fog.updateunattend

    #!/bin/bash # Sets the computer name and, for a host with "Join Domain" on, the domain # join in the deployed image's unattend.xml. fog.postdownload sources this # file with the Windows partition mounted on /ntfs. # # FOG sends these from the host record (service/hostinfo.php): # hostname the host name # hostusead 1 when "Join Domain after deploy" is on # hostaddomain, hostadou the domain and the OU # hostaduser, hostadpass the join account and its password # hostadpass is empty unless FOG Configuration > FOG Settings > # FOG_HOSTKEY_ALLOWED_SOURCES lists the imaging network. The FOG Agent, # and the older FOG Client, join the domain without writing the password # to disk. Use this only where neither is installed. # Escape a value for XML text, then for the right side of a sed s|||. # The quoted replacements stop bash 5.2 from reading & as "the match". xmlEscape() { local s="$1" s="${s//&/'&amp;'}" s="${s//</'&lt;'}" s="${s//>/'&gt;'}" s="${s//\"/'&quot;'}" s="${s//\'/'&apos;'}" printf '%s' "$s" } sedEscape() { local s="$1" s="${s//\\/'\\'}" s="${s//|/'\|'}" s="${s//&/'\&'}" printf '%s' "$s" } xmlValue() { sedEscape "$(xmlEscape "$1")" } # The places Windows Setup reads an unattend.xml from after sysprep. The # [x] in each name makes it a glob, so nocaseglob matches any case of it. shopt -s nocaseglob nullglob unattends=( /ntfs/[w]indows/[p]anther/[u]nattend.xml /ntfs/[w]indows/[p]anther/[u]nattend/[u]nattend.xml /ntfs/[w]indows/[s]ystem32/[s]ysprep/[u]nattend.xml /ntfs/[u]nattend.xml ) shopt -u nocaseglob nullglob if [[ ${#unattends[@]} -eq 0 ]]; then echo " * No unattend.xml found, skipping" debugPause return fi # A PXE boot does not carry the AD values on the kernel command line. Ask the # server for them, the same way FOS does after a USB boot. Keep only the # host* lines of the reply, and delete the reply because it holds the password. if [[ -z $hostusead ]]; then curlcmd=(curl -Lks) command -v fog.curl >/dev/null 2>&1 && curlcmd=(fog.curl -Ls) sysuuid=$(dmidecode -s system-uuid) sysuuid=${sysuuid,,} [[ -z $mac ]] && mac=$(getMACAddresses) token=$("${curlcmd[@]}" --data "mac=$(echo $mac | base64)" "${web}status/hostgetkey.php") "${curlcmd[@]}" -o /tmp/hinfo.txt --data "sysuuid=${sysuuid}&mac=${mac}&hosttoken=${token}" "${web}service/hostinfo.php" -A '' if [[ -f /tmp/hinfo.txt ]]; then . <(grep -E '^\[\[ -z \$host[a-z]+ \]\] && export host[a-z]+=' /tmp/hinfo.txt) rm -f /tmp/hinfo.txt fi fi joinDomain="" if [[ $hostusead == 1 && -n $hostaddomain ]]; then if [[ -z $hostadpass ]]; then echo " * No domain join password received, so the domain join is skipped." echo " Set FOG_HOSTKEY_ALLOWED_SOURCES to the imaging network to send it." debugPause else joinDomain=1 # Qualify a bare user name with the domain: DOMAIN\user. joinUser="$hostaduser" [[ $joinUser != *\\* && $joinUser != *@* ]] && joinUser="${hostaddomain}\\${joinUser}" fi fi name=$(xmlValue "$hostname") for unattend in "${unattends[@]}"; do dots "Writing Computer Name to $unattend" sed -i "s|<ComputerName>[^<]*</ComputerName>|<ComputerName>${name}</ComputerName>|g" "$unattend" if [[ ! $? -eq 0 ]]; then echo "Failed" debugPause handleError "Failed to update $unattend" fi echo "Done" debugPause [[ -z $joinDomain ]] && continue dots "Setting the domain join in $unattend" # Username and Password change only inside <Credentials>. AutoLogon and # the local accounts use the same element names. sed -i \ -e "/<JoinWorkgroup>/d" \ -e "/<Credentials>/,/<\/Credentials>/s|<Password>[^<]*</Password>|<Password>$(xmlValue "$hostadpass")</Password>|" \ -e "/<Credentials>/,/<\/Credentials>/s|<Username>[^<]*</Username>|<Username>$(xmlValue "$joinUser")</Username>|" \ -e "s|<MachineObjectOU>[^<]*</MachineObjectOU>|<MachineObjectOU>$(xmlValue "$hostadou")</MachineObjectOU>|g" \ -e "s|<JoinDomain>[^<]*</JoinDomain>|<JoinDomain>$(xmlValue "$hostaddomain")</JoinDomain>|g" \ "$unattend" if [[ ! $? -eq 0 ]]; then echo "Failed" debugPause handleError "Failed to set the domain join in $unattend" fi echo "Done" debugPause done
  • 1.6.0.14: Web UI not staying signed in?

    Solved FOG Problems
    4
    0 Votes
    4 Posts
    164 Views
    S

    @Tom-Elliott Thank you once again for the amazing support and turnaround.

  • 0 Votes
    2 Posts
    118 Views
    Tom ElliottT

    @lperoma Thank you for the detailed write-up. The detection notes made this quick to scope.

    FOG 1.6 covers this as follows:

    FOG Client cannot authorize. This was the real gap, and a pull request now adds it: https://github.com/FOGProject/fogproject/pull/2089. The server records each host whose client fails the handshake: since when, how many times, the source address and the reason. A new list report, Reports > Client Authentication Failures, shows them with the fix next to each one. A host leaves the list when its client authenticates again. Two reasons are recorded:

    The security token does not match. Reset Encryption Data fixes this. The server cannot decrypt the client’s key. This means the certificate the server publishes for clients does not pair with its private key, so every host fails at once. A reset does not help. Running the installer with --recreate-keys issues a new pair.

    One case stays invisible to the server. A client that trusts a different FOG CA refuses the server’s certificate and never sends a login, so there is nothing to record. Its fog.log shows “Certificate is not from FOG CA”.

    Rejected iPXE menu logins. 1.6 already records each rejected login in the audit trail, with the username and the address. Look under Reports > Audit Report.

    Hosts with no contact. 1.6 stores the last check-in and the last ping for each host. Fleet Report shows the last check-in, so you can sort on it.

    All of this is 1.6 only. 1.5.x does not get these changes, so your script remains the answer there until you move to 1.6.

  • FOG Docker image

    General
    8
    0 Votes
    8 Posts
    3k Views
    C

    @88fingerslukee Yop mate, are you on discord or something ? Would be easier to talk about this docker images !

  • Question regarding the new Fog Agent (FOG 1.6.x) prior to syspreppping

    Unsolved FOG Problems
    2
    0 Votes
    2 Posts
    136 Views
    Tom ElliottT

    @JYost With agent 0.1.23 or later, you do not need to stop or disable it before Sysprep, and you do not need the SetupComplete.cmd line. The agent waits until Windows setup has finished before it enrolls, checks in, or reboots. It starts on its own after OOBE completes.

    On an older agent, update it on the reference machine first. Or use the same steps as before with the new service name: sc config fog-agent start= disabled before Sysprep, then sc config fog-agent start= delayed-auto and sc start fog-agent in SetupComplete.cmd.

    You also do not need to clear the agent’s key before capture. Each deployed machine has different firmware IDs, so the agent drops the captured key and enrolls as itself. A deploy from your server approves it automatically.

    No firewall rule is needed. The agent opens no listening port. It only connects out to the FOG server over HTTPS.

    Details: https://docs.fogproject.org/installation/client/install-fog-agent#capturing-an-image-with-the-agent-installed

  • FOG 1.5.10 - Problem with AD Join.

    Unsolved FOG Problems
    6
    0 Votes
    6 Posts
    451 Views
    R

    I ran this command on the host, and then restarted the FogService., but my issue might have been slightly different.

    reg add “HKLM\System\CurrentControlSet\Control\Lsa” /v NetJoinLegacyAccountReuse /t REG_DWORD /d 1 /f

    Then it joined to AD with no issues.

    Are those exisiting machines in AD that you re-imaged with FOG, or were they new devices?

    This only happened to us with exisitng machines in AD that we re-imaged and then couldn’t join AD again after.