• Post-Image Software Installations

    2
    0 Votes
    2 Posts
    3k Views
    C

    Hi mwestaph,

    I am also new here but I believe I can take a crack at your image.
    Snapins I feel are great, they automatically install after your machine is imaged. The other tool you would want to consider here are the “Groups” feature. While this isn’t a traditional group where new hosts inherit group settings, its a good way to apply settings on mass.

    Here is my basic setup:
    I have 2 images and 6 groups. I then onboard all of the client machines / hosts and assign them to the appropriate group. In the group setup, I then choose the correct image and snapins for that group. This applies these settings to all associated hosts (ie. All current hosts that are associated with this groups now have the same settings.)
    The only downside currently is if you need to assign a new host machine to this group, you need to re-apply the image and snapin settings for the group to apply it appropriately to this machine.

    Let me know if this helps and if there is anyone more experienced out there feel free to tell me if I am wrong.

  • Full registration customised

    2
    0 Votes
    2 Posts
    3k Views
    J

    Do you think writing this in fog.man.reg after line

    [[ $exists != "#!ok" ]] && handleError "Unable to register host: $exists ($0)\n Args Passed: $*"

    could do it :

    host="" imageid="999" blDoAD="Y" realdoimage=$(echo -n 1 | base64) res="" user64=$(echo "fog" | tr -d '\012' | base64) pass64=$(echo "password" | tr -d '\012' | base64) while [[ $res != "#!ok" ]]; do echo -n " * Enter hostname for this computer: " read host if [[ ${#host} -gt 15 ]]; then host=${host:0:15} echo " | Truncated to 15 characters: $host" usleep 2000000 fi host=$(echo $host | base64) res=$(curl -Lks --data "host=$host" ${web}service/hostnameloop.php 2>/dev/null) [[ $res != "#!ok" ]] && echo "$res" done dots "Attempting to register host" res="" while [[ -z $res ]]; do res=$(curl -Lks --data "sysuuid=${sysuuid}&mac=$mac&advanced=$(echo -n 1 | base64)&host=$host&imageid=$imageid&doimage=$realdoimage&doad=$blDoAD&username=$user64&password=$pass64" ${web}service/auto.register.php 2>/dev/null) echo "$res" usleep 2000000 done . /bin/fog.inventory usleep 2000000
  • adding netboot.xyz to FOG menu

    2
    0 Votes
    2 Posts
    3k Views
    Tom ElliottT

    @mashina You may have to make appropriate customizations but here are the basic steps:
    https://forums.fogproject.org/topic/10944/using-fog-to-pxe-boot-into-your-favorite-installer-images

  • RHEL 8 ISO Bootable on FOG

    3
    0 Votes
    3 Posts
    3k Views
    B

    Sorry for the 8 month reply. It worked as you pointed out! I have switched to RHEL 9.5

    Here is how it was done if someone is interested:

    Download the RHEL9.5.iso to the fog server (mine is running Ubuntu)
    sudo mkdir /mnt/rhel_iso
    sudo mount -o loop /path/to/rhel-9.5.iso /mnt/rhel_iso

    Copy the contents to var:
    sudo mkdir -p /var/www/html/rhel9.5
    sudo cp -r /mnt/rhel_iso/* /var/www/html/rhel9.5/
    sudo chmod -R 755 /var/www/html/rhel9.5

    Get the vmlinuz and initrd.img from the /var/www/html/rhel9.5 to /tftpboot/rhel9.5 (create /tftpboot/rhel9.5 folder)
    sudo cp /var/www/html/rhel9.5/images/pxeboot/vmlinuz /tftpboot/rhel9.5/
    sudo cp /var/www/html/rhel9.5/images/pxeboot/initrd.img /tftpboot/rhel9.5/

    Before you move on, go to http://your-fog-server-ip/rhel9.5 make sure you can see the directories of the iso content you dropped in /var/www/html/rhel9.5

    Set up the Menu on the Fog UI (Here is mine)

    kernel tftp://10.10.10.6/rhel9.5/vmlinuz
    initrd tftp://10.10.10.6/rhel9.5/initrd.img
    imgargs vmlinuz initrd=initrd.img ip=dhcp inst.repo=http://10.10.10.6/rhel9.5/ splash quiet
    boot || goto MENU

  • Serverside logs for snapins

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • None pxe boot image deployment.

    2
    0 Votes
    2 Posts
    3k Views
    J

    fishing for ideas on where best place to start on a project like this. I think it be very valuable functionality if able to achieve it.

  • Question about Multicast Image Tasking Behavior with FOG API

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Store an image temporarily

    2
    0 Votes
    2 Posts
    2k Views
    george1421G

    @Bristow-0 Is this a physical computer or VM? Is it possible to add a new storage device to the FOG server?

    Something to understand that the fog database that lists the images is disconnected from the raw data file. You can move the image files to some place else, it won’t impact the FOG UI until you try to deploy a previously captured image.

  • Hide/Secure FOG Client download page

    3
    0 Votes
    3 Posts
    668 Views
    D

    @Tom-Elliott said in Hide/Secure FOG Client download page:

    Private key is built to the client at install time. The Public server ca cert is pulled at install time

    This is what I was unclear about. I thought the installer already had FOG’s private key. So each client gets its own private key?

  • Windows 11 -- Changes boot order priority following image deployment.

    3
    0 Votes
    3 Posts
    1k Views
    JJ FullmerJ

    @LiamRetrams I recently published a function related to this in my FogApi Powershell module (see my signature)

    I posted an example of using it in a snapin to change a host’s boot order to pxe boot as the first boot option

    https://forums.fogproject.org/topic/16784/powershell-snapin-no-output-non-error?_=1729112272355

    as @george1421 stated this is a windows issue, part of the oobe process involves changing the boot order. But you can utilize bcdedit to fix it. I’ve made an attempt at creating a universal option with my Set-WinToBootToPxe function, It works for me on some Asus motherboard based systems, I’d be very interested to hear if it works on custom Gigabyte builds as well.

    See also

    https://github.com/darksidemilk/FogApi/blob/master/FogApi/Public/Set-WinToBootToPxe.ps1 https://fogapi.readthedocs.io/en/latest/commands/Set-WinToBootToPxe/ https://github.com/darksidemilk/FogApi/blob/master/FogApi/Public/Get-WinBcdPxeID.ps1 https://fogapi.readthedocs.io/en/latest/commands/Get-WinBcdPxeId/
  • Help with SCCM and FOG integration

    10
    0 Votes
    10 Posts
    3k Views
    O

    @george1421 pls ignore, internal network issue. thank you.

  • Problems with using-fog-to-pxe-boot-into-your-favorite-installer

    Moved
    31
    1 Votes
    31 Posts
    14k Views
    O

    @razercortex pls disregard. internal network issue.

  • Server Migration, hostnames, and certificates

    3
    0 Votes
    3 Posts
    554 Views
    M

    @AUTH-IT-Center Thank you. I didn’t find that article but it has what I need.

  • FOG Clients are Unable to Connect to Server - sort of

    1
    0 Votes
    1 Posts
    389 Views
    No one has replied
  • Postdownload scripts and API

    5
    0 Votes
    5 Posts
    771 Views
    H

    @HorizonG

    I’m making an update to my script.

    If the computer belongs to several groups at the same time, this can cause problems.

    I now return all the groups, then the script selects only the group starting with GROUP_AUTOMATE_ …

    7679ccb4-dc09-4d19-9a3f-49b8039eeaf2-image.png

    This will copy only this folder to the local directory of the client machine : clientfolderpath=“/ntfs/FOG/Sites/$SITE_GROUP”
    136a0ede-7eec-46bc-a1bc-04560b236750-image.png

    Le script

    #!/bin/bash #Variables FOG_HOSTNAME=$hostname FOG_API_TOKEN="deleted for privacy reasons" FOG_USER_TOKEN="deleted for privacy reasons" FOG_SERVER="deleted for privacy reasons" # Adresse IP ou nom d'hôte de votre serveur FOG echo "Serveur FOG: $FOG_SERVER" # Fonction pour appeler l'API FOG function invoke_fog_api() { local fog_api_token="$1" local fog_user_token="$2" local fog_server="$3" local uri_path="$4" local method="${5:-GET}" local json_data="$6" local base_uri="http://$fog_server/fog" local uri="$base_uri/$uri_path" # Construct headers local headers=( -H "fog-api-token: $fog_api_token" -H "fog-user-token: $fog_user_token" -H "Content-Type: application/json" ) # Make API call and store response in a variable if [ "$method" == "GET" ]; then response=$(curl -s -X GET "$uri" "${headers[@]}") else response=$(curl -s -X "$method" "$uri" "${headers[@]}" -d "$json_data") fi echo "$response" } # Fonction pour obtenir les détails de l'hôte function get_fog_host() { local fog_api_token="$1" local fog_user_token="$2" local fog_server="$3" local fog_hostname="$4" response=$(invoke_fog_api "$fog_api_token" "$fog_user_token" "$fog_server" "host?name=$fog_hostname") # Vérifiez si la réponse est vide if [ -z "$response" ]; then echo "Erreur: La réponse de l'API pour l'hôte est vide." return 1 fi # Vérifiez la validité du JSON if ! echo "$response" | jq . > /dev/null 2>&1; then echo "Erreur: La réponse de l'API pour l'hôte n'est pas un JSON valide." echo "Réponse brute de l'API: $response" return 1 fi # Extraire les détails de l'hôte local host_info host_info=$(echo "$response" | jq --arg hostname "$fog_hostname" '.hosts[] | select(.name == $hostname)') if [ -z "$host_info" ]; then echo "Erreur: Aucun détail trouvé pour l'hôte $fog_hostname." return 1 fi echo "$host_info" } # Fonction pour obtenir les groupes associés à un hôte function get_fog_groups_for_host() { local fog_api_token="$1" local fog_user_token="$2" local fog_server="$3" local host_id="$4" # Récupérer les associations de groupes local response response=$(invoke_fog_api "$fog_api_token" "$fog_user_token" "$fog_server" "groupassociation") # Vérifiez la validité du JSON if ! echo "$response" | jq . >/dev/null 2>&1; then echo "Erreur: La réponse de l'API pour les associations de groupes n'est pas un JSON valide." echo "Réponse brute de l'API: $response" return 1 fi # Extraire les IDs des groupes associés à l'hôte local group_ids group_ids=$(echo "$response" | jq -r --arg host_id "$host_id" '.groupassociations[] | select(.hostID == ($host_id | tonumber)) | .groupID') # Récupérer les détails des groupes response=$(invoke_fog_api "$fog_api_token" "$fog_user_token" "$fog_server" "group") # Vérifiez la validité du JSON if ! echo "$response" | jq . >/dev/null 2>&1; then echo "Erreur: La réponse de l'API pour les groupes n'est pas un JSON valide." echo "Réponse brute de l'API: $response" return 1 fi # Afficher les détails des groupes associés dans un format simple local group_ids_array group_ids_array=$(echo "$group_ids" | jq -R -s -c 'split("\n") | map(select(length > 0) | tonumber)') echo "$response" | jq -r --argjson group_ids "$group_ids_array" \ '.groups[] | select(.id as $id | $group_ids | index($id)) | "\(.id) \(.name)"' } # Fonction pour traiter et afficher les groupes dont le nom commence par GROUP_AUTOMATE_ function process_fog_groups() { local group_data="$1" echo "Groupes associés à l'hôte (commençant par GROUP_AUTOMATE_) :" # Initialiser les index local group_index=1 # Extraire les groupes et définir les variables d'environnement while IFS= read -r line; do id=$(echo "$line" | awk '{print $1}') name=$(echo "$line" | awk '{$1=""; print $0}' | sed 's/^ *//') # Remove leading spaces from the name if [[ "$name" == GROUP_AUTOMATE_* ]]; then # Définir les variables d'environnement pour le nom et l'ID du groupe export FOG_GROUP_NAME_$group_index="$name" export FOG_GROUP_ID_$group_index="$id" # Afficher le groupe echo "GROUP NAME = $name" echo "GROUP ID = $id" export FOG_GROUP_NAME_AUTOMATE=$name export FOG_GROUP_NAME_ID=$id # Incrémenter l'index pour le prochain groupe group_index=$((group_index + 1)) fi done <<< "$group_data" } # Fonction principale pour la simulation function GetInfo_host() { local fog_api_token="$FOG_API_TOKEN" local fog_user_token="$FOG_USER_TOKEN" local fog_server="$FOG_SERVER" local fog_hostname="$FOG_HOSTNAME" # Obtenez les détails de l'hôte local local_host local_host=$(get_fog_host "$fog_api_token" "$fog_user_token" "$fog_server" "$fog_hostname") # Vérifiez si local_host est vide if [ -z "$local_host" ]; then echo "Erreur: Aucune information sur l'hôte trouvée." return 1 fi # Obtenez l'ID de l'hôte local host_id host_id=$(echo "$local_host" | jq -r '.id') if [ -z "$host_id" ]; then echo "Erreur: Impossible d'extraire l'ID de l'hôte." return 1 fi # Obtenez les groupes associés à l'hôte local host_groups host_groups=$(get_fog_groups_for_host "$fog_api_token" "$fog_user_token" "$fog_server" "$host_id") # Vérifiez si host_groups est vide if [ -z "$host_groups" ]; then echo "Erreur: Aucune information sur les groupes trouvée pour l'hôte." return 1 fi # Traitement des groupes et affichage des détails process_fog_groups "$host_groups" # Accès aux variables d'environnement pour chaque groupe for i in $(seq 1 $((group_index - 1))); do echo "Nom du groupe $i: ${!FOG_GROUP_NAME_$i}" echo "ID du groupe $i: ${!FOG_GROUP_ID_$i}" done # Affichage des détails echo "---------------------------------------" echo "Détails de l'hôte pour: $fog_hostname" echo "---------------------------------------" echo "Détails de l'hôte récupérés :" echo "$local_host" echo "---------------------------------------" # Afficher le contenu de host_groups => ALL GROUPS echo "---------------------------------------" echo "ALL GROUPS :" echo "$host_groups" echo "---------------------------------------" # Affichage des détails du groupe AUTOMATION #echo $FOG_GROUP_NAME_AUTOMATE #echo $FOG_GROUP_NAME_ID echo "Détails du groupe automation" echo "Nom du groupe: $FOG_GROUP_NAME_AUTOMATE" echo "ID du groupe: $FOG_GROUP_NAME_ID" echo "---------------------------------------" # Définir les variables d'environnement pour le nom et l'ID du groupe export FOG_GROUP_NAME_AUTOMATE export FOG_GROUP_NAME_ID } GetInfo_host SITE_GROUP="${FOG_GROUP_NAME_AUTOMATE##*_}" echo "Target Site $SITE_GROUP" echo "Try to copy this folder if existing : /images/Sites/$SITE_GROUP" # Vérification de la présence du disque système echo "Verifying we've found the OS disk" if [[ ! -d /ntfs/windows && ! -d /ntfs/Windows && ! -d /ntfs/WINDOWS ]]; then echo "! OS root Not found !" # Assurez-vous que 'debugPause' est défini, sinon utilisez une alternative appropriée # debugPause exit 1 fi echo "Found" # Préparer le chemin des dossiers clientfolderpath="/ntfs/FOG/Sites/$SITE_GROUP" remotefolderpath="/images/Sites/$SITE_GROUP" # Créer le répertoire /tmp/sites s'il n'existe pas déjà if [[ ! -d /tmp/sites ]]; then mkdir -p /tmp/sites fi # Créer le sous-répertoire avec le nom contenu dans $SITE_GROUP if [[ -n "$SITE_GROUP" ]]; then mkdir -p "/tmp/sites/$SITE_GROUP" echo "Le répertoire /tmp/sites/$SITE_GROUP a été créé." else echo "Erreur : \$SITE_GROUP est vide. Impossible de créer le répertoire." exit 1 fi # Créer le répertoire clientfolderpath s'il n'existe pas déjà if [[ ! -d "$clientfolderpath" ]]; then mkdir -p "$clientfolderpath" echo "Répertoire client créé : $clientfolderpath" fi # Copier le dossier avec rsync echo -n "In Progress" rsync -aqz "$remotefolderpath/" "$clientfolderpath/" >/dev/null 2>&1 if [[ $? -eq 0 ]]; then echo "Dossier copié avec succès." else echo "Erreur : Échec de la copie du dossier." exit 1 fi debugPause
  • Can't start my WinPE WIM image from a Task

    9
    0 Votes
    9 Posts
    2k Views
    Y

    @george1421 Hello,
    This feature is still highly asked to me about our FOG Deployment in our company. Do you mind giving me more informations about how can I achieve to boot my WIM / ISO image with a Fog Task ?

  • Adapt MBR images to GPT

    4
    0 Votes
    4 Posts
    708 Views
    O

    Ok I did it. If I dont set the partition as UEFI it doesnt add another entry in the boot. I have tested many times and it doesnt seems to fail… Not sure the consecuences of not setting it as UEFI.

  • How to use unattended script to complete oobe without loading a new image

    6
    0 Votes
    6 Posts
    1k Views
    JJ FullmerJ

    @rogerdodger wait, I just read this bit, not reimaging it makes it difficult. You still could use snapins and the fog client, but fully automating it would require reimaging.

  • How to get rid of Delete button under Images section

    Solved
    10
    0 Votes
    10 Posts
    2k Views
    T

    @Tom-Elliott thanks for everything. Guess we can close this topic (I’m not really sure if I can do it myself)

  • Does FOG Support HTTPS Network boot and image installation

    3
    0 Votes
    3 Posts
    687 Views
    Tom ElliottT

    @george1421 That’s true if using the fog installer to handle it.

    @michaelkoch1811 There are methods to rebuild the binaries using your own binaries of course.

    in the fogproject folder (where you normally run an installer) there’s a file under:
    utils/FOGiPXE called buildipxe.sh

    if you call this script with your <path/to/your/certificate.pem> it should build the ipxe binaries with your custom certificate.

    ./buildipxe.sh path/to/your/certificate.pem

    By default it will try to use the CA pem we generated for FOG at install.

150

Online

12.5k

Users

17.5k

Topics

156.2k

Posts