rpi4 network boot

Matthew Grooms mgrooms at shrew.net
Sun Feb 7 14:33:24 UTC 2021


On 2/6/2021 11:01 PM, Klaus Küchemann wrote:
>> Am 07.02.2021 um 05:00 schrieb Matthew Grooms <mgrooms at shrew.net>:
>>
>>>> Am 07.02.2021 um 02:41 schrieb Matthew Grooms <mgrooms at shrew.net>:
>>>>
>>>>
>>>> /etc/exports:
>>>> /var/rpi4/netboot -ro -alldirs -maproot=root
>>> why '-ro‘ ??
>> It's intended to be read only. That's also what the freebsd diskless boot handbook article suggests to do ...
>>
>> https://docs.freebsd.org/en/books/handbook/advanced-networking/#network-diskless
> I like writing to the system I’ve booted on net0 and have no problem with that :-)

Cool. I'm trying to boot a bunch of these devices from the same export, 
so mounting them all rw to the same mount is not desirable.

>>> Am 05.01.2021 um 01:18 schrieb Matthew Grooms <mgrooms at shrew.net>:
>>> What’s  your output of :
>>>
>>> root at matthew:~# sockstat -l4
>>>
>>> and
>>>
>>> root at matthew:~#  cat /etc/fstab
>> I don't follow. For the boot server or the RPI4 host? I don't see how the fstab of the boot server could be relevant. The RPI4 host doesn't have a local filesystem. It's trying to boot from the nfs export …
>>
> yes, for the boot server,
> ….look the link you’ve posted above :
>
>   https://docs.freebsd.org/en/books/handbook/advanced-networking/#network-diskless
>
> please read point/ 10. / Under  "32.8.1. Setting Up the PXE Environment“.  !!!
>
> that’s why I asked for ’sockstat -l4` ( or `-l6` if you use  ipv6)
>
> there’s also a note in the link that `-ro` is only an option to save machines from humans, if you trust yourself, you can remove the `-ro` ;-)
>
As I mentioned before, I don't see why the contents of the fstab of the 
boot server is relevant. If your asking for the netstat as evidence of 
the nfs mount working correctly,I verified that it was by booting the 
RPI4 from an sd imagine and mounted the nfs export manually to verify. 
It's definitely working as intended.

>> Am 07.02.2021 um 05:00 schrieb Matthew Grooms <mgrooms at shrew.net>:
>>
>>> and why did you split the folders under ../netboot/..?
>> To serve the raspberry pi 4 what it wants during boot. A more complete layout under my netboot directory looks like this ...
>>
>> /var/rpi4/netboot/firmware
>> /var/rpi4/netboot/01-dc-a6-32-a8-54-13  -> /var/rpi4/netboot/firmware
>> /var/rpi4/netboot/freebsd
>> /var/rpi4/netboot/freebsd/boot/msdos -> /var/rpi4/netboot/firmware
> well, it would be simpler to
> mount a bootable(downloaded) rpi.img with mdconfig to your nfs-export-destination-directory
>
> or
>
>
> what I do and what is far more useful :
> we can `make buildworld buildkernel` directly
> into the nfs-mount-directory on the boot-server.

Yup. I'm cross compiling world/kernel on the boot server and performing 
an install into the RPI4 boot directory.

> -
>   my netboot was based on u-boot-tftp from the sd-card which
> worked  very well, and yes: with the right setup ‚loader.efi‘ is detected automatically
> without copying it to the msdos-partition IIRC.
>
>   I didn’t try the eeprom-pxe yet but I assume(from what I’ve read so far) your problem
> is currently the missing `fstab-mount` .

I wish the boot would get that far. As shown at the bottom of my log 
output, it hangs with the genet0 output at the end of the boot that 
repeats endlessly in a tight loop ...

genet0: gen_intr2
...

If it was a problem with an fstab entry, I'm pretty sure I would have 
been able to identify and solve that by now.

If you ( or anyone else ) get around to trying a PXE boot and devise a 
working setup, I'd love to hear how you did it.

Thanks,

-Matthew


More information about the freebsd-arm mailing list