3

I've been trying to netboot my Pi4's using a Pi4 with dnsmasq on Ubuntu. So the idea is to have one Pi with attached storage serving the others.

My setup is:

  1. master PI with an USB SSD running Ubuntu and serving netboot partions with dnsmasq
  2. X number of slaves with no SSH or USB attached.

So I've flashed all Pi's to boot SD -> USB -> net and that seems to be working. I've successfully installed a stable Ubuntu 20.04.1 LTS on an SSD and setup dnsmasq. I've mainly followed this guide to setup the dnsmasq and nfs shares:

https://www.virtuallyghetto.com/2020/07/two-methods-to-network-boot-raspberry-pi-4.html#comment-63296

My /etc/dnsmasq.conf:

bind-interfaces
dhcp-range=10.0.1.255,proxy
log-dhcp
enable-tftp
tftp-root=/srv/tftpboot
pxe-service=0,"Raspberry Pi Boot"
log-facility=/var/log/dnsmasq.log
#dhcp-reply-delay=1

I serve the boot partition from /srv/tftpboot/[machine_serial]/

and then the I'm supposed to serve root from /srv/nfs/rpi4-[machine_serial] as defined in cmdline.txt:

$cat /srv/tftpboot/6bxxxx/cmdline.txt
console=serial0,115200 console=tty root=/dev/nfs nfsroot=10.0.1.10:/srv/nfs/rpi4-6ba324fe,vers=3 rw ip=dhcp rootwait elevator=deadline fixrtc

I don't think I get that far though. This is what I see in dnsmasq log (10.0.1.10 is the server and 10.0.1.24 is the client):

Oct 26 09:26:04 dnsmasq-dhcp[3544]: 1526547169 available DHCP subnet: 10.0.1.255/255.255.0.0
Oct 26 09:26:04 dnsmasq-dhcp[3544]: 1526547169 vendor class: PXEClient:Arch:00000:UNDI:002001
Oct 26 09:26:04 dnsmasq-dhcp[3544]: 1526547169 PXE(eth0) dc:a6:32:xx:xx:xx proxy
Oct 26 09:26:04 dnsmasq-dhcp[3544]: 1526547169 tags: eth0
Oct 26 09:26:04 dnsmasq-dhcp[3544]: 1526547169 broadcast response
Oct 26 09:26:04 dnsmasq-dhcp[3544]: 1526547169 sent size:  1 option: 53 message-type  2
Oct 26 09:26:04 dnsmasq-dhcp[3544]: 1526547169 sent size:  4 option: 54 server-identifier  10.0.1.10
Oct 26 09:26:04 dnsmasq-dhcp[3544]: 1526547169 sent size:  9 option: 60 vendor-class  50:58:45:43:xxxx
Oct 26 09:26:04 dnsmasq-dhcp[3544]: 1526547169 sent size: 17 option: 97 client-machine-id  00:52:50:69:34:11:31xxxxx...
Oct 26 09:26:04 dnsmasq-dhcp[3544]: 1526547169 sent size: 32 option: 43 vendor-encap  06:01:03:0a:04:00:50:xxxxx..
Oct 26 09:26:04 dnsmasq-dhcp[3544]: 1526547169 available DHCP subnet: 10.0.1.255/255.255.0.0
Oct 26 09:26:04 dnsmasq-dhcp[3544]: 1526547169 vendor class: PXEClient:Arch:00000:UNDI:002001
Oct 26 09:26:04 dnsmasq-tftp[3544]: error 0 Early terminate received from 10.0.1.24
Oct 26 09:26:04 dnsmasq-tftp[3544]: failed sending /srv/tftpboot/6bxxxx/start4.elf to 10.0.1.24
Oct 26 09:26:04 dnsmasq-tftp[3544]: sent /srv/tftpboot/6bxxxx/config.txt to 10.0.1.24
Oct 26 09:26:04 dnsmasq-tftp[3544]: file /srv/tftpboot/6bxxxx/vl805.sig not found
Oct 26 09:26:04 dnsmasq-tftp[3544]: file /srv/tftpboot/6bxxxx/pieeprom.sig not found
Oct 26 09:26:04 dnsmasq-tftp[3544]: file /srv/tftpboot/6bxxxx/recover4.elf not found
Oct 26 09:26:04 dnsmasq-tftp[3544]: file /srv/tftpboot/6bxxxx/recovery.elf not found
Oct 26 09:26:05 dnsmasq-tftp[3544]: sent /srv/tftpboot/6bxxxx/start4.elf to 10.0.1.24
Oct 26 09:26:06 dnsmasq-tftp[3544]: sent /srv/tftpboot/6bxxxx/fixup4.dat to 10.0.1.24
Oct 26 09:26:06 dnsmasq-tftp[3544]: file /srv/tftpboot/6bxxxx/recovery.elf not found
Oct 26 09:26:06 dnsmasq-tftp[3544]: sent /srv/tftpboot/6bxxxx/config.txt to 10.0.1.24
Oct 26 09:26:06 dnsmasq-tftp[3544]: sent /srv/tftpboot/6bxxxx/syscfg.txt to 10.0.1.24
Oct 26 09:26:06 dnsmasq-tftp[3544]: sent /srv/tftpboot/6bxxxx/usercfg.txt to 10.0.1.24
Oct 26 09:26:06 dnsmasq-tftp[3544]: file /srv/tftpboot/6bxxxx/dt-blob.bin not found
Oct 26 09:26:06 dnsmasq-tftp[3544]: file /srv/tftpboot/6bxxxx/recovery.elf not found
Oct 26 09:26:06 dnsmasq-tftp[3544]: sent /srv/tftpboot/6bxxxx/config.txt to 10.0.1.24
Oct 26 09:26:06 dnsmasq-tftp[3544]: sent /srv/tftpboot/6bxxxx/syscfg.txt to 10.0.1.24
Oct 26 09:26:06 dnsmasq-tftp[3544]: sent /srv/tftpboot/6bxxxx/usercfg.txt to 10.0.1.24
Oct 26 09:26:07 dnsmasq-tftp[3544]: file /srv/tftpboot/6bxxxx/bootcfg.txt not found
Oct 26 09:26:15 dnsmasq-tftp[3544]: sent /srv/tftpboot/6bxxxx/initrd.img to 10.0.1.24
Oct 26 09:26:19 dnsmasq-tftp[3544]: sent /srv/tftpboot/6bxxxx/bcm2711-rpi-4-b.dtb to 10.0.1.24
Oct 26 09:26:19 dnsmasq-tftp[3544]: file /srv/tftpboot/6bxxxx/overlays/overlay_map.dtb not found
Oct 26 09:26:19 dnsmasq-tftp[3544]: sent /srv/tftpboot/6bxxxx/overlays/rpi-poe.dtbo to 10.0.1.24
Oct 26 09:26:20 dnsmasq-tftp[3544]: sent /srv/tftpboot/6bxxxx/config.txt to 10.0.1.24
Oct 26 09:26:20 dnsmasq-tftp[3544]: sent /srv/tftpboot/6bxxxx/overlays/vc4-fkms-v3d.dtbo to 10.0.1.24
Oct 26 09:26:20 dnsmasq-tftp[3544]: sent /srv/tftpboot/6bxxxx/syscfg.txt to 10.0.1.24
Oct 26 09:26:20 dnsmasq-tftp[3544]: sent /srv/tftpboot/6bxxxx/usercfg.txt to 10.0.1.24
Oct 26 09:26:20 dnsmasq-tftp[3544]: sent /srv/tftpboot/6bxxxx/cmdline.txt to 10.0.1.24
Oct 26 09:26:22 dnsmasq-tftp[3544]: file /srv/tftpboot/6bxxxx/armstub8-gic.bin not found
Oct 26 09:26:22 dnsmasq-tftp[3544]: error 0 Early terminate received from 10.0.1.24
Oct 26 09:26:22 dnsmasq-tftp[3544]: failed sending /srv/tftpboot/6bxxxx/vmlinux to 10.0.1.24
Oct 26 09:26:29 dnsmasq-tftp[3544]: sent /srv/tftpboot/6bxxxx/vmlinux to 10.0.1.24
Oct 26 09:26:38 dnsmasq-dhcp[3544]: 248673221 available DHCP subnet: 10.0.1.255/255.255.0.0
Oct 26 09:26:38 dnsmasq-dhcp[3544]: 248673221 available DHCP subnet: 10.0.1.255/255.255.0.0
Oct 26 09:26:42 dnsmasq-dhcp[3544]: 2380323441 available DHCP subnet: 10.0.1.255/255.255.0.0
Oct 26 09:26:42 dnsmasq-dhcp[3544]: 2380323441 client provides name: 10.0.1.24
Oct 26 09:26:42 dnsmasq-dhcp[3544]: 2380323441 available DHCP subnet: 10.0.1.255/255.255.0.0
Oct 26 09:26:42 dnsmasq-dhcp[3544]: 2380323441 client provides name: 10.0.1.24

So my question is - am I misunderstanding this totally? Is it possible to netboot Ubuntu?

It seems to me that there are a lot of requested files that are not part of the Ubuntu dist that I don't understand where they are referred from other than that the firmware for netbooting is hardcoded for Raspbian OS specific booting?

3
  • Which of the two alternative approaches from the guide are you trying to implement? – Dmitry Grigoryev Oct 29 '20 at 12:43
  • 1
    The first, no SD – Viktor Hedefalk Oct 29 '20 at 22:52
  • I see that the first method is used to boot RPi OS. I'm by no means an expert in the topic, but it looks like you need the UEFI method to boot Ubuntu. – Dmitry Grigoryev Oct 30 '20 at 9:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.