Network booting is supported for all versions of the Pi that have onboard ethernet, ie. Pi 1 to 4, Model B/B+ only. Network booting is not supported for WiFi.
Depending on the version of your Pi, the process is different:
2B v1.1 and below
You need to copy the latest bootcode.bin
file on to a MicroSD card (formatted at FAT32) and then boot from it. The boot order is, firstly, to try booting from a USB device and , secondly, try PXE booting.
2B v1.2 and 3B
These models have the 2837 SoC which has a boot ROM that reads some One-Time Programmable (OTP) registers to determing the boot mode. To enable USB (and PXE) booting you will need to set register 17 of the OTP boot ROM. This can be done by following the “Client Configuration” guidance in the Raspberry Pi documentation. Once done, the boot order is as above – USB first, then PXE.
3B+
On the 3B+, register 17 is already set up with bit 29 set to enable USB Host booting, so no manual intervention is needed. Boot order is USB first, then PXE.
4B
You can set the boot order by programming the EEPROM. Guidance is available from the Raspberry Pi Documentation.
The RPi Boot Process
Prior to the Raspberry Pi 4B, each Pi has a small boot ROM in its SoC which can read files from an SD card and execute them. When the Pi is powered up, the boot ROM code checks to see if a MicroSD is present. If it is, the code looks for a file called bootcode.bin
on the card. If the file is present, it’s loaded into memory and program execution jumps to that memory address and continues execution from there. The bootcode.bin
file is the bootloader. It does some very basic setup and, once finished, loads the relevant start*.elf
and fixup*.dat
files that continue the bootstrap which eventually leads to loading the linux kernel.
bootcode.bin
is not used on the Raspberry Pi 4. The Pi 4 has an EEPROM, not a ROM, and the boot code is in this EEPROM.
If the boot ROM/EEPROM can’t find an SD card, it then loops through each of the USB ports looking for a device to boot from. If that fails, it attempts PXE booting. For the Pi 4, you can change this boot order and details are available from the Raspberry Pi Documentation.
Next Steps
Once you’ve set up your Pi for PXE booting, you can move on to setting up the server.
Leave a Reply