Unable to update Kernel and Captures not going to /images

  • I am working on setting up a mobile FOG server. I am using a laptop with Lubuntu 20.04. I have installed FOG from git (v1.5.9). Everything seemed to be set up correctly, but I am encountering two issues at the moment.

    1. I cannot get the Kernel Update to work in the web interface. It shows that it completes, but when I look at the Kernel Versions on the Home screen of the web interface, it still shows
    bzImage Version: 4.19.145
    bzImage32 Version: 4.19.145

    I verified that it remains 4.19.145 by starting a capture in debug mode and typing uname -r and it returns 4.19.145

    1. When performing a capture, it seems to complete the capture, but the image never gets moved to /images; it remains in /images/dev/<mac address>. I finally realized that the capture task also never completes, it just shows very little completed in the progress bar and there is a spinning circle. The list of images shows that the image is there, and it has a correct size, but obviously I can’t push the image out, since it isn’t actually in the correct location.

    I have verified that the passwords were correct for the fogproject user per https://wiki.fogproject.org/wiki/index.php/Troubleshoot_FTP#Credentials_.2F_Passwords and that the permissions were correct per https://wiki.fogproject.org/wiki/index.php/Troubleshoot_FTP#Permissions.

    Please help me figure out what I’ve missed.

  • Moderator

    @doogxela Good to hear this solved all the issues. Please keep in mind that when you re-run the installer to upgrade to the next version this might happen again. Though I am not sure. I don’t have Lubuntu to test here.

  • @Sebastian-Roth After moving the files and creating the link, it all seems to be working correctly now. I have updated the kernels using the web interface, and it successfully updated and is using them. My test computer now successfully boots to ipxe.

    I wish I could tell you what I did during the installation process that might have broken the link, but since this was my first time setting up a DHCP server and my first time installing FOG from scratch, it could be any number of things.

    I appreciate the assistance here.

  • Moderator

    @doogxela Ok, seems all good to move that stuff in /var/www/fog out of the way.

    sudo mv /var/www/fog /var/www/fog_delete_after_14_days
    sudo ln -s /var/www/html/fog/ /var/www/fog

    Not sure if Lubuntu is doing something special here that would cause this?!

  • @Sebastian-Roth

    :~$ ls -al /var/www/fog/lib/fog/system.class.php /var/www/html/fog/lib/fog/system.class.php
    -rw-r--r-- 1 www-data www-data 1524 Sep 19 19:11 /var/www/fog/lib/fog/system.class.php
    -rw-r--r-- 1 www-data www-data 1524 Sep 24 12:18 /var/www/html/fog/lib/fog/system.class.php
    :~$ ls -al /var/www/fog/lib/fog/config.class.php /var/www/html/fog/lib/fog/config.class.php
    -rw-r--r-- 1 www-data www-data 3752 Sep 19 19:11 /var/www/fog/lib/fog/config.class.php
    -rw-r--r-- 1 www-data www-data 3753 Sep 24 12:18 /var/www/html/fog/lib/fog/config.class.php
  • Moderator

    @doogxela We see this happen from time to time but I simply cannot replicate how this happens. Just to make sure it’s not just the folders having that date I may ask you to run the following two commands and post output here as well:

    ls -al /var/www/fog/lib/fog/system.class.php /var/www/html/fog/lib/fog/system.class.php
    ls -al /var/www/fog/lib/fog/config.class.php /var/www/html/fog/lib/fog/config.class.php

  • @Sebastian-Roth

    :~$ grep FOG_VERSION /var/www/fog/lib/fog/system.class.php /var/www/html/fog/lib/fog/system.class.php
    /var/www/fog/lib/fog/system.class.php:        define('FOG_VERSION', '1.5.9');
    /var/www/html/fog/lib/fog/system.class.php:        define('FOG_VERSION', '1.5.9');

    The 19th is when I initially installed FOG on this machine. I know that I ran the installation multiple times, due to some difficulty with getting the network configuration to make sense. Do you have any idea what would have caused the installation to use /var/www/fog to store information rather than /var/www/html/fog?

  • Moderator

    @doogxela Do you remember what you did on 19th of September? On a normal install /var/www/fog is not a directory but just a link to /var/www/html/fog/. See here:

    ls -al /var/www/
    total 16
    drwxr-xr-x.  4 root root 4096 Sep 11 13:58 .
    drwxr-xr-x. 22 root root 4096 Sep 11 13:50 ..
    drwxr-xr-x.  2 root root 4096 Jun  8 22:16 cgi-bin
    lrwxrwxrwx.  1 root root   18 Sep 11 13:58 fog -> /var/www/html/fog/
    drwxr-xr-x.  3 root root 4096 Sep 13 14:00 html

    So you have two different FOG web UI installs now. Please run the following command and post output here: grep FOG_VERSION /var/www/fog/lib/fog/system.class.php /var/www/html/fog/lib/fog/system.class.php

    As a quick fix you can copy those new kernels from /var/www/fog/service/ipxe/ to /var/www/html/fog/service/ipxe/ and I am sure it will boot with those bzImage_5.6.18 kernels.

  • @Sebastian-Roth

    :~$ ls -al /var/www /var/www/fog /var/www/html
    total 20
    drwxr-xr-x  4 root     root     4096 Sep 19 19:11 .
    drwxr-xr-x 15 root     root     4096 Sep 19 19:06 ..
    drwxr-xr-x 10 www-data www-data 4096 Sep 19 19:14 fog
    drwxr-xr-x  3 root     root     4096 Sep 24 12:18 html
    -rw-r--r--  1 www-data www-data   52 Sep 19 19:11 index.php
    total 408
    drwxr-xr-x 10 www-data www-data   4096 Sep 19 19:14 .
    drwxr-xr-x  4 root     root       4096 Sep 19 19:11 ..
    drwxr-xr-x  2 www-data www-data   4096 Sep 19 19:11 api
    drwxr-xr-x  2 www-data www-data   4096 Sep 19 19:11 client
    drwxr-xr-x  2 www-data www-data   4096 Sep 19 19:11 commons
    -rw-r--r--  1 www-data www-data 370070 Sep 19 19:11 favicon.ico
    lrwxrwxrwx  1 www-data www-data     13 Sep 19 19:11 fog -> /var/www/fog/
    drwxr-xr-x  2 www-data www-data   4096 Sep 19 19:11 fogdoc
    -rw-r--r--  1 www-data www-data    572 Sep 19 19:11 index.php
    drwxr-xr-x 13 www-data www-data   4096 Sep 19 19:11 lib
    drwxr-xr-x 10 www-data www-data   4096 Sep 19 19:11 management
    drwxr-xr-x  3 www-data www-data   4096 Sep 19 19:11 service
    drwxr-xr-x  2 www-data www-data   4096 Sep 19 19:11 status
    total 28
    drwxr-xr-x  3 root     root      4096 Sep 24 12:18 .
    drwxr-xr-x  4 root     root      4096 Sep 19 19:11 ..
    drwxr-xr-x 10 www-data www-data  4096 Sep 24 12:20 fog
    -rw-r--r--  1 root     root     10918 Sep 19 19:06 index.html
    -rw-r--r--  1 www-data www-data    52 Sep 20 14:26 index.php
  • Moderator

    @doogxela Please run ls -al /var/www /var/www/fog /var/www/html ()note the spaces in between!) and post output here.

  • @Sebastian-Roth I don’t have /html/ in the path to those files. Here is the output of that command to the files where they live for me.

    b5cdcde24a1cf892c69e5fdbc4677643  /var/www/fog/service/ipxe/bzImage_5.6.18
    3edcc87a0982149ca1e89bbfbccf4315  /var/www/fog/service/ipxe/bzImage32_5.6.18
    :~$ ls /var/www/html/fog/service/ipxe
    advanced.php  bzImage    init_32.xz   refind_aa64.efi  refind_x64.efi
    bgdark.png    bzImage32  init.xz      refind.conf
    bg.png        grub.exe   memdisk      refind.efi
    boot.php      index.php  memtest.bin  refind_ia32.efi
  • Moderator

    @doogxela Please run md5sum /var/www/html/fog/service/ipxe/bzImage_5.6.18 /var/www/html/fog/service/ipxe/bzImage32_5.6.18 and post output here!

  • @Sebastian-Roth
    After going through the process you linked, I was able to successfully capture an image and subsequently push it out. I’m not sure what was wrong, since I am 98% sure that the password was already correct in all locations, but I’ll take the win.

    So now the only issue is the kernels not updating correctly. When using the web interface, it says that it successfully downloaded and transferred the files, but the web interface still shows that bzImage and bzImage32 are version 4.19.145. I then downloaded 5.6.18 to /var/www/fog//service/ipxe/bzImage_5.6.18 and /var/www/fog//service/ipxe/bzImage32_5.6.18 and changed Fog Configuration -> Fog Settings -> TFTP Server -> TFTP PXE KERNEL to match that file name, and did the same with the 32-bit one. The computer I am testing with, then would not pxe boot. It gets to the init.xz portion, then reboots without a visible error.
    ![0_1601045900908_PXL_20200925_145514241.jpg](Uploading 100%) PXL_20200925_145514241.jpg

    If I switch it back to just use the bzImage kernel, then it works correctly. I am able to pxe boot that same computer to my existing server that is running FOG v1.5.9 and kernel v5.6.18.

    I need to be able to use the newer kernel because the mobile FOG server will be mostly imaging new Dell 5410 computers that need that updated kernel, but will also be imaging some HP Elitebook 840 G3s, which is what I am testing with currently.

  • Moderator

    @doogxela Please go through the steps outlined here: https://forums.fogproject.org/topic/11203/resyncing-fog-s-service-account-password

    If that doesn’t help I may ask you to schedule a capture task in debug mode (same as if you do for a normal but just before you create the task in the web UI there is a checkbox for debug). Boot the host, hit ENTER twice and start the task using the command fog in the console. Step through it till you get to the end. I am fairly sure you see an error message there. Take a picture of the screen and post that here!