SOLVED Windows 10 UEFI PC opens from fog server but boots into Windows instead PXE

  • Senior Developer

    @hariskar Thanks a lot for the PCAP file!!! I knew that dnsmasq is not very flexible but unfortunately this is another example. The matches and options do work but still dnsmasq is sending 192.168.1.1 in the DHCP header next-server field (so option 67 is pointing to 192.168.1.5 but next-server field is pointing to 192.168.1.1). Turns out that I only tested the dnsmasq config when running it on the same host where the TFTP server is running as well… So I didn’t notice.

    But it seams to work with ‘dhcp-boot’ option as well - at least when I just tested here on my debian machine (only tested BIOS and 64 bit UEFI so far). Maybe this depends on dnsmasq version and does not work for others. So please give it a try:

    dhcp-match=set:bios,60,PXEClient:Arch:00000
    dhcp-boot=tag:bios,undionly.kpxe,192.168.1.5,192.168.1.5
    
    dhcp-match=set:efi32,60,PXEClient:Arch:00006
    dhcp-boot=tag:efi32,i386-efi/ipxe.efi,192.168.1.5,192.168.1.5
    
    dhcp-match=set:efibc,60,PXEClient:Arch:00007
    dhcp-boot=tag:efibc,ipxe.efi,192.168.1.5,192.168.1.5
    
    dhcp-match=set:efi64,60,PXEClient:Arch:00009
    dhcp-boot=tag:efi64,ipxe.efi,192.168.1.5,192.168.1.5
    

    I am pretty sure I tested the ‘dhcp-boot’ option back when I added it to the wiki article. Either it didn’t work or I didn’t like it for some reason. Can’t remember. Please let us know if this is working for you and I will add this to the wiki!


  • I hope that this helps:

    Microsoft Windows [Version 10.0.10586]
    (c) 2015 Microsoft Corporation. Με επιφύλαξη κάθε νόμιμου δικαιώματος.
    
    C:\Users\hk>tftp -i 192.168.1.5 get ipxe.efi
    Transfer successful: 934816 bytes in 1 second(s), 934816 bytes/s
    
    C:\Users\hk>tftp -i 192.168.1.5 get i386-efi/ipxe.efi
    Transfer successful: 852160 bytes in 1 second(s), 852160 bytes/s
    
    hk@debian-server:~$ ls -al /tftpboot/ipxe.efi /tftpboot/i386-efi/ipxe.efi
    
    -rw-r--r-- 1 fog root 852160 Mar 27 17:05 /tftpboot/i386-efi/ipxe.efi
    
    -rw-r--r-- 1 fog root 934816 Mar 27 17:05 /tftpboot/ipxe.efi
    

    0_1459164590543_tftp_issue.pcap

  • Senior Developer

    @hariskar I think you need to get a packet dump of this so we really know what’s going on. Up to now this was just a lot of guessing which seams to lead nowhere!

    Please have you dnsmasq setup with the 12 lines as suggested. Check to see if the ipxe UEFI binaries are in place. On the FOG server: ls -al /tftpboot/ipxe.efi /tftpboot/i386-efi/ipxe.efi and as well try loading those from your windows client: tftp -i 192.168.1.5 get ipxe.efi and tftp -i 192.168.1.5 get i386-efi/ipxe.efi.
    If this all seams fine please install and run tcpdump on your FOG server sudo apt-get install tcpdump && sudo tcpdump -i eth0 -w tftp_issue.pcap udp (leave that command waiting, start up your client till you see the timeout, then stop tcpdmp with Ctrl+c and upload the tftp_issue.pcap file to the forum so we can have a look)


  • @Sebastian-Roth said:

    @hariskar Ahhh, now I see. Your client seams to be a 32 bit machine. But your 32 bit ipxe.efi binary is missing!

    cd /tftpboot
    sudo mkdir i386-efi
    sudo wget -O i386-efi/ipxe.efi "https://github.com/FOGProject/fogproject/blob/dev-branch/packages/tftp/i386-efi/ipxe.efi?raw=true"
    sudo chown fog i386-efi
    

    Then try booting the win10 UEFI client again and see if it works. The missing 32 bit UEFI binary is something Tom and I fixed in the installer just a few days ago. So if you update to the latest version this would be fixed as well. But with the above mentioned commands you can do this yourself very easily.

    I made a clean installation of latest trunk.
    Again the same:
    With:

    dhcp-match=set:bios,60,PXEClient:Arch:00000
    dhcp-option-force=tag:bios,66,192.168.1.5
    dhcp-option-force=tag:bios,67,"undionly.kpxe"
    
    dhcp-match=set:efi32,60,PXEClient:Arch:00006
    dhcp-option-force=tag:efi32,66,192.168.1.5
    dhcp-option-force=tag:efi32,67,"i386-efi/ipxe.efi"
    
    dhcp-match=set:efibc,60,PXEClient:Arch:00007
    dhcp-option-force=tag:efibc,66,192.168.1.5
    dhcp-option-force=tag:efibc,67,"ipxe.efi"
    
    dhcp-match=set:efi64,60,PXEClient:Arch:00009
    dhcp-option-force=tag:efi64,66,192.168.1.5
    dhcp-option-force=tag:efi64,67,"ipxe.efi"
    
    Checking Media Presence
    Media present
    Starting PXE over IPv4
    Station IP address is 192.168.1.2
    Server IP address is 192.168.1.1
    NBP filename is ipxe.efi
    NBP filesize is 0 Bytes
    PXE-E99: Unexpected network error.
    

  • I will try it.

    Also my Windows 10 are 64bit.

    What about

    PXE-E32 TFTP open timeout
    

    in the BIOS windows xp PC? It started when I put the 12 lines in DNSMasq.
    With

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

    it was OK.
    Maybe there is a connection between the 2 issues of the 2 PCs?

    Thank you!

  • Senior Developer

    @hariskar Ahhh, now I see. Your client seams to be a 32 bit machine. But your 32 bit ipxe.efi binary is missing!

    cd /tftpboot
    sudo mkdir i386-efi
    sudo wget -O i386-efi/ipxe.efi "https://github.com/FOGProject/fogproject/blob/dev-branch/packages/tftp/i386-efi/ipxe.efi?raw=true"
    sudo chown fog i386-efi
    

    Then try booting the win10 UEFI client again and see if it works. The missing 32 bit UEFI binary is something Tom and I fixed in the installer just a few days ago. So if you update to the latest version this would be fixed as well. But with the above mentioned commands you can do this yourself very easily.


  • In my previous post I made the attempt to get undionly.kpxe from fog server. Here is the correct attempt:

    C:\Users\hk>tftp -i 192.168.1.5 get undionly.kpxe
    Transfer successful: 92104 bytes in 1 second(s), 92104 bytes/s
    
    C:\Users\hk>
    
    tftp -v 192.168.1.5 -m binary -c get ipxe.efi
    

    How can I do it from windows console?

    hk@debian-server:~$ ls -al /tftpboot
    total 4868
    drwxr-xr-x  3 fog  root   4096 Mar 21 12:04 .
    drwxr-xr-x 25 root root   4096 Mar 21 12:04 ..
    -rw-r--r--  1 fog  root    840 Mar 21 12:04 boot.txt
    -rw-r--r--  1 root root    426 Mar 21 12:04 default.ipxe
    -rw-r--r--  1 fog  root 199104 Mar 21 12:04 intel.efi
    -rw-r--r--  1 fog  root  92505 Mar 21 12:04 intel.kkpxe
    -rw-r--r--  1 fog  root  92553 Mar 21 12:04 intel.kpxe
    -rw-r--r--  1 fog  root  92510 Mar 21 12:04 intel.pxe
    -rw-r--r--  1 fog  root 913472 Mar 21 12:04 ipxe.efi
    -rw-r--r--  1 fog  root 849920 Mar 21 12:04 ipxe.iso
    -rw-r--r--  1 fog  root 328877 Mar 21 12:04 ipxe.kkpxe
    -rw-r--r--  1 fog  root 328925 Mar 21 12:04 ipxe.kpxe
    -rw-r--r--  1 fog  root 328396 Mar 21 12:04 ipxe.krn
    -rw-r--r--  1 fog  root 328727 Mar 21 12:04 ipxe.pxe
    -rw-r--r--  1 fog  root 123448 Mar 21 12:04 ldlinux.c32
    -rw-r--r--  1 fog  root 187820 Mar 21 12:04 libcom32.c32
    -rw-r--r--  1 fog  root  26468 Mar 21 12:04 libutil.c32
    -rw-r--r--  1 fog  root  26140 Mar 21 12:04 memdisk
    -rw-r--r--  1 fog  root  29208 Mar 21 12:04 menu.c32
    drwxr-xr-x  2 fog  root   4096 Mar 21 12:04 pxelinux
    -rw-r--r--  1 fog  root  43186 Mar 21 12:04 pxelinux.0
    -rw-r--r--  1 fog  root  43210 Mar 21 12:04 pxelinux.0.old
    -rw-r--r--  1 fog  root 198656 Mar 21 12:04 realtek.efi
    -rw-r--r--  1 fog  root  93324 Mar 21 12:04 realtek.kkpxe
    -rw-r--r--  1 fog  root  93372 Mar 21 12:04 realtek.kpxe
    -rw-r--r--  1 fog  root  93380 Mar 21 12:04 realtek.pxe
    -rw-r--r--  1 fog  root 197920 Mar 21 12:04 snp.efi
    -rw-r--r--  1 fog  root 198112 Mar 21 12:04 snponly.efi
    -rw-r--r--  1 fog  root  92056 Mar 21 12:04 undionly.kkpxe
    -rw-r--r--  1 fog  root  92104 Mar 21 12:04 undionly.kpxe
    -rw-r--r--  1 fog  root  92174 Mar 21 12:04 undionly.pxe
    -rw-r--r--  1 fog  root  29728 Mar 21 12:04 vesamenu.c32
    

    Thank you!!

  • Senior Developer

    @hariskar Have you tried the file ‘ipxe.efi’ via the command line client as well ???
    I just updated the wiki page to use binary mode instead of netascii:

    tftp -v 192.168.1.5 -m binary -c get ipxe.efi
    

    Have all the iPXE binaries been properly installed? Check with ls -al /tftpboot on the FOG server!


  • tftp -v 192.168.1.5 -c get undionly.kpxe
    Connected to 192.168.1.5 (192.168.1.5), port 69
    getting from 192.168.1.5:undionly.kpxe to undionly.kpxe [netascii]
    Received 92825 bytes in 0.1 seconds [13246522 bit/s]
    

    Also in /tftpboot ipxe.efi Size 892.1KB (913,472Bytes)

  • Senior Developer

    @hariskar said:

    NBP filesize is 0 Bytes
    

    Why is filesize zero?? Please try to download the file via TFTP by hand: https://wiki.fogproject.org/wiki/index.php/Troubleshoot_TFTP#Testing_TFTP


  • With:

    dhcp-match=set:bios,60,PXEClient:Arch:00000
    dhcp-option-force=tag:bios,66,192.168.1.5
    dhcp-option-force=tag:bios,67,"undionly.kpxe"
    
    dhcp-match=set:efi32,60,PXEClient:Arch:00006
    dhcp-option-force=tag:efi32,66,192.168.1.5
    dhcp-option-force=tag:efi32,67,"i386-efi/ipxe.efi"
    
    dhcp-match=set:efibc,60,PXEClient:Arch:00007
    dhcp-option-force=tag:efibc,66,192.168.1.5
    dhcp-option-force=tag:efibc,67,"ipxe.efi"
    
    dhcp-match=set:efi64,60,PXEClient:Arch:00009
    dhcp-option-force=tag:efi64,66,192.168.1.5
    dhcp-option-force=tag:efi64,67,"ipxe.efi"
    

    I get in the windows 10 uefi pc:

    Checking Media Presence
    Media present
    Starting PXE over IPv4
    Station IP address is 192.168.1.2
    Server IP address is 192.168.1.1
    NBP filename is ipxe.efi
    NBP filesize is 0 Bytes
    PXE-E99: Unexpected network error.
    

    and it boots into windows

    In the windows xp BIOS PC:

    PXE-E32 TFTP open timeout
    
  • Senior Developer

    @hariskar No, you don’t need the ‘dhcp-boot=’ option. As well you should not modify the ‘dhcp-match’ config line! Use those 12 lines exactly as they are noted in the wiki article. Just put your FOG IP instead of x.x.x.x… that’s it!


  • So, since I use a router with dd-wrt firmware as a proxy with DNSMasq I understand that In the page you mention https://wiki.fogproject.org/wiki/index.php?title=BIOS_and_UEFI_Co-Existence#Using_ProxyDHCP_.28dnsmasq.29 this is what I should read. So

    dhcp-boot=undionly.kpxe,x.x.x.x
    which I till now had for my 2 windows xp bios pcs
    becomes:

    dhcp-match=set:efi64,60,PXEClient:grafeio2
    dhcp-option-force=tag:efi64,66,x.x.x.x # TFTP/FOG server ip
    dhcp-option-force=tag:efi64,67,“realtek.efi”
    dhcp-boot=realtek.efi,x.x.x.x
    dhcp-match=set:bios,60,PXEClient:ergastirio
    dhcp-option-force=tag:bios,66,x.x.x.x # TFTP/FOG server ip
    dhcp-option-force=tag:bios,67,“undionly.kpxe”
    dhcp-boot=undionly.kpxe,x.x.x.x

    for 1 windows xp (bios) and 1 windows 10 64 (uefi)??

    Thank you!

  • Senior Developer

    @hariskar As already mentioned, read this: https://wiki.fogproject.org/wiki/index.php?title=BIOS_and_UEFI_Co-Existence

    undionly.kpxe is not for UEFI!


  • After those messages windows logo shows and windows boot.
    I use my DD-WRT rooter as DHCP server and put dhcp-boot=undionly.kpxe,192.168.1.5 with
    DNSMasq Enabled
    Local DNS Enabled

    Some days ago I had another configuration:
    Boot option 1: PXE network boot (non uefi)
    Boot option 2 (Windows Boot manager (uefi))

    it boots normally in PXE but then there is another problem: if it does not boot from option 1 it does not fall to boot option 2 and asks for a bootable medium.

    So I thought to make both boot options uefi, but now I have the problem mentioned in pos #1.

    Thank you for reply!

  • Senior Developer

    @hariskar There is nothing like FOG 1.3.0. It’s not released yet! We call it FOG trunk at the moment.

    Checking Media Presence
    Media present
    Starting PXE over IPv4
    Succeeded to download NBP file
    

    Those messages are all fine. We need to know what is shown after those messages. Otherwise we cannot help you. Please try to take a picture or (slow motion) video of the boot process and upload here to the forum.

    Do you use FOG as DHCP server or did you set option 66/67 on a different DHCP to point to FOG? If you use an “external” DHCP server then you need to read this: https://wiki.fogproject.org/wiki/index.php?title=BIOS_and_UEFI_Co-Existence

278
Online

8.6k
Users

15.3k
Topics

143.4k
Posts