erichabg
Posts: 20
Joined: Sat Jun 01, 2013 9:29 am

After kernel update to 5.10.11 boot from nfs fails

Sun Feb 14, 2021 3:16 pm

After update of the kernel (via apt update) to V5.10.11 boot from nfs fails with kernel panic.
Config:
/boot is on sd card
/(root) is on nfs share

cmdline is:
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/nfs nfsroot=192.168.178.137:/export/nfs5/efraspi8a/root,udp,v3 smsc95xx.turbo_mode=N rw ip=192.168.178.114 rootwait elevator=deadline

this worked until the update of today

Now I downgraded the kernel to V5.4.72-v7+ and all works well again!

Is nfs support removed from the new kernel?

Regards
Erich

User avatar
DougieLawson
Posts: 41900
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: After kernel update to 5.10.11 boot from nfs fails

Sun Feb 14, 2021 5:09 pm

These NFS options are defined in the 5.10.14 kernel.

Code: Select all

# CONFIG_USB_FUNCTIONFS is not set
CONFIG_KERNFS=y
CONFIG_NFS_FS=y
CONFIG_NFS_V2=y
CONFIG_NFS_V3=y
CONFIG_NFS_V3_ACL=y
CONFIG_NFS_V4=y
CONFIG_NFS_SWAP=y
CONFIG_NFS_V4_1=y
CONFIG_NFS_V4_2=y
CONFIG_PNFS_FILE_LAYOUT=y
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_ROOT_NFS=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 is not set
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=y
CONFIG_NFS_COMMON=y
Test your system with that kernel by running sudo rpi-update then rebuilding your NFS TFTP server image and initramfs.
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on Twitter/LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

erichabg
Posts: 20
Joined: Sat Jun 01, 2013 9:29 am

Re: After kernel update to 5.10.11 boot from nfs fails

Mon Feb 15, 2021 8:44 am

Hello,
thanks for your quick response.

I'm not booting from TFTP image, as mentioned the /boot is on ssd and only the root is on the nfs server.
This worked for years now with 3 raspberries.

Now after kernel update the boot fails with kernel panic.

Something has changed. But what?

erichabg
Posts: 20
Joined: Sat Jun 01, 2013 9:29 am

Re: After kernel update to 5.10.11 boot from nfs fails

Mon Feb 15, 2021 8:48 am

Sorry /boot is on sdcard not ssd.

erichabg
Posts: 20
Joined: Sat Jun 01, 2013 9:29 am

Re: After kernel update to 5.10.11 boot from nfs fails

Mon Feb 15, 2021 11:29 am

Now I have done the following test with an old Pi (it took me hours yesterday to get my smarthome (based on some Pi 3B and Pi4) running again after the apt upgrade)

1) downloaded the latests Image of Rasbian OS lite (date of today is 2021-02-15)
2) unpacked the image to a sdcard
3) power up the Pi and config language etc.
4) check linux version via uname -r -> Kernel 5.4.83+
5) mount nfs share to /mnt/nfs5
6) copy root to share via # rsync -avx / /mnt/nfs5/efraspi1lite/root/
7) remove / from /etc/fstab on nfs share
8) change /boot/cmdline.txt to
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/nfs nfsroot=192.168.178.137:/export/nfs5/efraspi1lite/root,udp,vers=3 rw ip=dhcp rootwait elevator=deadline
9) reboot
10) checked if root was loaded from nfs share -> OK
11) # apt update
12) # apt upgrade
The following pakets are updated:
base-files bluez-firmware ca-certificates device-tree-compiler file firmware-atheros firmware-brcm80211 firmware-libertas firmware-misc-nonfree firmware-realtek iproute2 libgnutls30 libldap-2.4-2 libldap-common libmagic-mgc libmagic1 libpam-systemd libraspberrypi-bin libraspberrypi-dev libraspberrypi-doc libraspberrypi0 libsystemd0 libudev1 libzstd1 python-rpi.gpio raspberrypi-bootloader raspberrypi-kernel raspberrypi-sys-mods
raspi-config rpi-eeprom rpi.gpio-common sudo systemd systemd-sysv tzdata udev unzip

apt reported the kernel update "update the kernel with raspberrypi-kernel armhf 1.20210201-1"

after the successful update /lib/modules shows the libraries of kernel 5.10.11...

13) reboot -> fails with
VFS: Unable to mount root fs via NFS
...
"end Kernel panic - not syncing: No working init found. Try passing init= option to kernel...

I have used this procedure since years for all my (up to now 10 raspis) and it worked like a charm until now.

Any idea what's going wrong? What can I do?

erichabg
Posts: 20
Joined: Sat Jun 01, 2013 9:29 am

Re: After kernel update to 5.10.11 boot from nfs fails

Mon Feb 15, 2021 11:42 am

With some trail and error I have found the solution!
I have to remove the "udp" in the command line.
With "dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/nfs nfsroot=192.168.178.137:/export/nfs5/efraspi1lite/root,vers=3 rw ip=dhcp rootwait elevator=deadline"
It works again!

Return to “Raspberry Pi OS”