UEFI + Legacy BIOS TFTP/PXELINUX

tt-fai at kky.ttu.ee tt-fai at kky.ttu.ee
Fri Jul 6 15:19:34 CEST 2018


Hi!

 

Just went through setting up UEFI boot over PXE and TFTP. Of great help in figuring out what was going on was to add logging to the TFTP server:

Kill the tftp server started at boot and manually start one with

# /usr/sbin/in.tftpd –vvv --listen --user tftp --address 0.0.0.0:69 --secure /srv/fai

or similar (check the startup script of in.tftpd, add –v’s generously).

 

Then you will see in the syslog, which files are being requested and whether they are actually being transmitted.

A successful UEFI boot with grub generates about 15 TFTP requests, starting with:

Jun 30 18:22:40 server in.tftpd[11435]: RRQ from 172.24.0.68 filename fai/efi/x86_64-efi/core.efi

Jun 30 18:22:40 server in.tftpd[11436]: RRQ from 172.24.0.68 filename /fai/efi/x86_64-efi/normal.mod

Jun 30 18:22:40 server in.tftpd[11437]: RRQ from 172.24.0.68 filename /fai/efi/x86_64-efi/extcmd.mod

[…]

 

A missing or misplaced file will show up as 

Jun 30 18:22:40 server in.tftpd[11449]: RRQ from 172.24.0.68 filename /fai/efi/grub.cfg

Jun 30 18:22:40 server in.tftpd[11449]: sending NAK (1, File not found) to 172.24.0.68

 

Hoping this helps,

Toomas

 

From: linux-fai <linux-fai-bounces at uni-koeln.de> On Behalf Of Rémy Dernat
Sent: Friday, July 6, 2018 3:28 PM
To: linux-fai at uni-koeln.de
Subject: UEFI + Legacy BIOS TFTP/PXELINUX

 

Hi,

 

I am trying to set up an UEFI boot pxe mainly because our hardware servers do not support full legacy BIOS anymore (particularly hard disk plugin on those servers).

 

Our legacy pxelinux works just fine from a while now (and thanks for it).

 

I followed this link : https://lists.uni-koeln.de/pipermail/linux-fai/2014-February/010294.html

... with no luck. I created an "UEFI" specific class to avoid the erase of DEFAULT, and put everything in that new class, because we will need to keep the pxelinux config.

 

My tftp fai folder is organised like this:

```

root at faiserv:/srv# tree -L 2

.

├── fai

│   ├── config

│   └── nfsroot

├── nfs4

└── tftp

    └── fai

 

root at faiserv:/srv/tftp/fai# tree -L 2

.

├── c2960s-universalk9-tar.150-2a.SE9.tar

├── cisco-ios-150-2a.tar -> c2960s-universalk9-tar.150-2a.SE9.tar

├── efi

│   ├── fonts

│   ├── grub.cfg

│   ├── grub.cfg.nok

│   ├── i386-pc

│   ├── locale

│   ├── pxelinux.cfg -> ../pxelinux.cfg

│   ├── unicode.pf2

│   └── x86_64-efi

├── gpxelinux.0

├── initrd.img-3.16.0-4-amd64

├── initrd.img-3.16.0-6-amd64

├── ldlinux.c32

├── lpxelinux.0

├── pxelinux.0

├── pxelinux.0.back

├── pxelinux.cfg

│   ├── 0A01FD03

│   ├── 0A01FFF2

│   ├── A226B5A1.disable

│   ├── A226B5A2.disable

│   ├── A226B5A3.disable

│   ├── A226B5A4.disable

│   ├── A226B5A5.disable

│   ├── A226B5A6.disable

│   ├── A226B5A7.disable

│   ├── A226B5A9

│   ├── A226B5AA.disable

│   ├── A226B5AB.disable

│   ├── A226B5B0.disable

│   ├── A226B5B4.disable

│   ├── A226B5B8

│   └── default

├── syslinux.efi

├── vmlinuz-3.16.0-4-amd64

└── vmlinuz-3.16.0-6-amd64

 

```

 

I do not know if the UEFI is also searching for a filename matching its IP address with the hexa value, so I created a symbolic link to the pxelinux.cfg parent directory...

 

 

I have no problem with DHCP, and my client is loading the grub.cfg menu. However, it fails while searching for the nfsroot. The error I get (with debug=all) is (replacing sensitive informations): 

```

kern/disk.c:196 : Opening `tftp,IP.IP.IP.IP'...

disk/efi/efidisk.c:461 : opening tftp

kern/disk.c: 281: Opening `tftp,IP.IP.IP.IP' failed.

kern/disk.c: 295: Closing `tftp'.

```

 

 

Here is my grub.cfg config :

```

root at faiserv:/srv/tftp/fai/efi# cat grub.cfg

set menu_color_normal=white/black

set menu_color_highlight=black/light-gray

set timeout=5

# for debug:

#set pager=1

set debug=all

 

insmod efi_gop

insmod efi_uga

if loadfont ${prefix}/unicode.pf2

then

    insmod gfxterm

    set gfxmode=auto

    set gfxpayload=keep

    terminal_output gfxterm

fi

 

menuentry "Install from FAI" {

     linux  vmlinuz-3.16.0-6-amd64 rw ip=dhcp root=/dev/nfs nfsroot=IP.IP.IP.IP:/srv/fai/nfsroot FAI_FLAGS=verbose,sshd,createvt,reboot FAI_ACTION=install server=faiserv.acme.ltd FAI_CONFIG_SRC=nfs://faiserv.acme.ltd/srv/fai/config

     initrd initrd.img-3.16.0-6-amd64

}

 

```

 

 

Any help would be greatly appreciated.

 

Thanks,

Rémy

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20180706/ce658600/attachment-0001.html>


More information about the linux-fai mailing list