Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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>]
share|improve this question
    
This seems to be more at home on ServerFault.com rather than at SO. –  BiggsTRC May 9 '11 at 16:24
2  
Why init=/bin/busybox? Is that just for testing? busybox needs to be run as init (through a symlink or hardlink) to behave as init. –  camh May 9 '11 at 21:30
    
Because defaults /sbin/init neither works. –  arreche May 10 '11 at 10:37
    
How was this problem actually solved? I am also facing the same issue. Please help –  user2799508 Apr 15 at 7:21
add comment

migrated from stackoverflow.com May 9 '11 at 17:31

This question came from our site for professional and enthusiast programmers.

3 Answers

Are /dev/null or /dev/console missing? I had similar problem when those two files were missing.

share|improve this answer
add comment

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.

share|improve this answer
add comment

I'm not keen on making initrd's, but is it possible to set the permissions within the initrd? Maybe /bin/busybox/ doesn't have executable permission.

share|improve this answer
    
I did a chmod 777 to busybox binary and pointed It with init for testing pruposes. –  arreche May 10 '11 at 10:34
    
Where did you get the busybox executable from? Is it compatible with your CPU architecture? –  ultrasawblade May 10 '11 at 15:34
    
I've compiled It for my arch. busybox: ELF 32-bit LSB executable, ARM, version 1, dynamically linked (uses shared libs), stripped –  arreche May 10 '11 at 18:15
    
Are the libs in the initrd where busybox expects them? –  ultrasawblade May 10 '11 at 18:33
    
Now It works! I used another crosstools. –  arreche May 28 '11 at 10:24
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.