Posts: 3
Joined: Tue Aug 14, 2018 10:23 pm

[SOLVED] Network boot with fedora server: Kernel panic, unable to mount root fs

Tue Aug 14, 2018 11:55 pm

For the benefit anyone else who might run into this problem:
tldr: Pi tries to connect to NFS over UDP. Fedora has disabled UDP for NFS by default. Solution: add proto=tcp to the nfsroot option in cmdline.txt.

Example cmdline.txt:

Code: Select all

root=/dev/nfs nfsroot=,vers=3,proto=tcp ip=dhcp elevator=deadline


I was trying to netboot a Pi 3, using my Fedora desktop as server. Following the netboot tutorial, I set up dnsmasq as a dhcp proxy for PXE and had an nfs share with the root file system up and running. I could mount that nfs share from raspbian, but when trying to get the Pi to boot with tftp it would pause after showing its dhcp config, and then throw a kernel panic after a while:

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

It wasn't able to read the NFS root file system. A search told me that the NFS protocol version was important, but I already had vers=3 in my cmdline.txt. I tried vers=2 and vers=4, no change. I tried using my other Pi3 as the nfs server, and it did boot from that share. Time to download wireshark...

So looking at the packet capture, it was clear that the NFS server on Fedora was not willing to talk to the Pi. "PROGRAM_NOT_AVAILABLE", it responded to every request. More searching made it dawn on me that the Pi was trying to connect nfs over udp, and Fedora was only accepting tcp connections. Apparently they disabled nfs over udp. So after adding proto=tcp to the nfsroot option and restarting, the Pi booted to the login prompt.

Maybe there's some benefit from running nfs over tcp for everyone else as well.

Return to “Pidora / Fedora”