Skip to content
/ pipxe Public
forked from netbootxyz/pipxe

PXE-chainloadable iPXE for Raspberry Pi 4 with full diskless example

Notifications You must be signed in to change notification settings

valtzu/pipxe

 
 

Repository files navigation

PXE-chainloadable iPXE for the Raspberry Pi 4

piPXE is a build of the iPXE network boot firmware for the Raspberry Pi.

Quick start

  1. Bring TFTP/PXE server up – set variables according to your network. You can use .env file for convenience.
git clone https://github.com/valtzu/pixpe
cd pixpe/example
INTERFACE=eth0 SUBNET=192.168.1.0 NETMASK=255.255.255.0 docker-compose up
  1. Power on your Raspberry Pi 4 with Ethernet cable attached to the same network as your $INTERFACE above
  2. Wait a couple of minutes, it should load images directly from the images.maas.io (~500MB or so)
  3. You can now SSH to the machine (get the IP from dnsmasq output for example), username unsafe, password unsafe

Build from source

git clone https://github.com/valtzu/pixpe
cd pixpe
docker-compose up 

HTTP boot

Boot sequence

  1. EEPROM loads http://your-server/net_install/boot.img and verifies it against http://your-server/net_install/boot.sig
  2. start4.elf is launched (from boot.img)
  3. UEFI (RPI_EFI.fd) is launched (from boot.img), defined in config.txt: armstub=RPI_EFI.fd
  4. iPXE (embedded inside RPI_EFI.fd as EFI driver) is launched
  5. iPXE looks up autoexec.ipxe from SD card or from TFTP server (which may be resolved using DHCP)

Embedding iPXE script inside boot.img makes it possible to iPXE boot from internet, without SD card or TFTP server, eliminating step number 5 above.

Implementation

  1. Build boot.img with docker-compose run --rm build make EMBED=/opt/build/autoexec.ipxe (or wherever your ipxe script is)
  2. Create 2048-bit RSA key pair in PEM format (Google is your friend)
  3. Create boot.sig from boot.img with rpi-eeprom-digest -i boot.img -o boot.sig -k your-private-key.pem
  4. Copy boot.img to your HTTP server (you may need to also sign it with rpi-eeprom-digest)
  5. Flash EEPROM with your public key, BOOT_ORDER, HTTP_HOST etc. – but note that HTTP_PATH does not work and is always net_install (2022-04-02). See official docs on HTTP boot.

All of the above is made easy with valtzu/pipxe-http.

Licence

Every component is under an open source licence. See the individual subproject licensing terms for more details:

About

PXE-chainloadable iPXE for Raspberry Pi 4 with full diskless example

Topics

Resources

Stars

Watchers

Forks

Languages

  • Makefile 68.1%
  • Dockerfile 18.4%
  • Shell 13.5%