Hi, I’m trying to start NFS server on my PinePhone,
seems I can’t do that because of missing nfsd kernel module:
Dec 10 00:15:11 plasma-mobile mount[4017]: mount: /proc/fs/nfsd: unknown filesystem type 'nfsd'.
Dec 10 00:15:11 plasma-mobile systemd[1]: proc-fs-nfsd.mount: Mount process exited, code=exited,
Dec 10 00:15:11 plasma-mobile systemd[1]: Failed to mount NFSD configuration filesystem.
Dec 10 00:15:11 plasma-mobile systemd[1]: Dependency failed for NFS server and services.
No nfsd FS support in kernel either:
$ grep nfs /proc/filesystems
nodev nfs
nodev nfs4
And also I’m not able to find the module in any remote packages:
[bam@plasma-mobile ~]$ sudo pacman -Fy nfsd.ko.xz
:: Synchronizing package databases...
mobile is up to date
core is up to date
extra is up to date
community is up to date
[bam@plasma-mobile ~]$
How can I add the module?
I’m on Manjaro Plasma-Mobile Developer Edition.
[ray@ray-pc ~]$ zcat /proc/config.gz | grep NFS
# CONFIG_USB_FUNCTIONFS is not set
CONFIG_XENFS=m
CONFIG_XEN_COMPAT_XENFS=y
CONFIG_KERNFS=y
CONFIG_NFS_FS=m
CONFIG_NFS_V2=m
CONFIG_NFS_V3=m
CONFIG_NFS_V3_ACL=y
CONFIG_NFS_V4=m
CONFIG_NFS_SWAP=y
CONFIG_NFS_V4_1=y
CONFIG_NFS_V4_2=y
CONFIG_PNFS_FILE_LAYOUT=m
CONFIG_PNFS_BLOCK=m
CONFIG_PNFS_FLEXFILE_LAYOUT=m
CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="kernel.org"
# CONFIG_NFS_V4_1_MIGRATION is not set
CONFIG_NFS_V4_SECURITY_LABEL=y
CONFIG_NFS_FSCACHE=y
# CONFIG_NFS_USE_LEGACY_DNS is not set
CONFIG_NFS_USE_KERNEL_DNS=y
CONFIG_NFS_DISABLE_UDP_SUPPORT=y
CONFIG_NFS_V4_2_READ_PLUS=y
CONFIG_NFSD=m
CONFIG_NFSD_V2_ACL=y
CONFIG_NFSD_V3=y
CONFIG_NFSD_V3_ACL=y
CONFIG_NFSD_V4=y
# CONFIG_NFSD_BLOCKLAYOUT is not set
# CONFIG_NFSD_SCSILAYOUT is not set
# CONFIG_NFSD_FLEXFILELAYOUT is not set
# CONFIG_NFSD_V4_2_INTER_SSC is not set
# CONFIG_NFSD_V4_SECURITY_LABEL is not set
CONFIG_NFS_ACL_SUPPORT=m
CONFIG_NFS_COMMON=y
If they are not enabled then they will have to be enabled and the kernel recompiled. I do not know which kernel you are using to check.
A lot of the time one module pulls in others. nfsd might pull in some nfs modules and maybe some others. Some modules sometimes may be disabled by default and might be needed for the user’s special cases. Some modules will not show up in the config until certain ones get enabled. It would be best if the maintainer who maintains that kernel enable and compile it if he chooses to do so. I believe it is @philm
If you want to try compiling it you can start by enabling what I posted above in the PKGBUILD’s config file and build/test it.
@philm would you mind enabling it as a module, please?
RPi kernels have this and it’s needed for a work I do for Plasma SDK:
$ sudo pacman -Fy nfsd.ko
:: Synchronizing package databases...
mobile is up to date
core is up to date
extra is up to date
community is up to date
core/linux-rpi4 5.10.81-1
usr/lib/modules/5.10.81-1-MANJARO-ARM-RPI/kernel/fs/nfsd/nfsd.ko
core/linux-rpi4-mainline 5.15.4-1
usr/lib/modules/5.15.4-1-MANJARO-ARM-RPI/kernel/fs/nfsd/nfsd.ko
core/linux-rpi4-rc 5.15.rc7-1
usr/lib/modules/5.15.0-rc7-1-MANJARO-ARM/kernel/fs/nfsd/nfsd.ko
community/linux-rpi4-udl 5.10.44-2
usr/lib/modules/5.10.46-2-udlv8+/kernel/fs/nfsd/nfsd.ko
@bam I had some time to kill today and compiled a test kernel for you to test using the PKGBUILD repo you posted above. I do not have a pinephone so can not test it.
Here is the config diff. Some was changed by the system due to different compiling environment, config from older kernel which the newer 5.15.7 kernel added a couple of modules.
[ray@ray-pc Desktop]$ cat config-nfsd.diff
--- config-old 2021-12-10 14:10:03.811950229 -0600
+++ config 2021-12-10 13:46:32.507622484 -0600
@@ -1,8 +1,8 @@
#
# Automatically generated file; DO NOT EDIT.
-# Linux/arm64 5.15.6-1 Kernel Configuration
+# Linux/arm64 5.15.7-2 Kernel Configuration
#
-CONFIG_CC_VERSION_TEXT="gcc (GCC) 10.2.0"
+CONFIG_CC_VERSION_TEXT="aarch64-unknown-linux-gnu-gcc (GCC) 10.2.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=100200
CONFIG_CLANG_VERSION=0
@@ -5972,9 +5972,9 @@
CONFIG_NFS_FS=y
CONFIG_NFS_V2=y
CONFIG_NFS_V3=y
-# CONFIG_NFS_V3_ACL is not set
+CONFIG_NFS_V3_ACL=y
CONFIG_NFS_V4=y
-# CONFIG_NFS_SWAP is not set
+CONFIG_NFS_SWAP=y
CONFIG_NFS_V4_1=y
CONFIG_NFS_V4_2=y
CONFIG_PNFS_FILE_LAYOUT=y
@@ -5987,16 +5987,27 @@
# CONFIG_NFS_USE_LEGACY_DNS is not set
CONFIG_NFS_USE_KERNEL_DNS=y
CONFIG_NFS_DISABLE_UDP_SUPPORT=y
-# CONFIG_NFS_V4_2_READ_PLUS is not set
-# CONFIG_NFSD is not set
+CONFIG_NFS_V4_2_READ_PLUS=y
+CONFIG_NFSD=m
+CONFIG_NFSD_V2_ACL=y
+CONFIG_NFSD_V3=y
+CONFIG_NFSD_V3_ACL=y
+CONFIG_NFSD_V4=y
+# CONFIG_NFSD_BLOCKLAYOUT is not set
+# CONFIG_NFSD_SCSILAYOUT is not set
+# CONFIG_NFSD_FLEXFILELAYOUT is not set
+# CONFIG_NFSD_V4_2_INTER_SSC is not set
+# CONFIG_NFSD_V4_SECURITY_LABEL is not set
CONFIG_GRACE_PERIOD=y
CONFIG_LOCKD=y
CONFIG_LOCKD_V4=y
+CONFIG_NFS_ACL_SUPPORT=y
CONFIG_NFS_COMMON=y
CONFIG_NFS_V4_2_SSC_HELPER=y
CONFIG_SUNRPC=y
CONFIG_SUNRPC_GSS=y
CONFIG_SUNRPC_BACKCHANNEL=y
+CONFIG_SUNRPC_SWAP=y
# CONFIG_SUNRPC_DEBUG is not set
# CONFIG_CEPH_FS is not set
CONFIG_CIFS=m
Oh, very kind from your side, thank you!
I’ll try it, hopefully my phone boots
How am I supposed to install .tar? Maybe you could also create a package for me so I could remove it later? It’s not necessary, though. (I also have to probably check bootloader so it boots the new kernel)
I also would like to point that suggested changes are meant not only for me but for all Plasma developers shall they wanted to use cross-compiler.
No clue but it should have installed everything. I’m not sure how the pinephone works. I suspect people should have to not do anything on kernel upgrades. Normally old kernel gets removed before new kernel gets installed.
Pretty much. Everything that is needed as far as depends is installed on the master. It processes everything to the slaves to be compiled and gets sent back to the master to be put together. This simple way will work for building all packages. There is a distcc package especially for this in AUR for the x86 desktop for this scenario.
That’s interesting, but maybe works not very well when you have all the sources on PC side.
So for Plasma ARM development we choice another scheme with sysroot cross-SDK, as I linked above.
That distcc might still be an option, needs further investigation…
@Darksky next time simply create a PR/MR on gitlab, the CI will build the kernel and you can link the output to the user for review. Then the user can comment on the change and I might pick it up next time I push packages