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

    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
    • RE: Multi-Network, Multi-NIC fog server config help

      Tried adding a storage node…No dice…

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

      Hello all and thank you in advance for any assistance that may be provided 🙂 Past experience with this group has been outstanding!!!

      So here’s my setup: I have a FOG server VM running on my ESXi server. I have multiple networks connected to the ESXi host that serve multiple labs. Mgmt is on NIC 0, Lab1 is on NIC 1, Lab2 is on NIC2, etc…I have connected vNICs to my FOG VM for each lab network and can ping the FOG server from each network. I can also ping into the lab networks from the FOG VM so I’m fairly certain the networking is correct.

      I can TFTP boot from the default/main/Mgmt network but not from any of my lab networks. I get the FOG white screen with menu options.

      When I try from the lab network there is no TFTP response. After doing some research in the forums it seems like I need to add a storage node with the labnetwork IP but the same image location??? Just looking for confirmation that is indeed the trick to using one FOG server on many networks.

      Thanks!!!

      posted in General Problems
      L
      lenels2eng
    • RE: Trouble getting first Image

      Sorry about the long intervals between posts. Just finishing up internal product training…

      SO… I did as @Sebastian-Roth suggested and was able to successfully take an image and push it down on a blank VM! I have not tried putting the image back on the source VM but thought I would report back that I am successful and appear to be all set.

      The take away from this is having 2 storage nodes on the same machine is not a great idea. If you run out of space, add a HDD and mount it /Images to add space.

      Thank you @Sebastian-Roth and @george1421 for your help and guidance!

      posted in FOG Problems
      L
      lenels2eng
    • RE: Trouble getting first Image

      @Sebastian-Roth - thanks for the reply!!!

      I actually added a drive to my fog server and chose to give it it’s own location and storage node. Should I not? This is a VM and I used a 16 GB vdisk for my OS so I didn’t give it any space for images. After my OS was solid, then I added the 2nd vdisk…

      should I just start over with a larger vdisk???

      So in the file ownership side, I think I get it. The files are made under root in the MAC directory, then moved/copied to the imagename directory because there is no fog user on the client side to authenticate with.

      Thanks again for the assistance!!

      posted in FOG Problems
      L
      lenels2eng
    • RE: Trouble getting first Image

      @george1421 - I see where the file owner is root instead of fog when the client begins taking the image. I’ve tried resetting it to fog during the process and it does not work; I’ve tried setting permissions on the folder but new files and folders created belong to root; I’ve tried setting ACLs with the same results. I definitely think this is the root cause (no pun intended) but am in training this week so cannot troubleshoot this week. i will try to get back into the server later in the week to see if I can figure out why new folders and files that are created during the process default to root ownership and 0644 permission levels when everything looks like it should be owned by fog and have 0777…

      Thanks for seeing this and putting me on the path. 🙂

      posted in FOG Problems
      L
      lenels2eng
    • RE: Trouble getting first Image

      @george1421 - I have no idea what the location plugin is or where to even look for it 🙂

      for permissions I have it set at 777 for all users:

      [root@SRV-JMS-FOGTEST /]# ls -la /images/dev
      total 0
      drwxrwxrwx 3 fog root 46 Nov 30 19:00 .
      drwxrwxrwx 4 fog root 61 Nov 30 19:00 ..
      -rwxrwxrwx 1 fog root  0 Nov 30 19:00 .mntcheck
      drwxrwxrwx 2 fog root 26 Nov 30 19:00 postinitscripts
      
      [root@SRV-JMS-FOGTEST /]# ls -la /images2/dev
      total 20
      drwxrwxrwx 5 fog  root 4096 Dec  3 20:01 .
      drwxrwxrwx 5 fog  root 4096 Nov 30 19:51 ..
      drwxrwxrwx 2 root root 4096 Dec  3 20:11 000c29748171
      drwxrwxrwx 2 fog  root 4096 Dec  3 19:31 000c29748171.bak
      -rwxrwxrwx 1 fog  root    0 Nov 30 19:51 .mntcheck
      drwxrwxrwx 2 fog  root 4096 Nov 30 19:50 postinitscripts
      [root@SRV-JMS-FOGTEST /]#
      

      [Mod Note] I fixed the post for readability reasons -Geo

      posted in FOG Problems
      L
      lenels2eng
    • RE: Trouble getting first Image

      Thanks for the reply @george1421 !!

      Yes, I found that article and did run through it. the PW in .fogsettings matches…

      I’ve been digging around and found in the PHP-FPM error log (www-error.log) "Failed to open stream: No such file or directory in /var//www/html/fog/lib/fog/fogftp.class.php on line 808

      PHP Warning: ftp_put(/images/dev/000c29748171): failed to open stream: No such file or directory in /var/www/html/fog/lib/fog/fogftp.class.php on line 709"

      When I look in /images2/dev there is a directory for the image and there are files in it…

      not sure why some files transfer and then…it gets stuck maybe???

      posted in FOG Problems
      L
      lenels2eng
    • Trouble getting first Image

      Thank you in advance for your efforts in helping get FOG up and going…New install on Centos 7.5.1804 (Core) and FOG 1.5.5. I have the FOG server running and all looks good from the web interface. I am able to get a PXE client to boot and get it to register and inventory a new client. When I go to take an image of that client it gets most of the way then can’t complete. “error returned: Type: 2 File: /var/www/html/fog/lib/fog/fogftp.class.php, line 709, messageL ftp_put():” Then some stuff about UTC time zone.

      So I verified I can FTP into the box as the FOG user, set permissions on the TFTPBOOT directory and the /image/* directories, made sure the password matched in the web interface in FOG settings, in the storage node settings, and generally everywhere I could find it.

      I made sure the timezone in the OS matches the web interface, set to UTC on both sides.

      The imaging begins and does fine until it goes to text screen and I get a bunch of errors (above) then the “An Error has been detected!” and the kernel variables…

      I’ve searched through and can’t find an answer…

      Any help would be greatly appreciated…0_1543866596578_FOGerror.jpg

      posted in FOG Problems
      L
      lenels2eng
    • 1 / 1