- I build rootfs using busybox ,zimage using kernel source code. now i want to use NFS to read rootfs on qemu prompt can anybody
tell me for arm as target and x86 as host machine.

- 372
- 1
- 4
- 12
1 Answers
1)Install nfs-kernel-server
sudo apt-get install nfs-kernel-server
2)create nfs folder where rootfs will be copied.
mkdir -p /srv/nfs/
chown 1000:1000 /srv/nfs
3)edit the file /etc/exports
/srv/nfs 127.0.0.1(rw,sync,no_subtree_check,all_squash,insecure,anonuid=1000,anongid=1000)
or
if above does not works then try this
/srv/nfs 127.0.0.1(rw,sync,no_subtree_check,no_root_squash,insecure)
4)Run the command as root
exportfs -av
Copy the _install directory that is generated with Busybox build into the NFS share.
5)If you are not created rootfs properly follow this post for complete details http://balau82.wordpress.com/2010/04/27/linux-nfs-root-under-qemu-arm-emulator/
6)run
qemu-system-arm -M versatilepb -m 128M -kernel zImage -append "root=/dev/nfs nfsroot=10.0.2.2:/srv/nfs/_install rw ip=10.0.2.15::10.0.2.1:255.255.255.0 init=/sbin/init"

- 3,781
- 2
- 20
- 31
-
thanks for your answer but i am getting error,i am not able to start /sbin/init process,also i edited my question(added snapshot of error) only for you ,i tried according to your answer,please replay. – Vinod Patidar Mar 31 '14 at 17:28
-
Did u compiled busybox statically or dynamically? pls refer this http://stackoverflow.com/questions/22409516/how-to-compile-busybox/22475170#22475170 – vinay hunachyal Apr 01 '14 at 04:07
-
Vinod, the "/sbin/init" error means that your rootfs (created from busybox) does not have it, how about trying /bin/init? (just mount it and try searching for the file first). – Peter Teoh Aug 13 '17 at 02:53