PXE UEFI Boot [solved]

Questions related to network booting via PXE
kabutor
Posts: 3
Joined: 23 May 2013, 17:50

PXE UEFI Boot [solved]

Postby kabutor » 23 May 2013, 17:56

I have a syslinux PXE boot working, and I want to boot now in UEFI (EFI) mode.

I did some browsing on the internet and just modified the dhcpd.conf

Code: Select all

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 arch code 93 = unsigned integer 16;

option domain-name-servers 8.8.8.8, 195.235.96.90;

default-lease-time 600;
max-lease-time 7200;

ddns-update-style interim;


subnet 192.168.0.0 netmask 255.255.255.0 {
  range dynamic-bootp 192.168.0.50 192.168.0.70;
   option routers 192.168.0.1;

 class "pxeclients" {
        match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";

        next-server 192.168.0.100;

        if option arch = 00:07 {
                filename "pxelinux/bootx64.efi";
        } else {
                filename "pxelinux.0";
        }
   }
   server-name "pingu";
 #  next-server 192.168.0.100;
}


Now I tried on a PXE UEFI computer, and it works, it detects its a EFI boot mode (arch 0:07) and sends the bootx64.efi (that is the same that is on the boot/efi folder on the sysresccd cd, and it starts grub, and it stops there.

How can I pass the kernel to boot like in the standard PXE boot?

kabutor
Posts: 3
Joined: 23 May 2013, 17:50

Re: PXE UEFI Boot

Postby kabutor » 08 Oct 2014, 11:50

More than a year later, the solution was here:

https://wiki.ubuntu.com/UEFI/PXE-netboot-install

Just do the step 1, and download that signed grub
1. Download the UEFI signed grub image into /srv/tftp/:


Make on the root of your tftp directory a new one (efi/boot) and place there the renamed grub, use that grub on the DHCP.conf for the UEFI boot line:

Code: Select all

if option arch = 00:07 {

                filename "efi/boot/bootx64.efi";
}


Also in the root tftp you need to create a grub folder with grub.cfg inside. On the grub.cfg:

Code: Select all

menuentry "Sysrescue" {
set gfxpayload=keep
linux /sysrescd/isolinux/altker64 dodhcp netboot=nfs://192.168.0.100:/tftpboot/sysrescd
initrd /sysrescd/isolinux/initram.igz
}


Just change the values to your NFS shared folder.

kabutor
Posts: 3
Joined: 23 May 2013, 17:50

Re: PXE UEFI Boot [solved]

Postby kabutor » 23 Feb 2015, 17:13

Alright, new way, and better to do it with Syslinux >= 6.03 instead of Grub, which is a mess.

Same as before, you need to say in dhcpd.conf the loader to run,
make a directory on you root tftpd server called efi and copy the syslinux loader from efi64/efi/syslinux.efi

Code: Select all

if option arch = 00:07 {

                filename "efi/syslinux.efi";
}


you will need to copy in the efi directory from the syslinux files

ldlinux.e64

the good thing of this is that you can use the same config file from the standard pxelinux.cfg/default, recreate the directory inside the efi directory and edit it


Return to “Network Boot via PXE”

Who is online

Users browsing this forum: No registered users and 1 guest