# Kernel panic - not syncing: No init found

**URL:** https://forums.digi.com/t/kernel-panic-not-syncing-no-init-found/12199
**Category:** Linux
**Tags:** linux
**Created:** [November 17, 2013, 4:04pm UTC](https://forums.digi.com/t/kernel-panic-not-syncing-no-init-found/12199 "2013-11-17T16:04:28Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![olaoni](https://avatars.discourse-cdn.com/v4/letter/o/bc79bd/32.png) [@olaoni](https://forums.digi.com/u/olaoni)
#### Post date: [November 17, 2013, 4:04pm UTC](https://forums.digi.com/t/kernel-panic-not-syncing-no-init-found/12199/1 "2013-11-17T16:04:28Z")

</div>

Hi All,

I am trying to boot my kernel from ram using the bootm command in u-boot. the kernel image is stored on my host machine ip = 192.168.1.50. The two directories have been setup with relevant images as follows:-

Kernel Image directory =\> /tftpboot/uImage-cme9210js  
Squash fs directory =\> /exports/nfsroot-cme9210js

Below is the entry to my kernel command line arguments

rootpath=/exports/nfsroot-cmd9210js  
bootargs=root=/dev/nfs rw rootfstype=squashfs mtdparts=physmap-flash.0:0x30000(U-Boot),0x20000@0x30000(NVRAM),0x120000@0x2e0000(User-JFFS2) nfsroot=192.168.1.50:/exports/nfsroot-cme9210js ip=192.168.1.51:192.168.1.50:192.168.1.1:255.255.0.0::::eth0

After saving the variables I issue the following command

```auto
tftpboot 0x400000 /tftpboot/uImage-9210js

```

followed by

```auto
bootm

```

After issuing the following command the boot message ends with the following line.

> Looking up port of RPC 100005/1 on 192.168.1.50  
> VFS: Mounted root (nfs filesystem).  
> Freeing init memory: 80K  
> Warning: unable to open an initial console.  
> Kernel panic - not syncing: No init found. Try passing init= option to kernel.

What init option do I need to pass to the kernel?

Many thanks in advance

Ola

---

<div class="post-metadata">

### Author: ![LeonidM](https://avatars.discourse-cdn.com/v4/letter/l/d26b3c/32.png) [@LeonidM](https://forums.digi.com/u/LeonidM)
#### Post date: [December 27, 2013, 11:34pm UTC](https://forums.digi.com/t/kernel-panic-not-syncing-no-init-found/12199/2 "2013-12-27T23:34:31Z")

</div>

please use command  
dboot linux tftp

it looks like manual commands you are trying to use do not pass all necessary arguments to the kernel

---

<div class="post-metadata">

### Author: ![olaoni](https://avatars.discourse-cdn.com/v4/letter/o/bc79bd/32.png) [@olaoni](https://forums.digi.com/u/olaoni)
#### Post date: [December 28, 2013, 7:51pm UTC](https://forums.digi.com/t/kernel-panic-not-syncing-no-init-found/12199/3 "2013-12-28T19:51:07Z")

</div>

Hi LeonidM,

I tried your command but didn’t get far see output I get

Looking up port of RPC 100003/2 on 192.168.1.50  
Looking up port of RPC 100005/1 on 192.168.1.50  
Root-NFS: Server returned error -13 while mounting /exports/nfsroot-cme9210js  
VFS: Unable to mount root fs via NFS, trying floppy.  
VFS: Cannot open root device “nfs” or unknown-block(2,0)  
Please append a correct “root=” boot option; here are the available partitions:  
1f00 192 mtdblock0 (driver?)  
1f01 128 mtdblock1 (driver?)  
1f02 960 mtdblock2 (driver?)  
1f03 1664 mtdblock3 (driver?)  
1f04 1152 mtdblock4 (driver?)  
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)

Regards

onio

---

<div class="post-metadata">

### Author: ![olaoni](https://avatars.discourse-cdn.com/v4/letter/o/bc79bd/32.png) [@olaoni](https://forums.digi.com/u/olaoni)
#### Post date: [December 29, 2013, 3:22pm UTC](https://forums.digi.com/t/kernel-panic-not-syncing-no-init-found/12199/4 "2013-12-29T15:22:08Z")

</div>

Hi forum,

I have managed to boot the kernel and load the rootfs by passing the following parameters into uboot bootargs environment variable.

on the host (NFS server) I export the nfs directory by adding to the /etc/exports file as follows:-

```auto
/nfs *(rw,sync,no_root_squash,no_all_squash,no_subtree_check)

```

I also modified my uboot environment variable as follows:-

```auto
bootargs=root=/dev/nfs rw rootfstype=jffs2 mtdparts=physmap-flash.0:0x30000(U-Boot),0x20000@0x30000(NVRAM),0x120000@0x2e0000(User-JFFS2) nfsroot=192.168.1.50:/nfs ip=192.168.1.51:192.168.1.50:192.168.1.1:255.255.255.0:: eth0 init=/sbin/init

```

The serverip address is 192.168.1.50 while the target board ip address is 192.168.1.51 and the gateway 192.168.1.1.

I later copied the following contents of the created rootfs to the nfs directory on the serverip which were as follows:-

```auto
rootfs $ ls
bin dev etc home lib media mnt nfs opt proc root sbin sys tmp usr var

```

Passing the init=/sbin/init into the bootargs solved the Kernel panic - not syncing: No init found. Try passing init= option to kernel

As the init is an executable that resides in the sbin directory.

With above configuration I have been able to boot the kernel which loads the root file system.

I also made changes to the /nfs/etc/init.d/S05userfs.sh by adding the

```auto
mkdir -p /tmp/mnt/User-JFFS2
sleep 1
mount -t jffs2 /dev/mtdblock2 /tmp/mnt/User-JFFS2

```

to mount the JFFS2 filesystem which contains script to start all other user process and applications.

Regards

onio
