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

    Configuring dnsmasq with UEFI for PXE.

    Scheduled Pinned Locked Moved
    General
    3
    16
    5.6k
    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.
    • KnightRavenK
      KnightRaven
      last edited by

      Configuring dnsmasq with UEFI for PXE.

      Using dnsmasq 2.76 and Fog rc 36.

      @george1421

      What else needs to be done to ltsp.conf?

      0_1481839142688_ltsp.conf

      Thanks!
      Jason

      A wise man knows he can always grow wiser.

      99 little bugs in the code, 99 little bugs
      Fix one bug, save it again…
      101 little bugs in the code

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

        @KnightRaven
        I would start with this config file. Replace 192.168.112.24 with the IP address of your FOG server

        # Don't function as a DNS server:
        port=0
        
        # Log lots of extra information about DHCP transactions.
        log-dhcp
        
        # Set the root directory for files available via FTP.
        tftp-root=/tftpboot
        
        # The boot filename, Server name, Server Ip Address
        # dhcp-boot=undionly.kpxe,,192.168.112.24
        
        # Disable re-use of the DHCP servername and filename fields as extra
        # option space. That's to avoid confusing some old or broken DHCP clients.
        # dhcp-no-override
        
        dhcp-vendorclass=BIOS,PXEClient:Arch:00000
        dhcp-vendorclass=UEFI32,PXEClient:Arch:00006
        dhcp-vendorclass=UEFI,PXEClient:Arch:00007
        dhcp-vendorclass=UEFI64,PXEClient:Arch:00009
        
        dhcp-boot=net:UEFI32,i386-efi/ipxe.efi,,192.168.112.24
        dhcp-boot=net:UEFI,ipxe.efi,,192.168.112.24
        dhcp-boot=net:UEFI64,ipxe.efi,,192.168.112.24
        dhcp-boot=net:BIOS,undionly.kpxe,,192.168.112.24
        
        # PXE menu.  The first part is the text displayed to the user.  The second is the timeout, in seconds.
        pxe-prompt="Press F8 for boot menu", 1
        
        # The known types are x86PC, PC98, IA64_EFI, Alpha, Arc_x86,
        # Intel_Lean_Client, IA32_EFI, BC_EFI, Xscale_EFI and X86-64_EFI
        # This option is first and will be the default if there is no input from the user.
        # PXEClient:Arch:00000
        pxe-service=X86PC, "Boot BIOS PXE", undionly.kpxe
        # PXEClient:Arch:00007
        pxe-service=BC_EFI, "Boot UEFI PXE-BC", ipxe.efi
        # PXEClient:Arch:00009
        pxe-service=X86-64_EFI, "Boot UEFI PXE-64", ipxe.efi
        
        dhcp-range=192.168.112.24,proxy
        

        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!

        george1421G KnightRavenK 2 Replies Last reply Reply Quote 0
        • george1421G
          george1421 Moderator @george1421
          last edited by

          @george1421 This document explains what is going on in the config file: https://forums.fogproject.org/topic/8726/advanced-dnsmasq-techniques

          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
          • KnightRavenK
            KnightRaven @george1421
            last edited by

            @george1421
            Awesome, looks like I needed to finish adding vendor info as well as add boot info.

            Will give that a shot before I get out.

            A wise man knows he can always grow wiser.

            99 little bugs in the code, 99 little bugs
            Fix one bug, save it again…
            101 little bugs in the code

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

              @KnightRaven Right the vendor class is used to identify what the client is, then set the flag to indicate to the dhcp-boot what boot file to send. You need both parts. You have extra stuff set in your config file that should be disabled. That is why I recommended to start with my config file. Just move your config file to a safe location if you need to reference it.

              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!

              KnightRavenK 1 Reply Last reply Reply Quote 0
              • KnightRavenK
                KnightRaven @george1421
                last edited by

                @george1421
                Well So far it’s not working. I’m sure I’m missing something but its getting too late. I might can try again tomorrow.

                I even tried making a new ltsp.conf file with just your info.

                Actually its still picking up the old… I have restarted dnsmasq several times. Legacy is still booting with the old prompt text. Actually appears to be combining somehow. Ugh.

                that’s weird. I’ll have to look tomorrow.

                Thanks for your time. Y’all are always a big help.

                Jason Bradley

                A wise man knows he can always grow wiser.

                99 little bugs in the code, 99 little bugs
                Fix one bug, save it again…
                101 little bugs in the code

                Tom ElliottT 1 Reply Last reply Reply Quote 0
                • Tom ElliottT
                  Tom Elliott @KnightRaven
                  last edited by

                  @KnightRaven After making the changes to the ltsp.conf file, are you restarting the dnsmasq service?

                  Making the changes is the “first” part, but the configuration is loaded when the service starts. Any additional changes you make will not take effect until after the service is restarted.

                  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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                  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

                  KnightRavenK 1 Reply Last reply Reply Quote 0
                  • KnightRavenK
                    KnightRaven @Tom Elliott
                    last edited by

                    @Tom-Elliott
                    Alrighty, a new day, another dollar, and fresh eyes.
                    Yes I have been restarting dnsmasq. Didn’t realize it would use any ltsp file(maybe any file?) in that folder. And so was getting combined info/options. Still wasn’t working for UEFI in proxy mode when I left.
                    At another location that I will try working on and see what happens now that I know not to leave copies in the dnsmasq.d folder.

                    A wise man knows he can always grow wiser.

                    99 little bugs in the code, 99 little bugs
                    Fix one bug, save it again…
                    101 little bugs in the code

                    Tom ElliottT 1 Reply Last reply Reply Quote 0
                    • Tom ElliottT
                      Tom Elliott @KnightRaven
                      last edited by

                      @KnightRaven DNSMasq will use any file within the directory.

                      So simply copying and maintaining “Backup” files in the directory will not suffice, unfortunately.

                      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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                      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
                      • george1421G
                        george1421 Moderator
                        last edited by

                        Once you get dnsmasq setup and pulling the correct file, and IF it doesn’t work we’ll need to grab a quick pcap file of the dhcp / pxe booting process. The answer will be in the pcap. But lets not go there unless we need to. But the answer is pretty close once you get dnsmasq pulling the proper file.

                        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!

                        KnightRavenK 1 Reply Last reply Reply Quote 0
                        • KnightRavenK
                          KnightRaven @george1421
                          last edited by

                          @george1421
                          OK, so far it boots legacy and boots UEFI in DHCP(non proxy) mode only. When I leave dnsmasq in proxy mode PXE does not receive anything(no menu) and will just time out to pressing F* key options to reboot.

                          I tried doing a tcpdump. But not sure what to look for myself. I did see where it was trying to offer the ipxe.efi file. Perhaps you have a way to narrow the results?

                          A wise man knows he can always grow wiser.

                          99 little bugs in the code, 99 little bugs
                          Fix one bug, save it again…
                          101 little bugs in the code

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

                            If your fog server, target system, and dhcp server on the same subnet? If so lets capture a log of the pxe booting process.

                            1. install tcpdump on your fog server.
                            2. Launch tcpdump with the following command sudo tcpdump -w output.pcap port 67 or port 68 or port 69 or port 4011
                            3. pxe boot your target computer until you get the errir
                            4. press ctrl-c on the console to stop the tcpdump program
                            5. you can review it with wireshark or post it here and we will review it.

                            We really need to see what is going down the network wire during dhcp booting.

                            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!

                            KnightRavenK 3 Replies Last reply Reply Quote 0
                            • KnightRavenK
                              KnightRaven @george1421
                              last edited by

                              @george1421
                              Our true DHCP server is not on same subnet(it’s located in a whole other building). However my Fog server that also runs dnsmasq as proxy and the test laptop is on the same local switch.
                              Here is the output…
                              0_1481909299445_output.pcap

                              A wise man knows he can always grow wiser.

                              99 little bugs in the code, 99 little bugs
                              Fix one bug, save it again…
                              101 little bugs in the code

                              1 Reply Last reply Reply Quote 0
                              • KnightRavenK
                                KnightRaven @george1421
                                last edited by

                                @george1421
                                here is the ltsp again…
                                0_1481911611868_ltsp.conf

                                A wise man knows he can always grow wiser.

                                99 little bugs in the code, 99 little bugs
                                Fix one bug, save it again…
                                101 little bugs in the code

                                1 Reply Last reply Reply Quote 0
                                • KnightRavenK
                                  KnightRaven @george1421
                                  last edited by

                                  @george1421
                                  OK another pcap AND the ltsp just in case.

                                  1_1481923279812_output4.pcap 0_1481923279811_ltsp.conf

                                  A wise man knows he can always grow wiser.

                                  99 little bugs in the code, 99 little bugs
                                  Fix one bug, save it again…
                                  101 little bugs in the code

                                  Tom ElliottT 1 Reply Last reply Reply Quote 0
                                  • Tom ElliottT
                                    Tom Elliott @KnightRaven
                                    last edited by

                                    @KnightRaven What if you uncomment the “dhcp-no-override” and restart?

                                    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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

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

                                    201

                                    Online

                                    12.0k

                                    Users

                                    17.3k

                                    Topics

                                    155.2k

                                    Posts
                                    Copyright © 2012-2024 FOG Project