LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (http://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   Kernel panic - not syncing: Attempted to kill init! (Embedded ARM Board) (http://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/kernel-panic-not-syncing-attempted-to-kill-init-embedded-arm-board-690003/)

ksudeadeye 12-12-2008 01:21 AM

Kernel panic - not syncing: Attempted to kill init! (Embedded ARM Board)
 
Apologies for the duplicate post, I didn't see the embedded forum until after I posted the original.

I'm punting...I've been dealing with the same kernel panic at work for about a week and it's getting to me. I'm trying to get a small system built from scratch on an ARM development board. The kernel fails while trying to run init with the following error:

Code:

eth0: link up
IP-Config: Complete:
    device=eth0, addr=<BOARD IP>, mask=255.255.255.0, gw=<GATEWAY>,
    host=<HOSTNAME>, domain=, nis-domain=(none),
    bootserver=255.255.255.255, rootserver=<SERVER IP>, rootpath=
Looking up port of RPC 100003/2 on <SERVER IP>
Looking up port of RPC 100005/1 on <SERVER IP>
VFS: Mounted root (nfs filesystem).
Freeing init memory: 120K
Kernel panic - not syncing: Attempted to kill init!

Here's my target config:
Now the host config:
  • Redhat Enterprise Linux v5.2
  • Code Sourcery G++ Lite 2008q3-41 (gnu gcc 4.3.2, glibc 2.8)

Also, here's the param's uBoot is passing to the kernel:
Code:

console=ttyS0,115200n8
noinitrd
rw
ip=<BOARD IP>::<GATEWAY>:255.255.255.0:<HOSTNAME>::off
root=/dev/nfs
nfsroot=<PROJECT PATH>/rootfs_beta,nolock,wsize=1024,rsize=1024
mem=30M

I'm using the Code Sourcery toolchain on the host to compile the kernel and busybox, along with a few other tools for the target. Everything builds just fine and I'm deploying to a directory called "rootfs_beta" under my project folder on the host. That dir is then mounted as the root filesystem by the target board. The bootloader passes params to the kernel and the kernel seems to boot fine until the panic.

What's really got me stumped is that there aren't any other errors. The panic doesn't give you much information by itself, but I got a lot of good info from this post. Since I never see the busybox load message and last successful message from the kernel is "Freeing init memory..", I'm not sure what's generating the panic.

If I delete "init" from /sbin in the filesystem, I get the exact same kernel panic, which is odd because I would expect a warning like "init cannot be found". If, however, I add "init=/sbin/init" to the kernel params, I do get a warning similar to "specified init could not be executed, using default". This is also odd because I think /sbin/init IS the default. If I replace init after that, the warning dissapears, but I get the panic still.

I've also tried replacing the busybox init with sysvinit, same panic...so I'm inclined to blame the kernel or something I've screwed up in /dev...or something else I'm missing. The only two entries I have in /dev are "console" and "null". I get a warning about "console" being missing if I remove them.

I could also be network related. The filesystem seems to mount just fine, and I don't see any "NFS server not responding" errors...but init is the first binary run over the network, so it could still be a possibility.

Please help. :)

SOLVED. See the #4 post below...

datopdog 12-12-2008 04:50 AM

You kernel needs to have the following options built in

CONFIG_NFS_FS
CONFIG_ROOT_NFS
CONFIG_NET_ETHERNET
CONFIG_IP_PNP
CONFIG_IP_PNP_BOOTP
your ethernet card driver.

ksudeadeye 12-12-2008 12:17 PM

Network Settings
 
Quote:

Originally Posted by datopdog (Post 3372822)
You kernel needs to have the following options built in

CONFIG_NFS_FS
CONFIG_ROOT_NFS
CONFIG_NET_ETHERNET
CONFIG_IP_PNP
CONFIG_IP_PNP_BOOTP
your ethernet card driver.

All those config flags are enabled in the config I'm using (omap_osk_5912_defconfig).

ksudeadeye 12-12-2008 03:20 PM

Solved!
 
I rolled back the kernel version from 2.6.27.8 to 2.6.26.8...sysvinit came up just fine.

I'm not sure if I should report this as a bug or where to report it.

Any thoughts?


All times are GMT -5. The time now is 05:41 AM.