Results 1 to 10 of 14
Hi,
After a lot of searching with Google I have found this is a common problem, unfortunately none of the solutions I have found, fix the problem.
The original error ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 09-12-2012 #1Just Joined!
- Join Date
- Aug 2012
- Posts
- 39
Kernel panic - not syncing: No init found
Hi,
After a lot of searching with Google I have found this is a common problem, unfortunately none of the solutions I have found, fix the problem.
The original error I got was:
Kernel panic - not syncing: No init found. Try passing init= option to kernel.
The command line option was:
root=/dev/mtdblock3 rootfstype=jffs2 rw console=ttyMCS mem=64M0x0
(I had to remove 'at' symbol from above because I couldn't post)
I after digging around with google, I found a suggestion which I tried, I made my command line:
root=/dev/mtdblock3 rootfstype=jffs2 rw console=ttyMCS mem=64M0x0 init=/sbin/init panic=4
But I now get the following error:
Freeing init memory: 88K
Failed to execute /sbin/init. Attempting defaults...
Kernel panic - not syncing: No init found. Try passing init= option to kernel.
I can see that the Root drive is being mounted.
The contents of the init file is:
#!/bin/busybox ash
/bin/busybox mount -t sysfs /dev/sys /sys
/bin/busybox mount -t proc /proc
/bin/busybox mount -t devpts /dev/pts
# Populate /dev according to /sys
/bin/busybox mdev -s
/bin/busybox --install -s
/linuxrc
exec /sbin/init "$" (I had to remove at symbold from here) </dev/console >/dev/console 2>&1
Does anyone have any suggestions on how to fix this please?
- 09-13-2012 #2
Hi, AJEllisuk,
I have only ever seen this with disk hardware or file system corruption issues, which means at the least, since you can't boot your system, you would need some form of off line repair. Your quickest option might be to use alternate hardware to recover to. If you are developing some sort of embedded system and this is a first boot attempt, it might be an issue with a missing driver.
N
- 09-13-2012 #3Just Joined!
- Join Date
- Dec 2008
- Location
- Lund, Sweden
- Posts
- 24
From the description above I can't see if /sbin/init is actually executable (x flag set in permissions). If the file system was sanely generated it should be by default, but I'd verify that this is the case. Secondly, is /bin/busybox accessable and executable, as /sbin/init relies on its ash shell to run.
What kind of a device are you running on btw? It looks like some form of embedded device since the root device is an mtd. It looks like your generating the root file system yourself, or otherwise how do you know what's on there if can't boot.
- 09-13-2012 #4Just Joined!
- Join Date
- Aug 2012
- Posts
- 28
hey, I am sure you are trying to build sort of embedded system.
So have you build root file system by yourself?
If yes look for the "init" executable file.
root=/dev/mtdblock3 rootfstype=jffs2 rw console=ttyMCS mem=64M0x0 init=/sbin/init panic=4
by giving this command you are saying that your init file is in /sbin/init which is not the case always.
SO first of all you need to find where exactly your "init" executable file is.
and once you find modify the above command with it.
for eg.
if you find you "init" in /bin/ then you may give command as follow;
root=/dev/mtdblock3 rootfstype=jffs2 rw console=ttyMCS mem=64M0x0 init=/bin/init panic=4
hope this would help you.
- 09-13-2012 #5Just Joined!
- Join Date
- Aug 2012
- Posts
- 39
Hi Guys,
Thank you for your replies.
I am working with an ARM based embedded system. The processor is an MCS8144 from MosChip, and currently I'm working with the evaluation board.
I have checked the disk image and have found the file "init" in "/sbin". I have checked that the permissions are set to allow execution. I have also checked that busybox is present in /bin and that the permissions are set to allow execution.
The flash chip fitted is a new device, I have changed it for another device just to make sure the first was not faulty, but I still have the same problem. I was initially able to run a demo app from Moschip (I only have the binaries) without any problems. When I first built the linux kernel and filesystem image it worked, but now I have the above problem. The demo app does not pass "init=" in the command line, so I'm not sure what the problem is, or what I've done to cause the problem. I have tried reverting to an old version of code to try and fix this problem, but with no success.
- 09-13-2012 #6Just Joined!
- Join Date
- Jun 2006
- Posts
- 55
This might be as a result of your system not being able to mount root fs. Prior to searching for 'init', check whether the root fs is mounted at all.
- 09-14-2012 #7Just Joined!
- Join Date
- Aug 2012
- Posts
- 39
Hi,
Thank you for your reply.
I am sure the root fs is being mounted, I've confirmed this with the following console output:
VFS: Mounted root (jffs2 filesystem).
Freeing init memory: 96K
Kernel panic - not syncing: No init found. Try passing init= option to kernel.
I have a feeling something is going wrong with the build process
Andrew
- 09-14-2012 #8Just Joined!
- Join Date
- Jun 2006
- Posts
- 55
What your system is ?
I ask because I see in the beginning of this thread you provide the contents of the init script. However, usually, init is a fully fledged application rather than a script. If init is not found in its default location (which is /sbin/init), its location may be specified in kernel bootargs (as suggested in the error message) - init=/some-path-to-some-app. If init= thing doesn't help, then possibly you are not able to mount root fs anyway.
- 09-17-2012 #9Just Joined!
- Join Date
- Aug 2012
- Posts
- 39
- 09-17-2012 #10Just Joined!
- Join Date
- Jun 2006
- Posts
- 55
If it booted well with a particular type of flash, implies it might not boot so well with another. I know I repeat the same mantra all the time - chances you don't mount the root fs.


Reply With Quote

