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

Chain fog PXE with another one

Scheduled Pinned Locked Moved
General Problems
3
11
1.8k
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.
  • Z
    zeltron80
    last edited by Mar 27, 2018, 6:20 PM

    Hi,

    I’m trying to integrate fog’s PXE server in my organization one’s.
    What I want to do is : my PXE server first chains to fog to query about a pending task.
    If a task’s pending for the host, it boots on it, if not, it chains back to our organization’s PXE server.
    I took a look at boot.php, but didn’t really understood where to add the “go back to my PXE server” in the newboot() function.
    (I know how to query for a pending task, it works if a task exists for the host, but I don’t know what to do to automatically go back (without delay nor prompt) if there’s not.

    Bonus question (just for curiosity) : What do the -ar option of your chain ipxe command ? I found nothing about that, wherever I searched on the net (I looked at ipxe doc pages, of course).

    Thanks for your help.
    E.T.

    1 Reply Last reply Reply Quote 0
    • G
      george1421 Moderator
      last edited by Mar 27, 2018, 7:05 PM

      The short answer for this is to create a custom fog iPXE menu (using the web gui). This will chain back to your organization’s pxe server. Then from FOG you would set this new menu item as the default.

      So the idea is your default pxe server chains to fog’s ipxe. If FOG has something to do it will do it, if not the default action for the FOG menu is to chain back to your organization’s pxe server. Just be aware you will need to chain back to a point where the pxe client won’t turn around and chain back to the FOG server again creating a chain loop.

      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!

      Z 1 Reply Last reply Apr 4, 2018, 1:13 PM Reply Quote 0
      • Z
        zeltron80
        last edited by Apr 4, 2018, 1:11 PM

        This post is deleted!
        1 Reply Last reply Reply Quote 0
        • Z
          zeltron80 @george1421
          last edited by Apr 4, 2018, 1:13 PM

          @george1421

          Hello,
          Thanks for your answer. It’s most clear, but i have always a problem.
          The No Menu option is interessting because if there is no task it will boot from the first device.
          But i would like if there is no task, chain to my ipxe menu (i create a new menu in fog but i can’t use it if there is not a task, it’s all time sanboot --no-describe --drive 0x80 ).
          How i can use my chain instead of sanboot --no-describe --drive 0x80 ?
          Thanks

          G C 2 Replies Last reply Apr 4, 2018, 1:17 PM Reply Quote 0
          • G
            george1421 Moderator @zeltron80
            last edited by george1421 Apr 4, 2018, 7:18 AM Apr 4, 2018, 1:17 PM

            @zeltron80 Understand that you are doing something the developers did not imagine when they created the iPXE menu stuff. We will not get help from the developers with non-designed issues.

            So if you have the no menu option, but you create a default menu to chain back it doesn’t work?

            To ask the question the other way. If you do have the menu displayed, and have the default set to chain back to your pxe server does that work?

            I want to identify if the problem is only when hidden menu is selected and not with your menu item.

            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!

            Z 1 Reply Last reply Apr 4, 2018, 1:35 PM Reply Quote 0
            • Z
              zeltron80 @george1421
              last edited by Apr 4, 2018, 1:35 PM

              @george1421 Yes, if the menu displayed and if there is no task, after x second i am chain to my pxe server because my menu in fog is as default. But if the no menu option is activate, it boot from first device. I send a picture :
              0_1522848799606_ipxe-fog.jpg

              0_1522848815120_menu-fog.jpg

              G 1 Reply Last reply Apr 4, 2018, 1:52 PM Reply Quote 0
              • G
                george1421 Moderator @zeltron80
                last edited by Apr 4, 2018, 1:52 PM

                @zeltron80 Just for clarity you must have a description field entered. I have request the developers change the title description to “Menu Title” to make it a bit clearer for the FOG Admin.

                As for your hidden menu issue. I’ll need to look at the code to see if its hard coded or not. From the sounds of it, the answer is yes.

                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
                • G
                  george1421 Moderator
                  last edited by Apr 4, 2018, 2:05 PM

                  I’m just shooting in the dark here. But it looks like a simple edit to replace the sanboot option with your chain command. I’m not saying it will work but its a hack you can try.

                  Edit /var/www/html/fog/lib/fog/bootmenu.class.php then goto line 130 which says says:
                  $sanboot = 'sanboot --no-describe --drive 0x80';
                  Change the text between the single quotes to your chain command.
                  Save and exit your editor. Hide the menu and see if it chains correctly.

                  As aways make backups of files before you change them so you can reset them when it breaks.

                  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!

                  Z 1 Reply Last reply Apr 4, 2018, 2:40 PM Reply Quote 0
                  • Z
                    zeltron80 @george1421
                    last edited by Apr 4, 2018, 2:40 PM

                    @george1421 Thanks for your answers , indeed i have found a similar solution for to force what i want but it’s not great if i need to do it at every futur update.
                    I have edit line 157 in /var/www/html/fog/lib/fog/bootmenu.class.php :

                     'exit' => 'exit'     to   'exit' => 'chain tftp://xxx.xxx.xxx.xxx/menu.ipxe'
                    

                    And i change Boot Exit settings in fog
                    0_1522852756258_boot-exit-setting.jpg

                    G 1 Reply Last reply Apr 4, 2018, 3:13 PM Reply Quote 0
                    • G
                      george1421 Moderator @zeltron80
                      last edited by Apr 4, 2018, 3:13 PM

                      @zeltron80 Well you might have to do it that way. I can’t speak for the developers, but you are using FOG not in the way it was intended. So they might say its working as designed.

                      But what you have found is one of the great features of FOSS based software. If you don’t like it you have the control to change it. What I would do is create a diff file of the original to the modified file, then you can reapply your changes by just patching any update with the diff file. You won’t need to hand code anything that way.

                      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
                      • C
                        Cire3 @zeltron80
                        last edited by Apr 17, 2024, 9:52 PM

                        @zeltron80 So what would this look like ? I just simply want another server option in the menu. Is it using your ‘exit’ => ‘exit’ to ‘exit’ => ‘chain tftp://xxx.xxx.xxx.xxx/menu.ipxe’ ?

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

                        180

                        Online

                        12.0k

                        Users

                        17.3k

                        Topics

                        155.2k

                        Posts
                        Copyright © 2012-2024 FOG Project