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

    DNSMasq Help for iPXE stuff

    Scheduled Pinned Locked Moved
    General
    3
    18
    13.0k
    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.
    • JunkhackerJ
      Junkhacker Developer
      last edited by

      a quick search of the ipxe org website says that DNSMasq needs special configuration to work directly with ipxe. have you tried the advice on this thread? [url]http://forum.ipxe[/url] .org/showthread.php?tid=6077

      1 Reply Last reply Reply Quote 0
      • Jaymes DriverJ
        Jaymes Driver Developer
        last edited by

        Yes, that is the guide I am working off of.

        Also taking information from:
        [url]http://etherboot.org/wiki/pxechaining[/url]
        [url]http://www.richud.com/wiki/Network_iPXE_dnsmasq_Examples_PXE_BOOT[/url]

        1 Reply Last reply Reply Quote 0
        • JunkhackerJ
          Junkhacker Developer
          last edited by

          i don’t have any experience with DNSMasq but i’ll help with what i can. when you tried chainloading from pxelinux.0, what ipxe file did you direct it to. ipxe.krn or undionly.kpxe?

          1 Reply Last reply Reply Quote 0
          • Jaymes DriverJ
            Jaymes Driver Developer
            last edited by

            I’ve tried both. I’ve been focusing on undionly.kpxe, should I not be?

            After supplying either one I just sit at “boot:”

            1 Reply Last reply Reply Quote 0
            • JunkhackerJ
              Junkhacker Developer
              last edited by

              well, i know that i’ve had chainloading working from pxelinux.0 with the ipxe.krn one with the following in the pxelinux.cfg/default file
              [CODE]DEFAULT vesamenu.c32
              LABEL fog
              MENU DEFAULT
              kernel ipxe.krn dhcp && chain http://(fog-server-ip-address)/fog/service/ipxe/boot.php?mac=${net0/mac}
              PROMPT 0
              TIMEOUT 01
              [/CODE]

              1 Reply Last reply Reply Quote 0
              • Jaymes DriverJ
                Jaymes Driver Developer
                last edited by

                THANK YOU FOR THE HELP!!! THAT DID IT!!! It had to be the ipxe.krn in the default file that was where I kept getting stuck! I kept using the undionly.kpxe

                So for reference this is how I set it up.

                Installed DNSMasq and used the settings recommended in the wiki. I edited some of the information, but I left it to boot pxelinux.0. I added the line dhcp-authoritative to the bottom of the ltsp.conf and saved the file. I will post my set up at the end of my write up.

                I then renamed the pxelinux.0.old in the /tftpboot folder to pxelinux.0
                [code]
                sudo mv /tftpboot/pxelinux.0.old /tftpboot/pxelinux.0
                [/code]

                Now I created a /pxelinux.cfg/default.

                [code]
                cd tftpboot
                sudo mkdir /pxelinux.cfg
                cd pxelinux.cfg
                sudo gedit default
                [/code]

                I used Junkhackers recommendation on the default file information substituting my ip address for the fog server:

                [code]
                DEFAULT vesamenu.c32
                LABEL fog
                MENU DEFAULT
                kernel ipxe.krn dhcp && chain http://(fog-server-ip-address)/fog/service/ipxe/boot.php?mac=${net0/mac}
                PROMPT 0
                TIMEOUT 01
                [/code]

                Then test!

                as promised my ltsp.conf

                [code]

                port=0
                log-dhcp
                tftp-root=/tftpboot

                dhcp-boot=/tftpboot/pxelinux.0

                dhcp-option=17,/images

                dhcp-option=vendor:PXEClient,6,2b

                dhcp-no-override

                pxe-prompt=“Press F8 for boot menu”, 0

                pxe-service=X86PC, “Boot from network”, pxelinux

                dhcp-range=10.6.10.1,proxy
                dhcp-authoritative

                [/code]

                1 Reply Last reply Reply Quote 0
                • JunkhackerJ
                  Junkhacker Developer
                  last edited by

                  the undionly.kpxe is made to automatically look for the file default.ipxe in the same directory as itself. for some reason i don’t think it could find it, and that’s why it wasn’t working for you.

                  1 Reply Last reply Reply Quote 0
                  • Jaymes DriverJ
                    Jaymes Driver Developer
                    last edited by

                    This post is deleted!
                    1 Reply Last reply Reply Quote 0
                    • JunkhackerJ
                      Junkhacker Developer
                      last edited by

                      This post is deleted!
                      1 Reply Last reply Reply Quote 0
                      • Jaymes DriverJ
                        Jaymes Driver Developer
                        last edited by

                        Tom has informed me that the undionly.kpxe file IS the pxelinux.0 file. So with that being said, we don’t have to rename the pxelinux file and we can use undionly.kpxe in place. I will test and verify/update wiki when I have confirmed this.

                        Thanks for that Tom, I have adjusted my statement as not to confuse anyone.

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

                          I think the phrasing is backwards, but same kind of thing.

                          The undionly.kpxe file IS, for all intents and purposes, the pxelinux.0 file.

                          So change your Option 67 line to point to undionly.kpxe rather than pxelinux.0.

                          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
                          • Jaymes DriverJ
                            Jaymes Driver Developer
                            last edited by

                            [S]Not that I doubted you, but I gave this a go with the undionly.kpxe in place of pxelinux.0 and it went off without a hitch![/S]

                            [S]Thanks for your insight Tom![/S]

                            See next post

                            1 Reply Last reply Reply Quote 0
                            • Jaymes DriverJ
                              Jaymes Driver Developer
                              last edited by

                              bad news everyone… what I thought was working, is not.

                              It turns out the pxelinux.0 file was still hanging around and that has been what I have been chainloading and booting from, not the undionly.kpxe.

                              Because I use ip-helpers I am not sure if they are causing an issue or not.

                              So I still need help in adjusting the settings, ideas on things to tweak in order to get my network booting the correct pxe file.

                              I have removed the pxelinux.0 file and now regardless of what I supply in the dnsmasq ltsp.conf file I always receive the PXE-T01 error file not found.

                              any attempts to collect the file with a tftp get command will complete successfully.

                              1 Reply Last reply Reply Quote 0
                              • Jaymes DriverJ
                                Jaymes Driver Developer
                                last edited by

                                there has been partial success.

                                I found that, for whatever reason, when we use the call line
                                [code]
                                pxe-service=X86PC, “Boot from network”, undionly.kpxe
                                [/code]

                                the tftpboot server is actually looking for /tftpboot/unionly.kpxe.0

                                It is adding a .0 to the end of the file by default. That is fine, I can work with that.

                                When I make adjustments for the new file (unidonly.0) I can boot the ipxe system yay ipxe boots, but I never get my pxe menu loaded. It stops short after finding the mac information, see attatched screenshot.

                                I have even tried to slim down the default.ipxe to only include enough information to boot (no paramaters and what not) and it STILL fails after the mac.

                                Does anyone have a stronger grasp of what is going on?

                                [url=“/_imported_xf_attachments/0/656_error.jpg?:”]error.jpg[/url]

                                1 Reply Last reply Reply Quote 0
                                • JunkhackerJ
                                  Junkhacker Developer
                                  last edited by

                                  i found a tutorial for ipxe with DNSMasq [url]http://www.heath-bar.com/blog/?p=326[/url]
                                  looks like it could give you some ideas on what’s wrong

                                  1 Reply Last reply Reply Quote 0
                                  • Jaymes DriverJ
                                    Jaymes Driver Developer
                                    last edited by

                                    Thanks junhacker, that helped a bit more. Tom and I hit our heads together for a few days but we finally figured it out, what we have now is a REAL working use of dnsmasq with the undionly.kpxe boot file and using the boot.php as Tom has intended. This is very basic and gets the pxe boot menu working. BUT the important thing is it uses the real files and not faking it like before.

                                    This thing is very temperamental, so as you add options it may break!

                                    Here is a working set up
                                    [code]

                                    Don’t function as a DNS server:

                                    port=0

                                    Log lots of extra information about DHCP transactions.

                                    log-dhcp

                                    Dnsmasq can also function as a TFTP server. You may uninstall

                                    tftpd-hpa if you like, and uncomment the next line:

                                    enable-tftp

                                    Set the root directory for files available via FTP.

                                    tftp-root=/tftpboot

                                    The boot filename, Server name, Server Ip Address

                                    dhcp-boot=undionly.kpxe,x.x.x.x

                                    rootpath option, for NFS

                                    #dhcp-option=17,/images

                                    kill multicast

                                    #dhcp-option=vendor:PXEClient,6,2b

                                    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

                                    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”, 3

                                    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.

                                    #pxe-service=X86PC, “Boot from network”, pxelinux

                                    A boot service type of 0 is special, and will abort the

                                    net boot procedure and continue booting from local media.

                                    #pxe-service=X86PC, “Boot from local hard disk”, 0

                                    If an integer boot service type, rather than a basename is given, then the

                                    PXE client will search for a suitable boot service for that type on the

                                    network. This search may be done by multicast or broadcast, or direct to a

                                    server if its IP address is provided.

                                    pxe-service=x86PC, “Install windows from RIS server”, 1

                                    This range(s) is for the public interface, where dnsmasq functions

                                    as a proxy DHCP server providing boot information but no IP leases.

                                    Any ip in the subnet will do, so you may just put your server NIC ip here.

                                    Since dnsmasq is not providing true DHCP services, you do not want it

                                    handing out IP addresses. Just put your servers IP address for the interface

                                    that is connected to the network on which the FOG clients exist.

                                    If this setting is incorrect, the dnsmasq may not start, rendering

                                    your proxyDHCP ineffective.

                                    dhcp-range=10.0.0.10,proxy

                                    This range(s) is for the private network on 2-NIC servers,

                                    where dnsmasq functions as a normal DHCP server, providing IP leases.

                                    dhcp-range=192.168.0.20,192.168.0.250,8h

                                    For static client IPs, and only for the private subnets,

                                    you may put entries like this:

                                    dhcp-host=00:20:e0:3b:13:af,10.160.31.111,client111,infinite

                                    [/code]

                                    This boots straight to the pxe menu, if you want to add boot options, you figure it out 😛

                                    1 Reply Last reply Reply Quote 0
                                    • Jaymes DriverJ
                                      Jaymes Driver Developer
                                      last edited by

                                      in order to use the boot commands, you need to symlink undionly.kpxe to undionly.0 because of the appending .0 but then you can issue commands as normal, it seems after we got the dhcp-boot line correct the commands work again.

                                      symlink undionly
                                      [code]
                                      cd /tftpboot
                                      sudo ln -s undionly.kpxe undionly.0
                                      [/code]

                                      enable the boot lines
                                      [code]
                                      pxe-prompt=“Press F8 for boot menu”, 3

                                      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.

                                      pxe-service=X86PC, “Boot from network”, undionly
                                      [/code]

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

                                      176

                                      Online

                                      12.0k

                                      Users

                                      17.3k

                                      Topics

                                      155.2k

                                      Posts
                                      Copyright © 2012-2024 FOG Project