• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. Tom Elliott
    3. Best
    • Profile
    • Following 27
    • Followers 83
    • Topics 117
    • Posts 18,938
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: Group Export

      @Richarizard504 I’m not really sure how to help:

      Can you do a hard refresh in your browser and see if that helps anything?

      (CTRL + SHIFT + R in chrome generally)

      I have a screencast where i show you all I did, and all works, so I’m thinking maybe cache isn’t loading the updated Javascript elements necessary for this to function appropriately.

      posted in FOG Problems
      Tom ElliottT
      Tom Elliott
    • RE: Multicast De-Sync When Resizing Disks

      @christop The UDPCAST_MAXWAIT should be the time (in minutes) for all udpcast started jobs.

      If your setting isn’t working (I don’t know why it wouldn’t be, but there could have been a change that broke this unexpectedly) it would default back to 60 seconds in total.

      The value is stored in minutes on the UI side of things and then converted to seconds when and where required.

      I see a potential typo in /var/www/fog/lib/service/multicasttask.class.php at line 660 though, that seems might have been there for a while.

      If you can change it to multiply by 60. Otherwise you were just multiplying by six:

      So 10 * 6 = 60 seconds (one minute). 15 * 6 = 90 (1 minute 30 seconds)

      YOu can fix this by updating your UI value from 10 to the period you’re expecting. Or you can edit the file.

      i’m pushing what i hope will fix the issue in dev-branch if you’re wanting to go by a method that’s more “developed already” kind of thing.

      posted in FOG Problems
      Tom ElliottT
      Tom Elliott
    • RE: Minor issue with logging out of FOG web UI: HTTP ERROR 500

      @Fog_Newb This should be fixed in the latest dev-branch please let me know if it’s not.

      Thank you!

      posted in FOG Problems
      Tom ElliottT
      Tom Elliott
    • RE: Multicast De-Sync When Resizing Disks

      @christop Roger, sorry I’ve been doing a lot of programming in python lately and introduced “int(…)” which isn’t valid PHP syntax. This is corrected in the latest, please pull/install and let me know if it helps?

      Thank you for letting me know.

      posted in FOG Problems
      Tom ElliottT
      Tom Elliott
    • RE: FOG Reboot

      @chevengur The flag is onDemand -> 0 = No, 1 = yes.

      posted in FOG Problems
      Tom ElliottT
      Tom Elliott
    • RE: FOG Kernel update showing same version number for new Kernels - 6.12.35

      @rogalskij What you’re seeing is a list of all available kernels for download. The on that’s installed is the currently full release one. I don’t know which version that iss off the top of my head, but I believe it’s the October 14, 2025 at this point.

      posted in FOG Problems
      Tom ElliottT
      Tom Elliott
    • RE: Assign multiple host to a group

      @sapeurorca You can find host ID’s by name and parse it how ever you like. The api system handles things at the simplest level, which is by id’s (most API’s follow this same type of approach).

      This was not implemented with 1.3.3 no so you would have to script it entirely by yourself as needed.

      You can write a php script to do what you need.

      Something like:

      <?php
      require('/var/www/fog/commons/base.inc.php');
      /**
       * Could be handled more dynamically by making this a get variable.
       * This would allow you to call <scriptname>.php?groupname=SomeGroupName
       */
      //$groupname = filter_input(INPUT_GET, 'groupname');
      $groupname = 'groupnamehere';
      /**
       * Get the group object.
       */
      $group = FOGCore::getClass('Group')
          ->set('name', $groupname)
          ->load('name');
      /**
       * If the group isn't valid or doesn't exist, make it.
       */
      if (!$group->isValid()) {
          $group->save();
      }
      /**
       * Get the groups ID.
       */
      $groupID = $group->get('id');
      /**
       * The file must be in hostname1,hostname2 format (or csv if you will), You could modify to
       * process as csv where new hostnames are on new lines too. Something like:
       * hostname1
       * hostname2
       *
       * This would be handled by explode("\n", $hostnames) <Use of double quotes important>
       */
      $hostnames = file_get_contents('/path/to/csv/of/justhostnames.csv');
      /**
       * Just filters and makes the list unique (less work to try to process later on).
       */
      $listOfNames = array_filter(array_unique(explode(',', $hostnames)));
      /**
       * Just get's the hostID's that are already present. The hosts must already exist.
       * This will only return hostID's for valid hosts.
       */
      $hostIDs = FOGCore::getSubObjectIDs(
          'Host',
          array('name' => $listOfNames)
      );
      /**
       * The group association fields to be inserted.
       * GroupID is the group you're associating with gotten earlier.
       * HostID is the list of host IDs from earlier.
       */
      $fieldstogroupinsert = array(
          'groupID',
          'hostID'
      );
      /**
       * Starts our array of items to be inserted.
       */
      $items = array();
      /**
       * Loops each of the host ID's to build our query appropriately.
       */
      foreach ($hostIDs as &$hostID) {
          $items[] = array(
              $groupID,
              $hostID
          );
      }
      /**
       * Inserts all of the new associations.
       */
      FOGCore::getClass('GroupAssociationManager')
          ->insertBatch(
              $fieldstogroupinsert,
              $items
          );
      /**
       * Just let's you know it's finished.
       * NOTE: You could add error checking here if you want.
       */
      echo _('All done');
      ?>
      

      Hopefully all of that makes some sort of sense, if it were me I’d say do the PHP option and stick the file in /var/www/html/.

      Then you just call the script with: http://<fogip>/groupinsert.php (if groupinsert.php was the filename you called it.)

      Update the csv file when you need it and rerun the url call. You can script the call to the url with a curl request on a cron schedule if you needed to.

      Mind you I give no guarantees and I have not tested what I wrote (I just wrote it right now to give an example of how you could approach this). I suggest putting the file in /var/www/html so if you do update you don’t lose your script during upgrades, and the functionality should remain regardless of if you update or not.

      Take account you may need to add your own error handling to this script. I’m just giving a base suggestion, how you approach it is totally up to you.

      The csv file would just be a csv of hostnames, no headers or other information. e.g.:
      hostname1,hostname2,hostname3

      The script I wrote does not contain any space handling/trimming, nor does it take into account special characters. So you need to make sure your CSV is safe. Notice I’m not allowing any options, so you don’t have to worry about another person “exploiting” but security is up to you.

      If you want to semi automate it, the groupname line (line number three of the script) you could change it to:

      $groupname = filter_input(INPUT_GET, 'groupname');
      

      This would allow you to call the script appended with: ?groupname=SomeGroupNameHere. (Not a huge threat).

      You can also change the “file-get-contents” to be automated in a similar fashion though i’d highly recommend against it. But if you “must” you would specify the file name similarly. (Could be a huge threat).

      posted in FOG Problems
      Tom ElliottT
      Tom Elliott
    • RE: Unable to Capture an image: ERROR: Could not adjust the bad sector list

      @bond007fink The Could not adjust the bad sector list error generally indicates that NTFS metadata (bitmap / bad cluster map) is in an inconsistent state. FOG relies on ntfsresize and partclone to safely shrink and copy NTFS volumes, and if those tools cannot reliably map the filesystem, the capture will correctly fail.

      This can occur even when the drive is physically healthy. A filesystem marked dirty will prevent offline resize operations. In that case, FOG is behaving as designed — failing here is preferable to deploying a potentially corrupt image to multiple systems.

      We are seeing this more frequently after recent Windows updates, which appear to be leaving or reasserting the NTFS dirty bit.

      Please boot the source machine into Windows and run a full filesystem and encryption check. Make sure to adjust the drive letter if your system volume is not C:.

      chkdsk /x /r /f C:
      manage-bde -off C:
      

      Also ensure hibernation is disabled, as it can leave NTFS in a state that prevents offline resizing:

      powercfg -h off
      

      If capture succeeds when resizing is disabled, that further confirms this is a Windows filesystem state issue rather than a FOG defect.

      FOG cannot safely work around filesystem states imposed by other vendors. Ignoring NTFS safety checks would risk data integrity, and that is not something FOG should or will do.

      posted in FOG Problems
      Tom ElliottT
      Tom Elliott
    • RE: Following a migration, character encoding issue

      @Bristow-0 I don’t know what OS you’re running:

      php-gettext or php-php-gettext is the module you’ll need installed (pretty sure it already is but maybe there’s some unexpected collision occurring?)

      If you’re on debian, you my need to also reconfigure the fr_FR.UTF-8 sudo dpkg-reconfigure locales scroll down to the fr_FR.UTF-8 selector and ensure it’s selected.

      Tab to Ok, on the next screen choose your default (or change it if you want) and click ok. It shoudl reconfigure the languages.

      Other os’s the glibc/lanugage packs just need to be installed.

      posted in FOG Problems
      Tom ElliottT
      Tom Elliott
    • RE: Snapin Tasks Not Creating

      @AUTH-IT-Center Sorry moved these items to a new topic.

      I want to get this addressed, but this is different from the double quotes issue:

      Also:

      please hit up your sql database:

      SELECT * FROM fog.history;
      

      likely it will see the latest entry of something along the lines if:

      Task ID:  Name: Single Snapin Task - test321 has failed to save. Error: Save completed but no valid ID was assigned (insertId=0). Possible duplicate-key update or missing auto-increment.
      

      This is what I’m seeing when I try to create a single snapin task (i’ve not tried with all-snapins yet, but one thing at a time. I am working to fix it, just trying to narrow down the why.

      posted in FOG Problems
      Tom ElliottT
      Tom Elliott
    • RE: Snapin Tasks Not Creating

      @AUTH-IT-Center Please try the latest pull?

      It addresses a potential security issue as well which partially what took me so long, my apologies 🙂

      posted in FOG Problems
      Tom ElliottT
      Tom Elliott
    • RE: since upgrading to 1.5.10.1754 deploying image from the fog client menu fails (deploying from console is fine)

      @Gordon-Taylor Can you please install the dev-branch version?

      The error (value min() issue you see) has been fixed in the latest dev-branch.

      I hope this would fix the problem you’re seeing of course, but we won’t really know until that’s done.

      1754 is the latest “stable” version, but dev-branch is a bit newer than the stable branch specifically in an attempt to fix other (and this) particular issue(s).

      posted in FOG Problems
      Tom ElliottT
      Tom Elliott
    • 1 / 1