• Fog communications

    6
    0 Votes
    6 Posts
    1k Views
    JunkhackerJ

    @nick the client communicates entirely with web based services on the fog server. in fact, if you know what to put in the url bar you can do most (maybe all, i can’t remember) of the call/response in a browser to see what gets returned when the client makes requests. which is something we do when troubleshooting.

  • use fog snapins to install .deb files

    2
    0 Votes
    2 Posts
    326 Views
    S

    @OmegaXis While I have not tried it myself I would think it’s not a big deal. Start reading up on bash scripting and start with simple scripts like this one:

    #!/bin/bash # my installer script APT_GET_PATH=$(command -v apt-get) [[ -z $APT_GET_PATH && -x /usr/bin/apt-get ]] && APT_GET_PATH=/usr/bin/apt-get $APT_GET_PATH -y update $APT_GET_PATH -y install -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold name-of-new-package

    Instead of name-of-new-package use the package you want to install.

  • FOS not mounting drive for post download scripts.

    5
    0 Votes
    5 Posts
    779 Views
    R

    @george1421 @Sebastian-Roth So I modified my postdownload scripts to manually mount the correct drive if the code that was originally there didn’t do it. It is working for me so I am adding my post download scripts below in case anyone comes across this thread and finds it helpful for them. This works for me in my environment, but may not work for everyone.

    I took inspiration from the getHardDisk() function in https://github.com/FOGProject/fos/blob/master/Buildroot/board/FOG/FOS/rootfs_overlay/usr/share/fog/lib/funcs.sh

    The scripts are a bit of a mess but working

    fog.postdownload

    #!/bin/bash ## This file serves as a starting point to call your custom postimaging scripts. ## <SCRIPTNAME> should be changed to the script you're planning to use. ## Syntax of post download scripts are #. ${postdownpath}<SCRIPTNAME> clearScreen; dots "Running post download scripts." mkdir /ntfs &>/dev/null ntfs-3g -o force,rw $part /ntfs echo "Mounting Device"; if [ "$?" = 0 ]; then if [ ! -d "/ntfs/Windows" ]; then . ${postdownpath}mountLargestPartition fi echo "Done" debugPause . ${postdownpath}getMachineModel . ${postdownpath}getPlatformVersion . ${postdownpath}fog.drivers . ${postdownpath}fog.unattend if [ -z "$auditMode" ]; then . ${postdownpath}fog.bcu fi echo "Unmounting Device"; umount /ntfs; debugPause else echo "Failed to mount device"; sleep 30; debugPause fi

    mountLargestPartition

    #!/bin/bash dots "Running the manual mount script" drive=$(lsblk -dpno KNAME -I 3,8,9,179,202,253,259 | uniq | sort -V) driveCleaned=${drive//'/dev/'/} #Remove `/dev/` from variable partition="" partSize=0 # Get the largest partition while IFS= read -r line; do tempPartSize=$(blockdev --getsize64 /dev/$line) if [ $tempPartSize -gt $partSize ]; then partSize=$tempPartSize partition="/dev/$line" fi done < <(ls /dev | grep -E "${driveCleaned}[a-zA-Z0-9]+") umount /ntfs &> /dev/null ntfs-3g -o force,rw $partition /ntfs

    getMachineModel

    #!/bin/bash dots "Retrieving Machine Model" machine=$(dmidecode -s system-product-name) # Gets machine model machine="${machine// /_}" # Replace spaces with underscores echo "${machine}" debugPause

    getPlatformVersion

    #!/bin/bash dots "Retrieving Platform Version from Registry" # Create a registry file to be able to search the ReleaseId from # reged -x gives out an abort error message but from all my testing it still works. reged -x /ntfs/Windows/System32/config/SOFTWARE HKEY_LOCAL_MACHINE\\SOFTWARE \\ /out.reg &> /dev/null || true if [ -f /out.reg ] then PlatformVersion=$(cat /out.reg | grep 'ReleaseId') PlatformVersion=${PlatformVersion:13:4} # Grab only actual the ReleaseId. Full text looks like "ReleaseId"="1909" echo "${PlatformVersion}" else echo "No registry file found." debugPause dots "Retrieving Platform Version from PlatformVersion.rek file" if [ -f "/ntfs/Windows/PlatformVersion.rek" ] then PlatformVersion=$(<"/ntfs/Windows/PlatformVersion.rek") echo "${PlatformVersion}" debugPause else echo "No platform version file found." debugPause fi fi

    fog.drivers

    #!/bin/bash dots "Preparing Drivers" mkdir /ntfs/Drivers &>/dev/null; echo "In Progress" dots "Adding drivers to driver path" cp -ar "/images/drivers/${machine}/${PlatformVersion}/" /ntfs/Drivers if [ "$?" = 0 ]; then echo "Done" else echo "Failed!" fi debugPause regfile="/ntfs/Windows/System32/config/SOFTWARE" echo "regfile ${regfile}" key="\Microsoft\Windows\CurrentVersion\DevicePath" echo "key ${key}" devpath="%SystemRoot%\inf;%SystemDrive%\Drivers" echo "devpath ${devpath}" reged -e “$regfile” &>/dev/null <<EOFREG ed $key $devpath q y EOFREG echo “Drivers done.”

    fog.unattend

    #!/bin/bash dots "Searching for Platform Version" # If $PlatformVersion is not null/empty if [ -n "$PlatformVersion" ]; then echo "Found" debugPause dots "Removing old unattend file" rm -f /ntfs/Windows/Panther/*nattend.xml if [ "$?" = 0 ]; then echo "Done" else echo "Failed to remove file!" echo "Aborting fog.unattend" debugPause sleep 60 return fi debugPause dots "Checking image mode" if [ -n "$auditMode" ] && [ "$auditMode" -eq 1 ]; then echo "AUDIT" debugPause dots "Copying audit mode unattend file" cp "/images/unattends/UnattendAuditMode.xml" "/ntfs/Windows/Panther/Unattend.xml" if [ "$?" = 0 ]; then echo "Done" else echo "Failed!" fi debugPause else echo "OOBE" debugPause dots "Copying unattend file with driver path" cp "/images/unattends/UnattendWithDriverPath.xml" "/ntfs/Windows/Panther/Unattend.xml" if [ "$?" = 0 ]; then echo "Done" else echo "Failed!" fi debugPause fi else echo "No valid Platform Version." echo "Skipping unattend." debugPause fi

    fog.bcu

    #!/bin/bash dots "Copying BIOS change script" if [ -f "/images/drivers/CMSL-BIOS_Change.ps1" ] then cp "/images/drivers/CMSL-BIOS_Change.ps1" "/ntfs/Drivers" echo "Done" debugPause else echo " Failed! Could not find bios change script." debugPause sleep 60 fi echo "fog.bcu done." debugPause
  • How to set menu item as default? (And some other queries)

    4
    0 Votes
    4 Posts
    654 Views
    george1421G

    @yuma said in How to set menu item as default? (And some other queries):

    but when I use tftp, it takes a very long time - eventually iPXE says it timed-out.

    Well that’s a different issue. We can switch over to http and make things go a bit faster. For the my how to boot thread, for consistency sake I use the majority of tftp. But for big things we can surely switch over to http and see better performance.

  • Point a newbie in the right direction

    5
    0 Votes
    5 Posts
    1k Views
    RAVR

    @tom-elliott I’m looking forwards to it! There’s a lot about FOG I don’t know yet and I’m just starting to dip my toes in.

  • Installation fails due to lack of php7.1

    5
    0 Votes
    5 Posts
    1k Views
    D

    @sebastian-roth

    true story.
    Ubuntu 20.04 and FOG 1.5.9 get along quite well.

  • Reconfiguring an exisiting FOG Server to not have PXE enabled

    5
    0 Votes
    5 Posts
    709 Views
    D

    @george1421 I thought I did but I was wrong. I started reading these instructions down at the bottom under “Older Instructions” https://wiki.fogproject.org/wiki/index.php?title=USB_Bootable_Media#USB_Boot_UEFI_client_into_FOG_menu_.28harder_way.29

    But the files and folders don’t match up with what I got. Do I still need to copy the contents of /tftpboot/ to the root of the USB? Where do I start?

  • ISO PXE Booting

    9
    0 Votes
    9 Posts
    2k Views
    george1421G

    @george1421 Well progress is good.

    I can pxe boot the dell (redhat) kernel with this

    Menu Item: os.platformR620
    Description: Platform Specific Firmware R620
    Parameters:
    kernel tftp://${fog-ip}/os/dell/psf620/SA.1
    initrd tftp://${fog-ip}/os/dell/psf620/SA.2
    imgargs SA.1 initrd=SA.2 root=live:http://${fog-ip}/dellsquashfs.img rootfstype=auto rd.live.image rd.writable.fsimg rw DEBUG=0 share_type=NFS loglevel=7 BUILD=0 selinux=0 edd=off rd.md=0 rd.dm=0 quiet – share_script=drm_files/apply_bundles.sh
    boot || goto MENU
    Menu Show with: All Hosts

    SA.1 and SA.2 to into the /tftpboot path and squashfs.img -> dellsquashfs.img goes into the http root of /var/www/html

    It boots but doesn’t complete what is needed. But I have access to the command prompt. Focus is on this parameter now: share_type=NFS

    Some searching on the target system shows these options:
    2021-07-08 13_40_07-Window.png

    Now we know the script that is responsible to making the connection and the values supported for share_type.

    looking into the script I see two new clues.

    2021-07-08 15_45_16-Window.png

    $share_location and $share_opts making an NFS mount.

  • Modify path /images to /home ???

    17
    0 Votes
    17 Posts
    9k Views
    C

    @scoude said in Modify path /images to /home ???:

    Hi everybody,
    I have a 1.5.5 Fog version on Debian 9.3. By default, my images storage directory was /images.
    And my wish was to put images on new directory /var/images (/var is mount on LVM mapper…).
    So here are the actions I done :
    1/ create a /var/images directory
    2/ set good rights and owner for this new directory (see /images rights)
    3/ move all files from /images to /var/images (be careful to move all files : with dot, etc.; ls -la to be sure !)
    4/ connect to database with mysql client and change path :
    use fog;
    update nfsGroupMembers set ngmRootPath=‘/var/images/’;
    update nfsGroupMembers set ngmFTPPath=‘/var/images/’;

    5/ change path in /etc/exports :
    /var/images *(ro,sync,no_wdelay,no_subtree_check,insecure_locks,no_root_squash,insecure,fsid=0)
    /var/images/dev *(rw,async,no_wdelay,no_subtree_check,no_root_squash,insecure,fsid=1)

    6/ apply nfs changes :
    exportfs -ra

    That’s all !

    This works fine for me.

    Thank you.

  • delete all files from a client folder with windows 10

    7
    0 Votes
    7 Posts
    1k Views
    Gilberto FerrazG

    @george1421 Excellent explanation 🙂 Thanks for the help. I will close the post as resolved I believe it will work 🙂

  • Passing variable from ipxe menu to FOS

    8
    0 Votes
    8 Posts
    3k Views
    Tom ElliottT

    @rodluz I don’t understand the hiding of private ip addresses, never have and never will. Either way, glad you were able to get this working for you!

  • Recommended branch?

    2
    0 Votes
    2 Posts
    289 Views
    S

    @astrugatch Latest laster is 1.5.9 as of now. There have been a fair amount of fixes since then. I would suggest you use dev-branch to make sure you have all those fixes included.

  • WebGui language will not change

    3
    0 Votes
    3 Posts
    562 Views
    C

    @tom-elliott said in WebGui language will not change:

    installlang=1 /path/to/foginstaller/bin/installfog.sh -y

    Hello Tom

    thank you for your answer. I did what you described. But it doesn’t work. The language cannot be selected. What does “installlang = 1” mean

    thanks
    Marcel

  • Changing host registration database interaction

    3
    0 Votes
    3 Posts
    277 Views
    C

    @sebastian-roth Thanks for the swift response, looking closer at the fog image files this is exactly the file I will need to modify! From our perspective it would be great to have an audit trail for hardware built in to future versions, but I understand if there isn’t much demand for it, though slightly surprised as it seems useful to me for a whole variety of reasons outside of our specific use case (in which it is required!).

  • How do I view what pre-boot architecture type a PC has?

    4
    0 Votes
    4 Posts
    1k Views
    george1421G

    @yeet If you look at the very top of that wiki page it actually explains all of the arch types.

    Type Architecture Name ---- ----------------- 0 Intel x86PC 1 NEC/PC98 2 EFI Itanium 3 DEC Alpha 4 Arc x86 5 Intel Lean Client 6 EFI IA32 7 EFI BC (EFI Byte Code) 8 EFI Xscale 9 EFI x86-64

    Unless you think you might run across 1, 2, 3, 4, 5, 8 you probably won’t need to configure them. FOG Doesn’t have a iPXE boot loader anyway for those arch.

  • NFS loads fine; HTTP draws a blank screen

    Moved
    3
    0 Votes
    3 Posts
    302 Views
    S

    @yuma Misunderstood this as being a tutorial on how to set this up. Somehow missed your question. So moving this topic back to general questions now.

    Anyone able to help here? I don’t do much ISO booting stuff.

  • Update french translation for Fog 1.5.9

    11
    0 Votes
    11 Posts
    2k Views
    S

    @Bristow-0 Great work!! Thank you very much for updating all the translations.

  • Can I modify Full Host registration to remove some of the questions?

    2
    0 Votes
    2 Posts
    290 Views
    george1421G

    @yeet The concepts are covered here: https://forums.fogproject.org/topic/14278/creating-custom-hostname-default-for-fog-man-reg

    You will want to edit the fog.man.reg script and comment out the sections you don’t want. It helps if you know linux bash scripting or can follow programming. The idea is for you to make your custom fog.man.reg file then patch FOS Linux every time it boots, replacing the FOG supplied script with your custom script.

    You can download the current fog.man.reg file from the fog github site: https://github.com/FOGProject/fos/blob/master/Buildroot/board/FOG/FOS/rootfs_overlay/bin/fog.man.reg

  • Translate the FOG project website

    6
    0 Votes
    6 Posts
    1k Views
    B

    OK @tom-elliott, keep me posted, I’d love to see this site available in French. It looks more serious for the decision makers…

  • How do I change the IP for the DHCP server I want my FOG server to use?

    4
    0 Votes
    4 Posts
    583 Views
    S

    @Yeet The FOG installer doesn’t ask for a DHCP server IP. Though it asks for router/gateway and DNS server IP to be used in the DHCP configuration (if you tell it to enable this service on the FOG server).

184

Online

12.4k

Users

17.4k

Topics

155.9k

Posts