Page 1 of 5

NFS Support

Posted: Wed Jun 23, 2021 7:02 pm
by Magu
Hello!

Please add the NFS client to the linux subsystem. I have a file server which is exposed to my LAN over NFS. I have tried mounting the retro game share on my Mister, but the NFS client seems to be missing.

Code: Select all

mount: /mnt/yamato: unknown filesystem type 'nfs'.
Since these files do not take up much space, can they please be added to the mister linux system. I don't need any support scripts or anything like that, but just the ability to add an NFS share to /etc/fstab and having it auto mount during startup.

Re: NFS Support

Posted: Wed Jun 23, 2021 7:09 pm
by pacoarcade
If it's technically viable, NFS client would be great.

Re: NFS Support

Posted: Wed Jun 23, 2021 7:09 pm
by Mellified
You can use CIFS AKA SAMBA today if you don't want to wait.

Re: NFS Support

Posted: Wed Jun 23, 2021 7:29 pm
by Bas
CIFS is a whole different cookie that not everyone can or wants to deal with server-side. NFS being the native file sharing solution on Linux, it'd make sense to include at least the client bits.

Re: NFS Support

Posted: Wed Jun 23, 2021 7:40 pm
by Magu
Mellified wrote: Wed Jun 23, 2021 7:09 pm You can use CIFS AKA SAMBA today if you don't want to wait.
I tried that a few months back, but something was missing preventing it from working. Some part of the CIFS client that used to be included aint anymore if i don't remember incorrectly.

Re: NFS Support

Posted: Wed Jun 23, 2021 7:45 pm
by Magu
Found it. mount.cifs is missing. You get this when running cifs_mount.sh

Code: Select all

mount: /tmp/cifs_mount: bad option; for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program.
and if you check the contents of /sbin:

Code: Select all

# ls /sbin/mount*
/sbin/mount.lowntfs-3g	/sbin/mount.ntfs  /sbin/mount.ntfs-3g

Re: NFS Support

Posted: Thu Jun 24, 2021 7:33 am
by Locutus73
Magu wrote: Wed Jun 23, 2021 7:45 pm Found it. mount.cifs is missing. You get this when running cifs_mount.sh

Code: Select all

mount: /tmp/cifs_mount: bad option; for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program.
and if you check the contents of /sbin:

Code: Select all

# ls /sbin/mount*
/sbin/mount.lowntfs-3g	/sbin/mount.ntfs  /sbin/mount.ntfs-3g
That’s a standard misleading error message.
Please run dmesg immediately after the cifs_mount.sh script and you’ll find the real root issue so you’ll be able to correct the problem.
Let me know.

Regards.

Locutus73

Re: NFS Support

Posted: Thu Jun 24, 2021 7:58 am
by Magu
Would you look at that. In dmesg it complained about unspecified username and SMB dialect. specified both (including "guest" as user), and now it works, dunno which was the show-stopper. Thank you!

Now I can reuse that 128GB micro-SD for something else ...

(I still do think that one should include the NFS client just because it's a fairly simple operation.)

Re: NFS Support

Posted: Mon Jun 28, 2021 5:04 pm
by Doozer
I am using NFS since the beginning and it is working perfectly fine. I have already asked Sorgelig in the past (atari-forum) about putting it in the config. He answered that he will think about it. Now with more people interested, he might change his mind.

NFS is not compiled inside the kernel but this can be achieved by adding the following this line into the configuration file "arch/arm/configs/MiSTer_defconfig". You will have to replace the kernel image on your sdcard.

Code: Select all

CONFIG_NFS_FS=y
Depending on your cross-compiler location you can tune the following for the compilation.

Code: Select all

make ARCH=arm CROSS_COMPILE=/opt/gcc-linaro/bin/arm-linux-gnueabihf- O=build/ MiSTer_defconfig
make ARCH=arm CROSS_COMPILE=/opt/gcc-linaro/bin/arm-linux-gnueabihf- O=build/ -j9 -k zImage dtbs
cat build/arch/arm/boot/zImage build/arch/arm/boot/dts/socfpga_cyclone5_de10_nano.dtb > build/zImage_dtb
From the image itself, nothing has to be done. The busybox binary has the NFS support already built-in. I am using nolock option but it depends on your NFS config.

Code: Select all

/bin/busybox mount <your ip>:<your server path> <mister destination path> -o nolock
Hope it will help some of you to get NFS mounting.
Cheers.

Re: NFS Support

Posted: Fri Sep 03, 2021 3:18 pm
by numbski
>cross-compiler

Could you kindly point me in the direction of the cross-compiler setup?

Re: NFS Support

Posted: Sat Sep 04, 2021 2:53 am
by RealLarry
numbski wrote: Fri Sep 03, 2021 3:18 pm >cross-compiler

Could you kindly point me in the direction of the cross-compiler setup?
Have a look at https://github.com/MiSTer-devel/Main_Mi ... for-MiSTer

Re: NFS Support

Posted: Tue Sep 28, 2021 7:15 am
by kahuna
Another upvote for getting NFS built by default on the MiSTer image!
Pretty please? ;)

Re: NFS Support

Posted: Fri Nov 26, 2021 12:54 pm
by MrMartian
Another one from me too please.. NFS is faster and easier than SMB/CIFS

Re: NFS Support

Posted: Fri Nov 26, 2021 3:17 pm
by RealLarry
Folks, Sorgelig seems to be not too interested in this - and that's totally okay - so we could do this by ourself. If there's enough interest I'll overcome into this and compile an approproate kernel for us. I did this multiple times for our tty2oled project to include the USB2RS232 kernel feature (superfluous as implemented by Sorgelig meanwhile).
viewtopic.php?t=1887

Re: NFS Support

Posted: Fri Nov 26, 2021 4:13 pm
by Doozer
This is the link to my kernel with only NFS on top of the standard MiSTer configuration. Now with the modular approach Soregelig has taken, kernel must be following the system image version., currently 5.15.1. Enjoy!

Code: Select all

Linux MiSTer 5.15.1-MiSTer #1 SMP Fri Nov 12 17:31:23 CET 2021 armv7l GNU/Linux
Link MiSTer 5.15.1 with NFS kernel image

It is only one line to be put inside the default MiSTer configuration file. @sorgelig, please add it as it is requested by many others. This would be terrific and more than appreciated.

Re: NFS Support

Posted: Sat Nov 27, 2021 6:32 am
by RealLarry
Doozer wrote: Fri Nov 26, 2021 4:13 pm This is the link to my kernel with only NFS on top of the standard MiSTer configuration. Now with the modular approach Soregelig has taken, kernel must be following the system image version., currently 5.15.1. Enjoy!

Code: Select all

Linux MiSTer 5.15.1-MiSTer #1 SMP Fri Nov 12 17:31:23 CET 2021 armv7l GNU/Linux
Link MiSTer 5.15.1 with NFS kernel image

It is only one line to be put inside the default MiSTer configuration file. @sorgelig, please add it as it is requested by many others. This would be terrific and more than appreciated.
Great effort! But I'm sure that a better place to open a ticket about this is his repo

Re: NFS Support

Posted: Wed Dec 22, 2021 3:50 pm
by RealLarry
I'm working on a script similar to cifs_mount.sh to mount NFS shares. While it is working so far (but not finished) I can confirm that NFS's throughout is WAY faster than CIFS, especially with WiFi. Not comparable.

Re: NFS Support

Posted: Wed Dec 22, 2021 5:37 pm
by Bas
That's a strange finding. Both protocols shouldn't really differ all that much in throughput for a simple device like this. Usually you only really start to see the hairy details with "real" network deployments with multiple nodes and a decent workload. What kind of differences do you see?

Re: NFS Support

Posted: Thu Dec 23, 2021 6:01 am
by RealLarry
Yeah, there isn't really a difference in speed but in responsiness and I don't see the point to use an other network protocol when doing my work between two nix boxes ;)

Re: NFS Support

Posted: Wed Dec 29, 2021 7:05 am
by RealLarry
Attached is my NFS mount script. Place it into /media/fat/Scripts and run it once.
Based on cifs_mount.sh but totally revamped. Feel free to use and comment.

Re: NFS Support

Posted: Wed Dec 29, 2021 12:08 pm
by pac
Thx @RealLarry - I assume that the script obviously needs the modified Mister-build, correct?

Re: NFS Support

Posted: Wed Dec 29, 2021 12:36 pm
by RealLarry
pac wrote: Wed Dec 29, 2021 12:08 pm Thx @RealLarry - I assume that the script obviously needs the modified Mister-build, correct?
If you mean a modified MiSTer Kernel by modified Mister-build, then yes. But if you are unable to build your own Kernel I can offer my one for sure.
EDIT: modified Kernel attached. Before use rename your /media/fat/linux/zImage_dtb to be safe in case of failure...then extract the ZIP to the same place and reboot. Done :)

Re: NFS Support

Posted: Mon Aug 08, 2022 12:49 am
by nedrysoft
RealLarry wrote: Wed Dec 29, 2021 7:05 am Attached is my NFS mount script. Place it into /media/fat/Scripts and run it once.
Based on cifs_mount.sh but totally revamped. Feel free to use and comment.
Hi, I've just got my MiSTer and I'm in the process of setting it up and the first thing I wanted to do after getting it installed and updated was to point it at my NFS server...which is how I've ended up here.

Many thanks for providing a pre-built kernel image with NFS enabled as it's saved me having to so it.

I was just looking at your mount script, and due to some broadband issues over the weekend (my service has been going up and down) I just spotted something that I'm curious about in your mount script.

When wait for server is enabled, why is it checking for IP connectivity by pinging google rather than the NFS server?

Was this done for a specific reason? It would make more sense (at least it would to me!) to ping the NFS server, I can't image there are many people who have their NFS server in this situation external to their LAN (or subnet).

If it's purely connectivity that is desired, then then pinging 1.1.1.1 with a TTL of 1 would at least limit the check so that DNS resolution is not required, but it would at least check that connectivity/routing as far as the gateway is at the very least working.

I really appreciate you providing both the kernel and the script as they'll be a big time saver, but it was just something I noticed, mainly because at that exact moment, my broadband went down and I was a little confused as to why it thought there was no IP.

Re: NFS Support

Posted: Mon Aug 08, 2022 8:19 am
by RealLarry
nedrysoft wrote: Mon Aug 08, 2022 12:49 am I was just looking at your mount script, and due to some broadband issues over the weekend (my service has been going up and down) I just spotted something that I'm curious about in your mount script.

When wait for server is enabled, why is it checking for IP connectivity by pinging google rather than the NFS server?

Was this done for a specific reason? It would make more sense (at least it would to me!) to ping the NFS server, I can't image there are many people who have their NFS server in this situation external to their LAN (or subnet).
No, you are absolutely right. Even if this script still works, it's more or less a draft to give users some ideas to work with. Feel free to adopt and mod it for your personal needs.

Re: NFS Support

Posted: Mon Oct 31, 2022 2:15 pm
by RealLarry
New NFS aware Kernel, this time with the DE10 Nano Overclock Patch, which was already merged into Main.

Re: NFS Support

Posted: Sun Dec 25, 2022 6:26 am
by RealLarry

Updated Linux Kernel, but NFS aware. That's the point :)


Re: NFS Support

Posted: Wed Jan 04, 2023 4:33 pm
by Bas

I reported the request in a Github issue.


Re: NFS Support

Posted: Thu Mar 02, 2023 9:33 am
by fooness

Hello everyone.

Thank you all for your efforts in these regards! And thank you, Bas, for creating the GitHub issue. I basically only came here to let you know that adding kernel support for NFS was greenlit by Sorgelig, which is pretty amazing. https://github.com/MiSTer-devel/Linux-K ... 1450281378

I’m rather sure there will be ongoing efforts from your side, that’s why I wanted to say “Thank you” in advance for maybe making NFS mounts the same comfortable and easy experience, as CIFS mounts. I will keep an eye on this forum thread, and on the GitHub issue, in case I could help with any testing of possible scripts or whatnot.

In the meantime, I’m very looking forward to setting up my first MiSTer FPGA, once all components are finally being delivered to my door. 😊


Re: NFS Support

Posted: Fri Mar 03, 2023 8:49 pm
by Bas

Oh nice! I'll get on it.


Re: NFS Support

Posted: Sat Mar 04, 2023 11:33 am
by RealLarry

Attached is the latest version of my script to mount NFS (v4) shares. There are only minor changes to the last version.
Maybe @Sorgelig will take it into his account, which wpuld be very welcome.