• Using FOG Postinstall scripts for Windows Driver injection 2017 ed.

    Pinned Locked
    4
    1 Votes
    4 Posts
    19k Views
    george1421G

    Update: With the later releases of Win10 post 1703, the offline servicing section doesn’t seem to load the drivers. As a fix, add the following lines to your setupcomplete.cmd batch file to load the drivers at the end of the OSD process.

    pnputil.exe /add-driver "C:\Drivers\*.inf" /subdirs /install pnputil.exe /add-driver "C:\Drivers\*.inf" /subdirs /install pnputil.exe /add-driver "C:\Drivers\*.inf" /subdirs /install

    Running pnputil 2 times seems to be the sweet spot to capture all of the hardware devices, because some hardware is hidden behind other hardware drivers (such as USB3 and PCI hardware)

    Update: if you want to use the pnputil.exe command with versions of windows before Win10 you will need to use this command instead, since the older versions of pnputil do not support the /subdir switch.

    forfiles /p "C:\Drivers" /s /m *.inf /c “cmd /c pnputil -a @Path” forfiles /p "C:\Drivers" /s /m *.inf /c “cmd /c pnputil -a @Path” forfiles /p "C:\Drivers" /s /m *.inf /c “cmd /c pnputil -a @Path”
  • FOG Post install script for Win Driver injection

    Pinned
    69
    8 Votes
    69 Posts
    88k Views
    JJ FullmerJ

    @Coolguy3289 Sorry for the crazy delayed reply, I just saw this, I must have missed the notification

    This is what my general structure looks like. You would not need to recreate that with the + pseudo wildcards, that is part of my windows side matching that I have now actually replaced with this modellist method. The grep line will search each model folder in the given make folder regardless of its name. I will probably end up changing those folders to be something like HP ElitePro G# or something like that.

    e880c851-3f3c-418d-adb9-8ff886199667-image.png

    Then say I have a HP Elite Mini 600 G9 Desktop PC

    This bit

    makePth="/images/drivers/${make}" cd $makePth;

    Should get me into the /images/drivers/hp folder

    Then this listFile=`grep -il "$model" ./*/*-ModelList.txt` should search each HP ModelList.txt for that model string using grep and return the matching modelList file with a match. In this case it would match /images/drivers/hp/HP + +00 G9+/HP + +00 G9+-ModelList.txt as that file looks like this where I have various possible matching model names these drivers apply to including the one being searched for

    HP Elite Mini 600 G9 Desktop PC HP Elitedesk 600 G9 DM HP Elite Mini 800 G9 Desktop PC HP Pro Mini 400 G9 Desktop PC HP EliteOne 840 23.8 inch G9 All-in-One Desktop PC

    And then this remotedriverpath="$makePth/${listFile%/*}" should point to the parent path of where the found ModelList.txt file was found and it will then proceed to inject that folder to `C:\Out-Of-Box Drivers\HP + +00 G9+

    And as to creating those modelList.txt files, it’s easier than it sounds, especially if you use the fog api powershell module FogApi (see my signature).

    For example, to get all my current HP (and any other make that stores the friendly name of their model in system-product-name) model names as they are detected by fog you would setup the FogApi module in powershell

    Install-Module FogApi; Set-FogServerSettings -interactive

    Then this one liner would get all your fog host inventories, select just the sysman and sysproduct fields, and then sort it to unique model names giving you a list of model names you have in your inventory

    (get-foghosts).inventory | select-object sysman,sysproduct | sort-object sysproduct -Unique

    You’d also what to run these other 2 commands to get lists of other model names stored in system-version or baseboard-product-name

    (get-foghosts).inventory | select-object sysman,sysversion | sort-object sysversion -Unique (get-foghosts).inventory | select-object sysman,mbproductname | sort-object mbproductname -Unique

    You could probably expound from there to programatically create to folder structure and the modelList files of your current hosts, but I don’t have time at the moment to get that deep into it. I don’t have that many different models and already had the folder structure so just getting those lists was all I needed to construct the model list files

  • Powershell API Module

    Pinned
    32
    4 Votes
    32 Posts
    31k Views
    JJ FullmerJ

    Another Release(s)! 2506.9.22
    https://github.com/darksidemilk/FogApi/releases/tag/2506.9.22

    2506.9.19-22 are a slew of releases where I kept finding issues in broader tests right after I released each version. So apologies for the over-releasing there.

    Fixed send-fogimage to work with more use cases and utilize more parameters available to scheduled tasks like bypassbitlocker. Also simplified the parameter sets to avoid errors when using the command with different parameter sets. Also added links to PSGallery and chocolatey in each github release going forward.

    Full Release Note History: https://fogapi.readthedocs.io/en/latest/ReleaseNotes/
    Powershell Gallery Listing for this version: https://www.powershellgallery.com/packages/FogApi/2506.9.22
    Chocolatey Package Listing for this version (may take 1-60 days from release to be approved by chocolatey moderators): https://community.chocolatey.org/packages/FogApi/2506.9.22

  • FOG: 1.5.4 -> How to setup NAS - Synology DiskStation as Master Node

    52
    1 Votes
    52 Posts
    41k Views
    V
    UPDATE 07/17/2026

    After some experimentation and examining the fogftp.class.php file, I found that FOG calls ftp_rename to move files from the /image/dev/<mac_host> folder to the /image/<image_name> folder.

    Finally, it helped me to connect with a regular ftp client (WinSCP) and try to move the folders manually. This is how I found out that the problem was in the permissions set on the folders.

    So I found out that from my original version 1.5.10.10 to the current 1.5.10.1903 there was a change in the file

    /lib/reg-task/taskqueue.class.php

    in the private function _moveUpload() method it was previously

    ->chmod(0777, $dest) and now it is ->chmod(0775, $dest)

    That (maybe) could be the reason why it stopped working for me. Thanks to this post https://forums.fogproject.org/post/156271

    chown -R fog:users /volume1/images/ #set inheritance to the dev folder chmod g+s /volume1/images/dev/

    I connected to the NAS with ssh and fixed the permissions over the folders. Now it’s working fine again.

  • FOG Secure Boot with Shim

    18
    2 Votes
    18 Posts
    13k Views
    K

    @jmeyer Good work. So far looks very similar to what I was doing above but with grub instead. I’m guessing you’re aiming for something along the lines of the archived project you mentioned earlier that did this. Make sure you modify your ipxe scripts to load the shim with the shim command, and then sign whatever you’re booting from ipxe and you should be more or less there.

    It’s worth noting if you want you should be able to skip the grub stage entirely, if you load the shim directly and name your ipxe binary what you’re grub binary currently is you should be able to net boot any shim pretty easily, from there the shim can automatically call mok manager as long as it’s in the same directory as your shim.

    Sorry for responding so late. I’m out on training this week.

  • Basics for WinPE PXE boot using fog

    2
    3 Votes
    2 Posts
    4k Views
    R

    Hi,
    I know this is a bit old, but I found it when I was searching for an answer to the following question:

    I have prepared USB bootable image based in WinPE. I use it to boot from USB. I have this image in iso file and I use it to place it on USB with rufus software.

    I wonder if I can use this tutorial of yours in exactly same way only to use my custom iso image instead of your mentioned WinPE.

    I know this may be trivial question and I may just try it, but I am really only beginner in WinPE and fog project.

    Thank you for your kind answer.
    -r-

  • Configure iVentoy as netboot-Option in boot menu

    8
    1 Votes
    8 Posts
    14k Views
    Cire3C

    @youzersef Ok, see how long it takes me to get back on a project…lol

    I did some more looking, and found yes, the GUI will re-write the dhcp config file. However I did some more reading and I guess services.inc determines what is written by the GUI.

    Sorry, not a CLI guy, and I love the quick and easy edits, viewing issues that the GUI provides. Like Fog ! However my servers are headless…lol

    Anyway, looking that route now, and will update if I find how Negate wants services edited so when it reboots, DHCP will remain.

    Determined 🙂

    Any thank you everyone here . This place has always been great for information !

  • Installing FOG in a Docker container

    7
    1 Votes
    7 Posts
    14k Views
    8

    I’m going around replying to all these old Docker request threads so people can try out my work. Check out my thread here:

    https://forums.fogproject.org/topic/18000/unofficial-docker-image-beta

    and provide feedback in the comments.

    the actual github repo is here:

    https://github.com/88fingerslukee/fog-docker

  • 1 Votes
    1 Posts
    937 Views
    No one has replied
  • Inject drivers via Fog

    5
    0 Votes
    5 Posts
    9k Views
    D

    @george1421 Thanks for your help.

    I solve the problem with this AutoUnatted.xml

    <?xml version=“1.0” encoding=“utf-8”?>
    <unattend xmlns=“urn:schemas-microsoft-com:unattend”>
    <!-- Bypass OOBE -->
    <settings pass=“oobeSystem”>
    <component name=“Microsoft-Windows-Shell-Setup” processorArchitecture=“amd64” publicKeyToken=“31bf3856ad364e35” language=“neutral” versionScope=“nonSxS” xmlns:wcm=“http://schemas.microsoft.com/WMIConfig/2002/State” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”>
    <OOBE>
    <HideEULAPage>true</HideEULAPage>
    <HideLocalAccountScreen>true</HideLocalAccountScreen>
    <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
    <HideOnlineAccountScreens>true</HideOnlineAccountScreens>
    <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
    <ProtectYourPC>3</ProtectYourPC>
    <SkipUserOOBE>true</SkipUserOOBE>
    <SkipMachineOOBE>true</SkipMachineOOBE>
    <UnattendEnableRetailDemo>false</UnattendEnableRetailDemo>
    <NetworkLocation>Other</NetworkLocation>
    </OOBE>
    </component>
    <component name=“Microsoft-Windows-International-Core” processorArchitecture=“amd64” publicKeyToken=“31bf3856ad364e35” language=“neutral” versionScope=“nonSxS” xmlns:wcm=“http://schemas.microsoft.com/WMIConfig/2002/State” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”>
    <SystemLocale>pt-PT</SystemLocale>
    <UILanguage>pt-PT</UILanguage>
    <UserLocale>pt-PT</UserLocale>
    <InputLocale>0816:00000816</InputLocale>
    </component>
    </settings>

    <!-- Run SetupComplete.cmd via PostOOBE --> <settings pass="specialize"> <component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <RunSynchronous> <RunSynchronousCommand wcm:action="add"> <Order>1</Order> <Path>reg add "HKEY_LOCAL_MACHINE\SYSTEM\Setup\FirstBoot\PostOobe" /v "00" /t REG_SZ /d "cmd /c C:\Windows\Setup\Scripts\SetupComplete.cmd &amp; exit /b 0" /f</Path> </RunSynchronousCommand> </RunSynchronous> </component> </settings>

    </unattend>

    The AutoUnatted.xml will call the the script C:\Windows\Setup\Scripts\SetupComplete.cmd

    I make the sysprep with AutoUnatted.xml

  • Getting started video

    Unsolved
    3
    0 Votes
    3 Posts
    3k Views
    C

    Thanks @george1421,
    I haven’t setup Fog yet so was looking for a step by step guide to getting it installed and configured.

  • confusion creating fos-usb stick

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Synology NAS as FOG Storage node

    31
    5 Votes
    31 Posts
    42k Views
    M

    @george1421
    for those struggling with permissions with dev folder.
    nfs creates a root:root with 775 permissions and fog ftpuser isn’t part of that group

    Just use setgid feature on filesystem . it will enable inheritance
    first change the owner of the folders and make “users” the group , lets say fog is your ftp user

    chown -R fog:users /volume1/images/

    #set inheritance to the dev folder

    chmod g+s /volume1/images/dev/

    now every new file under dev will have the directory group owner

    Regards

  • Windows Powershell script for DHCP config

    1
    1 Votes
    1 Posts
    2k Views
    No one has replied
  • Updating/Compiling the latest version of iPXE

    5
    1 Votes
    5 Posts
    20k Views
    JJ FullmerJ

    @george1421 https://docs.fogproject.org/en/latest/compile_ipxe_binaries
    Just throwing in the permalink to the doc on this process.

  • Basic Persistent groups and 1.3.0RC16

    24
    2 Votes
    24 Posts
    26k Views
    Tom ElliottT

    @yannickF You really should state your issues.

    If a feature isn’t available for whatever reason, we will tell you, but leaving us in “uh oh” isn’t really a good approach.

    What issue are you having?

  • Successfully booting Parted Magic

    2
    1 Votes
    2 Posts
    6k Views
    george1421G

    @renewedharry

    I’m sure some of these parameters are not relevant as I don’t really know what I’m doing,

    It looks like you are doing very well.

    I can add a little context as in the kernel parameter loads the linux kernel. The initrd commands load these image files onto a virtual hard drive created by iPXE so the kernel can locate them. The .img files would actually be mapped as hard drives to the kernel. The kernel would know how to connect to them and use them.

    As for the imgargs these are flags for the kernel as it boots. The different flags tell the startup scripts in the kernel how to react dynamically to the external environment. The alternative would be to build the flags into the kernel, but then you would need to recompile the kernel every time you wanted to make a change. Hint: kernel args are the way to go.

    I don’t see much room for improvements with this design. You are currently using http to transfer the boot files. Once the kernel starts up then iPXE is out of the picture. I’m going to suspect most of the slowness is because most of the files are the pmodules directory. iPXE should load bzImage, initrd.img, fu.img and m.img very quickly. Where most of your time is probably once bzImage starts to boot. Then you are at the mercy of what Parted Magic does.

  • Using FOG to PXE boot into your favorite installer images

    Locked
    38
    7 Votes
    38 Posts
    130k Views
    george1421G

    Parted Magic version from May 2023

    Please see this article posted by @renewedharry

    https://forums.fogproject.org/topic/17498/successfully-booting-parted-magic

  • VirtualBox FOG Server Download

    51
    0 Votes
    51 Posts
    60k Views
    T

    I would like to have a link

  • Clone over network

    5
    0 Votes
    5 Posts
    5k Views
    R

    @Tom-Elliott Tanks a lot, i gonna check the documentation about PXE boot.
    Have a nice day.

48

Online

12.7k

Users

17.6k

Topics

156.8k

Posts