• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    chainloading failed advanced menu

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    3
    34
    4.5k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Scott BS
      Scott B
      last edited by Scott B

      Our FOG server started giving a chainloading failed message when you boot and try to access the advanced menu. You can log in on the advanced menu but right after is where you get the message. Normal booting and imaging from the main menu works fine.

      I’m not sure if the OS (Ubuntu 16.04.5) grabbed an update, we did move to FOG 1.5.5.3. I believe this was the issue was around before that thought.

      1 Reply Last reply Reply Quote 0
      • S
        Sebastian Roth Moderator
        last edited by

        @Scott-B Please take a picture of the error on screen and post here.

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        1 Reply Last reply Reply Quote 0
        • george1421G
          george1421 Moderator
          last edited by

          In addition to the picture, lets grab the ipxe menu. Key in the following into your browser, replacing the <ip_address> with the address of your fog server.
          http://<ip_address>/fog/service/ipxe/boot.php?mac=00:00:00:00:00:00
          That will spill out a wall of text. That is the iPXE menu commands, post that results here in a code block so we can see what’s wrong with the advanced menu.

          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

          Scott BS 1 Reply Last reply Reply Quote 1
          • Scott BS
            Scott B @george1421
            last edited by george1421

            @george1421 said in chainloading failed advanced menu:

            In addition to the picture, lets grab the ipxe menu. Key in the following into your browser, replacing the <ip_address> with the address of your fog server.
            http://<ip_address>/fog/service/ipxe/boot.php?mac=00:00:00:00:00:00
            That will spill out a wall of text. That is the iPXE menu commands, post that results here in a code block so we can see what’s wrong with the advanced menu.

            Sure, no problem.

            alt text

            #!ipxe
            set fog-ip 10.95.95.100
            set fog-webroot fog
            set boot-url http://${fog-ip}/${fog-webroot}
            cpuid --ext 29 && set arch x86_64 || set arch i386
            goto get_console
            :console_set
            colour --rgb 0x00567a 1 ||
            colour --rgb 0x00567a 2 ||
            colour --rgb 0x00567a 4 ||
            cpair --foreground 7 --background 2 2 ||
            goto MENU
            :alt_console
            cpair --background 0 1 ||
            cpair --background 1 2 ||
            goto MENU
            :get_console
            console --picture http://10.95.95.100/fog/service/ipxe/bgdark.png --left 100 --right 80 && goto console_set || goto alt_console
            :MENU
            menu
            colour --rgb 0xff0000 0 ||
            cpair --foreground 1 1 ||
            cpair --foreground 0 3 ||
            cpair --foreground 4 4 ||
            item --gap Host is NOT registered!
            item --gap -- -------------------------------------
            item fog.local Boot from hard disk
            item fog.reginput Perform Full Host Registration and Inventory
            item fog.deployimage Deploy Image
            item fog.multijoin Join Multicast Session
            item fog.sysinfo Client System Information (Compatibility)
            item fog.advancedlogin Advanced Menu Login
            choose --default fog.local --timeout 2000 target && goto ${target}
            :fog.local
            sanboot --no-describe --drive 0x80 || goto MENU
            :fog.reginput
            kernel bzImage32 loglevel=4 initrd=init_32.xz root=/dev/ram0 rw ramdisk_size=512000 web=http://10.95.95.100/fog/ consoleblank=0 rootfstype=ext4 storage=10.95.95.100:/images/ storageip=10.95.95.100 loglevel=4 mode=manreg
            imgfetch init_32.xz
            boot || goto MENU
            :fog.deployimage
            login
            params
            param mac0 ${net0/mac}
            param arch ${arch}
            param username ${username}
            param password ${password}
            param qihost 1
            isset ${net1/mac} &amp;&amp; param mac1 ${net1/mac} || goto bootme
            isset ${net2/mac} &amp;&amp; param mac2 ${net2/mac} || goto bootme
            param sysuuid ${uuid}
            :fog.multijoin
            login
            params
            param mac0 ${net0/mac}
            param arch ${arch}
            param username ${username}
            param password ${password}
            param sessionJoin 1
            isset ${net1/mac} && param mac1 ${net1/mac} || goto bootme
            isset ${net2/mac} && param mac2 ${net2/mac} || goto bootme
            param sysuuid ${uuid}
            :fog.sysinfo
            kernel bzImage32 loglevel=4 initrd=init_32.xz root=/dev/ram0 rw ramdisk_size=512000 web=http://10.95.95.100/fog/ consoleblank=0 rootfstype=ext4 storage=10.95.95.100:/images/ storageip=10.95.95.100 loglevel=4 mode=sysinfo
            imgfetch init_32.xz
            boot || goto MENU
            :fog.advancedlogin
            login
            params
            param mac0 ${net0/mac}
            param arch ${arch}
            param username ${username}
            param password ${password}
            param advLog 1
            isset ${net1/mac} &amp;&amp; param mac1 ${net1/mac} || goto bootme
            isset ${net2/mac} &amp;&amp; param mac2 ${net2/mac} || goto bootme
            param sysuuid ${uuid}
            :bootme
            chain -ar http://10.95.95.100/fog/service/ipxe/boot.php##params ||
            goto MENU
            autoboot
            
            1 Reply Last reply Reply Quote 0
            • george1421G
              george1421 Moderator
              last edited by

              Well that was almost a bust for me. No useful info on to why. But I do see the next url we need to query.

              http://<ip_address>/fog/service/ipxe/advanced.php?mac0=00:00:00:00:00:00&arch=x86_64&username=fog&password=password&advLog=1

              I don’t have an advanced menu defined on my fog server so I only get

              #ipxe
              

              To the url call.

              What do you have in the following field? Fog Settings->iPXE General Configuration->Advanced Menu settings->Advanced menu command(field)

              Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

              Scott BS 1 Reply Last reply Reply Quote 0
              • Scott BS
                Scott B @george1421
                last edited by

                @george1421 said in chainloading failed advanced menu:

                What do you have in the following field? Fog Settings->iPXE General Configuration->Advanced Menu settings->Advanced menu command(field)

                I have nothing listed in that field. In fact, I can’t even enter test in that field. It’s just blank.

                alt text

                george1421G 1 Reply Last reply Reply Quote 0
                • george1421G
                  george1421 Moderator @Scott B
                  last edited by

                  @Scott-B Well that’s going to be a problem. That is what builds your advanced menu. That is where you are suppose to add your customer advanced menu text into (guessing since I don’t use advanced menus).

                  @Developers is that correct? If that field is blank you should not see any advanced menus? Is this a feature of 1.5.5.3?

                  Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                  1 Reply Last reply Reply Quote 0
                  • george1421G
                    george1421 Moderator
                    last edited by george1421

                    I did a bit of reverse engineering here: I entered “junk” into that field, then called http://<fog_server_ip>/fog/service/ipxe/advanced.php?mac0=00:00:00:00:00:00&arch=x86_64&username=fog&password=password&advLog=1

                    and received this as a iPXE menu, which is an invalid iPXE menu and should create a chain loading error because its not a valid iPXE menu script.

                    #!ipxe
                    junk
                    

                    So what does that tell us?

                    1. FOG will only display the advanced menu item if that field contains data. With a blank field FOG skips over displaying the iPXE menu.
                    2. You probably have a bad iPXE menu data in that field. Which at the moment you can’t edit via the frontend.

                    Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                    Scott BS 1 Reply Last reply Reply Quote 0
                    • Scott BS
                      Scott B @george1421
                      last edited by

                      @george1421 said in chainloading failed advanced menu:

                      I did a bit of reverse engineering here: I entered “junk” into that field, then called http://<fog_server_ip>/fog/service/ipxe/advanced.php?mac0=00:00:00:00:00:00&arch=x86_64&username=fog&password=password&advLog=1

                      and received this as a iPXE menu, which is an invalid iPXE menu and should create a chain loading error because its not a valid iPXE menu script.

                      #!ipxe
                      junk
                      

                      So what does that tell us?

                      1. FOG will only display the advanced menu item if that field contains data. With a blank field FOG skips over displaying the iPXE menu.
                      2. You probably have a bad iPXE menu data in that field. Which at the moment you can’t edit via the frontend.

                      I’m fine taking the whole menu program back to defaults if anyone can help me do so.

                      george1421G 1 Reply Last reply Reply Quote 0
                      • george1421G
                        george1421 Moderator @Scott B
                        last edited by

                        @Scott-B If you call the advanced menu as I have defined the URL what do you get? I think we have 2 issues here.

                        1. Your advanced menu is not right
                        2. You can’t edit it because the field is blank.

                        First lets see what your advanced menu looks like.

                        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                        Scott BS 1 Reply Last reply Reply Quote 0
                        • Scott BS
                          Scott B @george1421
                          last edited by

                          @george1421 said in chainloading failed advanced menu:

                          @Scott-B If you call the advanced menu as I have defined the URL what do you get? I think we have 2 issues here.

                          1. Your advanced menu is not right
                          2. You can’t edit it because the field is blank.

                          First lets see what your advanced menu looks like.

                          All I get is

                          #!ipxe
                          
                          george1421G 1 Reply Last reply Reply Quote 0
                          • george1421G
                            george1421 Moderator @Scott B
                            last edited by

                            @Scott-B Did you ever have an advanced menu?

                            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                            Scott BS 1 Reply Last reply Reply Quote 0
                            • Scott BS
                              Scott B @george1421
                              last edited by

                              @george1421 said in chainloading failed advanced menu:

                              @Scott-B Did you ever have an advanced menu?

                              Yes. We used to memtest or dban from it.

                              1 Reply Last reply Reply Quote 0
                              • george1421G
                                george1421 Moderator
                                last edited by george1421

                                OK, the last bit before we need to get the developers involved.

                                From the fog server linux command prompt. Key in the following:

                                mysql -u root -p fog
                                <press enter at password>
                                select * from  globalSettings where settingKey="FOG_PXE_ADVANCED";
                                

                                The output will look similar (but probably line wrapped) to this:

                                MariaDB [fog]> select * from  globalSettings where settingKey="FOG_PXE_ADVANCED";
                                +-----------+------------------+----------------------------------------------------------------------------------------------------+--------------+-------------------+
                                | settingID | settingKey       | settingDesc                                                                                        | settingValue | settingCategory   |
                                +-----------+------------------+----------------------------------------------------------------------------------------------------+--------------+-------------------+
                                |        74 | FOG_PXE_ADVANCED | This setting defines if you would like to append any settings to the end of your PXE default file. | junk         | FOG Boot Settings |
                                +-----------+------------------+----------------------------------------------------------------------------------------------------+--------------+-------------------+
                                1 row in set (0.00 sec)
                                

                                This is the text behind that menu entry. The settings value field is the only important field.

                                You could rewrite the sql query as this to give us only what we are interested in:

                                select settingValue from  globalSettings where settingKey="FOG_PXE_ADVANCED";
                                

                                Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                                Scott BS 1 Reply Last reply Reply Quote 0
                                • Scott BS
                                  Scott B @george1421
                                  last edited by

                                  @george1421 said in chainloading failed advanced menu:

                                  select settingValue from globalSettings where settingKey=“FOG_PXE_ADVANCED”;

                                  mysql> select * from  globalSettings where settingKey="FOG_PXE_ADVANCED";
                                  +-----------+------------------+----------------------------------------------------------------------------------------------------+--------------+-------------------+
                                  | settingID | settingKey       | settingDesc                                                                                        | settingValue | settingCategory   |
                                  +-----------+------------------+----------------------------------------------------------------------------------------------------+--------------+-------------------+
                                  |        74 | FOG_PXE_ADVANCED | This setting defines if you would like to append any settings to the end of your PXE default file. |              | FOG Boot Settings |
                                  +-----------+------------------+----------------------------------------------------------------------------------------------------+--------------+-------------------+
                                  1 row in set (0.00 sec)
                                  
                                  mysql> select settingValue from  globalSettings where settingKey="FOG_PXE_ADVANCED";
                                  +--------------+
                                  | settingValue |
                                  +--------------+
                                  |              |
                                  +--------------+
                                  1 row in set (0.10 sec)
                                  
                                  mysql>
                                  
                                  george1421G 1 Reply Last reply Reply Quote 0
                                  • george1421G
                                    george1421 Moderator @Scott B
                                    last edited by

                                    @Scott-B Well somewhere along the way there is no advanced menu defined. We are going to need the @Developers to look at the code in the FOG configuration page to why that field is hidden in 1.5.5.3 (it works in 1.5.4). Then you can rebuild your custom advanced menu again.

                                    Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                                    1 Reply Last reply Reply Quote 1
                                    • S
                                      Sebastian Roth Moderator
                                      last edited by Sebastian Roth

                                      @Scott-B @george1421 Ok seems like there is something messed up with the advanced menu.

                                      First there seems to be an issue in the code that causes the chainload error. Please edit /var/www/html/fog/service/ipxe/advanced.php, jump to the end of the file and make the last four lines look like this:

                                      printf(
                                          "%s",
                                          FOGCore::getSetting('FOG_PXE_ADVANCED')
                                      );
                                      

                                      So remove the #!ipxe part in the second line. Save the file and see if your advanced login menu is properly working again.

                                      @george1421 said:

                                      FOG will only display the advanced menu item if that field contains data. With a blank field FOG skips over displaying the iPXE menu.

                                      You are perfectly right about this and I am not sure why it is that way. I am looking through the code right now to figure it out. My guess is that that part was moved to the iPXE menu settings but partly some stuff was left behind. While most old installations still had FOG_PXE_ADVANCED set from the old days no one did really notice.

                                      @george1421 said:

                                      We are going to need the @Developers to look at the code in the FOG configuration page to why that field is hidden in 1.5.5.3 (it works in 1.5.4).

                                      What exactly do you mean? I just installed a fresh 1.5.4 test system and it looks exactly the same to me. FOG_PXE_ADVANCED empty and no field to edit it.

                                      @Scott-B It’s kind of strange that you seem to be able to use the Advanced (Login) menu at all if that variable is empty in your database. See if you can make it work with the above mentioned code change and we’ll take it from there.

                                      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                                      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                                      george1421G Scott BS 2 Replies Last reply Reply Quote 0
                                      • george1421G
                                        george1421 Moderator @Sebastian Roth
                                        last edited by

                                        @Sebastian-Roth said in chainloading failed advanced menu:

                                        What exactly do you mean? I just installed a fresh 1.5.4 test system and it looks exactly the same to me. FOG_PXE_ADVANCED empty and no field to edit it.

                                        adv_ipxe.png

                                        If I look at my fog server running 1.5.4 I can enter an Advanced menu command, because the field (edit box) is there. If you look at what Scott posted below he doesn’t have the box to enter anything in and he’s using 1.5.5.3 https://forums.fogproject.org/topic/12911/chainloading-failed-advanced-menu/5

                                        I don’t know why the menu is being displayed in the iPXE side, but the first is to be able to edit in the webui. The rest is executing “I think” correctly. Its possible that the advanced menu field has a single white space in it causing the menu to be displayed in the ipxe side. I didn’t do a length in my query.

                                        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                                        1 Reply Last reply Reply Quote 0
                                        • S
                                          Sebastian Roth Moderator
                                          last edited by Sebastian Roth

                                          @george1421 Can’t stop laughing. We all seem to have stepped into the same puddle of mud here. I figured that the field is not being displayed because AdBlock Plus Firefox Add-in is blocking it!!!

                                          The rest is executing “I think” correctly.

                                          Sorry, no. There is an issue in the advanced.php as mentioned earlier. As soon as Scott has fixed that in the code (manually for now) and maybe disabled AdBlock for this site to be able to edit that field he should be all up and running.

                                          But still I am wondering about the structure of this. When you got to FOG Configuration -> iPXE Menu Item Settings -> fog.advanced. From my understanding this is how the advanced menu was meant to be used at some stage but was never finished. Maybe I am wrong here. @Tom-Elliott is the only one who can tell us I suppose.

                                          I’ll push that one fix to github for now and we’ll see about the rest later.

                                          Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                                          Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                                          1 Reply Last reply Reply Quote 1
                                          • S
                                            Sebastian Roth Moderator
                                            last edited by Sebastian Roth

                                            @Sebastian-Roth said in chainloading failed advanced menu:

                                            But still I am wondering about the structure of this. When you got to FOG Configuration -> iPXE Menu Item Settings -> fog.advanced. From my understanding this is how the advanced menu was meant to be used at some stage but was never finished.

                                            Yeah, I got that upside down. Has been a long time since I last used it. iPXE Menu Item Settings is just that, the menu definition itself. Those should be fine for Scott as far as I see (only issue which should not cause trouble is the &amp;&amp; you have, make this && in the fog.advancedlogin so you won’t have that isset message on screen). Now after the menu item (login or not) it proceeds to load what is defined in the “Advanced menu command” field (disable AdBlock Firefox Add-in to see that). For that to work you need to fix that code in /var/www/html/service/ipxe/advanced.php as mentioned before.

                                            The “Advanced menu command” field needs to begin like this:

                                            #!ipxe
                                            ...
                                            

                                            Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                                            Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post

                                            157

                                            Online

                                            12.0k

                                            Users

                                            17.3k

                                            Topics

                                            155.2k

                                            Posts
                                            Copyright © 2012-2024 FOG Project