• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. sudburr
    3. Posts
    • Profile
    • Following 0
    • Followers 1
    • Topics 129
    • Posts 747
    • Groups 2

    Posts

    Recent Best Controversial
    • RE: Changing IP address post fog install is problematic

      In its simplest form that we run, some of our FOG servers are stationary, others move around. For us to have a single solution build that works for any location, all of our FOG servers are configured to grab an IP via external DHCP reservation.

      I copy and paste the following to the CLI to edit rc.local:

      cp -f /etc/rc.local /etc/rc.local.old
      if [ -f /etc/centos-release ]; then
      echo ' ' >> /etc/rc.local
      echo 'make_fog_portable' >> /etc/rc.local
      echo ' ' >> /etc/rc.local
      else
      sed -i "s|exit 0|make_fog_portable &|g" /etc/rc.local
      echo ' ' >> /etc/rc.local
      echo 'exit 0' >> /etc/rc.local
      fi
      chmod 755 /etc/rc.local
      echo '#!/bin/bash' > /bin/make_fog_portable
      echo '#' >> /bin/make_fog_portable
      echo '# make_fog_portable &' >> /bin/make_fog_portable
      echo '#' >> /bin/make_fog_portable
      echo '# This script is expected to be run as a job from /etc/rc.local' >> /bin/make_fog_portable
      echo '# It will wait until an IP address is found, then use that IP' >> /bin/make_fog_portable
      echo '# address to configure the FOG Server for that site.' >> /bin/make_fog_portable
      echo '#' >> /bin/make_fog_portable
      echo ' ' >> /bin/make_fog_portable
      echo 'exit 0' >> /bin/make_fog_portable
      chmod 755 /bin/make_fog_portable
      vim /bin/make_fog_portable
      

      At the now open file ‘make_fog_portable’ Insert the following, before “exit 0” ; [ESC]:wq to write/quit

      # Wait for an IP address
      IP=`ip addr list eth0 | grep "inet " |cut -d" " -f6|cut -d/ -f1`
      while [ -z $IP ]
      do
      	echo "Waiting :05 for an IP Address" > /dev/kmsg
      	sleep 5
      	IP=`ip addr list eth0 | grep "inet " |cut -d" " -f6|cut -d/ -f1`
      done
      
      # Make FOG Server Portable
      sleep 6
      echo "Updating IP address for FOG_TFTP_HOST to be $IP [`date`]" > /dev/kmsg
      mysql --user=root -e "UPDATE \`globalSettings\` SET \`settingValue\` = '$IP' WHERE \`settingKey\` ='FOG_TFTP_HOST';" fog
      echo "Updating IP address for FOG_WEB_HOST to be $IP [`date`]" > /dev/kmsg
      mysql --user=root -e "UPDATE \`globalSettings\` SET \`settingValue\` = '$IP' WHERE \`settingKey\` ='FOG_WEB_HOST';" fog
      echo "Updating IP address for FOG_WOL_HOST to be $IP [`date`]" > /dev/kmsg
      mysql --user=root -e "UPDATE \`globalSettings\` SET \`settingValue\` = '$IP' WHERE \`settingKey\` ='FOG_WOL_HOST';" fog
      echo "Updating IP address for Storage Node DefaultMember to be $IP [`date`]" > /dev/kmsg
      mysql --user=root -e "UPDATE \`nfsGroupMembers\` SET \`ngmHostname\` = '$IP' WHERE \`ngmMemberName\` ='DefaultMember';" fog
      echo "Updating IP address in file .fogsettings to be $IP [`date`]" > /dev/kmsg
      sed -i "s|ipaddress=\".*\"|ipaddress=\"$IP\"|" /opt/fog/.fogsettings
      echo "Updating IP address in file default.ipxe to be $IP [`date`]" > /dev/kmsg
      sed -i "s|http://\([^/]\+\)/|http://$IP/|" /tftpboot/default.ipxe
      sed -i "s|http:///|http://$IP/|" /tftpboot/default.ipxe
      
      echo "Sleeping 10 seconds before releasing script [`date`]" > /dev/kmsg
      sleep 10
      echo "releasing script [`date`]" > /dev/kmsg
      

      Complete the generalization with this; you will also need to run this after any FOG trunk update:

      if [ -f /etc/debian_version ]; then
      cd /var/www/fog/lib/fog
      fi
      
      if [ -f /etc/centos-release ]; then
      cd /var/www/html/fog/lib/fog
      fi
      
      cp -f config.class.php config.class.php.old
      sed -i "s|\".*\..*\..*\..*\"|\$_SERVER['SERVER_ADDR']|" config.class.php
      reboot
      

      Why a job at startup? In the case of a power failure, the FOG server itself whether it be physical or virtual will almost invariably be available long before the site’s switches finish their POSTs and the network is available again. The loop to check for an IP prevents the FOG server coming up without an IP or in the case of a mobile server, forces the new IP into FOG’s configuration before it has a chance to start.

      This solution even allows us to change the subnet entirely and the server will always, automatically reconfigure itself according to the new DHCP reservation.

      Works like a charm.

      This works on Ubuntu 14-, 15+, Debian 8+ and CentOS 7.

      It is into this make_fog_portable job that I would also add any code for restarting critical services:

      
      # Ubuntu 14-
      sleep 6
      echo "Restarting tftpd-hpa [`date`]" > /dev/kmsg
      service tftpd-hpa restart
      sleep 6
      echo "Restarting mysql [`date`]" > /dev/kmsg
      service mysql restart
      sleep 6
      echo "Restarting FOGMulticastManager [`date`]" > /dev/kmsg
      service FOGMulticastManager restart
      
      # Debian 8+, Ubuntu 15+
      if [ -f /etc/debian_version ]; then
      echo "Restarting Critical FOG Services [`date`]" > /dev/kmsg
      systemctl restart tftp* mysql* FOG* apache*
      fi
      
      posted in Bug Reports
      sudburrS
      sudburr
    • RE: Chromium OS

      Be sure to indicate whether you are using Chromium OS vs Chromium on Linux.

      I expect I’ll be retouching my Chromium OS solution in the not terribly distant future and will update things here too.

      posted in Linux Problems
      sudburrS
      sudburr
    • RE: Unable to upload Windows 10 Image from hyper-V Windows 2012r2 to fog 0.32

      Windows 10 has nothing to do with it. It’s just data on a drive at this point.

      Three things come to mind. If you can successfully upload from another location, ignore #1.

      1. Run the following on your fog server
      sudo touch /images/.mntcheck
      sudo touch /images/dev/.mntcheck
      sudo chmod -R 777 /images
      
      cat /etc/exports
      - and observe whether /images and /images/dev are mounted correctly.
      
      1. Configure your VM’s network adapters
      • try uploading with just the legacy adapter connected
      • try uploading with both legacy and Ethernet adapter connected
      1. Try using kernel 3.18.5 x86_64 . Downloading only the x86 kernel to your fog server will have no effect because your client is booting with bzImage which is the x64 kernel.
      posted in Windows Problems
      sudburrS
      sudburr
    • RE: Have to rebuild FOGBOX, need advice.

      I agree with Wayne. Ditch Ubuntu if you can. Go for at least Debian 8.2 or my new fave, CentOS 7.1.

      Moving from Ubuntu to Debian solved 2 big workaround headaches.

      Moving from Debian to CentOS removed 4 more workarounds for me

      posted in FOG Problems
      sudburrS
      sudburr
    • RE: My CentOS 7.1 recipe (for solely running a FOG Server)

      Updated to include mastering for duplication.

      posted in Tutorials
      sudburrS
      sudburr
    • RE: Best Linux distro for FOG trunk

      We started off with Ubuntu Desktop, then Server (no gui), then I switched up to Debian Server, and now I’m running CentOS 7 no GUI on a minimal server install for my development server. Whatever I’m using for dev eventually makes it out to our production/live servers.

      IMO Debian is head and shoulders better than Ubuntu, and I’ve found CentOS to be the most stable and trouble free of the bunch.

      posted in General
      sudburrS
      sudburr
    • RE: My CentOS 7.1 recipe (for solely running a FOG Server)

      My development Hyper-V server is a desktop i7 2600 and 16GB memory.

      FOG is such a lightweight that I find the storage I/O and Ethernet to be the only bottlenecks.

      My physical servers are all running on 2009 Lenovo M58 systems with Pentium E2220 and 2GB ; SATA-II and often 5900rpm at that.

      posted in Tutorials
      sudburrS
      sudburr
    • My CentOS 7.1 recipe (for solely running a FOG Server)

      =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
      CentOS_7 - Install Minimal Server +20151027

      • This is a MINIMAL (CORE) installation intended solely for a FOG Server role
      • The resulting image can be deployed to any virtual or physical hardware (hopefully)
      • https://wiki.centos.org/FAQ/CentOS7

      =-=-=-=-=-
      For a Physical FOG Server

      i.	Flash & Program System BIOS for ODD Boot
      ii.	Install HDD #1 (120+ GiB & zeroed) on first controller port
      iii.	Install ODD #1 on last controller port
      iv.	Insert CentOS-7-x86_64-NetInstall-1503 CD
      

      =-=-=-=-=-
      For a Hyper-V Virtual FOG Server

      i.	Create a New Virtual Machine: CentOS_7, Generation 1, 512MB Dynamic Memory, Onboard Network, Create a virtual hard disk
      ii.	Boot from CD
      iii.	Maximum RAM 2048MB
      iv.	1 Virtual Processor
      v.	DVD Drive Image File: "CentOS-7-x86_64-NetInstall-1503.iso"
      vi.	Automatic Start Action: Nothing
      

      =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
      01> Install CentOS_7

      • Start Machine
      • Install!

      @ CentOS 7

      • Install CentOS 7

      @ What language would you like to use during the installation process?

      • English (Canada)
        = CONTINUE

      @ Installation Summary

      / Network & Host Name

      • Ethernet (eth0) = ON
      • Host Name = “centos7”
        = DONE

      / Date & Time

      • Americas + Toronto
      • Network Time = ON + Configure + OK
        = DONE

      / Installation Source

      • On the network = “http://mirror.centos.org/centos/7/os/x86_64/”
        = DONE

      / Software Selection

      • Minimal Install
        = DONE

      / Installation Destination

      • I will configure partitioning
      • Checkmark <Msft Virtual Disk>
        = DONE

      @ Manual Partitioning

      • Use the following partitioning scheme = Standard Partition
      • Click here to create them automatically
      • DATA /home = DELETE
      • SYSTEM swap = File System = swap, Desired Capacity = 10 GiB ( becomes sda3 )
      • SYSTEM / = File System = ext4, Desired Capacity = 999 GiB ( becomes sda2 )
      • SYSTEM /boot = File System = ext4, Desired Capacity = 500 MiB ( becomes sda1 )
        = DONE

      @ Summary of Changes
      = Accept Changes

      @ Installation Summary
      = Begin Installation

      @ Configuration

      / Root Password

      • “… root password …”
        = DONE

      / User Creation

      • Full name = Administrator
      • Username = administrator
      • Make this user administrator
      • Password = “… administrator password …”
        = DONE

      @ CentOS is now successfully installed …

      • Reboot (.ISO is ejected)

      … system restarts …
      =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
      02> Master the OS & Update the Kernel

      • Login via CONSOLE
      • Determine IP Address
      • Logoff
      ip addr
      exit
      
      • Login REMOTELY with Kitty ( http://kitty.9bis.net/ )
      • Elevate Access Level
      • Disable root access via SSH (CentOS only)
      • Direct next Kernel recompilation to include AHCI drivers & be HW generic
      • Clean & Update the OS
      • Clear history
      • Shutdown
      sudo su
      
      sed -i "s|#PermitRootLogin yes|PermitRootLogin no|g" /etc/ssh/sshd_config
      systemctl restart sshd.service
      sed -i 's|#add_drivers+="|add_drivers+="ahci|g' /etc/dracut.conf
      sed -i 's|#hostonly="yes|hostonly="no|g' /etc/dracut.conf
      yum clean all
      yum makecache
      yum update -y
      history -c
      shutdown now
      

      =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
      03> End of Recipe

      • Export VM
      • Add Legacy Network Adapter
      • Set Legacy Network Adapter, Virtual Switch: Onboard
      • Set BIOS Boot to Legacy Network Adapter

      =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
      04> Ready for FOG Capture

      • Capture

      =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

      posted in Tutorials
      sudburrS
      sudburr
    • RE: Updating Build 4820 on CentOS 7.1

      @Wayne-Workman said: My CentOS 7 build I have on my desk at work uses “Server with GUI”, with all three virtualization options ticked.

      Well that’s a major difference right there. I’m only using minimal install. No GUI.

      posted in Bug Reports
      sudburrS
      sudburr
    • RE: Updating Build 4820 on CentOS 7.1

      Hmm,

      • virgin CentOS 7.1 minimal install
      • install build 4820 : no configuration changes made
      • install build 5036

      The update to 5036 still fails on the first attempt, at the same setting up/start MySQL.

      A second invocation to update to 5036 completes properly.

      The http pathing problem is due to changes I make.

      posted in Bug Reports
      sudburrS
      sudburr
    • RE: Updating Build 4820 on CentOS 7.1

      Considering some of the changes I make from default, it may have been self-inflicted, but the changes I’m thinking of are necessary to make some things work.

      I’m going to fire up another scratch CentOS 7.1 server and start from there and see where it goes.

      posted in Bug Reports
      sudburrS
      sudburr
    • RE: Updating Build 4820 on CentOS 7.1

      A few things.

      Removing MariaDB prior to upgrading, removes the MySQL fail from the FOG Installer. The FOG installer fixes things up.
      Running the FOG installer twice gets things just as far.

      At the:

      You still need to install/update your database schema.
        This can be done by opening a web browser and going to:
      
            http://x.x.x.x/fog/management
      
        Press [Enter] key when database is updated/installed.
      

      I can either remote in via another session to apply the following fix, or [Enter] to continue to completion then apply this fix:

      sed -i -e "s|/management|/fog/management|g" /var/www/html/fog/index.php
      

      Visit the home page, http://x.x.x.x/ which redirects me to http://x.x.x.x/fog/management , update the schema, and I’m your uncle.

      So I have a workaround that completes the process, but it doesn’t explain why it fails to begin with.

      posted in Bug Reports
      sudburrS
      sudburr
    • RE: Updating Build 4820 on CentOS 7.1

      Found it… I think. I’ll get back in a sec.

      posted in Bug Reports
      sudburrS
      sudburr
    • RE: Updating Build 4820 on CentOS 7.1

      Interestingly, removing mariadb-server prior to attempting the upgrade, the installer breezes through the MySQL setup/start.

      But 404 remains.

      posted in Bug Reports
      sudburrS
      sudburr
    • RE: Updating Build 4820 on CentOS 7.1

      Reinstalling mariadb is a bad thing, mkay. Toasted the database. Sends me to the schema updater, then error 500.

      I don’t know how much cleaner from scratch I can make this install, but at no time is MySQL available as a service.

      posted in Bug Reports
      sudburrS
      sudburr
    • RE: Updating Build 4820 on CentOS 7.1

      Issuing prior to update attempt:

      systemctl restart mysql
      Failed to issue method call: Unit mysql\x2a.service failed to load: No such file or directory.
      

      This is CentOS. It uses MariaDB .

      posted in Bug Reports
      sudburrS
      sudburr
    • RE: Updating Build 4820 on CentOS 7.1

      Roughly 100 GiB free.

      Build 5032 fails identically.

      I’m not finding any smoking gun yet other than maybe this snippet from /var/log/httpd/error_log .

      [Wed Oct 21 14:48:54.808829 2015] [mpm_prefork:notice] [pid 908] AH00170: caught SIGWINCH, shutting down gracefully
      [Wed Oct 21 14:49:37.254328 2015] [suexec:notice] [pid 911] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
      [Wed Oct 21 14:49:37.364932 2015] [ssl:warn] [pid 911] AH02292: Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
      [Wed Oct 21 14:49:37.444596 2015] [auth_digest:notice] [pid 911] AH01757: generating secret for digest authentication ...
      [Wed Oct 21 14:49:37.446351 2015] [lbmethod_heartbeat:notice] [pid 911] AH02282: No slotmem from mod_heartmonitor
      [Wed Oct 21 14:49:37.449064 2015] [ssl:warn] [pid 911] AH02292: Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
      [Wed Oct 21 14:49:37.501595 2015] [mpm_prefork:notice] [pid 911] AH00163: Apache/2.4.6 (CentOS) OpenSSL/1.0.1e-fips PHP/5.6.14 configured -- resuming normal operations
      [Wed Oct 21 14:49:37.501657 2015] [core:notice] [pid 911] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
      BFD: /var/www/html/fog/service/ipxe/bzImage: Warning: Ignoring section flag IMAGE_SCN_MEM_NOT_PAGED in section .bss
      BFD: /var/www/html/fog/service/ipxe/bzImage32: Warning: Ignoring section flag IMAGE_SCN_MEM_NOT_PAGED in section .bss
      [Wed Oct 21 14:59:20.250823 2015] [mpm_prefork:notice] [pid 911] AH00170: caught SIGWINCH, shutting down gracefully
      [Wed Oct 21 15:00:09.666114 2015] [suexec:notice] [pid 949] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
      [Wed Oct 21 15:00:09.740593 2015] [ssl:warn] [pid 949] AH02292: Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
      [Wed Oct 21 15:00:09.889696 2015] [auth_digest:notice] [pid 949] AH01757: generating secret for digest authentication ...
      [Wed Oct 21 15:00:09.891447 2015] [lbmethod_heartbeat:notice] [pid 949] AH02282: No slotmem from mod_heartmonitor
      [Wed Oct 21 15:00:09.894049 2015] [ssl:warn] [pid 949] AH02292: Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
      [Wed Oct 21 15:00:09.944900 2015] [mpm_prefork:notice] [pid 949] AH00163: Apache/2.4.6 (CentOS) OpenSSL/1.0.1e-fips PHP/5.6.14 configured -- resuming normal operations
      [Wed Oct 21 15:00:09.944968 2015] [core:notice] [pid 949] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
      

      Patching CentOS, rebooting, and manually restarting services have no effect.

      systemctl restart FOGImageReplicator FOGMulticastManager FOGPingHosts FOGScheduler FOGSnapinReplicator mariadb vsftpd httpd
      
      posted in Bug Reports
      sudburrS
      sudburr
    • Updating Build 4820 on CentOS 7.1

      Updating a working 4820 install on CentOS 7.1 with build 5012 .

      Configuring services.
      
       * Stopping FOGMulticastManager.service Service................OK
       * Stopping FOGImageReplicator.service Service.................OK
       * Stopping FOGSnapinReplicator.service Service................OK
       * Stopping FOGScheduler.service Service.......................OK
       * Stopping FOGPingHosts.service Service.......................OK
       * Setting up and starting MySQL...............................Failed!
      [root@devfog bin]#
      

      Then immediately trying the install/update again, the install will reach;

      You still need to install/update your database schema.
        This can be done by opening a web browser and going to:
      
            http://172.19.244.13/fog/management
      
        Press [Enter] key when database is updated/installed.
      

      But, web access is a fat 404 .

      posted in Bug Reports
      sudburrS
      sudburr
    • RE: Setting up new storage node

      @Wayne-Workman said:

      And I agree with @ITSolutions , it’s probably a very bad idea to try to use NTFS. I’d recommend Ext4 as he did.

      Poking my nose into this little 'ism. The NTFS formatted image drives, physical and virtual, that I’ve been using for over a year disagree. 😉

      posted in Linux Problems
      sudburrS
      sudburr
    • RE: Windows 8.1 "Dirty Bit" in UEFI

      No. It’s a power saving function… wait a minute. It’s bubbling up from the nether world.

      Deep Sleep.

      No wait. Though that is a bad thing to have enabled.

      Now I remember. Okay, smack me up the side of the head with a dead marmot. It’s a Toshiba OEM piece of software for SSD based systems.

      I need more caffeine… or I should go to bed early.

      posted in General
      sudburrS
      sudburr
    • 1 / 1