SOLVED I/O ERROR with Boot.php

  • im having a litle problem i have seen you already solved with FOGs I/O error on boot.php ?
    well, seen a comment on a thread here saying to disable the plugins to fix the problem but i gues the UI changed from that time (a year ago) and i cant find the plugin manager on my for … im running latest 1.2.0, i tried to search the fog settings and all i found was the plugin system and its not set to be enabled, there’s no V on the FOG_PLUGINSYSY_ENABLED … so does it mean i have a problem with the plugins or something else ?
    its the second time i configured fog, and the first time it worked well … now im kinda clueless what could gone wrong …

  • yeah so i figured it out …
    had a problem with the way i registered the machine … thanks for the help.

  • Senior Developer

    @Nox245 Did you get this solved yet?

  • Senior Developer

    I just stumbled upon this thread. Is that the one you were talking about?

    Do you use plugins like capone at all? I not this is probably a different issue. And I am pretty sure it is a different one as you are running version 1.2.0…

  • This sounds to me like a slight problem. When you say you’re running 1.2.0, have you by chance ensured a tasking actually exists for this host? I ask this because the specific lines of code for 1.2.0 relay this information:

             $Task = current($this->Host->get('task'));
             if (!$Task->isValid())
                 if ($this->FOGCore->getSetting('FOG_NO_MENU'))

    The first line 394 ($Task = current($this->Host->get(‘task’));) Tells me that the task for this host doesn’t exist, or isn’t being properly generated.

    The next line (if (!$Task->isValid())) is where the system is failing completely. Current, in php, means to take the most recent element of an array. If there is no array to pull you will get the (PHP Warning: current() expects parameter 1 to be an array, string given…)

    Can you do me a favor and edit the /var/www/html/fog/lib/fog/BootMenu.class.php and right before line 394 type:

             print $this->Host->get('task');
             $Task = current($this->Host->get('task'));
             if (!$Task->isValid())
                 if ($this->FOGCore->getSetting('FOG_NO_MENU'))

    Then go to the url as you did before? What is printed in the Browser?

  • @Nox245
    so heres a pic of the host in the fog server :
    and yes i did add the in the web interface
    when i go to the link it shows nothing
    but when i add / at the end like :
    it shows the same as the first time (without the mac=b0…)
    thats the log :
    [Tue Oct 13 13:42:33 2015] [error] [client] PHP Warning: current() expects parameter 1 to be array, string given in /var/www/html/fog/lib/fog/BootMenu.class.php on line 394
    [Tue Oct 13 13:42:33 2015] [error] [client] PHP Fatal error: Call to a member function isValid() on a non-object in /var/www/html/fog/lib/fog/BootMenu.class.php on line 395

  • Senior Developer

    @Nox245 Seams like the boot menu for non-registered hosts is ok and not producing any serious errors in the log file (don’t worry about the favicon message in 11:25). But you had some serious errors earlier this morning as I can see in the log file. Probably from booting the client.

    Please try again booting up the client to windows and access the same URL but with added parameter (MAC address from your first screenshot):

    Looking through the source code I am still wondering how this can happen. Did you register this host? How did you register (host added in the web interface?)?

  • got a screen shot of the logs tail
    and heres what i got on the
    also when i access the link i get the log :
    [Tue Oct 13 11:25:58 2015] [error] [client] File does not exist: /var/www/html/favicon.ico, referer:

    cpuid --ext 29 && set arch x86_64 || set arch i386
    colour --rgb 0xff6600 2
    cpair --foreground 7 --background 2 2
    console --picture --left 100 --right 80
    colour --rgb 0xff0000 0
    cpair --foreground 0 3
    item --gap Host is NOT registered!
    item --gap -- -------------------------------------
    item fog.local Boot from hard disk
    item fog.memtest Run Memtest86+
    item fog.reginput Perform Full Host Registration and Inventory
    item fog.reg Quick Registration and Inventory
    item fog.sysinfo Client System Information (Compatibility)
    choose --default fog.local --timeout 600000000 target && goto ${target}
    sanboot --no-describe --drive 0x80 || goto MENU
    kernel memdisk iso raw
    initrd memtest.bin
    boot || goto MENU
    kernel bzImage32 root=/dev/ram0 rw ramdisk_size=127000 ip=dhcp dns= keymap= web= consoleblank=0 loglevel=4 mode=manreg
    imgfetch init_32.xz
    boot || goto MENU
    kernel bzImage32 root=/dev/ram0 rw ramdisk_size=127000 ip=dhcp dns= keymap= web= consoleblank=0 loglevel=4 mode=autoreg
    imgfetch init_32.xz
    boot || goto MENU
    kernel bzImage32 root=/dev/ram0 rw ramdisk_size=127000 ip=dhcp dns= keymap= web= consoleblank=0 loglevel=4 mode=sysinfo
    imgfetch init_32.xz
    boot || goto MENU
  • Senior Developer

    Please boot up the client to its normal OS (probably Windows) and try to access the URL from your browser:

    Check your apache error log while accessing the URL too! On the FOG server run tail -f /var/log/httpd/error_log for CentOS. If you see an error like “No such file or directory” you should be able to find the correct log file using this command find /var/log -name "*error*log"

  • right.
    im running 1.2.0 on centos 5.7 on vmware, the client is a dell optiplex 3020 core i3 w/ 8GB RAM
    as im trying to boot to the NIC it just throws that error … it doesnt boot to fogs menu at all.
    heres a pic of the whol thing

  • Senior Developer

    Are you running FOG 1.2.0 or latest meaning trunk version? Which OS are you running FOG on? What is your client machine?

    Please tell us more about where you see the I/O ERROR with Boot.php? Maybe take a screenshot or describe in words how we can reproduce this error.