{"id":285,"date":"2015-05-29T14:40:28","date_gmt":"2015-05-29T13:40:28","guid":{"rendered":"http:\/\/www.troliver.com\/?p=285"},"modified":"2015-11-05T13:09:27","modified_gmt":"2015-11-05T13:09:27","slug":"fog-installing-and-troubleshooting-fog-1-2-0-on-ubuntu-14-04","status":"publish","type":"post","link":"https:\/\/www.troliver.com\/?p=285","title":{"rendered":"FOG \u2013 Installing and Troubleshooting FOG 1.2.0 on Ubuntu 14.04"},"content":{"rendered":"<p><em>Its been a while since I&#8217;ve talked about FOG on here.\u00a0The last 4 or 5 months have been busy and filled up with term-time activities as well as fixing many issues we have had. So FOG is still very much in use where I work, but there have been some changes to how we use it and how it operates. Another thing that has been done is to increase our storage capacity, which might come into a separate post, but the long and short is that our entire infrastructure has been reinstalled in some form or other, including FOG.<\/em><\/p>\n<p>The following steps should help anyone who has already installed Ubuntu 14.04 on their system to set up the free computer cloning and computer management package called FOG. You can find more detailed information, including what you can actually do with FOG,\u00a0elsewhere &#8211; for example on the\u00a0<a href=\"https:\/\/wiki.fogproject.org\/\/wiki\/index.php?title=FOGUserGuide\">FOG Wiki<\/a>\u00a0&#8211;\u00a0so\u00a0this is just a guide to get it up and running and to look at some of the problems that may be faced in doing so. I recommend using this\u00a0post instead of my previous posts to get started\u00a0since its more up to date and some of the original issues just don&#8217;t apply anymore.<\/p>\n<h1>New Installation<\/h1>\n<p>I used to suggest using another guide to install FOG but I may as well use my own. Note that this assume you are using Ubuntu, you are using a separate DHCP server (or none at all) and that you want to use a single network interface:<\/p>\n<ul>\n<li>Download FOG 1.2.0 using\u00a0<em>wget<\/em>\n<ul>\n<li><span class=\"theme:shell-default lang:sh decode:true crayon-inline\">cd \/tmp<\/span><\/li>\n<li><span class=\"theme:shell-default lang:default decode:true crayon-inline\">wget http:\/\/cznic.dl.sourceforge.net\/project\/freeghost\/FOG\/fog_1.2.0\/fog_1.2.0.tar.gz<\/span><\/li>\n<\/ul>\n<\/li>\n<li>Unzip the archive\n<ul>\n<li><span class=\"theme:shell-default lang:default decode:true crayon-inline \">tar -xvzf fog_1.2.0.tar.gz<\/span><\/li>\n<\/ul>\n<\/li>\n<li>Navigate to the newly unzipped directory and run the fog installation script\n<ul>\n<li><span class=\"theme:shell-default lang:default decode:true crayon-inline\">cd fog_1.2.0<\/span><\/li>\n<li><span class=\"theme:shell-default lang:default decode:true crayon-inline\">cd bin<\/span><\/li>\n<\/ul>\n<ul>\n<li><span class=\"theme:shell-default lang:default decode:true crayon-inline\">sudo .\/installfog.sh<\/span><\/li>\n<\/ul>\n<\/li>\n<li>Follow the steps in the FOG installer wizard:\n<ul>\n<li>Select a Debian-based installation <strong>(2)\u00a0<\/strong><\/li>\n<li>This will be a regular FOG server so select normal <strong>(N)<\/strong><\/li>\n<li>Leave all IP, gateway and DNS settings as default <strong>(Enter)<\/strong><\/li>\n<li>Use the default NIC <strong>(N)<\/strong><\/li>\n<li>Don&#8217;t use DHCP with FOG\u00a0<strong>(N)<\/strong><\/li>\n<li>Select\u00a0\u00a0(so make a note of it)<\/li>\n<\/ul>\n<\/li>\n<li>You are then told to navigate to your FOG page which is at\u00a0<em>http:\/\/&lt;fog address&gt;\/fog\/management<strong>\u00a0<\/strong><\/em>before you finish installation.\n<ul>\n<li>You have to update your database the first time you install FOG. Select &#8220;Install\/Upgrade Now&#8221;<\/li>\n<li>This is all you need to do on the web side for now. You can go back to your installation and continue, which will finish the installation!<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h1>Additional Configuration<\/h1>\n<p>FOG won&#8217;t start working properly just yet. There are a few settings that need to be changed and some additional setup to make things\u00a0work as you would expect them to.<\/p>\n<h2>Default Apache page<\/h2>\n<p>If you navigate with your browser to your FOG server to administer it, you will likely\u00a0get the default page for your Apache webserver. What you can do is remove this default html page, set the root directory to be in a different location and then redirect visitors to the FOG management page inside the \/fog\/ directory.\u00a0So if\u00a0you want your FOG server to automatically point to the management page, you can do the following:<\/p>\n<ul>\n<li>Edit the<em> \/etc\/apache2\/sites-enabled\/000-default.conf<\/em> and change the following line:\n<ul>\n<li><span class=\"theme:shell-default lang:vim decode:true crayon-inline\">DocumentRoot \/var\/www\/html<\/span><br \/>\nto<\/li>\n<li><span class=\"theme:shell-default lang:vim decode:true crayon-inline\">DocumentRoot \/var\/www<\/span><\/li>\n<\/ul>\n<\/li>\n<li>Remove the default index page\n<ul>\n<li><span class=\"theme:shell-default lang:vim decode:true crayon-inline\">rm var\/www\/index.html<\/span><\/li>\n<\/ul>\n<\/li>\n<li>Replace the contents of <em>var\/www\/index.php <\/em>with\n<pre class=\"theme:shell-default lang:php decode:true\">&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;meta http-equiv=\"Refresh\" content=\"0; URL=fog\/index.php\"&gt;\r\n&lt;\/head&gt;\r\n&lt;\/html&gt;<\/pre>\n<\/li>\n<\/ul>\n<p>After you&#8217;ve finished, issue a <span class=\"theme:shell-default lang:sh decode:true crayon-inline\">sudo service apache2 restart<\/span>\u00a0command and you should now be able to just navigate to the address of your FOG server.<\/p>\n<h2>FOG System User and passwords<\/h2>\n<p>By default, FOG uses a default username and password of <em>fog<\/em> and <em>password<\/em> in order to get into the FOG web UI.<\/p>\n<p>You will likely want to change this password under\u00a0<em>User Management<\/em>\u00a0in the FOG web UI\u00a0settings, but more crucial is that you have a corresponding system account. You can either change the account FOG uses for everything, or just create a system account (with the same details for the accounts as specified in\u00a0<em>\/var\/www\/fog\/lib\/fog\/Config.class.php.<\/em><\/p>\n<ul>\n<li>Create a user on the system called FOG with\u00a0<em>adduser<\/em>\n<ul>\n<li><span class=\"theme:shell-default lang:default decode:true crayon-inline\">adduser fog<\/span><\/li>\n<\/ul>\n<\/li>\n<li>Give it the same password that you are using in the FOG web UI. The other settings don&#8217;t matter, they can be blank.<\/li>\n<\/ul>\n<p>Without this\u00a0user,\u00a0you&#8217;ll get a variety of errors on the system, I found. Previously, I had used &#8220;fog&#8221; as the default username for the system, but I like to try and keep these things separate so that I can understand better what is going on.<\/p>\n<p>Edit\u00a0\/<em>var\/www\/fog\/lib\/fog\/Config.class.php\u00a0<\/em>and ensure that the <em>MYSQL_PASSWORD\u00a0<\/em>setting has a value in it. It should have &#8211; but it may not &#8211; the password you created when setting up MySQL with FOG. The root username should also be set to\u00a0<em>root<\/em> too, so that it looks something like this:<\/p>\n<ul>\n<li>\n<pre class=\"theme:shell-default lang:sh decode:true\">define('DATABASE_TYPE',         'mysql');\r\ndefine('DATABASE_HOST',         'localhost');\r\ndefine('DATABASE_NAME',         'fog');\r\ndefine('DATABASE_USERNAME',     'root');\r\ndefine('DATABASE_PASSWORD',     'sqlPasswordYouSet');<\/pre>\n<\/li>\n<\/ul>\n<h2>Image storage<\/h2>\n<p>You may have noticed that the original drive size of 40GB was very small. It is &#8211; but that&#8217;s because I don&#8217;t actually want to store the images on the same disk as the rest of FOG. This is so that we can move the images around and back them up much easier than the FOG server and not bloat the rest of the FOG system with these files. Plus, we can offload this to a separate storage device entirely, even located elsewhere.<\/p>\n<p>FOG maps everything to using the root \/images folder by default. Instead of using an actual folder for \/images, its possible to mount a separate drive as \/images &#8211; so everything will still point to the same place, but the storage location is different.<\/p>\n<ul>\n<li>Note if you&#8217;re using a VM: make a new disk, something large like 1TB, and also make it <em>Independent<\/em>. This way, changes are persistent and the disk is much easier to move around to other systems. Restart the VM.<\/li>\n<\/ul>\n<h3>Making a new disk<\/h3>\n<h3><em>Assuming that you are using sudo and that the disk is registered on the system as \/dev\/sdb:<\/em><\/h3>\n<ul>\n<li>Make sure that the new drive <em>is\u00a0<\/em>actually\u00a0listed as \/dev\/sdb\/\n<ul>\n<li><span class=\"theme:shell-default lang:sh decode:true crayon-inline\">fdisk -l<\/span><\/li>\n<\/ul>\n<\/li>\n<li>Wipe the MBR\n<ul>\n<li><span class=\"theme:shell-default right-set:true lang:sh decode:true crayon-inline \">dd if=\/dev\/zero of=\/dev\/sdb count=20 bs=512<\/span><\/li>\n<\/ul>\n<\/li>\n<li>Partition the disk with <em>fdisk<\/em>\n<ul>\n<li><span class=\"theme:shell-default lang:sh decode:true crayon-inline\">fdisk \/dev\/sdb\/<\/span><\/li>\n<li>Select\u00a0<em>n\u00a0<\/em>then <em>p<\/em>\u00a0to make a new partition<\/li>\n<li>Hit enter three times\u00a0to accept the defaults (default partition of 1 and the first and last sectors)<\/li>\n<li>Select <em>t\u00a0<\/em>to change the system ID to be Linux (83)<\/li>\n<li>Select <em>a<\/em>\u00a0and <em>1<\/em>\u00a0to make the partition bootable<\/li>\n<li>Select <em>w<\/em>\u00a0to write the table to disk and exit<\/li>\n<\/ul>\n<\/li>\n<li>Make the system ext3\n<ul>\n<li><span class=\"theme:shell-default lang:sh decode:true crayon-inline\">mkfs.ext3 \/dev\/sdb1<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>Mounting a disk to \/images<\/h3>\n<ul>\n<li>If you want to keep the contents of an existing \/images directory, you can move the folder to somewhere else temporarily:\n<ul>\n<li><span class=\"theme:shell-default lang:sh decode:true crayon-inline\">mv \/images \/images2<\/span><\/li>\n<\/ul>\n<\/li>\n<li>Make the images directory again, if it doesn&#8217;t exist:\n<ul>\n<li><span class=\"theme:shell-default lang:sh decode:true crayon-inline\">mkdir \/images<\/span><\/li>\n<\/ul>\n<\/li>\n<li>Mount \/dev\/sdb to here\n<ul>\n<li><span class=\"theme:shell-default lang:sh decode:true crayon-inline\">mount -t ext3 \/dev\/sdb1 \/images<\/span><\/li>\n<\/ul>\n<\/li>\n<li>Check the output of\u00a0<em>mount<\/em> to see if the disk is mounted as expected.<\/li>\n<li>If you moved the contents off originally, you can copy it back again and delete the temporary directory:\n<ul>\n<li><span class=\"theme:shell-default lang:default decode:true crayon-inline\">cp -av \/images2\/* \/images\/<\/span><\/li>\n<li><span class=\"theme:shell-default lang:sh decode:true crayon-inline\">rm -r \/images2\/<\/span><\/li>\n<\/ul>\n<\/li>\n<li>Mount the new disk at system startup with adding the following line to <em>\/etc\/fstab<\/em>\n<ul>\n<li><span class=\"theme:shell-default lang:vim decode:true crayon-inline\">\/dev\/sdb1 \/images ext3 defaults 0 0<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>Using the disk with FOG<\/h3>\n<p>You need to add a file to the directory, called <em>.mntcheck,\u00a0<\/em>manually. This file is used by FOG and must be there:<\/p>\n<ul>\n<li><span class=\"theme:shell-default lang:sh decode:true crayon-inline\">touch \/images\/.mntcheck<\/span><\/li>\n<\/ul>\n<p>Finally, I set the permissions for the folder so that the user <em>fog<\/em> owns it and\u00a0only the specified user and group can access it.<\/p>\n<ul>\n<li><span class=\"theme:shell-default lang:sh decode:true crayon-inline\">chown -R fog \/images<\/span><\/li>\n<li><span class=\"theme:shell-default lang:sh decode:true crayon-inline\">chmod 774 \/images<\/span><\/li>\n<\/ul>\n<h2>Serving FOG to different subnets<\/h2>\n<p>I talked <a href=\"http:\/\/www.troliver.com\/?p=47\">about this previously<\/a>\u00a0under &#8220;proxyDHCP&#8221;, and I&#8217;m just going to briefly mention what is written<a href=\"https:\/\/wiki.fogproject.org\/wiki\/index.php\/Using_FOG_with_an_unmodifiable_DHCP_server\/_Using_FOG_with_no_DHCP_server#DNSMASQ_settings_for_iPXE\"> here<\/a>, but essentially you need to configure FOG to respond to requests from other subnets. Refer to both of those links and it should be fine.<\/p>\n<p>&nbsp;<\/p>\n<h1>Troubleshooting<\/h1>\n<p>The following are common issues I have noticed with other people or encountered myself, mostly specifically with Ubuntu 14.04 and FOG 1.2.0. Please feel free to comment on or correct\/elaborate on any of these but I&#8217;ll try and cover them as briefly and as well as I can!<\/p>\n<h2>Undionly.0 is missing<\/h2>\n<p><a href=\"http:\/\/www.troliver.com\/wp-content\/uploads\/2015\/05\/filenotfound.png\"><img decoding=\"async\" loading=\"lazy\" class=\" size-full wp-image-304 aligncenter\" src=\"http:\/\/www.troliver.com\/wp-content\/uploads\/2015\/05\/filenotfound.png\" alt=\"filenotfound\" width=\"747\" height=\"295\" srcset=\"https:\/\/www.troliver.com\/wp-content\/uploads\/2015\/05\/filenotfound.png 747w, https:\/\/www.troliver.com\/wp-content\/uploads\/2015\/05\/filenotfound-300x118.png 300w\" sizes=\"(max-width: 747px) 100vw, 747px\" \/><\/a><\/p>\n<p>This will almost certainly happen when you first start trying to boot from FOG. <a href=\"http:\/\/www.troliver.com\/?p=47\">In an earlier post<\/a>, I talked about moving from pxelinux to undionly &#8211; but one thing that wasn&#8217;t apparent at the time was that you may have a missing file.<\/p>\n<p>In <em>\/etc\/dnsmasq.d\/ltsp.conf,\u00a0<\/em>you can specify the bootfile. I checked this and the file specified, <em>undionly.kpxe<\/em>, is definitely in the <em>\/tftboot\/<\/em> directory, which is where tftp requests can get their files from.<\/p>\n<p>To see if this is an issue with TFTP or something else, you can install the TFTP client on a Windows machine (under &#8220;Add\/Remove Programs&#8221; and then &#8220;Turn Windows Features On or Off&#8221;) and launch a\u00a0command line as an Administrator (you won&#8217;t be able to do this otherwise, you&#8217;ll get an error to do with being unable to connect to the server). If there&#8217;s any issue with connectivity to the server or TFTP, you&#8217;ll see it here. Use the command <em>&#8220;tftp &lt;fog server IP&gt; get undionly.kpxe&#8221; <\/em>to manually download the file and you should see the following if its successful:<\/p>\n<pre class=\"theme:terminal lang:batch decode:true\">C:\\Windows\\system32&gt;tftp 10.1.100.30\u00a0get undionly.kpxe\r\nTransfer successful: 103224 bytes in 1 second(s), 103224 bytes\/s<\/pre>\n<p>You can also use <em>tcpdump<\/em>\u00a0on the FOG server to see traffic for a given host using\u00a0 <span class=\"theme:shell-default lang:sh decode:true crayon-inline\">tcpdump -i eth0 | grep 192.168.31.100<\/span>\u00a0. This will tell you the kind of traffic that is going on between hosts. Note: if you&#8217;re using SSH, you want to\u00a0<em>exclude<\/em> your own machine by using <em>grep -v &lt;ip of your own machine&gt;\u00a0<\/em>otherwise you&#8217;ll be generating the same traffic that you&#8217;re recording!<\/p>\n<p>So if everything works ok, what is wrong?<\/p>\n<p>It seems to be the case that iPXE requires bootfiles to be appended with <em>.0 .\u00a0<\/em>I think this is an issue with iPXE rather than FOG &#8211; but previously, undionly.0 seemed to exist (and now it doesn.t). So there are two options, both of which work:<\/p>\n<ul>\n<li>Copy undionly.kpxe to undionly.0\n<ul>\n<li><span class=\"theme:terminal lang:sh decode:true crayon-inline \">cp undionly.kpxe undionly.0<\/span><\/li>\n<\/ul>\n<\/li>\n<li>Symbolic link undionly.0 to undionly.kpxe (you might need -r or you might not)\n<ul>\n<li><span class=\"theme:terminal lang:sh decode:true crayon-inline\">sudo ln -s -r undionly.kpxe undionly.0<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>For more information, see <a href=\"https:\/\/forums.fogproject.org\/topic\/4915\/unidonly-0-question\/8\">this post <\/a>I made on the FOG forums which should explain a bit more or<a href=\"https:\/\/forums.fogproject.org\/topic\/2544\/dnsmasq-help-for-ipxe-stuff\"> some of the responses<\/a> to a similar issue.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h2>Changing the IP of your FOG server<\/h2>\n<p>If you change your server&#8217;s IP, you&#8217;ll need to edit the settings throughout FOG in order to do this correctly. You&#8217;ll need to update every instance of the FOG server&#8217;s IP and not just in the <em>interfaces<\/em> file. You can use\u00a0<em>grep\u00a0<\/em>to find instances of the old IP address and change those by editing the respective file; this search term, for example, will find all references within the subfolders of FOG:\u00a0<span class=\"theme:shell-default lang:sh decode:true crayon-inline\">grep -r 10.1.1.200 \/var\/www\/fog\/lib<\/span>\u00a0. You can also use<a href=\"https:\/\/wiki.fogproject.org\/wiki\/index.php\/Change_FOG_Server_IP_Address\"> this (maybe out of date) guide<\/a> on the FOG wiki, but ultimately I think you have\u00a0to check the following places:<\/p>\n<ul>\n<li>\/var\/www\/fog\/lib\/fog\/Config.class.php<\/li>\n<li>\/tftpboot\/default.ipxe<\/li>\n<li>\/etc\/hosts<\/li>\n<li>\/etc\/dnsmasq.d\/ltsp.conf<\/li>\n<li>\/etc\/network\/interfaces<\/li>\n<li>\/tftpboot\/pxelinux.cfg\/default<\/li>\n<\/ul>\n<p>And make sure that you either restart the whole system or the following services:<\/p>\n<ul>\n<li>apache2<\/li>\n<li>networking<\/li>\n<li>dnsmasq<\/li>\n<\/ul>\n<p>I personally would suggest\u00a0to remake the server again but if this isn&#8217;t really an option, the above should fix things for you.<\/p>\n<h2>DNSMASQ\/LTSP breaks DNS lookups<\/h2>\n<p>A frequently occurring problem after installing\u00a0<em>dnsmasq<\/em>\u00a0is that despite the\u00a0<em>interface\u00a0<\/em>file configured to point to a specific nameserver, the host is unable to look up any hostnames. This means no package upgrades, namely.<\/p>\n<p>f you look at <em>\/etc\/resolv.conf<\/em> (which is actually \/run\/resolvconf\/resolv.conf), it seems that the nameserver is 127.0.0.1. Inside<em>\u00a0\/run\/resolvconf\/interface\/<\/em>\u00a0are all of the interfaces that could be used and inside \/<em>eth0.inet<\/em>, the right settings are configured. However, there is a file called lo.dnsmasq, too &#8211; which has the offending address inside it.<\/p>\n<p>What seems to happen is that the\u00a0<em>interface order<\/em>\u00a0has changed at some point so that a load of these loopback interfaces take priority over any physical adapters. <em>Resolvconf<\/em> gets its settings from numerous sources, which are ordered in precedence here in <em>\/etc\/resolvconf\/interface-order<\/em>. The solution is not to just remove the lo.dnsmasq, but to change the order in the <em>interface-order<\/em> file to make eth* the priority.<\/p>\n<p>In short; we want the <i>eth0<\/i>\u00a0(or whatever it is on the system) adapter to be used as the adapter for performing DNS lookups\u00a0instead:<\/p>\n<ul>\n<li>Edit <em>\/etc\/resolvconf\/interface-order<\/em><\/li>\n<li>Edit the first entry to look something like the following:<\/li>\n<\/ul>\n<pre class=\"theme:shell-default lang:vim decode:true\" style=\"padding-left: 60px;\"># interface-order(5)\r\neth*\r\nlo.inet*\r\nlo.dnsmasq<\/pre>\n<ul>\n<li>Restart the <em>dnsmasq<\/em> service.<\/li>\n<\/ul>\n<h2><\/h2>\n<h2>Schema needs updating..<\/h2>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-303\" src=\"http:\/\/www.troliver.com\/wp-content\/uploads\/2015\/05\/brokenfog.png\" alt=\"brokenfog\" width=\"987\" height=\"597\" srcset=\"https:\/\/www.troliver.com\/wp-content\/uploads\/2015\/05\/brokenfog.png 987w, https:\/\/www.troliver.com\/wp-content\/uploads\/2015\/05\/brokenfog-300x181.png 300w\" sizes=\"(max-width: 987px) 100vw, 987px\" \/><\/p>\n<p>Another common error people seem to get &#8211; with apparently no commonly\u00a0discernible cause &#8211; is\u00a0the following screen with <em>&#8220;<span class=\"topic-title\">Your FOG database schema is not up to date..&#8221;.<\/span><\/em><span class=\"topic-title\">\u00a0when opening the FOG web UI. For me, it most often occurred after a system reboot after initial installation &#8211; and it wouldn&#8217;t always happen straight away, sometimes a few minutes would pass.\u00a0<\/span><\/p>\n<p><span class=\"topic-title\">There seems to be a few fixes and a few causes, but if you look at the running processes and filter out\u00a0<em>mysql\u00a0<\/em>processes, you&#8217;ll see there are actually a few instances\u00a0already\u00a0running, when you should have only one.<\/span><\/p>\n<pre class=\"theme:shell-default lang:sh decode:true\">local_admin@fog:~$ ps aux | grep mysql \r\nmysql 1089 2.3 1.2 821128 49136 ? Ssl 16:11 0:00 \/usr\/sbin\/mysqld \r\nroot 1486 0.0 0.0 4440 700 ? S 16:11 0:00 \/bin\/sh \/usr\/bin\/mysqld_safe \r\nmysql 1838 0.1 0.8 380768 33084 ? Sl 16:11 0:00 \/usr\/sbin\/mysqld --basedir=\/usr --datadir=\/var\/lib\/mysql --plugin-dir=\/usr\/lib\/mysql\/plugin --user=mysql --log-error=\/var\/log\/mysql\/error.log --pid-file=\/var\/run\/mysqld\/mysqld.pid --socket=\/var\/run\/mysqld\/mysqld.sock --port=3306<\/pre>\n<p>There are a few fixes that have been suggested:<\/p>\n<ul>\n<li>You can issue this command, based on what <a href=\"https:\/\/github.com\/fogproject\/fogproject\/issues\/1\">Tom Elliott suggested here<\/a>.\n<ul>\n<li><span class=\"theme:shell-default lang:default decode:true crayon-inline\">echo manual | sudo tee \/etc\/init\/mysql.override<\/span><\/li>\n<\/ul>\n<\/li>\n<li>What worked\u00a0for me, however, was to edit <em>\/opt\/fog\/.fogsettings\u00a0<\/em>and fill in the following blank lines to match the respective fields in <em>\/var\/www\/fog\/lib\/fog\/Config.class.php<\/em>:\n<ul>\n<li><span class=\"theme:shell-default lang:default decode:true crayon-inline\">snmysqluser=&#8221;root&#8221;<\/span><br \/>\n<span class=\"theme:shell-default lang:default decode:true crayon-inline\">snmysqlhost=&#8221;localhost&#8221;<\/span><\/li>\n<li>Afterwards, run dpkg-reconfigure mysql-server-5.5 and use the same password specified in the <em>fogsettings<\/em> file to reset the mySQL database password.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>There is a lot of similar issues documented on the FOG forums if you&#8217;re interested more in the issue. I think this should fix it but I would be interested if anyone else has another idea as to the cause of it.<\/p>\n<h2>FOG services don&#8217;t actually start<\/h2>\n<p>It seems &#8211; at least on Ubuntu 14.04 with FOG 1.2.0 &#8211; that the FOG task scheduler, multicast manager and image replication services just don&#8217;t start. Well, ok they <em>do<\/em> start, but then they stop quite quickly. Log files are generated but since the service abruptly stops, you get nothing more than a few lines. You can manually start the services yourself, and you&#8217;ll get some error about a process ID not existing, but you want to be able to do this automatically. Add this to \/etc\/rc.local to force restart of the FOG services 10 seconds after system startup.<\/p>\n<pre class=\"theme:shell-default lang:vim decode:true\">sleep 10\r\nservice FOGMulticastManager restart\r\nservice FOGScheduler restart\r\nservice FOGImageReplicator restart\r\nexit 0<\/pre>\n<h2>Snapin file size limit<\/h2>\n<p>By default, snap-ins are limited to being really small. But if you want to use snapins to deploy large files, you will need to edit <em>\/etc\/php5\/apache2\/php.ini\u00a0<\/em>to increase the limits. The amount of POST data you can send and the file size limit needs to be changed, so find the following lines and set them to the following values (you can go higher or lower, of course).<\/p>\n<pre class=\"theme:shell-default lang:vim decode:true\">memory_limit = 2000M\r\npost_max_size = 8000M\r\nupload_max_filesize = 8000M<\/pre>\n<p>&nbsp;<\/p>\n<h1>FOG on a virtual machine?<\/h1>\n<p>This really isn&#8217;t a hugely important point since this installation guide applies for physical machines too, but one of the things to consider in this post is that it was decided to move FOG to a VM. There is now\u00a0<em>High Availability<\/em> &#8211; which, essentially, means that if the host running FOG fails then a second host takes over and FOG should keep running seamlessly. Additionally, we can now take advantage of our new storage provision and move some of the images onto this.<\/p>\n<p>My\u00a0configuration settings are very lean, get still quite generous, with only a single dual core virtual CPU and 4GB of memory. The hard disk space is similarly small at only 40GB thin provision; the reason for this will be apparent later. Finally, we can create snapshots in a VM and migrate it around and back it up elsewhere by downloading the entire set of virtual disk files.<\/p>\n<p>I did some quick bandwidth test using\u00a0<em>iperf<\/em>\u00a0to see what sort of throughput could be achieved on the system and the result was suggesting speeds of 624Mb\/s, which perhaps could be improved later but is nevertheless a reasonable way to 1Gb\/s speeds (although I haven&#8217;t done many tests over other systems to determine latency around the site).<\/p>\n<pre class=\"theme:shell-default lang:sh decode:true\">admin@fog:~$ iperf -s\r\n------------------------------------------------------------\r\nServer listening on TCP port 5001\r\nTCP window size: 85.3 KByte (default)\r\n------------------------------------------------------------\r\n[ 4] local 10.1.63.202 port 5001 connected with 10.9.112.224 port 22251\r\n[ ID] Interval Transfer Bandwidth\r\n[ 4] 0.0-10.0 sec 745 MBytes 624 Mbits\/sec<\/pre>\n<p>&nbsp;<\/p>\n<p>Hopefully this will be enough to get most people started; if anyone has any questions do feel free to ask or post over on the FOG forums (which have just recently been updated and will likely have broken a lot of my links in older posts!). However, soon I will likely be checking out the new FOG and the new client!<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Its been a while since I&#8217;ve talked about FOG on here.\u00a0The last 4 or 5 months have been busy and filled up with term-time activities as well as fixing many issues we have had. So FOG is still very much in use where I work, but there have been some changes to how we use [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_newsletter_tier_id":0,"jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[2,21],"tags":[13,14,20,46],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6PQZ3-4B","_links":{"self":[{"href":"https:\/\/www.troliver.com\/index.php?rest_route=\/wp\/v2\/posts\/285"}],"collection":[{"href":"https:\/\/www.troliver.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.troliver.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.troliver.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.troliver.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=285"}],"version-history":[{"count":17,"href":"https:\/\/www.troliver.com\/index.php?rest_route=\/wp\/v2\/posts\/285\/revisions"}],"predecessor-version":[{"id":356,"href":"https:\/\/www.troliver.com\/index.php?rest_route=\/wp\/v2\/posts\/285\/revisions\/356"}],"wp:attachment":[{"href":"https:\/\/www.troliver.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=285"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.troliver.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=285"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.troliver.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=285"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}