NFS Not SUpported byu Kernel

A whole bunch of things are kind of causing some issues for me and as of late it has been my inability to get NFS working for MPI.

I keep getting:

Not starting NFS kernel daemon: no support in current kernel.

Why is this happening with the L4T Distro? Anyway to resolve it?

Thanks

You need to compile and flash a new kernel with “NFS server support” checked in the config. FYI, this is a linux config item in general, not related to L4T nor related to Ubuntu…it’s simply a feature not configured by default. It would be a security issue if enabled nfs export without setting it up (assuming you are on a public network).

You can likely configure the kernel source as current config using /proc/config.gz, and add NFS server support as a module (avoids flashing the kernel). If you build this and get some form of crash/Oops upon module use, you will probably have to flash the kernel and not just build a module…I’ve never tried so I can’t tell you which works (sometimes enabling a module forces a non-module feature elsewhere…which can break the module if the kernel isn’t also rebuilt).

If you don’t know if you are using NFSv3 or NFSv4 you could check both of those once the module is selected, but you would save space if you compile only what you need. You might also need to add related packages for NFS servers…the current kernel is already set up to allow reading other NFS servers, it just can’t act as a server without this.

Could you walk me through recompiling the kernel with NFS support please? I am not sure how to recompile it for L4T.

Thank You for the information!

The gist is this…you need kernel source matching the existing kernel. Try:
https://developer.nvidia.com/linux-tegra-rel-19

From there download kernel source:
https://developer.nvidia.com/sites/default/files/akamai/mobile/files/L4T/kernel_src.tbz2

Unpack it on your Jetson. Parts of this need to be done with “admin”/root authority, and since it is Ubuntu, from your login just run “sudo -s”. You could type “sudo” before every command requiring root, but it will simplify it if you just sudo -s prior to doing this.

Because the kernel is version 3.10.24, I suggest you unpack it in /usr/src/kernels/3.10.24/.

I’m guessing you are using L4T R19.2, which they ship with, so yours will differ from what I’m giving (default for R19.3). The command

uname -r

should read something like this:
3.10.24-gf455cd4

So…to make life simple and not copy source all over, cd to /usr/src/kernels/, and make a symbolic link via this versioned name to the generic 3.10.24 (remember, uname -r is likely different for you and use what your uname -r says):

ln -s 3.10.24 3.10.24-gf455cd4

Now you can

cd /usr/src/kernels/`uname -r`

From there copy your running configuration:

gunzip < /proc/config.gz > .config

(this decompresses and redirects to the .config file)

You may have to install something like libncurses5 and/or libncurses5-dev for menuconfig to work (it’ll tell you if this is the case), but once you have it, from the directory you just added .config to, you can do this:

make menuconfig

From inside menuconfig, at the bottom, see the “Load” option (right arrow to reach it). Load the .config file which should match your system since you just put the file there. Go down to “General setup”, make sure that within this “Local version” is also set to uname -r. At this point the menuconfig should contain updatable setup which starts exactly as your current system runs. You’ll always start here, and if in doubt, “make mrproper”, and copy .config again from /proc/config.gz, and load menuconfig from this…you’ll always start out matching this way.

If you are satisfied your menuconfig is a copy of current system, you can add NFS server features. For NFSD (server, not client), scroll down to “File systems”, and from in that again go down to “Network File Systems”. Things needed for a client will already be set up there, what you want is to be an NFS server (NFS daemon). Scroll down to “NFS server support”, and hit the “m” key to enable it as a module (you could just check it on and not as a module, but you don’t need to be a server to boot the system). This will cause server support items for version 3 and 4 to appear, you will have whichever version you use. Probably version 4, but it wouldn’t hurt to make both available, both version 3 and 4…then you can use whichever works. Space bar enables, NFS server is already a module, this adds features within the module.

You’re set up now to scroll right to “Save” and save menuconfig to “.config”.

There are lots of options how to compile, but if you really want to keep it simple, just run

make -j4

and it will go for quite awhile then finish. The -j4 makes it use all 4 cpu cores and run faster.

Subdirectory arch/arm/boot/ will contain zImage, used for kernel flashing. You will want to “make modules_install” before flashing though, this will add the new NFS server module to “/lib/modules/uname -r”. Since you don’t need to install NFS daemon to boot, you could technically avoid this. I’m guessing the module will be in fs/nfsd/ with a name like “nfsd.ko”, and you could test first before flashing. You’d cd to fs/nfsd/, and run “insmod nfsd.ko” to see if it loads. If it does, the “make modules_install” will put this in the module directory. Follow the flashing instructions using the zImage.

Roughly, if you have not upgraded to R19.3 and still use R19.2 default, you’ll save the original L4T kernel directory’s zImage as backup (meaning you have the original kernel in the L4T download and you might want it back some day), and then replace the zImage there with the one you just created. Read about flashing in L4T docs for the rest. Just as a note, if you have upgraded to R19.3 and chose to use U-boot instead of fastboot (fastboot is the default), you’ll need put zImage in Jetson’s /boot directory (because U-boot looks here instead of the GPT partition where fastboot looks).

Flashing with “flash.sh -k 6 jetson-tk1 mmcblk0p1” puts the new kernel in. Just don’t do this until you’ve read the info on flashing.

FYI, kernel compile on Jetson is no different than any linux, and the Ubuntu distribution on Jetson is a full linux system. The difference is in installing the kernel since it is using fastboot or U-boot boot loader instead of grub. Module install is standard too, anything you read for Ubuntu is good for this.

Thank you! Clear and to the point and it worked perfectly!