Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Kernel panic: Unable to mount root fs via NFS
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
MiRoSa
n00b
n00b


Joined: 24 Mar 2014
Posts: 22

PostPosted: Thu Jul 10, 2014 8:24 am    Post subject: [Solved] Kernel panic: Unable to mount root fs via NFS Reply with quote

My PXE-Box get via tftp the kernel image...

It seems my kernel dont know how to NFS... but I have no idea why?

Kernel-Output:
Code:

...
e1000e: eth0 NIC Link is Up 100Mbps Full Duplex, Flow Control: Rx/Tx
e1000e 0000:00:19.0 eth0: 10/100 speed: disabling TSO
Sending DHCP requests ., OK
IP-Config: Got DHCP answer from 192.168.2.102, my address is 192.168.2.27
IP-Config: Complete:
    device=eth0, hwaddr=d8:50:e6:d2:..:.., ipaddr=192.168.2.27, mask=255.255.255.0, gw=192.168.2.1
    host=192.168.2.27, domain=misaro.de, nis-domain=(none)
    bootserver=192.168.2.102, rootserver=192.168.2.102, rootpath=
    nameserver0=192.168.2.1
...
   *** system waits here about 30 secs ***
...
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: cannot open root device "nfs" or unknown-block(2,0): error -6
Please append a correct "root=" boot option; here are the available partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
CPU: 1 PID: 1 Comm: swapper/0 NOt tainetd 3.12.21-gentoo-r1 #1
Hardware name: ASUS All Series/Q87T, BIOS 0904 05/14/2014
...


The kernel finds the net-driver, do a bootp request, but seems not to initiate the NFS

I dont get with tcpdump any nfs-related packets...

my pxelinux.cfg/C0A8021B:
Code:

DEFAULT /bzImage-igelfux
APPEND root=/dev/nfs nfsrootdebug nfsroot=192.168.2.102:/diskless/igelfux,nfsvers=4 ip=dhcp


my .config (i try to compile all important drivers into the kernel, but may be i need some more)
Code:

...
CONFIG_NETWORK_FILESYSTEMS=y
CONFIG_NFS_FS=y
# CONFIG_NFS_V2 is not set
CONFIG_NFS_V3=y
# CONFIG_NFS_V3_ACL is not set
CONFIG_NFS_V4=y
CONFIG_NFS_SWAP=y
# CONFIG_NFS_V4_1 is not set
CONFIG_ROOT_NFS=y
# CONFIG_NFS_USE_LEGACY_DNS is not set
CONFIG_NFS_USE_KERNEL_DNS=y
CONFIG_NFSD=y
# CONFIG_NFSD_V3 is not set
# CONFIG_NFSD_V4 is not set
CONFIG_LOCKD=y
CONFIG_LOCKD_V4=y
CONFIG_NFS_COMMON=y
CONFIG_SUNRPC=y
CONFIG_SUNRPC_GSS=y
CONFIG_SUNRPC_SWAP=y
...


Last edited by MiRoSa on Sat Jul 12, 2014 4:25 pm; edited 1 time in total
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1724

PostPosted: Thu Jul 10, 2014 7:14 pm    Post subject: Reply with quote

First, you need initramfs to make it work. You didn't provide it among boot params. Is it built into kernel already?
Second, you must have your network device's driver compiled into kernel. Modules will not work (at least not with default genkernel-generated initramfs)
Third, it seems your root is a directory tree. Again, if you use initramfs from genkernel, it won't work. You must turn it into livecd. In particular, you need your root stuffed into squashfs image, provide nfsroot that would allow you read squashfs image, then to make it work you must specify path to that image, type of image, and tell init scripts you want loop mount.

To make it work in other modes than livecd you would have to hack it a bit. Not like it was very hard, it's mostly a matter of your wants.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 42800
Location: 56N 3W

PostPosted: Thu Jul 10, 2014 8:51 pm    Post subject: Reply with quote

MiRoSa,

Code:
nfsvers=4
is a problem. I could never get that to work.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
MiRoSa
n00b
n00b


Joined: 24 Mar 2014
Posts: 22

PostPosted: Thu Jul 10, 2014 9:05 pm    Post subject: Reply with quote

Thx, for your answers!

with
Code:
nfsvers=3


I get a step further!

That was the solution!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum