Recent days we get the announcement about releasing Raspberry Pi 3. Those of you who play with embedded systems or just try to make things probably still got good old Raspberry Pi (1). Because during time old platforms loose value as potential candidate for new projects I decided to sacrifice my old RPi and make test server from it.
One of my customer required testing his software against PXE server with various configurations. I realized that using my home network with my TP-Link router I have no way to create such configuration on server machine I usually use. I would need to connect directly to server and with one Ethernet port this was not the solution for me. My other platforms like A20 boards, Odroid or RPi2 are occupied by some projects. I recall that I have old RPi that can be used for that purpose.
Configuration described below is very limited because it test just PXE booting, there is no outside world connection. This connection can be added by adding wifi dongle to Raspberry Pi and modifying iptables and routing.
- download recent Raspberry Pi image and flash it to SD card. I used Raspbian Jessie Lite.
- if you don’t have free keyboard and HDMI monitor use UART to connect serial console – you can use this post, if you don’t konw how to connect it
- flash recent iPXE to your hardware or use what is already provided by vendor
Raspbian Jessie Lite – initial setup
Install server TFTP:
Change configuration according to your needs. My looks like that:
1 2 3 4 5 6 7
Download netboot files for Debian, which we will use for testing purposes:
Unpack netboot package in
Install udhcpd and remove conflicting packages:
At the end of
1 2 3 4 5 6 7 8 9
You can also assign client MAC to given IP address by adding:
1 2 3 4 5 6 7 8 9
eth0 configuration to static IP:
1 2 3 4 5
Then reboot device and connect your PXE client device.
Testing PXE server
When device boot press
Ctrl-B to enter iPXE shell. If you cannot enter shell
please replace iPXE with recent version using this instructions.
Entering iPXE you should see something like that:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
First let’s configure interface:
1 2 3 4
And boot Debian installer:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
It took me some time to put this information together an correctly run this server, so for future reference and for those confused with udhcpd and other tools configuration this post should be useful. Thanks for reading and as always please share if you think this post is valuable. If anything is not clear or I messed something please let me know in comments.