Booting from emergency kernel [solved]


9 posts
by iciclethief » Sun May 06, 2012 12:31 pm
Has anyone successfully booted the RPi from the emergency kernel (by renaming it kernel.img)?  When I try I just get either no output on HDMI or random 'noise' pixels on the screen.

I've tried a few distros with the same result.
Posts: 10
Joined: Tue Apr 17, 2012 7:50 pm
by pepedog » Sun May 06, 2012 1:27 pm
Yes, not lately though.

Arch uses same one as deb, comes from firmware file
Posts: 966
Joined: Fri Oct 07, 2011 9:55 am
by dom » Sun May 06, 2012 6:17 pm
I've just investigated and it seems the kernel_emergency on github is stale.

I've just updated it, and it works for me.

Note: You can also add:

kernel=kernel_emergency.img

to config.txt as an alternative to renaming kernels.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4011
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by iciclethief » Mon May 07, 2012 12:38 pm
Thanks. And thanks for the config.txt tip too.
Posts: 10
Joined: Tue Apr 17, 2012 7:50 pm
by johnreed » Thu Dec 20, 2012 4:26 pm
Hi guys,

Thanks for the great raspberry pi project. I am a convert from other embedded linux boards.

However, I tried using the emergency kernel with the release "2012-12-16-wheezy-raspbian.zip", and it hung just after loading the USB Ethernet driver. Here is the startup log from serial:
https://www.dropbox.com/s/893vuhzel0ulo ... _fails.txt

I'm interested in modifying the emergency kernel for a project, but it seems not even to boot. To install it, I literally took the image, booted it once to make sure it booted, and then I renamed kernel_emergency.img to kernel.img.

I had the same problem with the prior rasbian release 2012-10-28. It hung at the same part of the boot sequence.

As far as I can tell (no monitor to connect at the moment), the issue isn't that it stops writing to the serial, but rather that it really hangs. To verify, I configured it with static IP. If it boots up using the default kernel.img, then I can ping it, log in, etc. However, when booting with the emergency kernel, it stops as documented in my bootlog (see above). The PWR, FDX, and 100 lights are on solid. The LNK light blinks sometimes. (However, if I disconnect the ethernet, then only the PWR light is on.)

I *also* had the same issue when I took a working kernel and compiled in the target_fs using the kernel switch CONFIG_INITRAMFS_SOURCE. It just stops booting. I wonder if the initramfs is somehow messing up the mounting of root, but really that is just speculation. There is no indication in my bootlog (as far as I know) that it is in fact ever starting the initramfs.

Cheers!
Posts: 6
Joined: Sat Sep 03, 2011 10:55 am
by dom » Thu Dec 20, 2012 4:42 pm
I think the init scripts do disable the serial console.
I believe if you connect a keyboard and monitor, you will find it is usable (it was when I last checked).
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4011
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by johnreed » Thu Dec 20, 2012 5:47 pm
I tried it again (i.e. just the newest raspbian wheezy armhf image) with a monitor and got the same result. It boots fine when using the original kernel.img, but if I rename kernel_emergency.img (or if I use the config.txt switch to specify to use that kernel image instead), then it hangs right after the following (please see the bootlog I posted):

[ 3.428460] smsc95xx v1.0.4
[ 3.503676] smsc95xx 1-1.1:1.0: eth0: register 'smsc95xx' at usb-bcm2708_usb-1.1, smsc95xx USB 2.0 E1

I believe that kernel_emergency.img is currently broken. I am using Raspberry Pi Model B 512MB.
Posts: 6
Joined: Sat Sep 03, 2011 10:55 am
by rgh » Thu Dec 20, 2012 7:13 pm
Are you sure it has hung? I got caught out by this once - I thought the Pi had hung on boot after the USB discovery messages but it turned out there was a shell prompt buried in the text further up the screen. If I just hit return on the USB keyboard I got a shell prompt below those messages.
Posts: 220
Joined: Fri Nov 25, 2011 3:53 pm
by johnreed » Thu Dec 20, 2012 8:09 pm
Hey thanks so much for setting me straight on that! The emergency_kernel works! However, people who use it should know that the serial link makes it look like things are hanging (it is unresponsive to keyboard input). To use the emergency_kernel it is currently practically necessary to connect a monitor and keyboard.

emergency_kernel doesn't display a prompt when it comes up unless you press a key. (In order to discover this I actually had to go to my car to get a USB keyboard that I brought home from work in case I was going to need it ...)

Furthermore, the emergency_kernel's network device (although it is initialized), will not respond to settings in /etc/network/interfaces on the standard root partition. It seems it is just coming up inside the initramfs and then stopping there (so it's probably using the /etc/network/interfaces inside target_fs).
Posts: 6
Joined: Sat Sep 03, 2011 10:55 am