Skip to contentSkip to conversation

NFS-root

Qemu-devel Alexander E. Patrakov 1 participant 1 message May 31, 2004

lore
Share & tools
lore
#0 lore raw

I have experimented with NFS-root linux installations in qemu recently. Results follow. All of them are obtained with this command or its variations:

qemu -nographic -hda hda.dsk -m 64 -kernel bzImage -append "console=ttyS0 root=/dev/nfs ro nfsroot=10.0.2.2:/jail ip=10.0.2.15:10.0.2.2:::::off init=/bin/sh ide0=noprobe ide1=noprobe ide2=noprobe ide3=noprobe ide4=noprobe ide5=noprobe" -user-net

In /jail, there are dev/console, dev/null, bin/sh and libraries it depends upon. The directory is exported in /etc/exports in the following way:

/jail (ro,insecure)

The .config file for 2.6.6 linux kernel used for this experiment is attached.

1) I have to create a dummy hard disk image because of that "-kernel requires -hda" check. The diskless configuration is perfectly valid, please remove the check.

2) Everything works perfectly with tun-tap networking (of course with IP addresses adjusted).

3) I cannot make the kernel mount the root filesystem via NFS over UDP if I use -user-net. However, if I replace nfsroot=10.0.2.2:/jail with nfsroot=10.0.2.2:/jail,tcp everything works.

Why does the difference exist between tun-tap and slirp cases when UDP is used? Is this a bug?

Signature · 1 line
Alexander E. Patrakov