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

Add a second PXE Boot Option

Scheduled Pinned Locked Moved
General
4
18
7.7k
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.
  • F
    FritzBox360 @george1421
    last edited by Mar 7, 2017, 2:59 PM

    @george1421 you code works fine šŸ˜‰ I added a new menu entry! But now i have still the problem with the different rooms/clients. I will try to check if i can change the GRUB_FIRST_HDD option.

    G 1 Reply Last reply Mar 7, 2017, 4:15 PM Reply Quote 0
    • G
      george1421 Moderator @FritzBox360
      last edited by Mar 7, 2017, 4:15 PM

      @FritzBox360 I’m not sure I understand. If there is nothing for fog to do, it should chain load to your other pxe server. Its not clear where an exit mode would come into play here.

      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!

      F 1 Reply Last reply Mar 8, 2017, 8:47 AM Reply Quote 0
      • F
        FritzBox360 @george1421
        last edited by Mar 8, 2017, 8:47 AM

        @george1421 okay, no problem i will explain šŸ˜‰

        We have here two rooms ( A and B ) on the same subnet with the same DHCP settings.

        Both rooms are managed via one FOG-Server and have a local WIN7 image.

        Now, we would like to use room B for OpenSLX virtualization. Therefore we need another next-server entry via DHCP. But this is not cool because we have to decide between FOG and OpenSLX. As a fact, OpenSLX uses a PXE boot too. So i thought there could be a way to use both.

        Sure, i could add a new image to FOG with boots to OpenSLX but therefore i need to re-image the room all the time if someone needs WIN7.

        I am thinking of managing both rooms via FOG and be able to start OpenSLX individually on a client.

        Thanks to @george1421 i could add an option to the BootMenu. But the problem is, we are not using this menue at the time and it is not individually for the clients.

        For example: Room B has 64 Clients - if i would like to boot into OpenSLX i need to boot manually each client into the FOG BootMenu to start OpenSLX. If i select the ā€œdefaultā€ option as @Wayne-Workman mentioned - all other clients - e.g. room A - would be affected.

        So i was lokking for an option - sth. like a flag " Boot OpenSLX " - for each client and i found the ā€œHost Bios Exit Typeā€ option with is nearly what i need. But i do not need grub, i need sth. like a PXE boot to another IP.

        I am new to the whole PXE Grub boot topic. As @Sebastian-Roth mentioned there is a way to edit the /var/www/html/fog/lib/fog/bootmenu.class.php for ā€œotherā€ grub commands.

        So i am stuck at the point to connect grub to load from another server. I am not sure if booting into grub.exe is a step to far because i did not found a working way to connect grub to pxe. Something like @george1421 mentioned to chainload from another IP would be great. But i am not familar with that topic.

        Would be nice if someone could help here. If there are any kind of questions feel free to ask!

        Thanks a lot!

        G 1 Reply Last reply Mar 8, 2017, 1:35 PM Reply Quote 0
        • G
          george1421 Moderator @FritzBox360
          last edited by Mar 8, 2017, 1:35 PM

          @FritzBox360 said in Add a second PXE Boot Option:

          s a PXE boot too. So i thought there could be a way to use both.

          Thank you for your detailed information. I do see a path forward from here with a few potential failures.

          FOG uses a number of other technologies to allow their magic to work. One of those technologies is from the iPXE project. iPXE gives fog the dynamic pxe boot capabilities. The FOG management code can build the iPXE boot menus and actions dynamically based on what the client should be doing at a specific point in time. While FOG can create iPXE menus dynamically, iPXE can’t directly interact with FOG so there is no way for the iPXE kernel (undionly.kpxe or ipxe.efi) to know what FOG knows about the target computers. The iPXE kernel can only know about what it finds out about via dhcp or what its been told by FOG creating the iPXE menu in a certain way.

          Now to the issue.
          From your post you have 2 rooms of computers. Both rooms (sets) of computers will be managed by FOG. One should boot through to the local hard drive and the second room should booth through to OpenSLX via an iPXE chain command. These computers are on the same subnet. During the iPXE mode, iPXE doesn’t know how to interact with FOG.

          So the question is how can iPXE know which set a pxe booting computer belongs in? Remember we are dealing with computers so intrinsic knowledge is not possible. iPXE only has these commands avaialble: http://ipxe.org/cmd

          The one answer I can think of is by the device’s mac address. You would have to maintain a list of mac addresses that a pxe booting computer would be tested against to identify which group the target computer falls in. If a mac address match is found then the pxe booting computer then could be redirected to OpenSLX.

          <I need to pause here for a while>

          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
          • W
            Wayne Workman @Wayne Workman
            last edited by Wayne Workman Mar 8, 2017, 8:01 AM Mar 8, 2017, 1:58 PM

            @FritzBox360 said in Add a second PXE Boot Option:

            For example: Room B has 64 Clients - if i would like to boot into OpenSLX i need to boot manually each client into the FOG BootMenu to start OpenSLX. If i select the ā€œdefaultā€ option as @Wayne-Workman mentioned - all other clients - e.g. room A - would be affected.

            As I already said:

            @Wayne-Workman said in Add a second PXE Boot Option:

            This would apply to everything though.

            I don’t think FOG is the tool you should be using for this, I think you would do better with syslinux.

            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!
            Daily Clean Installation Results:
            https://fogtesting.fogproject.us/
            FOG Reporting:
            https://fog-external-reporting-results.fogproject.us/

            J 1 Reply Last reply Mar 8, 2017, 4:15 PM Reply Quote 1
            • J
              Junkhacker Developer @Wayne Workman
              last edited by Junkhacker Mar 8, 2017, 10:17 AM Mar 8, 2017, 4:15 PM

              any reason you don’t want to set it for ā€œhide menuā€ and a 1 second timeout?
              your custom default menu item (which will be chosen even if the user doesn’t see it) can have a collection of conditions to test against to only make the relevant hosts boot to the OpenSLX server

              signature:
              Junkhacker
              We are here to help you. If you are unresponsive to our questions, don't expect us to be responsive to yours.

              J 1 Reply Last reply Mar 8, 2017, 4:30 PM Reply Quote 0
              • J
                Junkhacker Developer @Junkhacker
                last edited by Junkhacker Mar 8, 2017, 10:31 AM Mar 8, 2017, 4:30 PM

                @Junkhacker to clarify, your new ā€œdefaultā€ menu item would contain something like this:

                iseq ${serial} <labSerial1> &&  goto chainboot ||
                iseq ${serial} <labSerial2> &&  goto chainboot ||
                goto fog.local
                
                :chainboot
                set net0/next-server <otherPXEbootServerIP> && set filename <whateverFile> && chain 
                tftp://<otherPXEbootServerIP>/<whateverFile> ||
                exit
                

                signature:
                Junkhacker
                We are here to help you. If you are unresponsive to our questions, don't expect us to be responsive to yours.

                G 1 Reply Last reply Mar 8, 2017, 4:52 PM Reply Quote 3
                • G
                  george1421 Moderator @Junkhacker
                  last edited by george1421 Mar 8, 2017, 10:53 AM Mar 8, 2017, 4:52 PM

                  @Junkhacker This is exactly what I was thinking when I had to pause earlier.

                  At the top you will have a major test for hardware inclusuion in this group

                  iseq ${serial} <labSerial1> &&  goto chainboot ||
                  iseq ${serial} <labSerial2> &&  goto chainboot ||
                  ...
                  iseq ${serial} <labSerial64> &&  goto chainboot ||
                  

                  If there isn’t a match then the original (old default) menu is selected.

                  goto fog.local
                  

                  If there is a match then the flow jumps down to the label

                  :chainboot
                  

                  Sets the next server (dhcp option 66) and boot filename (dhcp option 67) to the new values required for OpenSLX and then chain boots (fwiw that should be on one line, its a bit deceiving because of the line wrap, that is all one line) into the new environment.

                  @Junkhacker Simply Brillant!!

                  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!

                  J 1 Reply Last reply Mar 8, 2017, 5:05 PM Reply Quote 3
                  • J
                    Junkhacker Developer @george1421
                    last edited by Mar 8, 2017, 5:05 PM

                    @george1421 yuck, you’re right about the line wrap. it would look better and work just as well to make that:

                    set net0/next-server <otherPXEbootServerIP> 
                    set filename <whateverFile> 
                    chain tftp://<otherPXEbootServerIP>/<whateverFile> ||
                    

                    signature:
                    Junkhacker
                    We are here to help you. If you are unresponsive to our questions, don't expect us to be responsive to yours.

                    1 Reply Last reply Reply Quote 1
                    • F
                      FritzBox360
                      last edited by Mar 9, 2017, 8:37 AM

                      Nice! Thank you @Junkhacker and @george1421

                      I just changed it to work with the clients MAC address and it seems to work like a charm!

                      So now, i have this config:

                      iseq ${net0/mac} XX:XX:XX:XX:XX:XX && goto chainboot ||
                      goto fog.local
                      :chainboot
                      set pxeserver:ipv4 XXX.XX.XXX.XXX
                      set next-server ${pxeserver}
                      chain tftp://${pxeserver}/pxelinux.0
                      exit
                      

                      I will do some testing but i am verry optimistic šŸ˜‰

                      Thanks!

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

                      214

                      Online

                      12.1k

                      Users

                      17.3k

                      Topics

                      155.4k

                      Posts
                      Copyright Ā© 2012-2024 FOG Project