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.
Prerequisites
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 know how to connect it
flash recent iPXE to your hardware or use what is already provided by vendor
Raspbian Jessie Lite - initial setup
Setup TFTP
Install server TFTP:
1
sudo apt-get install tftpd-hpa
Change configuration according to your needs. My looks like that:
# Comment the following line to enable# DHCPD_ENABLED="no"# Options to pass to busybox' udhcpd.## -S Log to syslog# -f run in foregroundDHCPD_OPTS="-S"
iPXE> autoboot
net0: 00:0d:b9:3f:9e:58 using i210-2 on PCI01:00.0 (open)[Link:up, TX:20 TXE:0 RX:8 RXE:2][RXE: 2 x "The socket is not connected (http://ipxe.org/380f6001)"]
Configuring (net0 00:0d:b9:3f:9e:58)............... ok
net0: 192.168.0.194/255.255.255.0 gw 192.168.10.2
net0: fe80::20d:b9ff:fe3f:9e58/64
net1: fe80::20d:b9ff:fe3f:9e59/64 (inaccessible)
net2: fe80::20d:b9ff:fe3f:9e5a/64 (inaccessible)
Next server: 192.168.0.1
Filename: /srv/tftp/pxelinux.0
tftp://192.168.0.1//srv/tftp/pxelinux.0... ok
pxelinux.0 : 42988 bytes [PXE-NBP]
PXELINUX 6.03 PXE 20150819 Copyright (C) 1994-2014 H. Peter Anvin et al+---------------------------------------+
| ^GDebian GNU/Linux installer boot menu |
|---------------------------------------|
| Install |
| Advanced options > |
| Help |
| Install with speech synthesis |
| |
| |
| |
| |
| |
| |
+---------------------------------------+Press ENTER to boot or TAB to edit a menu entry
Summary
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.
Founder of 3mdeb, a passionate advocate for open-source firmware solutions, driven by a belief in transparency, innovation, and trustworthiness. Every day is a new opportunity to embody the company's vision, emphasizing user liberty, simplicity, and privacy. Beyond business, a casual chess and bridge player, finding peace in nature and nourishment in theology, philosophy, and psychology. A person striving to foster a healthy community, grounded in collaboration and shared growth, while nurturing a lifelong curiosity and a desire to deeply understand the world.