16

In the official Raspbian "wheezy" image (2012-07-15), there are three Kernel images:

  • kernel.img (6MB)
  • kernel_cutdown.img (4MB)
  • kernel_emergency.img (16MB)

I'm curious what are the technical differences between these? When might it be beneficial to change from the default (kernel.img)?

  • For those who don't know - you can choose which kernel you use by adding a line to /boot/config.txt file e.g. to boot the cutdown kernel: kernel=kernel_cutdown.img – Pierz Feb 10 '15 at 18:13
12

I can't seem to find any specific information about the Raspbian kernels, which concerns me. However, I can give the information I have from my experience with Linux kernels.

Traditionally, when you compile a kernel for a distribution you want it to be able to cover support for a fairly wide range of hardware. For example, various graphics cards and wireless cards as well as more simple things like SATA controllers and filesystem support. Kernels will then also have modularisation support so that other hardware can be supported via the loading of modules. This you will see accomplished by the use of modprobe or more traditionally insmod. Module loading will normally take place behind the scenes, for example when you plug in a USB Hard Drive, the usbcore module will be loaded. What is often not known is that this support can also be built into the kernel, which increases its size and time it takes to load at boot, but often improves performance.

The issue faced by developers is whether support should be compiled into the kernel, provided as a module or left out completely.

The standard kernel kernel.img, will try and cover the most likely hardware combinations. For a distro like Raspbian this is likely to include all of the Raspberry Pi hardware, as well as the other parts needed for a running operating system. The kernel appears to be small (I have built kernels >50MB), so I imagine that even with the basic kernel, most support is modular.

The kernel_cutdown.img will provide the smallest image possible that still allows the system to be usable. This will likely include basic filesystem and networking. But not much in the way of external peripheral support, so forget about plugging in that USB wireless adapter. Occasionally, the cutdown image will be built without modularisation entirely (which can half the size of the image).

In contrast, the kernel_emergency.img will likely be the opposite of the cutdown. This oversized image will contain a wide range of support compiled into the kernel. This image is usually used when there is a problem with the other kernels that is difficult to identify as it should provide a bootable installation in almost all cases. Think of it as a safe-mode.

I hope that helps your understanding. If I find out any more specifics about the Raspian images then I'll add it here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.