• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. dvorak
    3. Topics
    D
    • Profile
    • Following 0
    • Followers 0
    • Topics 3
    • Posts 19
    • Best 2
    • Controversial 0
    • Groups 0

    Topics created by dvorak

    • D

      Unsolved Possible to allow web-based access to use HTTPS, but everything else http (ipxe, fog client etc)?

      FOG Problems
      • • • dvorak
      1
      0
      Votes
      1
      Posts
      53
      Views

      No one has replied

    • D

      Solved simple PXE tutorial

      FOG Problems
      • • • dvorak
      11
      0
      Votes
      11
      Posts
      5.9k
      Views

      D

      @george1421 Thanks a ton for those words (OK that iso image seems to be only a legacy/bios boot media.)

      I figured out one thing I was doing very wrong.
      I was PXE booted in UEFI… when hitting F12 to boot the PC, I automatically selected the IPV4 under UEFI, and not the “network boot” under legacy, both of which show up in my F12 menu. Both of which FOG PXE boot works with.

      Well, after using the legacy, the dell iso image (that only shows CD.txt) works flawlessly. Now I think everything will work that requires legacy for me, as some things seems you can’t use PXE UEFI with (perhaps not supported by the manufacturer, some programs like Memtest require spending thousands of dollars to get the “site edition” that works with PXE, etc). Keeping in mind your words in other posts about the size limitations of isos (2gb?), the ones I wish to use should all be small enough. I think we can mark this as solved.

      Thanks so much for your help.

    • D

      /opt/fog/.fogsettings MySQL user can't make changes

      General
      • • • dvorak
      4
      0
      Votes
      4
      Posts
      409
      Views

      D

      @sebastian-roth
      Update I was able to make progress by fixing up the code per-say. I think the OP of the code (ch3i) wrote up something from memory and not from actual tests, and possibly update or make note of any changes in syntax as programs update.

      For instance, hostname --fqdn gives an error “hostname: unrecognized option ‘–fqdn’ BusyBox v1.31.1” so I changed to ‘hostname -f’.

      I was able to get pass the original MySQL errors using your advice, and using the fogstorage account instead. Running both scripts on ubuntu still stops without reason at “checking hostname/domain configurations”. When I run it on FOG (As a postdownloadscript), and it runs after cloning the image,it stops at :
      “Check Mysql Configuration: Done
      Check FOG Mysql Database Status: Done
      Checking hostname/domain configurations *Rebooting system as task is completed”
      Reboot: restarting system

      but upon reboot, I have the same hostname I myself set prior to capturing the image. Fog has a different hostname set to the MAC that I never changed, so if the script worked my hostname should reflect what FOG has.

      IT never makes it to the next part which should say “updating /etc/hostname” nor saying “Done” or “host not found in fog database”. So I am thinking it’s stuck at these lines:

      ######################################################### # Get interfaces ######################################################### NETWORK_CARDS=($(ls /sys/class/net | grep eth)) ######################################################### # Get host name and domain from FoG database ######################################################### FUNC_DOTS "Checking hostname/domain configurations" for ETH in ${NETWORK_CARDS[*]} do # read mac address MAC=$(cat /sys/class/net/$ETH/address) # get mac address information from fog web server wget http://$FOG_SERVER/$FOG_WEBROOT/service/hostname.php?mac=$MAC -O /tmp/hostname_check 2>/dev/null HOST_NAME="$(grep 'ok=' /tmp/hostname_check | cut -d "=" -f2)" HOST_DOMAIN_NAME="$(grep 'ADDom' /tmp/hostname_check | cut -d "=" -f2)" if [ "$HOST_NAME" != "" ] then echo "Done ($HOST_NAME.$HOST_DOMAIN_NAME)" sleep 3 # A hostname is found - quit the loop break else echo "Error" FUNC_DOTS "Host not found in FOG database" echo "exiting" sleep 3 exit fi done

      Final Update
      I got it to work!
      As first mentioned, I had to update the syntax as it’s been over 7 years since the code was written by OP (ch3i). The update that crashed the above code was :

      NETWORK_CARDS=($(ls /sys/class/net | grep eth))

      To get it to work I swapped it to :

      NETWORK_CARDS=($(ls /sys/class/net ))

      I learned thru google there was a change (systemd?) that made ls /sys/class/net not use ETH anymore, rather showing something like “enp0s31f6” which is the same as ETH0, but showing the exact location. The code was looking for ETH so just removing that line fixed it.

      Now that it works, I feel I can turn the code into a snap-in or post-download script.

    • 1 / 1