Dear Martin, On Tue, 4 Mar 2025 22:50:00 +0100 Martin Wege <martin.l.wege@xxxxxxxxx> wrote: > On Mon, Mar 3, 2025 at 9:40 AM Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx> wrote: > > > > Hi, > > > > On 28.02.25 11:57, Sascha Hauer wrote: > > > On Fri, Feb 21, 2025 at 12:54:00PM +0100, Martin Wege wrote: > > >> On Wed, Feb 12, 2025 at 3:33 PM Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> wrote: > > >>> > > >>> Hi Martin, > > >>> > > >>> On Tue, Feb 11, 2025 at 01:56:58PM +0100, Martin Wege wrote: > > >>>> Hello! > > >>>> > > >>>> Does barebox have support to mount a NFSv.2 filesystem? > > >>> > > >>> No, not yet. For NFSv4 we would first need TCP support. While we started > > >>> to integrate a TCP stack we are not there yet unfortunately. > > >> > > >> How long is this going to take? > > > > > > I don't think this will happen anytime soon. It's quite some work and > > > our bandwidth for adding such a feature without (paying) customer > > > demand is limited. > > > > > > That said, the lack of NFSv4 support is nagging me personally as well. > > > > We had a discussion about this last year, but it didn't result in any > > upstream code yet: > > https://lore.barebox.org/barebox/CAAvCNcCZhS8mkvdgcJ2L-eiur+OxgWEXRLnadO_HFyHfSi7WFA@xxxxxxxxxxxxxx/ > > > > One question that I still have, is what do you use NFSv4 for? > > Is it just for development and your IT is disabling NFSv3? > > No, NFSv4.1 (NFSv4.0 is obsolete due to bugs) offers better > performance, more flexibility, smaller footprint, better caching > (delegations), ACLs, SELinux support, and can be tunneled through > firewalls because it only uses TCP port 2049 and nothing else. > > > > > Do you use it in the field? > > Yes, we do > > > > > Knowing about the use case helps with prioritizing future work. > > As it stands, NFS is mostly understood as development feature and > > it's expected so far that interested users will be able to provide > > a NFSv3 UDP server in their development network. > > No, NFS is not only a development feature. For example CERN uses NFS > boot (with patched NFSv4.1 stack) in radiation environments - that > saves a SSD per embedded machine, which is typically one of the most > affected pieces from radiation. AIRBUS also uses nfsboot in their > equipment and flight deck systems. > > So yes, you would have customers for NFSv4.1 support in barebox. Just wanted to chime in to amplify this a bit, since we are also using NFSv4.2 netboot (though only TFTP in barebox for now): Your arguments are solid, and make a lot of sense. If you are going to replace more and more microcontroller based nodes with Linux capable SoCs, because it makes a lot of economical sense (hardware costs are very similar nowadays, and software development is 10x easier and cheaper on Linux than on a uC), you will end up inevitably with a lot of Linux nodes inside of a machine or industrial plant, where you previously had uC's. So, do you want to continue using 1970's tech (RS485/modbus) or 1980's tech (CAN) to communicate between all those nodes, or will you use Linux's native language (TCP/IP) which also immediately means another 10x reduction in software development costs of the networking part? If you choose the latter, you will also get significant HW cost savings basically for free if you also net-boot (via NFS and/or TFTP). In other words, why are we not already doing this? At least we are. We are starting to use Single Pair Ethernet almost everywhere where there were other field-busses involved traditionally. So we noticed that we end up with a lot of boards running Linux connected together via anything from 10Base-T1L to 1000Base-T1. Replace the eMMC chip on all but one of them with a cheap 2MiB SPI-NOR flash to load barebox and netboot from one single board running an NFSv4.2 (and TFTP) server serving the kernel and rootfs for all the others from a single eMMC, that can be updated with a single RAUC bundle guaranteeing consistent software and trivially easy updates on all nodes at once. Not to mention the benefit of trivial repairs because all boards are basically dumb and don't need to be flashed with software that matches the machine they are being replaced in, etc... To be fair though, it isn't strictly needed for barebox to have NFS support for our use-case, since it suffices to load the kernel (and possibly an initramfs) via TFTP and mount the nfsroot from the kernel, but IMHO it is certainly valuable to have basic NFSv4.2 support in barebox. It would facilitate the use of just 1 protocol instead of 2. I also agree that NFSv3 support in that regard offers little value since you really don't want to base everything on this obsolete version with all of its limitations. But also a bit of caution to be mindful of: Cybersecurity. Of course barebox can be made to only boot signed fit images, but are there other potential attack vectors? What if the NFS server needs to be secured with with GSS and kerberos? Barebox possibly won't be able to access it unless it also supports that. P.S.: I am currently not subscribed to the barebox mailing list, so I don't know if this email will get forwarded by the list server. Best regards, -- David Jander