• 0 Votes
    1 Posts
    4 Views
    No one has replied
  • 0 Votes
    1 Posts
    4 Views
    No one has replied
  • 0 Votes
    3 Posts
    53 Views
    L

    @Tom-Elliott

    Thanks Tom, I tested #2122 and it does what you described.

    I applied the two src files of the PR by hand on top of the patches channel (schema 465, agent 0.1.28) and reproduced the same situation with test-bios. First Deploy (16928): the agent asked for the directory join and the plan went to awaiting_reboot (attempt 12f448e3…, trigger_task_id 16928). Before it rebooted I powered the VM off and queued a second Deploy (16929), which completed normally. The agent enrolled by itself after that (rebind, approved via deploy).

    For a while the old plan was still in hdRejoinState, still awaiting_reboot with trigger 16928, so right after queuing the Deploy nothing had changed. Once the machine booted the new Windows and the agent checked in, FOG replaced it on its own. A minute later there was a new attempt (3e64f53…, trigger 16929, awaiting_reboot). I didn’t touch “Clear directory operation review” or edit anything in the database. After one reboot the host was verified, hdJoined=1, hdKind=ad, secure_channel: healthy.

    So the old attempt is dropped after the new Deploy and the first boot, not at the moment the Deploy is created, which matches what you wrote. It only looks odd if you check the host in between and still see the old plan. No problem on my side, just mentioning it in case anyone else notices the same thing.

    One idea, only if you think it’s worth it: a checkbox in the Deploy task form, something like “discard every pending task of this host”, unchecked by default. The automatic rules are safer for the normal case, but sometimes the admin knows everything left over from the previous install is dead (queued tasks, snapins, a pending directory join) and wants to force a clean start right when the Deploy is queued, without waiting for the first boot and without the “Clear directory operation review” box. In our case, when a machine misbehaves it often keeps snapin tasks queued, and today you have to open the host, work out which tasks it has and delete them one by one. In a big fleet that is slow and easy to get wrong, whereas one box on the Deploy would clean the slate in a single step.

    I’ll drop my manual patch when #2122 reaches patches.

  • 0 Votes
    3 Posts
    68 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
    14 Posts
    294 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
    88 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
    132 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
    659 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
    95 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
    209 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
    127 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
    108 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
    98 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
    308 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
    118 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
    512 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
    169 Views
    S

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

  • 0 Votes
    2 Posts
    122 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 !