Hi forum,
I have managed to boot the kernel and load the rootfs by passing the following parameters into uboot bootargs environment variable.
on the host (NFS server) I export the nfs directory by adding to the
/etc/exports file as follows:-
Code:
/nfs *(rw,sync,no_root_squash,no_all_squash,no_subtree_check)
I also modified my uboot environment variable as follows:-
Code:
bootargs=root=/dev/nfs rw rootfstype=jffs2 mtdparts=physmap-flash.0:0x30000(U-Boot),0x20000@0x30000(NVRAM),0x120000@0x2e0000(User-JFFS2) nfsroot=192.168.1.50:/nfs ip=192.168.1.51:192.168.1.50:192.168.1.1:255.255.255.0:: eth0 init=/sbin/init
The serverip address is 192.168.1.50 while the target board ip address is 192.168.1.51 and the gateway 192.168.1.1.
I later copied the following contents of the created rootfs to the nfs directory on the serverip which were as follows:-
Code:
rootfs $ ls
bin dev etc home lib media mnt nfs opt proc root sbin sys tmp usr var
Passing the
init=/sbin/init into the
bootargs solved the
Kernel panic - not syncing: No init found. Try passing init= option to kernel
As the init is an executable that resides in the sbin directory.
With above configuration I have been able to boot the kernel which loads the root file system.
I also made changes to the /nfs/etc/init.d/S05userfs.sh by adding the
Code:
mkdir -p /tmp/mnt/User-JFFS2
sleep 1
mount -t jffs2 /dev/mtdblock2 /tmp/mnt/User-JFFS2
to mount the JFFS2 filesystem which contains script to start all other user process and applications.
Regards
onio