Centos – How to PXE boot with ARM


I'm trying to setup diskless UEFI + PXE + NFS booting for CentOS 7 on ARM. Generally, the process looks like this:

  1. Client CPU boots UEFI firmware
  2. Client UEFI's PXE firmware requests DHCP from the network
  3. Server supplies IP, TFTP server IP, PXE NBP (network bootstrap program) filename
  4. Client UEFI loads NBP from TFTP server
  5. Client UEFI executes NBP, which loads kernel image from TFTP server
  6. Client NBP executes kernel image, which mounts filesystem via NFS

Every PXE boot guide I can find eventually requires pxelinux.0, from Syslinux, as the NBP (steps 3, 4, 5). Syslinux doesn't support ARM (afaik?). With that in mind:

Can someone describe how to PXE boot an aarch64?

Best Answer

Here are my eventual findings and solution, with lots of help from the comments!

  • Syslinux doesn't support ARM
  • Even if it did, pxelinux.0 only applied to BIOS, not UEFI
  • Use GRUB2 instead of Syslinux

Assuming the PXE (DHCP + TFTP) server(s) are already setup according to many guides,

  1. Copy your kernel and initramfs to your TFTP root dir (commonly /var/lib/tftpboot)
  2. Copy grubaa64.efi from /boot/efi/EFI/centos/ to your TFTP root dir (or ./boot/ subdir)
  3. Create a config file, grub.cfg, in the same directory

    (GRUB treats / as your TFTP root dir. Change linux & initrd as needed)

    menuentry 'Shared CentOS (4.5.0-23.el7.aarch64)' {
        linux       /vmlinuz-4.5.0-23.el7.aarch64 rw root=/dev/nfs ip=dhcp nfsroot=/netboot/CentOS_7.3 enforcing=0
        initrd      /initramfs-nfs-only.img
    menuentry 'Refresh GRUB menu' {
        configfile  /boot/grub.cfg
  4. Point your DHCP server to grubaa64.efi instead of pxelinux.0

  5. That's it! Try editing grub.cfg on the TFTP server, then choosing "Refresh GRUB menu" to see that it pulls in the new config
Related Question