[Kea-users] kea http uefi boot

Jorell F JorellF at outlook.com
Tue Jun 5 22:56:18 UTC 2018


I am trying to get ipxe to load from UEFI HTTP booting using Kea, I already am booting from PXE supporting both UEFI and Legacy .


      {
        "name": "UEFI-64-1",
        "test": "substring(option[60].hex,0,20) == 'PXEClient:Arch:00007'",
        "boot-file-name": "ipxe/x86_64/snponly.efi"
      },
      {
        "name": "UEFI-64-2",
        "test": "substring(option[60].hex,0,20) == 'PXEClient:Arch:00008'",
        "boot-file-name": "ipxe/x86_64/snponly.efi"
      },
      {
        "name": "UEFI-64-3",
        "test": "substring(option[60].hex,0,20) == 'PXEClient:Arch:00009'",
        "boot-file-name": "ipxe/x86_64/snponly.efi"
      },
      {
        "name": "UEFI-32-1",
        "test": "substring(option[60].hex,0,20) == 'PXEClient:Arch:00006'",
        "boot-file-name": "ipxe/i386/ipxe.efi"
      },
      {
        "name": "UEFI-32-2",
        "test": "substring(option[60].hex,0,20) == 'PXEClient:Arch:00002'",
        "boot-file-name": "ipxe/i386/ipxe.efi"
      },
      {
        "name": "Legacy",
        "test": "substring(option[60].hex,0,20) == 'PXEClient:Arch:00000'",
        "boot-file-name": "ipxe/undionly.kpxe"
      },
      {
        "name": "XClient_iPXE",
        "test": "substring(option[77].hex,0,4) == 'iPXE'",
        "boot-file-name": "http://${webserver}/ipxe/boot.php"<http://${webserver}/ipxe/boot.php>
      }


On 6/5/2018 3:44 PM, Klaus Steden wrote:

The UEFI section of my DHCP config looks like this:

{
  "name": "bootstrap-efi",
  "test": "substring(option[60].hex, 0, 20) == 'PXEClient:Arch:00007'",
  "option-data": [
    {
      "name": "boot-file-name",
      "data": "ipxe/snponly.efi"
    },
    {
      "name": "domain-name-servers",
      "data": "$nameserver1, $nameserver2"
    }
  ]
}

My embedded IPXE script (used when building snponly.efi) looks like this:

#!ipxe

goto boot_${platform} ||
shell

:boot_efi
dhcp || goto failed_dhcp
chain ${bootstrap_server}/${net0/mac} || goto failed_chain

:failed_dhcp
echo DHCP configuration failed, dropping to iPXE shell
shell
exit

:failed_chain
echo Chain loading failed, dropping to iPXE shell
shell
exit

The actual boot stanza looks a bit like this:

#!ipxe
set base_url $bootstrap_server

kernel ${base_url}/linux
initrd ${base_url}/initrd.gz

imgargs linux noapic acpi=off auto=true fb=false ip=dhcp ipv6.disable=1 interface=eth0 biosdevname=0 init=/init root=/dev/ram0 rdshell url=${base_url}/preseed/${net0/mac} language=en country=US locale=C priority=critical netcfg/dhcp_timeout=120 initrd=initrd.gz ||
boot ||

I don't do a lot of UEFI, but the above works quite well for us. Don't forget to disable IMAGE_COMBOOT if you use the same embedded script for both UEFI and BIOS mode, and to include the initrd in the boot stanza of your actual iPXE bootstrap (BIOS doesn't need that option in the kernel command line, but UEFI does). You could combine all of these into a single IPXE script, but YMMV.

Hope this helps.

cheers,
Klaus

On Tue, Jun 5, 2018 at 1:38 PM, Jorell F <JorellF at outlook.com<mailto:JorellF at outlook.com>> wrote:

What would be the kea config equivalent of the following dhcp config

if option client-architecture = encode-int ( 16, 16 ) {
     option vendor-class-identifier "HTTPClient";
     filename "http://my.web.server/ipxe.efi"<http://my.web.server/ipxe.efi>;
}





_______________________________________________
Kea-users mailing list
Kea-users at lists.isc.org<mailto:Kea-users at lists.isc.org>
https://lists.isc.org/mailman/listinfo/kea-users



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20180605/6e16a916/attachment.htm>


More information about the Kea-users mailing list