• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. lenels2eng
    L
    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 18
    • Best 2
    • Controversial 0
    • Groups 0

    lenels2eng

    @lenels2eng

    2
    Reputation
    34
    Profile views
    18
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    lenels2eng Unfollow Follow

    Best posts made by lenels2eng

    • RE: Hardware Agnostic Mobile FOG

      @george1421 IT WORKS!!! (at least on the first system I tried šŸ˜› )

      so your code is MUCH more elegant than mine but it works.

      Here is what I did to the script:

      1. I implemented a check on the interface using the code you started me on (like your code you just shared).
      2. I created an SQL update statement that updates two tables in the fog database:
      # If the interface from fogsettings doesn't match what the system returned #
      #    Make the change so system can still function #
      #---- Update the interface Setting ----#
      $echo "The interface does not match the interface setting in $fogsettings, updating the interface Settings server-wide." >> $log
      statement3="UPDATE \`globalSettings\` SET \`settingValue\`='$interface' WHERE \`settingKey\` IN ('FOG_NFS_ETH_MONITOR','FOG_UDPCAST_INTERFACE');"
      statement4="UPDATE \`nfsGroupMembers\` SET \`ngmInterface\`='$interface' WHERE \`ngmMemberName\`='$storageNode' OR \`ngmHostname\`='$ipaddress';"
      sqlStatements2="$statement3$statement4"
      
      
      1. adjusted the SQL execution to add in the new SQL statements:
      # Builds proper SQL Statement and runs.
      # If no user defined, assume root
      [[ -z $snmysqluser ]] && $snmysqluser='root'
      # If no host defined, assume localhost/127.0.0.1
      [[ -z $snmysqlhost ]] && $snmysqlhost='127.0.0.1'
      # No password set, run statement without pass authentication
      if [[ -z $snmysqlpass ]]; then
          $echo "A password was not set in $fogsettings for mysql use" >> $log
          $mysql -u"$snmysqluser" -e "$sqlStatements" "$database" 2>> $log
          $mysql -u"$snmysqluser" -e "$sqlStatements2" "$database" 2>> $log
          # Else run with password authentication
      else
          $echo "A password was set in $fogsettings for mysql use" >> $log
          $mysql -u"$snmysqluser" -p"${snmysqlpass}" -e "$sqlStatements" "$database" 2>> $log
          $mysql -u"$snmysqluser" -p"${snmysqlpass}" -e "$sqlStatements2" "$database" 2>> $log
      fi
      
      

      4)updated the .ogsettings file to edit the interface entry:

      #---- Update .fogsettings IP ----#
      $echo "Updating the ipaddress field inside of $fogsettings" >> $log
      $sed -i "s|ipaddress='.*'|ipaddress='$ip'|g" $fogsettings
      $sed -i "s|interface='.*'|interface='$interface'|g" $fogsettings
      
      

      Rebooted and opened the beb interface. All looks good!!!

      Now, I just need to make/capture an image to prove all is working.

      Thanks!!!

      posted in FOG Problems
      L
      lenels2eng
    • RE: Hardware Agnostic Mobile FOG

      I have been paying with this for a bit now and was working through a scenario where the OS doesn’t get an IP so trying to statically assign one, at least temporarily. I wasn’t able to get it to work but I think it just needs a little more time to work on this scenario. Otherwise, this works quite well. I did some minor tweaks so that my end user only had to boot to the USB drive and after the cron job runs keep an eye on the screen for the IP of the FOG server which I echo’ed out at the end of the script using: printf ā€œThe IP of the FOG server is: $IP \Nā€ > /dev/console

      I sent it off to a co-worker in another location and asked them to just plug in the USB drive, boot to it, wait for the message then try another machine to see if he got the FOG menu. He did and was able to register the machine with FOG and pull an image down so I’m marking this:

      SOLVED!!!

      I may try to go back when I have some time to finish hashing through the statically assign an IP if you don’t get one scenario…

      posted in FOG Problems
      L
      lenels2eng

    Latest posts made by lenels2eng

    • RE: Hardware Agnostic Mobile FOG

      I have been paying with this for a bit now and was working through a scenario where the OS doesn’t get an IP so trying to statically assign one, at least temporarily. I wasn’t able to get it to work but I think it just needs a little more time to work on this scenario. Otherwise, this works quite well. I did some minor tweaks so that my end user only had to boot to the USB drive and after the cron job runs keep an eye on the screen for the IP of the FOG server which I echo’ed out at the end of the script using: printf ā€œThe IP of the FOG server is: $IP \Nā€ > /dev/console

      I sent it off to a co-worker in another location and asked them to just plug in the USB drive, boot to it, wait for the message then try another machine to see if he got the FOG menu. He did and was able to register the machine with FOG and pull an image down so I’m marking this:

      SOLVED!!!

      I may try to go back when I have some time to finish hashing through the statically assign an IP if you don’t get one scenario…

      posted in FOG Problems
      L
      lenels2eng
    • RE: Hardware Agnostic Mobile FOG

      @george1421 IT WORKS!!! (at least on the first system I tried šŸ˜› )

      so your code is MUCH more elegant than mine but it works.

      Here is what I did to the script:

      1. I implemented a check on the interface using the code you started me on (like your code you just shared).
      2. I created an SQL update statement that updates two tables in the fog database:
      # If the interface from fogsettings doesn't match what the system returned #
      #    Make the change so system can still function #
      #---- Update the interface Setting ----#
      $echo "The interface does not match the interface setting in $fogsettings, updating the interface Settings server-wide." >> $log
      statement3="UPDATE \`globalSettings\` SET \`settingValue\`='$interface' WHERE \`settingKey\` IN ('FOG_NFS_ETH_MONITOR','FOG_UDPCAST_INTERFACE');"
      statement4="UPDATE \`nfsGroupMembers\` SET \`ngmInterface\`='$interface' WHERE \`ngmMemberName\`='$storageNode' OR \`ngmHostname\`='$ipaddress';"
      sqlStatements2="$statement3$statement4"
      
      
      1. adjusted the SQL execution to add in the new SQL statements:
      # Builds proper SQL Statement and runs.
      # If no user defined, assume root
      [[ -z $snmysqluser ]] && $snmysqluser='root'
      # If no host defined, assume localhost/127.0.0.1
      [[ -z $snmysqlhost ]] && $snmysqlhost='127.0.0.1'
      # No password set, run statement without pass authentication
      if [[ -z $snmysqlpass ]]; then
          $echo "A password was not set in $fogsettings for mysql use" >> $log
          $mysql -u"$snmysqluser" -e "$sqlStatements" "$database" 2>> $log
          $mysql -u"$snmysqluser" -e "$sqlStatements2" "$database" 2>> $log
          # Else run with password authentication
      else
          $echo "A password was set in $fogsettings for mysql use" >> $log
          $mysql -u"$snmysqluser" -p"${snmysqlpass}" -e "$sqlStatements" "$database" 2>> $log
          $mysql -u"$snmysqluser" -p"${snmysqlpass}" -e "$sqlStatements2" "$database" 2>> $log
      fi
      
      

      4)updated the .ogsettings file to edit the interface entry:

      #---- Update .fogsettings IP ----#
      $echo "Updating the ipaddress field inside of $fogsettings" >> $log
      $sed -i "s|ipaddress='.*'|ipaddress='$ip'|g" $fogsettings
      $sed -i "s|interface='.*'|interface='$interface'|g" $fogsettings
      
      

      Rebooted and opened the beb interface. All looks good!!!

      Now, I just need to make/capture an image to prove all is working.

      Thanks!!!

      posted in FOG Problems
      L
      lenels2eng
    • RE: Hardware Agnostic Mobile FOG

      sorry for the progress posts but it’s helping me work through this šŸ™‚ and it might help someone else noodle through something similar…

      so I think I can write into the .fogsettings file by using ā€œsedā€ā€¦
      sed -i ā€œs|interface=ā€˜.*’|interface=ā€˜$interface’|gā€ $fogsettings

      and possibly the only places in the DB are???:
      in the globalSettings table: FOG_NFS_ETH_MONITOR and FOG_UDPCAST_INTERFACE setting the settingValue field to the new interface

      in nfsGroupMembers table: ngmInterface field to the new interface.

      ca;t seem to find it anywhere else so hopefully these are the only places…

      posted in FOG Problems
      L
      lenels2eng
    • RE: Hardware Agnostic Mobile FOG

      So I figured out how to add a if…then statement to the MakeFogMobile.sh script that basically compares what @george1421 said and the interface value in the fog settings file. If they are the same keep going, if not set the interface variable to the correct value. what I don’t know is what settings to update in the settings file nor how to do that and what fields in the database to change to reflect the correct interface…

      can you point me in the right direction please?

      posted in FOG Problems
      L
      lenels2eng
    • RE: Hardware Agnostic Mobile FOG

      @george1421 Thank you, I’ll try it out today.

      As for the NUC or Pi, both good options but looking to be able to hand the not so technical people in the field a USB drive they can boot off of so no other equipment needed.

      If I can’t get it to go off the USB drive, then I’ll try the NUC route. I’ll let you know how it goes later today…

      Thanks!!!

      posted in FOG Problems
      L
      lenels2eng
    • Hardware Agnostic Mobile FOG

      Hey guys. First off, absolutely the BEST imaging/cloning solution EVER!!! I use it for physical machines and VMs.

      So here’s my scenario:
      We have developed images for our training department that they have tweaked and tested and are super happy with. Now they want to take them on the road and do training all over the world. We run multiple events in multiple locations and rent laptops at every location so I can’t just build one FOG server and service the entire environment. Also, I have no control over the laptops other than they have to be blank-ed after use (script from bootable USB does the trick).

      I found the Mobile FOG scripts and that seems to be the solution as I can load it onto a bootable USB drive (given enough storage capacity) and have multiple copies of it running around with minimal effort. Boot from USB on one of the rented laptops and have that be the server for the rest. When they are all done, use one of the other s to image the one that was used as the server.

      Where i’m hung up at is that because the hardware changes from model to model, the script doesn’t work because it’s stuck on trying to monitor a certain interface that may not exist on different hardware. For example, on one laptop the NIC might enumerate as en160 while on another it may show up as enp0s25 and on yet another as enp1s0f1. The script is checking by interface so if its different the crontab job doesn’t do anything because it can’t find the interface.

      Is there a way to make the script agnostic so it finds it and works?

      FOG version 1.5.7 on Centos 7 via USB drive.

      Thanks!!!

      EDIT: so I’m not the best script writer but I can read most fairly well. It looks like the MakeFogMobile.sh script looks for the IP. I think a function could be written that checks for the interface too and compares it to the fogsettings file just it does for the IP. Then it would update the fogsettings and then the DB. I just have no idea how to write it. Isee it as something like:

      while [[ -z $interf ]]; do
          ip=$(for interf in `ip ntable | grep dev | sort | uniq | sed -e 's/^.*dev //;/^lo/d'`)
          [[ -n $ip ]] && break
          $echo "could't enumerate the interface" >> $log
          sleep 5
      done
      

      Does that make sense???

      posted in FOG Problems
      L
      lenels2eng
    • RE: Access Control - hide tabs?

      OK, thought it might be possible…appreciate the reply.

      posted in FOG Problems
      L
      lenels2eng
    • Access Control - hide tabs?

      I’ve been experimenting with the access control plug in and find that it suits what I am trying to accomplish quite well. However, I would like to hide some of the tabs in the submenu pages but do not see an example of that anywhere. I understand to make a new rule and to hide items from the top tool bar (images, users, printers, settings, etc.) and I see where you can hide a submenu from the left side menu’s (for example in the host’s node; list all hosts, create new host, etc.). I’d like to be able to hide some of the tabs in a detail node (if I’m using the correct terminology…).

      For example, if you go into the hosts node, select a host you end up on the general tab of that host (url: index.php?node=host&sub=edit&id=15) and a list of tabs across the top of the ā€œHost Generalā€ information. How do you designate to hide those tabs/links? We’re not using for to do anything with printers so I’d like that to not be visible. I’d like to hide the ability to mess with AD too.

      Any syntax tips to hide these tabs? is it a different Rule Type? what about the other fields in the new rule form?

      Thank you in advance for your assistance!!!

      posted in FOG Problems
      L
      lenels2eng
    • RE: Multi-Network, Multi-NIC fog server config help

      @Sebastian-Roth yes, the esxi host has a NIC on each network. I am attempting to get the network to allow access to an single IP in the management for each lab so I can just use the 066 DHCP option to point to the interface that works for TFTP which I believe is the way the guys that are doing similar setups are making it work.

      posted in General Problems
      L
      lenels2eng
    • RE: Multi-Network, Multi-NIC fog server config help

      Thanks for the replies! DHCP is handled by another device and the correct 66 and 67 entries are there. Yes, the FOG server has multiple NICs, one on each network. Each NIC has an IP on that network. lab1 172.16.111.5, lab2 172.16.112.5, etc.

      @Tom-Elliott - The idea is to have one FOG server service 3 networks, each are both physically and logically separate. Each network has it’s own cable plant that terminate at a switch for that network which then connects to a router. The only point of confluence is at the router. The routing is configured that none of the labs can talk to any of the other labs, only out to the firewall and internet.

      @Sebastian-Roth - yes, that command returned *:69 so I think it’s listening on all IPs. I only have a few hours to work on it this morning until I have to turn WDS back on to get ready for next week. I’ll go through the testing TFTP from the lab networks you linked to and see if I can make any progress.

      I read a while ago, and of course can’t find it when I need it, there are a bunch of people using FOG in a similar setup in the EDU space. I think they were doing multiple labs off one server but passing the TFTP boot only to one IP with DHCP relay as you mentioned as well.

      I’m hoping to get this going as I have two scenario’s where this would be AMAZING to get implemented.

      Again, thanks guys for being quick and responsive on these forums. MAJOR bonus for using FOG is the relevant help from the guys in the middle of it!!

      posted in General Problems
      L
      lenels2eng