Kernel panic after updates

72 views
Skip to first unread message

Adam Pribyl

unread,
Nov 24, 2010, 9:43:33 AM11/24/10
to biffe...@googlegroups.com
I've got my first 8MB biffer board, but my first steps with it were
probably not the lucky ones. There was preflashed OpenWrt with kernel
2.6.32.20. After first successful boot I installed few more things via
opkg, rebooted and now I am getting "Kernel panic - not syncing: Attempted
to kill init!".

I am not completely sure, what happened and how to fix it. I noticed that
the updates from actual openwrt thread are somewhat newer, than what was
on the provided board, causing some apps to end with segmentation fault or
bus error - this was due to that those applications were compiled with
newer libc. However this should have no influence on that I am not able to
boot anymore and kernel does not find squashfs:

3 Bifferboard partitions found on MTD device rdc_flash
Creating 3 MTD partitions on "rdc_flash":
0x000000000000-0x000000100000 : "kernel"
0x000000100000-0x0000007f0000 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
split_squashfs: no squashfs found in "rdc_flash"
0x0000007f0000-0x000000800000 : "biffboot"
VFS: Mounted root (jffs2 filesystem) on device 31:1.
Freeing unused kernel memory: 116k freed
Please be patient, while OpenWrt loads ...
Kernel panic - not syncing: Attempted to kill init!

As I am not very keen on compilin and flashin my own openwrt (I need to
focus on my application), I tried to go around this by creating a rootfs
on SD card (/dev/sda1). But I am not able to convice the biffboot to take
it as a rootfs. Whenever I change any boot option, the board simply would
not boot and is repeatedly printing on the console just a kernel version:

Linux version 2.6.32.20 (biff@fen) (gcc version 4.1.2) #9 Sun Sep 12
18:46:40 BS

I am only able to continue with boot with default options.
(console=uart,io,0x3f8 rootfstype=squashfs,jffs2)

My questions then:
1. Are there any openwrt snapshots of kernel and rootfs for biffboard that
just works after "bb_upload.py" with USB/SD and that may be used to
quickly fix the board without the need to "install linux, install
buildroot... etc. steps"?

2. Why do any attempts to modify cmndline in biffboot end up with repeated
kernel version message? What this means?

3. How may the rootfs be damaged with installation of two
user applications (perl, mc)? Or could it happen that boot parameters were
set incorrent when I tried to boot with inserted SD card?


Thank for any help.

Adam Pribyl

biff...@yahoo.co.uk

unread,
Nov 24, 2010, 10:25:22 AM11/24/10
to Bifferboard

On Nov 24, 2:43 pm, Adam Pribyl <pri...@lowlevel.cz> wrote:
> newer libc. However this should have no influence on that I am not able to
> boot anymore and kernel does not find squashfs:

Indeed.

> As I am not very keen on compilin and flashin my own openwrt (I need to
> focus on my application),

That's probably the wrong attitude. The Bifferboard version of
OpenWrt has no package repository, and most people compile from source
and flash custom firmware. I produced the factory firmware as a way
of making sure everything on the board works, it was never intended as
an application development platform, although it may work for some
things.

> on SD card (/dev/sda1). But I am not able to convice the biffboot to take
> it as a rootfs.

You probably need a rather different kernel to do this, since OpenWrt
puts the USB drivers on jffs. For USB-boot they need to be built-in.

> Linux version 2.6.32.20 (biff@fen) (gcc version 4.1.2) #9 Sun Sep 12
> 18:46:40 BS

Hmmm... I've not seen this before, so can't guess.

> 3. How may the rootfs be damaged with installation of two
> user applications (perl, mc)? Or could it happen that boot parameters were
> set incorrent when I tried to boot with inserted SD card?

I don't understand this, but you can try to run the flash test from
Biffboot, in case there might be a problem with the flash. It's very
rare though, since we now test all flash locations before shipping.

regards,
Biff.

Andrew Scheller

unread,
Nov 24, 2010, 12:43:06 PM11/24/10
to biffe...@googlegroups.com
> My questions then:
> 1. Are there any openwrt snapshots of kernel and rootfs for biffboard that
> just works after "bb_upload.py"

There's http://sites.google.com/site/bifferboard/Home/factory-firmware

> with USB/SD and that may be used to quickly
> fix the board without the need to "install linux, install buildroot... etc.
> steps"?

...but it doesn't work with a USB rootfs. Maybe you'd have better luck with
http://sites.google.com/site/bifferboard/Home/desktop-linux-distributions/slackware/newbie-instructions

> 2. Why do any attempts to modify cmndline in biffboot end up with repeated
> kernel version message? What this means?

As explained on http://sites.google.com/site/bifferboard/openwrt-svn
the OpenWRT kernel has it's cmndline pararameters embedded inside the
kernel itself. So the only way to change them is to recompile (and
reflash) the kernel.

> 3. How may the rootfs be damaged with installation of two user applications
> (perl, mc)? Or could it happen that boot parameters were set incorrent when
> I tried to boot with inserted SD card?

No idea. Maybe it didn't "shut down" cleanly, and the rootfs image got
corrupted or something?

Andrew

Adam Pribyl

unread,
Nov 26, 2010, 6:40:11 AM11/26/10
to biffe...@googlegroups.com
On Wed, 24 Nov 2010, Andrew Scheller wrote:

>> My questions then:
>> 1. Are there any openwrt snapshots of kernel and rootfs for biffboard that
>> just works after "bb_upload.py"
>
> There's http://sites.google.com/site/bifferboard/Home/factory-firmware
>

I am bit confused by that. Attachement is named as bzImage, which is
usually a kernel, while having 6MB, it seems to be a complete flash
content (kernel, rootfs, antything else?). On the other page I've read,
that kernel is checked to be less than 974848 bytes by upload python
script. How do I get such an bzImage to the BB?

>> with USB/SD and that may be used to quickly
>> fix the board without the need to "install linux, install buildroot... etc.
>> steps"?
>
> ...but it doesn't work with a USB rootfs. Maybe you'd have better luck with
> http://sites.google.com/site/bifferboard/Home/desktop-linux-distributions/slackware/newbie-instructions


I've got the impression USB works from the page
http://sites.google.com/site/bifferboard/Home/howto/flash-kernel

Seems I am not completely familiar with the terminology used on biffer
board pages and sometimes pages are meant for 1MB older version, which is
kind of missleading.

> Andrew

Adam Pribyl

biff...@yahoo.co.uk

unread,
Nov 26, 2010, 7:22:43 AM11/26/10
to Bifferboard

On Nov 26, 11:40 am, Adam Pribyl <pri...@lowlevel.cz> wrote:
> On Wed, 24 Nov 2010, Andrew Scheller wrote:
> >> My questions then:
> >> 1. Are there any openwrt snapshots of kernel and rootfs for biffboard that
> >> just works after "bb_upload.py"
>
> > There'shttp://sites.google.com/site/bifferboard/Home/factory-firmware
>
> I am bit confused by that. Attachement is named as bzImage, which is
> usually a kernel, while having 6MB, it seems to be a complete flash
> content (kernel, rootfs, antything else?). On the other page I've read,
> that kernel is checked to be less than 974848 bytes by upload python
> script. How do I get such an bzImage to the BB?

Look for the versions of the upload scripts with '8' in the name,
e.g.:
bb_upload8.py
bb_eth_upload8.py

They have the limitation removed.

> >> with USB/SD and that may be used to quickly
> >> fix the board without the need to "install linux, install buildroot... etc.
> >> steps"?
>
> > ...but it doesn't work with a USB rootfs. Maybe you'd have better luck with
> >http://sites.google.com/site/bifferboard/Home/desktop-linux-distribut...
>
> I've got the impression USB works from the pagehttp://sites.google.com/site/bifferboard/Home/howto/flash-kernel

It works if you use the 'wrapper' I wrote around the OpenWrt build,
which is probably now out of date, and I don't really support it any
more since the 8MB devices became mainstream. If you want USB-root
you may as well use Debian or Slackware. OpenWrt wasn't designed for
USB-root and doesn't support it directly. Those efforts were just a
short-term solution due to it being impossible to fit OpenWrt into 1MB
of flash, so I had to force OpenWrt so it worked USB-root because
there wasn't any alternative OS you could use then. That was before I
figured out how to get Slackware running USB-root.

> Seems I am not completely familiar with the terminology used on biffer
> board pages and sometimes pages are meant for 1MB older version, which is
> kind of missleading.

Yes, that's true. Unfortunately, quite a few people have put their
1MB devices away, and taken them out of the cupboard 1 year later,
asking how to use them. I would *love* to just get rid of that
documentation, as we haven't sold a 1MB device for a year (apart from
2nd hand on Ebay), but I think it will cause problems. I have been
slowly moving such pages to an 'attic' area, but I obviously missed
that one.

If you want to improve the documentation you are most welcome, drop me
an email and I will give you access to the site. You cannot sign-up
yourself for access, but this is not my decision, it's the way Google
sites works, unfortunately :(.

cheers,
Biff.

Andrew Scheller

unread,
Nov 26, 2010, 7:27:00 AM11/26/10
to biffe...@googlegroups.com
>> There's http://sites.google.com/site/bifferboard/Home/factory-firmware
> I am bit confused by that. Attachement is named as bzImage, which is usually
> a kernel, while having 6MB, it seems to be a complete flash content (kernel,
> rootfs, antything else?).

Yeah, as you may have noticed by now, there's lots of different ways
to do things in Linux ;) I'll try explaining things in depth,
hopefully I won't confuse you even more...!

Every "working linux " needs a kernel and a rootfs. This can either be
a kernel with an external rootfs, or a kernel with an
embedded-inside-it rootfs.
And on the bifferboard, the "external rootfs" can either be on a USB
drive, or it can be in the BB's Flash memory. The current OpenWRT
setup uses an "external rootfs in flash memory", but on the BB to get
the rootfs into flash memory in the first place, it has to be uploaded
at the same time as the kernel. So technically the file is
bzImage-with-appended-rootfs ;)
Created with https://dev.openwrt.org/browser/trunk/target/linux/rdc/image/mkimg_bifferboard.py

> On the other page I've read, that kernel is
> checked to be less than 974848 bytes by upload python script. How do I get
> such an bzImage to the BB?

That limit is for the older 1MB boards, to flash big images onto the
BB you need to use the 'upload8' scripts.

> I've got the impression USB works from the page
> http://sites.google.com/site/bifferboard/Home/howto/flash-kernel

Again, that's for an earlier version of OpenWRT when only the 1MB
bifferboards were available, and so Biff had to hack openwrt to put
the rootfs on USB. With the 8MB-flash BBs, such hacks are no longer
necessary.

> Seems I am not completely familiar with the terminology used on biffer board
> pages and sometimes pages are meant for 1MB older version, which is kind of
> missleading.

Yup, unfortunately parts of the BB wiki are outdated and therefore
confusing :( but as a low-volume product Biff can't afford to hire a
website development team ;)
I've (previously) tidied up parts of the wiki before, and as an
enthusiastic volunteer I'm happy to help with any questions on this
list, if I'm able to.

Andrew

Reply all
Reply to author
Forward
0 new messages