cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
btsavage
Participant
Participant
9,644 Views
Registered: ‎11-09-2015

Intermittent Boot Error - Kernel Panic

I'm booting Ubuntu on the zynq (custom hardware.)  There is an intermittent problem resulting in a kernel panic it appears from trying to mount the rootfs on the SD card.  When it works, it works fine, but it appears that occasionally, the boot tries to complete before the device (SD partition) is mounted.  Relevent section of the boot log posted below.  Any ideas?

 

Freeing unused kernel memory: 208K (c057c000 - c05b0000)
do mounts
mmc0: new high speed SDHC card at address 59b4
start mdev
mmcblk0: mmc0:59b4 AF UD 7.48 GiB (ro)
mdev: /sys/class: No such file or directory
mount root
 mmcblk0: p1 p2
mount: mounting /dev/mmcblk0p2 on /mnt failed: No such file or directory
mount: mounting devtmpfs on /mnt/dev failed: No such file or directory
hand off to new root
BusyBox v1.21.0 (2013-04-11 13:36:51 PDT) multi-call binary.

Usage: switch_root [-c /dev/console] NEW_ROOT NEW_INIT [ARGS]

Free initramfs and switch to another root fs:
chroot to NEW_ROOT, delete all in /, move NEW_ROOT to /,
execute NEW_INIT. PID must be 1. NEW_ROOT must be a mountpoint.

        -c DEV  Reopen stdio to DEV after switch

Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100
CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.0.0-xilinx-L3KEO-00076-gdfc1bc8-dirty #12
[<c00085e8>] (gic_handle_irq) from [<c0011700>] (__irq_svc+0x40/0x74))14)
---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100x260)

0 Kudos
Reply
4 Replies
norman_wong
Scholar
Scholar
9,618 Views
Registered: ‎05-28-2012

You might need to add "rootwait" to your kernel command line.

0 Kudos
Reply
btsavage
Participant
Participant
9,545 Views
Registered: ‎11-09-2015

I have rootwait in the boot options in the devicetree? 

0 Kudos
Reply
norman_wong
Scholar
Scholar
9,536 Views
Registered: ‎05-28-2012

I was making the comment based upon a post you made recently with a bootlog.txt containing this line:
  Kernel command line: console=ttyPS0,115200 root=/dev/mmcblk1p2
I overlooked the this line in your original post
  mmcblk0: mmc0:59b4 AF UD 7.48 GiB (ro)
This means the SD card was accessed successfully by the MMC driver. Perhaps the MMC driver just identified the SD card but not quite ready. Check your boot log and DTS for the "rootwait". The read-only (ro) is still a problem. The root file system must be writeable.

0 Kudos
Reply
btsavage
Participant
Participant
8,724 Views
Registered: ‎11-09-2015

Anyone else have a suggestion on resolving this?  It appears that the root device is trying to be mounted before it is ready.  After it fails the mount, the device shows up.  See the bold lines in the log portion below.  This is causing me a lot of problems and I'm learning as I go, so any advice is appreciated!

 

 

Freeing unused kernel memory: 216K (c058e000 - c05c4000)
do mounts
start mdev
mdev: /sys/class: No such file or directory
mount root
mount: mounting /dev/mmcblk0p2 on /mnt failed: No such file or directory
mount: mounting devtmpfs on /mnt/dev failed: No such file or directory
hand off to new root
mmc0: new high speed SDHC card at address 7db5
mmcblk0: mmc0:7db5 SE08G 7.28 GiB (ro)
BusyBox v1.21.0 (2013-04-11 13:36:51 PDT) multi-call binary.

U mmcblk0: p1 p2
sage: switch_root [-c /dev/console] NEW_ROOT NEW_INIT [ARGS]

Free initramfs and switch to another root fs:
chroot to NEW_ROOT, delete all in /, move NEW_ROOT to /,
execute NEW_INIT. PID must be 1. NEW_ROOT must be a mountpoint.

        -c DEV  Reopen stdio to DEV after switch

Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100
CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.0.0-xilinx-L3KEO-00076-gdfc1bc8-dirty #16
[<c00085e8>] (gic_handle_irq) from [<c0011700>] (__irq_svc+0x40/0x74))14)
([<c030ff08>] (cpuidle_enter_state) from [<c0048560>] (cpu_startup_entry+0x1a4/0---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100

0 Kudos
Reply