I got this working but not quite using the published instructions. I did it my own way so that I can use the USB MSD that I'd already got booting on my RPi3B as the network root drive for my RPi3B when it boots using PXE.
I started with an SDCard and ran the magic boot to update the OTP flags.
Got the RPi3 booting from a USB stick, by following the published instructions.
https://www.raspberrypi.org/documentati ... des/msd.md
For network booting I've pulled that USB stick out of my RPi3B and mounted it in my RPi2B. I've mounted that with this /etc/fstab
Code: Select all
proc /proc proc defaults 0 0
/dev/mmcblk0p1 /boot vfat defaults 0 2
/dev/mmcblk0p2 / ext4 defaults,noatime 0 1
# Mount the network boot USB stick
/dev/sda2 /tftp ext4 defaults,noatime 0 1
# Mount /boot as /tftp/boot so that it gets shared out by dnsmasq
/dev/sda1 /tftp/boot vfat defaults 0 0
# a swapfile is not a swap partition, no line here
# use dphys-swapfile swap[on|off] for that
the trick here is to mount the ext4 filesystem on /tftp then mount the fat one on top of that at /tftp/boot.
Updated the /etc/dhcpcd.conf to give the RPi2B a fixed IP address (that's outside my normal network)
Code: Select all
interface eth0
static ip_address=10.1.2.99/24
#static routers=192.168.1.138
#static domain_name_servers=192.168.1.11 8.8.8.8
Updated /tftp/boot/cmdline.txt with
Code: Select all
dwc_otg.lpm_enable=0 console=tty1 root=/dev/nfs nfsroot=10.1.2.99:/tftp elevator=deadline rootwait ip=dhcp rw
note the matching IP address for my RPi2B. This one will get a DHCP address assigned by dnsmasq on the RPi2B. That can be done after you've shutdown the USB booted RPi3B because the /tftp filesystem is mounted read/write on my RPi2B.
Install dnsmasq on the RPI2B and configure it with
Code: Select all
port=0
dhcp-range=10.1.2.10,10.1.2.40,300h
log-dhcp
enable-tftp
tftp-root=/tftp/boot
pxe-service=0,"Raspberry Pi Boot"
the trick here is using the /boot from the USB stick as the root for the tftp server.
Install nfs-kernel-server and configure it with
Code: Select all
/tftp *(rw,sync,no_subtree_check,no_root_squash)
that allows the network booted system to use the network filesystem.
Disconnect everything from your regular network, connect RPi2B (10.1.2.99) to your RPi3B with a cable (or in my case with a five port switch). Boot the RPi2B. Boot the RPi3B see the rainbow screen appear, see the desktop appear and grab a beer to celebrate a job well done.
One thing that also gives me is I can logon to my RPi2B from my laptop, just by plugging it into the 5-port switch. dnsmasq on the RPi2B hands out a second DHCP address 10.1.2.xx/24 to my laptop and I know the RPi2B has got a fixed IP address 10.1.2.99.
Once I can logon to my RPi2B I can look at the dnsmasq logs to determine the address assigned for my RPI3B and can log in to it. My RPi3B as a touch screen, anyway but this gives a headless option.
It also doesn't need any mucking about with tcpdump (I did that first time I tried the network boot, but didn't need it for this configuration). Because the tftp fileserver is the same RPi2B as NFS server it has a single fixed IP address and is fully self-contained.
If anyone is in Winchester next week at the Roebuck PH on Wed @ 20:00 I'll be showing a live demo.