
On my router I already ran ISC dhcp server and dnsmasq for other reasons, so I decided to extend that config to also provide TFTP boot. Has been mounted (since the file we need is on that share). Some things I want to point out: this will fail to mount /nfs/docker/loop since the file is not created yet, so for the first time, it's probably wise to commentĪlso, after we setup the loop device mount and enable this line, the x-systemd.requires=/nfs/docker option tells systemd to mount the last line after /nfs/docker The /boot is mounted, more for convenience than anything else (if I want to change a boot configuration, I remount it read-write before changing and rebooting). nfs/docker/loop /var/lib/docker ext4 loop,x-systemd.requires=/nfs/docker 0 2 local:/docker /nfs/docker nfs defaults,vers= 4. local:/tftpboot /boot nfs defaults,vers= 4. I think the important partsįor netboot are root=/dev/nfs, nfsroot=, ip=dhcp and the rootwait arguments.Īfter getting the root filesystem ready, I updated the /etc/fstab file: Where 192.0.2.2 represents my NAS (but not really, I'm using RFC5737 documentation ranges). Since we are going to use /tftpboot as the boot loader, we can configure how we are going to boot in /tftpboot/cmdline.txt: root=/dev/nfs nfsroot=192.0.2.2:/nfs_root,vers=4.1,proto=tcp rw ip=dhcp console=tty1 elevator=deadline rootwait cgroup_enable=memory cgroup_memory=1 The /docker share I started out as an empty one.

How I exactly created these, I'm not sure since it's been a while, but I think I just copied /boot to nas.local:/tftpboot and / (without /boot) to

I tried to document all the steps to reproduce, but I'm sure I forget some part that is obvious to me now. To run DHCP from your router, your setup might be simpler with just a RPi and a NAS. The NAS can do TFTP boot as well, but for other reasons I need my router to handling DHCP (and bootp). The Raspberry Pi 3B+ has a built-in netboot mode, just take out the SD card 3.

Is it possible to run my raspberry pi setup with docker completely without sd-card? Of course this went wrong at some point the machine did not boot anymore. I had a RPi with docker setup and used netboot, but had an SD card for It is not a secret that the most fragile part of a raspberry pi setup is the SD card.
