I try to run Linux with nfs-root from barebox, but the kernel cannot mount root-filesystem. I've added parts of my "/env/config" and some messages from booting, which I regarded as being important for my problem. Does anybody has a hint for me? Did I forget anything in my config? Kind Regards Dirk /env/config: .. eth0.ipaddr=192.168.10.200 eth0.serverip=192.168.10.150 eth0.netmask=255.255.255.0 eth0.gateway=192.168.10.254 .. kernel_loc=tftp rootfs_loc=net rootfs_type=jffs2 rootfsimage=rootfs.${rootfs_type} .. _______________________________ Boot-Output: .. Starting kernel ... commandline: console=ttySAC0,115200 mini2440=0tbi ip=192.168.10.200::192.168.10.254:255.255.255.0::: root=/dev/nfs nfsroot=192.168.10.150:/srv/nfsroot,v3,tcp noinitrd mtdparts=nand:256k(bareb) arch_number: 1999 Uncompressing Linux... done, booting the kernel. .. .. dm9000 dm9000: eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1 IP-Config: Complete: device=eth0, addr=192.168.10.200, mask=255.255.255.0, gw=192.168.10.254, host=192.168.10.200, domain=, nis-domain=(none), bootserver=255.255.255.255, rootserver=192.168.10.150, rootpath= VFS: Mounted root (nfs filesystem) on device 0:15. devtmpfs: error mounting -2 Freeing init memory: 148K Kernel panic - not syncing: No init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance. [<c00326d4>] (unwind_backtrace+0x0/0xf4) from [<c0350fa0>] (panic+0x4c/0x1ac) [<c0350fa0>] (panic+0x4c/0x1ac) from [<c002d5b0>] (init_post+0xc4/0x140) [<c002d5b0>] (init_post+0xc4/0x140) from [<c0008430>] (kernel_init+0xe4/0x120) [<c0008430>] (kernel_init+0xe4/0x120) from [<c002e878>] (kernel_thread_exit+0x0/0x8)
Barebox Linux NFS-Root
Have you tried to mount a "default" rootfs via NAND. Are you using the Pengutronix BSP? Which version of Barebox?
It's barebox 2011.07, Kernel 3.0, busybox 1.18.5. I found out, that root seemed to be mounted. When I deactivated devtmpfs in Kernel-Config, I get another message. (No Init found). (On /sbin/init is a link to busybox.) IP-Config: Complete: device=eth0, addr=192.168.10.200, mask=255.255.255.0, gw=192.168.10.254, host=192.168.10.200, domain=, nis-domain=(none), bootserver=255.255.255.255, rootserver=192.168.10.150, rootpath= VFS: Mounted root (nfs filesystem) on device 0:14. Freeing init memory: 148K Kernel panic - not syncing: No init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance. [<c00326d4>] (unwind_backtrace+0x0/0xf4) from [<c0350b14>] (panic+0x4c/0x1ac) [<c0350b14>] (panic+0x4c/0x1ac) from [<c002d5b0>] (init_post+0xc4/0x140) [<c002d5b0>] (init_post+0xc4/0x140) from [<c00083f0>] (kernel_init+0xe4/0x120) [<c00083f0>] (kernel_init+0xe4/0x120) from [<c002e878>] (kernel_thread_exit+0x0/0x8)
Dirk, You seem to be at the "bleeding edge"! I am still working with Barebox 2011.05 and 2.6.39.3. Good luck, Dave
I used buildroot (latest from git) "make mini2440_defconfig" Added Barebox and Kernel3.0 :-) Is it possible, that there is something wrong with my busybox-binary? Kind Regards Dirk
That looks suspect, but it has been over a year since I struggled with cross-compiling Busybox myself. It is suppose to use a default init file, if don't provide one. Dave.
I had a look at LXR. I found out (main.c from line 677) Kernel tries several defaults, before it panics. I'm sure to have "/sbin/init" in my rootfs. Is there a possibility to debug loading my init? Kind Regards Dirk if (execute_command) { run_init_process(execute_command); printk(KERN_WARNING "Failed to execute %s. Attempting " "defaults...\n", execute_command); } run_init_process("/sbin/init"); run_init_process("/etc/init"); run_init_process("/bin/init"); run_init_process("/bin/sh"); panic("No init found. Try passing init= option to kernel. " "See Linux Documentation/init.txt for guidance.");
Do you mean, that I need a whole filesystem in /srv/nfsroot ? I just put the rootfs.jffs2 file there. the rootfs.jffs2 contains a "/dev"-directory.
Dirk, you always need the whole root filesystem at the location where you instruct your kernel to NFS-mount. That is how "NFS root filesystem" is working. The rootfs.jffs2 is intended for the NAND flash.