You are not logged in.

#1 2014-11-18 07:50:52

wtx
Member
Registered: 2014-06-09
Posts: 76

[SOLVED] qemu - starting system from nfs-root

Hello,

I'm trying to start Linux under qemu using nfs-root, but it doesn't work.
I have configured and started nfs-server with appropriate share /nfs_qemu.
I've compiled in support for nfs-root into the qemu-linux-kernel.
I am able to mount the share /nfs_qemu manually, but Linux under qemu is not.
Here is part of logs from qemu linux:


[    1.259318] 8139cp 0000:00:03.0 eth0: link up, 100Mbps, full-duplex, lpa 0x05E1
[    1.292619] IP-Config: Complete:
[    1.292878]      device=eth0, hwaddr=52:54:00:12:34:56, ipaddr=12.0.0.2, mask=255.255.255.0, gw=255.255.255.255
[    1.293368]      host=12.0.0.2, domain=, nis-domain=(none)
[    1.293519]      bootserver=12.0.0.1, rootserver=12.0.0.1, rootpath=
[    1.504619] tsc: Refined TSC clocksource calibration: 3092.978 MHz
[    1.811353] input: ImExPS/2 Generic Explorer Mouse as /devices/platform/i8042/serio1/input/input3
[    2.505155] Switched to clocksource tsc

[   96.847732] VFS: Unable to mount root fs via NFS, trying floppy.
[   96.851498] VFS: Cannot open root device "nfs" or unknown-block(2,0): error -6
[   96.851672] Please append a correct "root=" boot option; here are the available partitions:
[   96.852003] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
[   96.852059] CPU: 0 PID: 1 Comm: swapper Not tainted 3.15.6 #3
[   96.852059] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140617_173321-var-lib-archbuild-testing-x86_64-tobias 04/01/2014
[   96.852059]  ffff88000705fe68 ffff88000705fdd8 ffffffff81613b9d ffff88000705fe58
[   96.852059]  ffffffff816120f1 ffffffff00000010 ffff88000705fe68 ffff88000705fe00
[   96.852059]  ffffffff81612573 ffff88000705fe78 ffffffff8142ed1a 0000000000000000
[   96.852059] Call Trace:
[   96.852059]  [<ffffffff81613b9d>] dump_stack+0x19/0x1b
[   96.852059]  [<ffffffff816120f1>] panic+0xb0/0x1bc
[   96.852059]  [<ffffffff81612573>] ? printk+0x4a/0x52
[   96.852059]  [<ffffffff8142ed1a>] ? class_dev_iter_next+0x2a/0x50
[   96.852059]  [<ffffffff81cbd1d5>] mount_block_root+0x199/0x230
[   96.852059]  [<ffffffff81cbd35d>] mount_root+0xf1/0xfa
[   96.852059]  [<ffffffff81cbd49d>] prepare_namespace+0x137/0x16f
[   96.852059]  [<ffffffff81cbcef4>] kernel_init_freeable+0x1cf/0x1df
[   96.852059]  [<ffffffff8160f460>] ? rest_init+0x80/0x80
[   96.852059]  [<ffffffff8160f469>] kernel_init+0x9/0xf0
[   96.852059]  [<ffffffff81620a3a>] ret_from_fork+0x7a/0xb0
[   96.852059]  [<ffffffff8160f460>] ? rest_init+0x80/0x80
[   96.852059] Kernel Offset: 0x0 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffff9fffffff)
[   96.852059] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)


and part of logs from nfs-server side:

Nov 18 08:29:43 localhost rpc.mountd[8675]: authenticated mount request from 12.0.0.2:695 for /nfs_qemu (/nfs_qemu)
Nov 18 08:29:48 localhost rpc.mountd[8675]: authenticated mount request from 12.0.0.2:810 for /nfs_qemu (/nfs_qemu)
Nov 18 08:29:58 localhost rpc.mountd[8675]: authenticated mount request from 12.0.0.2:874 for /nfs_qemu (/nfs_qemu)
Nov 18 08:30:18 localhost rpc.mountd[8675]: authenticated mount request from 12.0.0.2:674 for /nfs_qemu (/nfs_qemu)
Nov 18 08:30:48 localhost rpc.mountd[8675]: authenticated mount request from 12.0.0.2:827 for /nfs_qemu (/nfs_qemu)
Nov 18 08:31:18 localhost rpc.mountd[8675]: authenticated mount request from 12.0.0.2:768 for /nfs_qemu (/nfs_qemu)

So it looks like qemu linux is trying to mount /nfs_qemu but it cannot succeed for some reason.

Anyone knows what is the problem?

Last edited by wtx (2014-11-18 09:40:56)

Offline

#2 2014-11-18 09:40:41

wtx
Member
Registered: 2014-06-09
Posts: 76

Re: [SOLVED] qemu - starting system from nfs-root

Ok, I'll answer myself. It turned out that there is not support for nfs server v2 in kernel 3.15.6. Nfs-root requires by default nfs v2 and that is why it couldn't connect.
I'v just add "vers=3" option to "nfsroot" and now it works smile

Offline

Board footer

Powered by FluxBB