Raspberry network boot

Pi 3 is able to boot by network without SD.

Manual for Raspberry Pi 3

  1. Istall WTware from .exe installer. Select to install WTware TFTP.
  2. Run configurator.
  3. In the left upper corner press the button with Raspberry.
  4. Create "Programming SD" and boot Raspberry from it once.

That's all. It should boot by network with SD since then. At boot start there's a pause for about 10 seconds.

Sometimes it doesn't work. See possible reasons below, the solution is: insert special SD for boot by network.

Manual for Raspberry Pi 2. And for Pi 3, if it failed to boot without SD:

  1. Run WTware from .exe installer. Select to install WTware TFTP.
  2. Run configurator.
  3. In the left upper corner press the button with Raspberry.
  4. Create "SD card for network boot".

On this boot card there's only one file bootcode.bin. We do hope that this file will be compatible with newer kernels and Raspberry firmware, i.e. this SD you won't have to rewrite for next versions. If it will be so, raspberry boot by network will finally have sense.

config.txt file

To edit config.txt file, copy it from directory (instead of 5.4.84 specify WTware version you are working with):

C:\Program Files (x86)\WTware\TFTPDROOT\5.4.84\pi2\localboot\
to directory:
C:\ProgramData\WTware\Terminals\{your Pi MAC-address}\
And in terminal directory make changes, needed only for this terminal.

How it works

Raspberry Pi network boot realization is extremely trivial. PXE BIOS for 20-years aged x86 computers is smarter than Raspberry Pi boot code. That's why no HTTP possible, when we are talking about boot. Only TFTP.

Some code is embedded into Raspberry Pi 3 processor. This code allows to boot Pi 3 without SD. This code has especially many problems, and it's not possible to replace it. If Pi fails to boot without SD, use "SD for network boot". It contains the same code, but some problems were fixed.

Raspberry Pi 2 contains no code for boot by network. That's why "SD for network boot" is needed anyway.

At boot start Pi 3 boot code downloads by TFTP it's binary files (bcm2709-rpi-2-b.dtb or bcm2710-rpi-3-b.dtb, fixup.dat, start.elf), it's configuration files (config.txt, cmdline.txt) and WTware boot file (kernel7.img). If WTware TFTP is used, these files are loaded from needed WTware version directory:

C:\Program Files (x86)\WTware\TFTPDROOT\5.4.84\pi2\localboot\
If any other TFTP is used, these files are loaded from TFTP root. Download WTware zip-archive and see Raspberry Pi developers manual.

Update: since 5.4.86, 067 dhcp option is not needed anymore FOR RASPBERRY NETWORK BOOT (but is needed for x86 and may be used for Raspberry local boot). WTware will ignore 067 while booting Raspberry by network as Raspberry firmware does.

List of possible network problems (Raspberry boot code problems, not WTware fault):

Errors of DHCP/PXE realization:

  • Although the Pi sets the vendor class option 60 to "PXEClient:Arch:00000:UNDI:002001", this is not PXE compliant.
  • The pi does not send a DHCPREQUEST packet before it starts to use the IP addr in the DHCPOFFER packet.
  • DHCP option next-server is ignored, use DHCP Option 66 (option tftp-server-name for Linux DHCP) to specify a different TFTP server address.
  • ARCH Option 93 is set to an unexpected value in the DHCPDISCOVER packet. It is set to 0 (Standard PC BIOS).
  • DHCP option filename is ignored. start.elf (with or without the serial number as a prefix) is used as a filename instead.

Bootrom errors during boot without SD card:

  • When the boot ROM enables the Ethernet link, it first waits for the link to come up, then sends its first DHCP request packet. This is sometimes too quick for the switch to which the Raspberry Pi is connected: we believe that the switch may throw away packets it receives very soon after the link first comes up.
  • The DHCP packet retransmission loop is not timing out correctly, so the DHCP packet will not be retransmitted.
  • DHCP Option 3 (routers) is not requested (so the Pi cannot contact a server that is located in a different subnet). Even if the DHCP server is forced to provide this option, the Pi seems to ignore it.

If you have any comments or remarks to this article, please, let us know!