Linux – Kernel panic – not syncing: No init found. While booting from U-Boot

bootembeddedkernellinuxu-boot

Kernel mounted the root file system but can not find any init script. I'm sure that script exists in my ramdisk.img!

I also checked out this and GE863-PRO3 U-BOOT Software User Guide 1VV0300777 Rev. 6 – 2010-01-25.

Any idea or alternative documentation?

My environment: GE863-PRO3 128/64 version

U-Boot 1.2.0 (Aug 18 2010 - 12:16:10)- 221 Telit

DRAM:  64 MB

Bank #1
Flash:NAND Numonyx NAND01G-B2B 128MB 1.8V 8-bit
Hardware ECC (ECC data size = 512 bytes)
Nb min erasable unit:   1024
min erasable Size: 131072
Size=134217728 bytes
Logical address: 0x40000000
No bad block detected
Area 0: 40000000 to 403BFFFF (RO)  Primary Bootstrap
Area 1: 403C0000 to 4043FFFF (RO)  U-Boot code
Area 2: 40440000 to 404BFFFF (RO)  U-Boot Environment
Area 3: 404C0000 to 407BFFFF       User Area 1
Area 4: 407C0000 to 47FFFFFF       User Area 2

U-BOOT commands:

setenv bootargs console=ttyS0,115200 mem=64M ver=4384k icofat=257k rootfstype=jffs2 root=/dev/mtdblock1 rw mtdparts=at91_nand:7936k(ARMboot)ro,-@7936k(root) init=/bin/busybox
ethinit 192.168.122.3
erase 404C0000 47FFFFFF
tftp 20200000 ramdisk.img
cp.b 20200000 0x407c0000 14cd78
tftp 20200000 uImage
bootm

boot output:

VFS: Mounted root (jffs2 filesystem).
Freeing init memory: 96K
Setting DMA Console
Failed to execute /bin/busybox.  Attempting defaults...
Kernel panic - not syncing: No init found.  Try passing init= option to kernel.
Function entered at [<c01de28c>] from [<c01de304>]
Function entered at [<c01de2a0>] from [<c0020398>]
 r3:c3c1ac40 r2:c3c1ac40 r1:c3c1deb0 r0:c01c3cab
Function entered at [<c00202dc>] from [<c00085e0>]
 r4:c020d2c0
Function entered at [<c00083b8>] from [<c003a454>]

Best Answer

Your problem is here:

setenv bootargs console=ttyS0,115200 mem=64M ver=4384k icofat=257k rootfstype=jffs2 root=/dev/mtdblock1 rw mtdparts=at91_nand:7936k(ARMboot)ro,-@7936k(root) init=/bin/busybox

Busyboxy is like a chameleon. It changes its behavior depending on how you call it. In order to make it act like init you have to call it init. Change it to init=/sbin/init.

You also need to make sure that /sbin/init is a symlink or hard link to /bin/busybox inside your ramdisk.img.

Related Question