Yes. That's the way I demo'd it.
Get your RPi 3B booting from a USB stick first following the official instructions for that.
Poweroff. Pull the USB stick and insert that into RPi2B.
Install all the stuff from
https://help.ubuntu.com/community/SettingUpNFSHowTo to get an NFS server working. Install dnsmasq.
mkdir /tftp
sudo mount /dev/sda2 /tftp
sudo mount /dev/sda1 /tftp/boot
Add /etc/exports
Code: Select all
/tftp *(rw,sync,no_subtree_check,no_root_squash)
Update /etc/fstab on the 2B with
Code: Select all
/dev/sda2 /tftp ext4 defaults,noatime 0 1
/dev/sda1 /tftp/boot vfat defaults 0 0
Run dnsmasq 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"
Update /etc/dhcpcd.conf on the 2B with
Code: Select all
interface eth0
static ip_address=10.1.2.99/24
Update /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 quiet splash plymouth.ignore-serial-consoles ip=dhcp
Reboot the RPi2B.
Connect the two Raspberries with a straight 568A to 568A CAT5 cable (or with a dedicated ethernet switch).
Boot the RPI3B and be amazed.