This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

initramfs issue,: Kernel panic - not syncing: No init found

Hello,

I'm currently trying to create a RAM filesystem on our custom board with a DaVinci DM6467 running linux on the ARM. I've built the kernel using initramfs and the Arago filesystem as my target_fs (removed some of the bloat).

Basically the kernel is booting but then complains that it can't excute /init. I do have it there, its a symbolic link to /bin/busybox. I've also added init=./linuxrc to the bootargs which is also another symbolic link to /bin/busybox, but it still is not working. Does anyone have any ideas? Below are all my build parameters and output:

Kernel Build Parameters (.config):

CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE="/home/user/target_fs/"
CONFIG_INITRAMFS_ROOT_UID=0
CONFIG_INITRAMFS_ROOT_GID=0

CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=1
CONFIG_BLK_DEV_RAM_SIZE=8192

U-Boot Parameters/Env:

U-Boot InSight > printenv
bootdelay=3
baudrate=115200
bootfile="uImage"
addclk=setenv bootargs ${bootargs} clkref=${clkref}
ethact=DaVinci EMAC
stdin=serial
stdout=serial
stderr=serial
ethaddr=00:0e:99:02:b6:d4
ipaddr=192.168.1.152
ver=U-Boot 2009.08 (Oct 02 2010 - 12:26:28)
nfshost=192.168.1.169
serverip=192.168.1.169
rootpath=/export/filesys
filesize=1FB008
fileaddr=80000000
nfspath=/export/filesys
bootcmd=tftpboot 0x80000000 uImage-InSight-exp; bootm
bootargs=mem=76M console=ttyS0,115200n8 init=./linuxrc ip=192.168.1.152::192.168.1.1:255.255.255.0::eth0 vpif.ch2_numbuffers=0 vpif_display.ch3_numbuffers=0

Environment size: 589/131068 bytes

 

Kernel Boot Output:

U-Boot InSight > boot
Using DaVinci EMAC device
TFTP from server 192.168.1.169; our IP address is 192.168.1.152
Filename 'uImage-InSight-exp'.
Load address: 0x80000000
Loading: #################################################################
         ###########################T #########T #########T ####################
         ############T #####################################################
         #################################################################
         ###############################
done
Bytes transferred = 4270312 (4128e8 hex)
## Booting kernel from Legacy Image at 80000000 ...
   Image Name:   Linux-2.6.32-rc2-davinci1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4270248 Bytes =  4.1 MB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux................................................................................................................................................................................................................................................................................................................................................ done, booting the kernel.
Linux version 2.6.32-rc2-davinci1 (
) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) ) #67 PREEMPT Mon Oct 25 14:45:59 PDT 2010
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: DaVinci DM646x EVM
Memory policy: ECC disabled, Data cache writeback
DaVinci dm6467_rev1.x variant 0x0
Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 19304
Kernel command line: mem=76M console=ttyS0,115200n8 init=./linuxrc ip=192.168.1.152::192.168.1.1:255.255.255.0::eth0 vpif.ch2_numbuffers=0 vpif_display.ch3_numbuffers=0
Unknown boot option `vpif.ch2_numbuffers=0': ignoring
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 76MB = 76MB total
Memory: 66168KB available (3472K code, 310K data, 7028K init, 0K highmem)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:245
Console: colour dummy device 80x30
Calibrating delay loop... 147.86 BogoMIPS (lpj=739328)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
DaVinci: 43 gpio irqs
NET: Registered protocol family 16
MUX: Setting register STSOMUX_DISABLE
           PINMUX0 (0x00000000) = 0x80000000 -> 0x80000000
MUX: Setting register STSIMUX_DISABLE
           PINMUX0 (0x00000000) = 0x80000000 -> 0x80000000
MUX: Setting register PTSOMUX_DISABLE
           PINMUX0 (0x00000000) = 0x80000000 -> 0x80000000
MUX: Setting register PTSIMUX_DISABLE
           PINMUX0 (0x00000000) = 0x80000000 -> 0x80000000
MUX: initialized CIR_UART2
MUX: Setting register CIR_UART2
           PINMUX1 (0x00000004) = 0x00000015 -> 0x00000025
bio: create slab <bio-0> at 0
SCSI subsystem initialized
pcf857x: probe of 1-0038 failed with error -121
vpif vpif: vpif probe success
Switching to clocksource timer0_1
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
msgmni has been set to 129
io scheduler noop registered
io scheduler anticipatory registered (default)
CIR device registered successfully                        (Major = 252,  Minor = 0)
Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x1c20000 (irq = 40) is a ST16654
console [ttyS0] enabled
serial8250 serial8250.0: unable to register port at index 1 (IO0 MEM1c20400 IRQ41): -22
serial8250 serial8250.0: unable to register port at index 2 (IO0 MEM1c20800 IRQ42): -22
brd: module loaded
loop: module loaded
at24 1-0050: 32768 byte 24c256 EEPROM (writable)
Uniform Multi-Platform E-IDE driver
ide-gd driver 1.18
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <
maxk@qualcomm.com>
dm9000 Ethernet Driver, V1.31
console [netcon0] enabled
netconsole: network logging started
mice: PS/2 mouse device common for all mice
i2c /dev entries driver
Linux video capture interface: v2.00
adv7393: init_adv7393()
adv7441a: adv7441a_init()
v4l2_i2c_new_subdev_board(): info->addr = 2a
adv7393: adv7393_probe()
adv7393 1-002a: chip found @ 0x54 (DaVinci I2C adapter)
adv7393: to_state()
adv7393: adv7393_initialize()
adv7393:   defaulting to test pattern
adv7393: adv7393_write(): reg= 0x0, value=0x1c
adv7393: adv7393_write(): reg= 0x82, value=0xcb
adv7393: adv7393_write(): reg= 0x84, value=0x40
v4l2_i2c_new_subdev_board(): info->addr = 20
adv7441a: adv7441a_probe()
adv7441a: adv7441a_initialize()
adv7441a:   Defaulting ADV7441A to 720P @ 60 Hz (Hopefully).
adv7441a: adv7441a_write_reg(): reg = 0x5, val = 0x1
adv7441a: adv7441a_write_reg(): reg = 0x6, val = 0xa
adv7441a: adv7441a_write_reg(): reg = 0x47, val = 0xa
adv7441a: adv7441a_write_reg(): reg = 0x3, val = 0xc
adv7441a: adv7441a_write_reg(): reg = 0x1d, val = 0x40
adv7441a: adv7441a_write_reg(): reg = 0x6b, val = 0xc3
adv7441a: adv7441a_setstd()
adv7441a: adv7441a_set_format_params()
adv7441a 1-0020: adv7441a 1-0020 decoder driver registered !!
vpif_capture vpif_capture: registered sub device adv7441a
vpif_capture vpif_capture: DM646x VPIF Capture driver initialized
watchdog watchdog: heartbeat 60 sec
TCP cubic registered
NET: Registered protocol family 17
Clocks: disable unused uart1
Clocks: disable unused emac
Clocks: disable unused spi0
Clocks: disable unused timer1
Clocks: disable unused pci
Adsys InSight: priv->phy_mask = 0
Adsys InSight: ndev->name = eth%d
davinci_emac_probe: using random MAC addr: b2:a5:39:3c:4f:4b
Adsys Insight: mdio_bus.c: bus->phy_mask = fffffbff
Adsys InSight: mdiobus_scan(): addr = a, physdev = c3ab1a00
emac-mii: probed
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
Adsys InSight: Searching for phy with mask: 400
Adsys InSight: priv->mii_bus->phy_map[10] = c3ab1a00
eth0: attached PHY driver [Marvell 88E1111] (mii_bus:phy_addr=1:0a, id=1410cc2)
IP-Config: Complete:
     device=eth0, addr=192.168.1.152, mask=255.255.255.0, gw=192.168.1.1,
     host=192.168.1.152, domain=, nis-domain=(none),
     bootserver=255.255.255.255, rootserver=255.255.255.255, rootpath=
Freeing init memory: 7028K
Failed to execute /init
Failed to execute ./linuxrc.  Attempting defaults...
Kernel panic - not syncing: No init found.  Try passing init= option to kernel.
Backtrace:
[<c06e97d0>] (dump_backtrace+0x0/0x114) from [<c097c410>] (dump_stack+0x18/0x1c)
 r7:00000000 r6:00000000 r5:00000000 r4:c0a6d010
[<c097c3f8>] (dump_stack+0x0/0x1c) from [<c097c468>] (panic+0x54/0x124)
[<c097c414>] (panic+0x0/0x124) from [<c06e55ac>] (init_post+0xdc/0x104)
 r3:00000000 r2:c3ab6600 r1:c0a99000 r0:c09f67f3
[<c06e54d0>] (init_post+0x0/0x104) from [<c00084c0>] (kernel_init+0xe8/0x118)
 r5:00000000 r4:c0a6c8c0
[<c00083d8>] (kernel_init+0x0/0x118) from [<c06fe8a0>] (do_exit+0x0/0x684)

 

  • Also, here is a listing of my target_fs:

    user@laptop:~/target_fs$ ls -lrta
    total 64
    drwxr-xr-x  2 bbergan bbergan 4096 2010-10-25 12:38 boot
    drwxr-xr-x  3 bbergan bbergan 4096 2010-10-25 12:38 home
    drwxr-xr-x 12 bbergan bbergan 4096 2010-10-25 12:38 media
    drwxr-xr-x  2 bbergan bbergan 4096 2010-10-25 12:38 proc
    drwxr-xr-x  2 bbergan bbergan 4096 2010-10-25 12:38 sys
    drwxr-xr-x  2 bbergan bbergan 4096 2010-10-25 12:38 bin
    drwxr-xr-x  2 bbergan bbergan 4096 2010-10-25 12:38 dev
    drwxr-xr-x 22 bbergan bbergan 4096 2010-10-25 12:38 etc
    drwxr-xr-x  2 bbergan bbergan 4096 2010-10-25 12:38 mnt
    lrwxrwxrwx  1 root    root      12 2010-10-25 12:38 linuxrc -> /bin/busybox
    drwxr-xr-x  2 bbergan bbergan 4096 2010-10-25 12:38 sbin
    lrwxrwxrwx  1 root    root       8 2010-10-25 12:38 tmp -> /var/tmp
    drwxr-xr-x  7 root    root    4096 2010-10-25 12:38 var
    drwxr-xr-x  3 bbergan bbergan 4096 2010-10-25 12:39 opt
    drwxr-xr-x 11 bbergan bbergan 4096 2010-10-25 12:48 usr
    drwxr-xr-x  2 bbergan bbergan 4096 2010-10-25 12:51 lib
    lrwxrwxrwx  1 bbergan bbergan   11 2010-10-25 13:26 init -> bin/busybox
    drwxr-xr-x 16 bbergan bbergan 4096 2010-10-25 13:26 .
    drwxr-xr-x 49 bbergan bbergan 4096 2010-10-25 14:44 ..
    user@laptop:~/target_fs$

  • Fixed it:

    I  did not have the proper libraries available in the filesystem. I added the /lib from the Arago filesystem that came with my EVM and this fixed the problem. Here is a listing of the /lib directory from my target_fs:

    bbergan@bbergan-laptop:~/target_fs/lib$ ls
    ld-2.8.so      libanl.so.1             libc-2.8.so     libcrypt-2.8.so  libdl-2.8.so   libm-2.8.so     libnsl-2.8.so         libnss_compat.so.2  libnss_files-2.8.so  libpthread.so.0   librt-2.8.so         libthread_db.so.1  libutil-2.8.so     libvolume_id.so.1.1.0
    ld-linux.so.3  libBrokenLocale-2.8.so  libcidn-2.8.so  libcrypt.so.1    libdl.so.2     libmemusage.so  libnsl.so.1           libnss_dns-2.8.so   libnss_files.so.2    libresolv-2.8.so  librt.so.1           libudev.so.0       libutil.so.1       modules
    libanl-2.8.so  libBrokenLocale.so.1    libcidn.so.1    libc.so.6        libgcc_s.so.1  libm.so.6       libnss_compat-2.8.so  libnss_dns.so.2     libpthread-2.8.so    libresolv.so.2    libthread_db-1.0.so  libudev.so.0.2.0   libvolume_id.so.1  udev
    bbergan@bbergan-laptop:~/target_fs/lib$

    Then I had a busybox issue with the inittab file. This ultimately had to do with how the ram disk was initialized. I added "rdinit=/sbin/init" to the bootargs and this fixed the issue.