• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • 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.
  • S
    Scott B @george1421
    last edited by Jan 28, 2019, 4:53 PM

    @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>
    
    G 1 Reply Last reply Jan 28, 2019, 4:55 PM Reply Quote 0
    • G
      george1421 Moderator @Scott B
      last edited by Jan 28, 2019, 4:55 PM

      @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 Jan 28, 2019, 4:32 PM Jan 28, 2019, 9:24 PM

        @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

        G S 2 Replies Last reply Jan 28, 2019, 9:39 PM Reply Quote 0
        • G
          george1421 Moderator @Sebastian Roth
          last edited by Jan 28, 2019, 9:39 PM

          @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 Jan 28, 2019, 3:57 PM Jan 28, 2019, 9:57 PM

            @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 Jan 28, 2019, 4:33 PM Jan 28, 2019, 10:31 PM

              @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 && 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
              • S
                Scott B @Sebastian Roth
                last edited by Jan 29, 2019, 2:10 PM

                @Sebastian-Roth said in chainloading failed advanced menu:

                I made the change to /var/www/html/fog/service/ipxe/advanced.php as suggested. The menu still isn’t working but does a few extra errors about Exec format as seen in the image below.

                chainloaderror2

                1 Reply Last reply Reply Quote 0
                • S
                  Sebastian Roth Moderator
                  last edited by Jan 29, 2019, 2:11 PM

                  @Scott-B What have you set in the “Advanced Menu Command” field?

                  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

                  S 1 Reply Last reply Jan 29, 2019, 2:19 PM Reply Quote 0
                  • S
                    Scott B @Sebastian Roth
                    last edited by Jan 29, 2019, 2:19 PM

                    @Sebastian-Roth said in chainloading failed advanced menu:

                    @Scott-B What have you set in the “Advanced Menu Command” field?

                    It’s blank and uneditable.

                    AdvancedMenu

                    1 Reply Last reply Reply Quote 0
                    • S
                      Sebastian Roth Moderator
                      last edited by Jan 29, 2019, 2:32 PM

                      @Scott-B As mentioned yesterday you need to disable Firefox Add-in AdBlock Plus to see the field. Not sure why that is but I figured that was blocking the field for me. Pretty sure it’s the same for you.

                      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

                      S 1 Reply Last reply Jan 29, 2019, 2:34 PM Reply Quote 0
                      • S
                        Scott B @Sebastian Roth
                        last edited by Scott B Jan 29, 2019, 8:34 AM Jan 29, 2019, 2:34 PM

                        @Sebastian-Roth said in chainloading failed advanced menu:

                        @Scott-B As mentioned yesterday you need to disable Firefox Add-in AdBlock Plus to see the field. Not sure why that is but I figured that

                        Doh! I must have only allowed it temporarily. The field is there now. It’s blank.

                        1 Reply Last reply Reply Quote 0
                        • S
                          Sebastian Roth Moderator
                          last edited by Jan 29, 2019, 2:38 PM

                          @Scott-B Well then start adding your advanced menu code here:

                          #!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

                          S 1 Reply Last reply Jan 29, 2019, 2:49 PM Reply Quote 0
                          • S
                            Scott B @Sebastian Roth
                            last edited by Jan 29, 2019, 2:49 PM

                            @Sebastian-Roth said in chainloading failed advanced menu:

                            @Scott-B Well then start adding your advanced menu code here:

                            #!ipxe
                            ...
                            

                            That get’s me past the chainload error and drops me off at a blinking cursor.

                            1 Reply Last reply Reply Quote 0
                            • S
                              Sebastian Roth Moderator
                              last edited by Jan 29, 2019, 2:54 PM

                              @Scott-B You need to define a proper menu code yourself. The ... is not enough. Who designed your advanced menu last time?

                              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

                              S 1 Reply Last reply Jan 29, 2019, 4:44 PM Reply Quote 0
                              • S
                                Scott B @Sebastian Roth
                                last edited by Jan 29, 2019, 4:44 PM

                                @Sebastian-Roth said in chainloading failed advanced menu:

                                @Scott-B You need to define a proper menu code yourself. The ... is not enough. Who designed your advanced menu last time?

                                I think we are good. I was able to add DBAN back to the menu list.

                                S 1 Reply Last reply Feb 4, 2019, 7:38 PM Reply Quote 0
                                • G
                                  george1421 Moderator
                                  last edited by george1421 Jan 29, 2019, 10:47 AM Jan 29, 2019, 4:46 PM

                                  @Scott-B said in chainloading failed advanced menu:

                                  Doh! I must have only allowed it temporarily. The field is there now. It’s blank.

                                  OK great this is what we were seeing in the database with our sql query. Somewhere along the way this field must have been reset. You will need to hand code this menu entry for it to work correctly. I can tell you that by using the boot.php url I provided below which was displayed in your browser, you can see the structure of what you need to include in your advanced menu design.

                                  @Sebastian-Roth what kind of shady stuff are you doing to have that field blocked by the ad blocker?? <just kidding> I wonder why this field still exists? If you look in the ipxe menu configuration there is a field Menu show on, some options are Advanced menu and Advanced menu with password. Were these options never implemented? I had the idea to make just a checkbox in the ipxe menu configuration to be advanced menu but it looks like someone already thought of that??

                                  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 Jan 29, 2019, 4:57 PM

                                    @george1421 said in chainloading failed advanced menu:

                                    If you look in the ipxe menu configuration there is a field Menu show on, some options are Advanced menu and Advanced menu with password.

                                    Yeah I was mislead by that as well. Those two are just the entry points for the Advanced Menu. Without login -> no ipxe code needed -> will lead you straight to Advanced Menu Command definition. With Login -> do the Login (defined in the menu entry) -> then on successful login run same Advanced Menu Command. Might be a bit confusing at first.

                                    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
                                    • S
                                      Sebastian Roth Moderator
                                      last edited by Jan 29, 2019, 5:03 PM

                                      Marking this solved now as I have just pushed a fix to the dev-branch…

                                      Seems like not very many people use this stuff at all. The issue has been in the code for a long time - even in 1.5.0 and probably earlier (didn’t look back further). But possibly this issue came up with an update of iPXE. Anyway, should be fixed now.

                                      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
                                      • S
                                        Scott B @Scott B
                                        last edited by Feb 4, 2019, 7:38 PM

                                        @Scott-B said in chainloading failed advanced menu:

                                        I think we are good. I was able to add DBAN back to the menu list.

                                        For anyone who may find this thread down the road below is the quick advanced menu I wrote for this thread.

                                        #!ipxe
                                        menu
                                        item --gap – ---------------- iPXE boot menu ----------------
                                        item DBAN Boot and Nuke
                                        item DBANAUTO Boot and Nuke Autowipe
                                        item HIRENSCD Hirens Boot CD (Most Features Outdated)
                                        item GPARTED GParted Partition Editor 
                                        item SRCD System Rescue CD
                                        item SHELL iPXE Shell
                                        item RETURN Return to previous menu
                                        choose --default RETURN --timeout 10000 target && goto ${target}
                                        
                                        :DBAN
                                        kernel ${boot_url}/dban/dban.bzi nuke="dwipe" silent vga=785
                                        boot
                                        goto MENU
                                        
                                        :DBANAUTO
                                        kernel ${boot_url}/dban/dban.bzi nuke="dwipe --autonuke" silent nousb vga=785
                                        boot
                                        goto MENU
                                        
                                        :HIRENSCD
                                        sanboot http://${fog-ip}/hirenscd/HirensBootCD152.iso
                                        chain memdisk iso raw ||
                                        goto MENU
                                        
                                        :GPARTED
                                        kernel http://${fog-ip}/gparted/live/vmlinuz vmlinuz boot=live config components union=overlay username=user noswap noeject ip= vga=788 fetch=${fog-ip}/gparted/live/filesystem.squashfs
                                        initrd http://${fog-ip}/gparted/live/initrd.img
                                        boot
                                        
                                        :SRCD
                                        kernel http://${fog-ip}/srcd/rescue64 netboot=http://${fog-ip}/srcd/sysrcd.dat
                                        initrd http://${fog-ip}/srcd/initram.igz
                                        boot
                                        boot
                                        
                                        :SHELL
                                        shell ||
                                        goto MENU
                                        
                                        :RETURN
                                        chain http://${fog-ip}/${fog-webroot}/service/ipxe/boot.php?mac=${net0/mac} ||
                                        prompt
                                        goto MENU
                                        
                                        autoboot```
                                        1 Reply Last reply Reply Quote 1
                                        • S
                                          Sebastian Roth Moderator
                                          last edited by May 6, 2019, 9:12 PM

                                          @Scott-B Be aware that I just re-added the #!ipxe stuff as other users told us the advanced menu is broken for them now: https://forums.fogproject.org/topic/13230/advanced-menu-bug

                                          This is only in the current development version but it will also be in the next release 1.5.7. Just so you know in case you update to that or a later version at some point in time.

                                          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
                                          • 2 / 2
                                          • First post
                                            Last post

                                          259

                                          Online

                                          12.0k

                                          Users

                                          17.3k

                                          Topics

                                          155.2k

                                          Posts
                                          Copyright © 2012-2024 FOG Project