Created
May 5, 2016 09:55
-
-
Save dreamcat4/fe899a9baecb5fed3a3e3749dfd8e61e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user=root | |
# disable dns server | |
port=0 | |
# enable tftp server | |
enable-tftp | |
tftp-root=/pxe | |
# dhcp proxy mode. do not act as the authoratitive dhcp server | |
dhcp-range=192.168.0.1,proxy,255.255.0.0 | |
# send disable multicast and broadcast discovery, and to download the boot file immediately | |
dhcp-option=vendor:PXEClient,6,2b | |
# set tag ENH if request comes from iPXE (iPXE user class) | |
# dhcp-match=set:ENH,175 # alternative way, look for option 175 | |
dhcp-userclass=set:ENH,iPXE | |
#Here, I define netboot types | |
#dhcp-vendorclass=set:BIOS,PXEClient:Arch:00006 | |
#dhcp-vendorclass=set:UEFI,PXEClient:Arch:00007 | |
# when dhcp-range mode=proxy, the filename to download. here the .0 is ommited as it gets auto-added | |
# if request comes from firmware, load iPXE via TFTP | |
#pxe-service=tag:!ENH,tag:BIOS,X86PC, PC-DOS: Chainload Boot - iPXE, undionly.kpxe | |
#pxe-service=tag:!ENH,tag:UEFI,X86-64_EFI, UEFI: Chainload Boot - iPXE, ipxe.efi | |
#pxe-service=tag:!ENH,X86-64_EFI, UEFI: Chainload Boot - iPXE, ipxe.efi | |
pxe-service=tag:!ENH,X86PC, PC-DOS: Chainload Boot - iPXE, undionly.kpxe | |
# if request comes from iPXE, direct it to boot from boot.ipxe | |
# dhcp-boot=tag:ENH,http://192.168.69.69/boot.ipxe | |
#pxe-service=tag:ENH,tag:BIOS,X86PC, PC-DOS: boot.ipxe - iPXE, http://192.168.69.69/boot.ipxe | |
#pxe-service=tag:ENH,tag:UEFI,X86-64_EFI, UEFI: boot-uefi.ipxe - iPXE, http://192.168.69.69/boot-uefi.ipxe | |
#pxe-service=tag:ENH,X86-64_EFI, UEFI: boot-uefi.ipxe - iPXE, http://192.168.69.69/boot-uefi.ipxe | |
pxe-service=tag:ENH,X86PC, PC-DOS: boot.ipxe - iPXE, http://192.168.69.69/boot.ipxe | |
# optional settings | |
# move boot server and filename information out of dedicated fields into DHCP options. | |
# makes extra space in the DHCP packet for other options but can confuse old / broken clients | |
#dhcp-no-override | |
# secure: only serve files owned by the dnsmasq user (root) | |
#tftp-secure | |
# enable logging | |
log-queries | |
log-dhcp | |
I'm not sure here. dont know. but at the time uefi had only just started
working in ipxe. and it had some issues. so one thing you could do is try
CSM mode if the client supports it. then you
would be able to identify if its an issue with uefi.
but what it really sounds like some sort of a network or client related
issue maube? because if you are not seeing any files downloaded in the
logs. if the file isnt downloaded it cant run on the client. so that then
should be the next thing to focus on. there are a number of things to check
and examine here. both on client and server side.
so whille you should check these manually first. if then you run out of
things to check blindly and stilll not working. then it may call for a tool
like wireshark to check whether the problem is in the client or server. or
elsewhere on network if the request is not being forwarded / proxied from
you other real dhcp server. etc. or if the client is sending the right
packets in the first place. so with wireshark or other network based
logging method you can at least know where to focus next. and not that all
uefi clients necessarily behaves themselves as you would hope for either
frankly
sorry that i cannot help you further with those specific debugging steps.
but it is also a very long time ago since the last time i looked at this
pxe booting myself here on my own setup. so my recollection is a bit vague
around what my own resolution was at the time. but maybe it turned out to
be something simple like the file permissions for the download or other
simpler misconfiguration matters. but i really cannot remember at this point
however be sure to also join the dnsmasq discuss mailinglist. and search
its previous message archives. because those are also really very helpful
source of information. along with ipxe mailinglist too
hope it works out for you!
good day
…On Mon, Sep 27, 2021 at 1:13 AM Julio César Rocha ***@***.***> wrote:
***@***.**** commented on this gist.
------------------------------
Hi. I'm trying to get this to work in the following setting:
- Linux server working as both DHCP, TFTP and HTTP servers using the
same local address (192.168.143.1).
- Contents of boot-uefi.ipxe are:
#!ipxe
shell
- TFTP root contains ipxe.efi.
- HTTP root contains boot-uefi.ipxe.
- Client machine using UEFI, *Secure Boot off*, x64.
I copied most of your script with minimum modifications (omitting general
config, which works fine for booting EFI loaders directly, including
ipxe.efi via TFTP).
dhcp-option=vendor:PXEClient,6,2b
# dhcp-match=set:ENH,175 # alternative way, look for option 175
dhcp-userclass=set:ENH,iPXE
#Here, I define netboot types
#dhcp-vendorclass=set:UEFI,PXEClient:Arch:00007
# if request comes from firmware, load iPXE via TFTP
#pxe-service=tag:!ENH,tag:UEFI,X86-64_EFI, UEFI: Chainload Boot - iPXE, ipxe.efi
## non-vendor-tagged
pxe-service=tag:!ENH,X86-64_EFI, UEFI: Chainload Boot - iPXE, ipxe.efi
# if request comes from iPXE, direct it to boot from boot.ipxe
# dhcp-boot=tag:ENH,http://192.168.143.1:2004/boot-uefi.ipxe
#pxe-service=tag:ENH,tag:BIOS,X86PC <http://192.168.143.1:2004/boot-uefi.ipxe#pxe-service=tag:ENH,tag:BIOS,X86PC>, PC-DOS: boot.ipxe - iPXE, http://192.168.143.1:2004/boot.ipxe
#pxe-service=tag:ENH,tag:UEFI,X86-64_EFI <http://192.168.143.1:2004/boot.ipxe#pxe-service=tag:ENH,tag:UEFI,X86-64_EFI>, UEFI: boot-uefi.ipxe - iPXE, http://192.168.143.1:2004/boot-uefi.ipxe
## non-vendor-tagged
pxe-service=tag:ENH,X86-64_EFI, UEFI: boot-uefi.ipxe - iPXE, http://192.168.143.1:2004/boot-uefi.ipxe
As is, the client complains about not finding an operating system. Dnsmasq
doesn't log anything.
Tried the following modifications:
- Commenting out dhcp-option=vendor:PXEClient,6,2b.
- The client fails to find an OS again. Dnsmasq logs the following:
dnsmasq-dhcp: 848456621 available DHCP range: 192.168.143.3 -- 192.168.143.200
dnsmasq-dhcp: 848456621 vendor class: PXEClient:Arch:00007:UNDI:003000
dnsmasq-dhcp: 848456621 available DHCP range: 192.168.143.3 -- 192.168.143.200
dnsmasq-dhcp: 848456621 vendor class: PXEClient:Arch:00007:UNDI:003000
dnsmasq-dhcp: 848456621 available DHCP range: 192.168.143.3 -- 192.168.143.200
dnsmasq-dhcp: 848456621 vendor class: PXEClient:Arch:00007:UNDI:003000
dnsmasq-dhcp: 848456621 available DHCP range: 192.168.143.3 -- 192.168.143.200
dnsmasq-dhcp: 848456621 vendor class: PXEClient:Arch:00007:UNDI:003000
- Additionally, using the "alternate" method to set ENT instead of
dhp-userclass.
dhcp-match=set:ENH,175 # alternative way, look for option 175
- Same result as before.
- Additionally, uncommenting the following line:
dhcp-boot=tag:ENH,http://192.168.143.1:2004/boot-uefi.ipxe
- Same result.
Anything I may be missing?
Again, the rest of the config is also minimal and seems to play well with
booting any EFI loader directly from TFTP.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<https://gist.github.com/fe899a9baecb5fed3a3e3749dfd8e61e#gistcomment-3905900>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAPMYTZZEQOYXYYZBJTT43UD6ZLNANCNFSM5EZKZVLQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
I'm not sure here...
Understood. Thanks for your reply.
TFTP directory /tftpboot inaccessible: Permission denied <- I cannot solve this.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi. I'm trying to get this to work in the following setting:
192.168.143.1
).boot-uefi.ipxe
are:ipxe.efi
.boot-uefi.ipxe
.I copied most of your script with minimum modifications (omitting general config, which works fine for booting EFI loaders directly, including ipxe.efi via TFTP).
As is, the client complains about not finding an operating system. Dnsmasq doesn't log anything.
Tried the following modifications:
dhcp-option=vendor:PXEClient,6,2b
.ENT
instead ofdhp-userclass
.Anything I may be missing?
Again, the rest of the config is also minimal and seems to play well with booting any EFI loader directly from TFTP.