[syslinux] pxelinux efi64 boot woes on hyper-v gen 2

Luke Ledgerd luke.ledgerd at niteco.se
Thu Nov 27 20:03:57 PST 2014


Gene,

I found a document from IBM that explains why it didn't like Vendor-Class-Identifier option I was using "PXEClient" was causing EFI boot rooms to dummy spit, that's very useful, that combined with RTFMing the PXE specs 3.0-3.2 might solve my problem if I keep at it.
http://www-01.ibm.com/support/docview.wss?uid=swg21247032

Even the PXELinux docs suggest encapsulating vendor  necessary options for some ROMS. Maybe I'll put all those same options into my DHCP configuration below without having them  encapsulated in hex.

Currently here is my DHCP configuration minus the IP addresses of course. I might just bite the bullet and get WDS/System Centre doing the first stage of the boot and work backwards, or let it do the first stage if it's possible to make it hand over to PXElinux-EFI. Personally I prefer the other way around.

Clonezilla isn't working for us with Gigabit Lan Cards due to firmware loading issues (even in the Ubuntu version), so I'm going to my own script in System Rescue CD (Gentoo) without all the Debian-live / delayed module loading issues that's more adapted for our needs. Clonezilla is a great collection of scripts, and it even does multicast but however I just can't make sense of their build environment. Sorry guys.


option space PXE;
option PXE.mtftp-ip code 1 = ip-address;
option PXE.mtftp-cport code 2 = unsigned integer 16;
option PXE.mtftp-sport code 3 = unsigned integer 16;
option PXE.mtftp-tmout code 4 = unsigned integer 8;
option PXE.mtftp-delay code 5 = unsigned integer 8;
option PXE.discovery-control code 6 = unsigned integer 8;
option PXE.discovery-mcast-addr code 7 = ip-address;
option PXE.boot-server code 8 = { unsigned integer 16, unsigned integer 8, ip-address };
option PXE.boot-menu code 9 = { unsigned integer 16, unsigned integer 8, text };
option PXE.menu-prompt code 10 = { unsigned integer 8, text };
option PXE.boot-item code 71 = unsigned integer 32;


default-lease-time                      300;
max-lease-time                          300;
option subnet-mask                      255.255.252.0;
option domain-name-servers              X & Y;
option domain-name                      "niteco.se";
option domain-search                    "niteco.se";
ddns-update-style                       none;
server-name                             Z;
option arch code 93 = unsigned integer 16;

allow booting;
allow bootp;
# we don't use vendor option space - the ROMS need it too
#vendor-option-space pxelinux;
option space pxelinux;
option pxelinux.magic      code 208 = string;
option pxelinux.configfile code 209 = text;
option pxelinux.pathprefix code 210 = text;
option pxelinux.reboottime code 211 = unsigned integer 32;

# Ref:
# http://www.syslinux.org/wiki/index.php/PXELINUX
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=720589

## Uncomment the following "if block" when you have some buggy PXE NIC card (such as annoying sis900 NIC). Remember to modify the MAC vendor prefix and restart dhcpd service!!!
## This is a workround for some network card with BAD PXE code in firmware.
## It will only affect those clients with MAC vendor prefix you assigned.
## Ref: http://syslinux.zytor.com/archives/2005-August/005640.html

#if substring (option vendor-class-identifier, 0, 3) = "PXE" {
#     # **************************************************************
#     # ***MODIFY*** the MAC vendor prefix of client network card here.
#     # **************************************************************
#     # For annoying sis900 network card, maybe it is 00:07:95, 00:0C:6E...
#     if substring (hardware, 1, 3) = 00:0C:6E {
#         # sis900.zpxe is specially for sis900 NIC, you can download it from
#         # http://rom-o-matic.net/etherboot/etherboot-5.4.4/contrib/rom-o-matic
#         filename = "sis900.zpxe";
#     }
#}

# Uncomment the following to get the debug/verbose messages in system log. The messages like the following will be shown:
# Client 0:c:29:3b:34:fb requests 1:2:3:5:6:b:c:d:f:10:11:12:2b:36:3c:43:80:81:82:83:84:85:86:87 - PXEClient:Arch:00000:UNDI:002001 - no dhcp-client-id
# Client 0:c:29:3b:34:fb requests 1:3:6:c:f:1c:28:29:2a - DRBLClient - no dhcp-client-id
# Begin of log command

log-facility local7 ;

log(info, concat("Client ",
        binary-to-ascii(16, 8, ":", substring(hardware, 1, 6)),
        " requests ",
        binary-to-ascii(16, 8, ":", option dhcp-parameter-request-list),
        " - ",
        pick-first-value(option vendor-class-identifier, "no vendor-id"),
        " - ",
        pick-first-value(option dhcp-client-identifier, "no dhcp-client-id"))
   );
# End of log command
class "pxeclients" {
  match if (substring(option vendor-class-identifier, 0, 9) = "PXEClient") ;
  next-server 10.10.20.50;
  option tftp-server-name "10.10.20.50" ;
  site-option-space "pxelinux";
  option pxelinux.magic f1:00:74:7e;
  if exists dhcp-parameter-request-list {
    # Always send the PXELINUX options (specified in hexadecimal)
     option dhcp-parameter-request-list = concat(option dhcp-parameter-request-list,d0,d1,d2,d3);
  }
if option arch = 00:00 {
    filename "pxelinux.0";
    option pxelinux.configfile "pxelinux.cfg/bios";
} else if option arch = 00:06 {
    filename "bootia32.efi";
    #option bootfile-name "bootia32.efi";
    option pxelinux.configfile "pxelinux.cfg/efi32";
} else if option arch = 00:07 {
    filename "bootx64.efi";
    #option bootfile-name "bootx64.efi";
    filename "bootx64.efi";
    #option boot-size 391;
    option pxelinux.configfile "pxelinux.cfg/efi64";
    option vendor-class-identifier "PXEClient:Arch:00007:UNDI:003016";
} else if option arch = 00:09 {
    filename "bootx64.efi";
    #option bootfile-name "bootx64.efi";
    #option boot-size 391;
    option pxelinux.configfile "pxelinux.cfg/efi64";
    option vendor-class-identifier "PXEClient:Arch:00007:UNDI:003016";
} else {
    filename "pxelinux.0";
    option pxelinux.configfile "pxelinux.cfg/bios";
}
    option pxelinux.reboottime 30;
  #option vendor-encapsulated-options 09:0f:80:00:0c:4e:65:74:77:6f:72:6b:20:62:6f:6f:74:0a:07:00:50:72:6f:6d:70:74:06:01:02:08:03:80:00:00:47:04:80:00:00:00:ff;
  vendor-option-space PXE;
  option PXE.mtftp-ip 0.0.0.0;
  option PXE.discovery-control 11;
# I'll check this is the right one to force TFTP only soon!
}

# For more info, ref: http://drbl.sourceforge.net/faq/index.php#path=./2_System&entry=37_coexist_with_existing_dhcp.faq
# local-port 1067;
# remote-port 1068;

shared-network "alias-interface-identifier" {
subnet X.X.X.X netmask 255.255.252.0 {
    option subnet-mask  255.255.255.0;
    option routers X.X.X.X;
    option netbios-node-type 8;
    pool {
      allow members of "pxeclients";
      range X.X.X.X X.X.X.X;
    }
 }
}

-----Original Message-----
From: Gene Cumm [mailto:gene.cumm at gmail.com] 
Sent: Friday, November 28, 2014 10:41 AM
To: Luke Ledgerd
Cc: syslinux at zytor.com
Subject: Re: [syslinux] pxelinux efi64 boot woes on hyper-v gen 2

On Thu, Nov 27, 2014 at 8:59 AM, Luke Ledgerd <luke.ledgerd at niteco.se> wrote:
> Gene,
>
> As it happened I started working on this again just as you mailed me.

I saw it in IRC.

> It appears that PXE-E99 may also be related to MTFTP part of the PXE spec. IBM also says it has something to do with jumbo frames. I tried setting PXE.mtcp-ip to 0.0.0.0 to disable it but still no joy.
>
> The bootfile size shows up as zero because that relates to "option 
> boot-size" in dhcp and doesn't seem to be the problem

I've never set this.

> I've already fired up wireshark and had a look, and the tftp was the nas, so I'll move it over to the linux box to get the traffic. The ideas I have now to fix is to try setting up atftp to do multicast tftp.

I've honestly never done MTFTP at all.

> "option bootfile-name" only freaks out the rom and adds extra characters at the end.
>
> If I have option vendor-class-identifier "PXEClient"; before 
> Vendor-option-space PXE; Option PXE.mtftp-ip 0.0.0.0
>
> It freaks out the rom and it says no offer found. It's not just hyper-v I'm testing with a bare-metal system too.
> My original configuration file started as the same on from dbrl-clonezilla-server but it's changed a bit now.

How does it differ?  Any way you could email it (inline or attached; even if IP/domain sanitized to something neutral like an RFC1918 IP or test-net like 192.0.2.0/24).

> Do some PXE roms require MTFTP to boot in EFI mode?

I've never seen one.

I'd suggest starting with a simpler setup.

--
-Gene

> -----Original Message-----
> From: Gene Cumm [mailto:gene.cumm at gmail.com]
> Sent: Thursday, November 27, 2014 8:50 PM
> To: Luke Ledgerd
> Cc: syslinux at zytor.com
> Subject: Re: [syslinux] pxelinux efi64 boot woes on hyper-v gen 2
>
> On Mon, Nov 24, 2014 at 3:24 AM, Luke Ledgerd <luke.ledgerd at niteco.se> wrote:
>> http://www.niallbrady.com/2014/06/11/when-uefi-network-booting-on-a-h
>> y perv-gen-2-vm-you-might-get-pxe-e99-unexpected-network-error/
>>
>> P.S. It's not this and I'm getting a PXE-E99 tftp failure "Unexepected Network Error", so I'll guess I'll need to investigate what kind of TFTP server makes hyper-v happy. Virtualbox, VmWare seem to have the same EFI boot code & output the same error message.
>>
>> Probably not a problem for the syslinux mailing list.
>
> A packet capture may help figure out why there's a negative tftp/tftpd interaction.
>
> (host 192.0.2.4 and host 192.0.2.5) and udp and (port 69 or (src 
> portrange 1024-65535 and dst portrange 1024-65535))
>
> This should be the easiest filter and can be done on the tftpd system.
>
>> -----Original Message-----
>> From: Luke Ledgerd
>> Sent: Monday, November 24, 2014 3:06 PM
>> To: 'syslinux at zytor.com'
>> Subject: pxelinux efi64 boot woes on hyper-v gen 2
>>
>> I'm trying to boot pxelinux from a hyper-v generation 2 (efi 64), but 
>> I keep getting NBP Filename bootx64.efi NBP Filesize 0 bytes and of 
>> course it doesn't boot from the startup screen
>>
>> The thing is the tftpserver works fine with pxelinux.0 and bios mode, and I can use a unix tftp client to download bootx64.efi without any issues.
>>
>> http://www.syslinux.org/archives/2014-March/021825.html
>> I have my DHCP server set up just like steven from CloneZilla.org does.
>>
>> Any suggestions for this one?
>>
>> Luke Ledgerd / Internal IT
>>
>> Add: 156 Xa Dan II, 14th Floor,
>>          Dong Da District, Hanoi, Vietnam.
>> Mobile Vietnam: +84 (0) 995304270
>> Email: luke.ledgerd at niteco.se
>> Skype: luke-ledgerd-niteco
>> Web: http://niteco.se



More information about the Syslinux mailing list