OpenWrt Forum Archive

Topic: Kernel panic - not syncing: No init found. Try passing init= option...

The content of this topic has been archived on 5 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,

I've just cross-compiled an image for a x86.  I copied (dd) the image across from a livecd and then rebooted.  It starts to bootup fine until:

Kernel panic - not syncing: No init found. Try passing init= option to kernel

Anyone know what I'm doing wrong?

Cheers.

(Last edited by andypi on 21 Nov 2012, 19:07)

Any ideas?  I had hoped this might be a quick one smile

What's the difference between the

openwrt-x86-generic-combined-ext4.img.gz
openwrt-x86-generic-fs-ext4.img.gz

images that are produced?  Maybe that has something to do with it?  I used the combined image.

Maybe I've missed a package I need during "make menuconfig"?

Cheers.

You want the combined image. What command did you use to dd it over to the hard drive? Please post the exact commands you used.

I used:

dd if=openwrt-x86-generic-combined-ext4.img of=/dev/sda bs=1M count=100

Thanks for your help.

Hmmm...what type of computer is this? What kind of hard drive? You may need a custom kernel with AHCI sata enabled in the device drivers.

My hardware is:

Intel pentium D processor
MSI P965 Neo motherboard
SATA II hard drive

I just went into "make menuconfig" to check my configuation:

Kernel modules ---> Filesystems
  kmod-fs-autofs4
  kmod-fs-ext4
  kmod-fs-isofs
  kmod-fs-vfat

Kernel modules ---> Block devices
  kmod-ata-core
    kmod-ata-ahci
    kmod-ata-marvell-sata
    kmod-ata-nvidia-sata
    kmod-ata-pdc20xx-old
    kmod-ata-piix
    kmod-ata-sil
    kmod-ata-sil24
    kmod-ata-sis
    kmod-ata-via-sata
  kmod-ide-core
    kmod-ide-core-aec62xx
    kmod-ide-core-generic
    kmod-ide-core-generic-old
    kmod-ide-core-it821x
    kmod-ide-core-pdc202xx
  kmod-libsas
  kmod-loop
  kmod-md-mod
    kmod-md-linear
    kmod-md-multipath
    kmod-md-raid0
    kmod-md-raid1
    kmod-md-raid10
    kmod-md-raid456
  kmod-mvsas
  kmod-scsi-cdrom
  kmod-scsi-core

After I exited, I noticed the following:

andrew@andrew-VirtualBox:~/OpenWRT/trunk$ make menuconfig
tmp/.config-package.in:12561:warning: 'select' used by config symbol 'PACKAGE_deluge-ui-gtk' refer to undefined symbol 'PACKAGE_python-gtk'
tmp/.config-package.in:17015:warning: 'select' used by config symbol 'PACKAGE_peerguardian' refer to undefined symbol 'PACKAGE_libipq'
tmp/.config-package.in:30505:warning: 'select' used by config symbol 'PACKAGE_dsl-qos-queue' refer to undefined symbol 'PACKAGE_libipq'
tmp/.config-package.in:35818:warning: 'select' used by config symbol 'PACKAGE_libdaq' refer to undefined symbol 'PACKAGE_libipq'
tmp/.config-package.in:46923:warning: 'select' used by config symbol 'PACKAGE_lcd4linux-custom' refer to undefined symbol 'PACKAGE_libdpf'
tmp/.config-package.in:46958:warning: 'select' used by config symbol 'PACKAGE_lcd4linux-full' refer to undefined symbol 'PACKAGE_libdpf'
Warning! Found recursive dependency: PACKAGE_lcd4linux-custom LCD4LINUX_CUSTOM_PLUGIN_mysql LCD4LINUX_CUSTOM_NEEDS_libmysqlclient PACKAGE_lcd4linux-tew673gru PACKAGE_lcd4linux-custom
Warning! Found recursive dependency: PACKAGE_strongswan-full PACKAGE_strongswan-mod-mysql PACKAGE_strongswan-full
Warning! Found recursive dependency: PACKAGE_nprobe NPROBE_MYSQL_SUPPORT PACKAGE_nprobe
#
# using defaults found in .config
#


*** End of OpenWrt configuration.
*** Execute 'make' to build the OpenWrt or try 'make help'.

andrew@andrew-VirtualBox:~/OpenWRT/trunk$ 

What does this mean?  Is it a problem?

Ticking the corresponding kmods as <*> in menuconfig will not help as this just means that the package containing the kernel module files is embedded into the firmware rootfs, but since OpenWrt has no initrd facility at all it cannot preload the required modules to find the rootfs. You need to run "make kernel_menuconfig" and mark the appropriate controller driver as builtin so that it is actually compiled into the kernel image.

I'm still getting a Kernel panic:

EXT4-fs error (device sda2): ext4_lookup:1044: inode #2: comm swapper: deleted inode referenced: 3571
Kernel panic - not syncing: No init found. Try passing init= optin to kernel.
EXT4-fs (sda2): error count: 2
EXT4-fs (sda2): inital error at 1358899193: ext4_lookup:1044: inode 2
EXT4-fs (sda2): last error at 1358899860: ext4_lookup: 1044: inode 2

Any ideas?

Any ideas?  All I want to do is TRY OpenWRT to see if it will fulfil my needs!  You'd think that a pre-compiled image for PC hardware would include SATA drivers etc.

Anyway, I've compiled my own kernel with ext4/ext2 and SATA support but it still does not work.  Is something broken or should I try including something else into my kernel?  If so, what?  It kind of seems like guess work to me.

Another question:  How can I backup both the configuration for 'make kernel_menuconfig' and 'make menuconfig' (in case I start again from the begining)?

Cheers.

The discussion might have continued from here.