Hardware Reference
In-Depth Information
he Linux kernel is a single ile located in the
/boot
directory called
kernel.img
. When
the Pi is irst switched on and begins to load the operating system, it looks for this ile, and if
the ile is missing, the Pi won't work. he emergency kernel is a second ile, again in the
/
boot
directory, called
kernel_emergency.img
.
he emergency kernel is, in most cases, almost identical to the standard kernel. When
changes are made to the standard kernel, to boost performance or add new features for
example, the emergency kernel is left unaltered. his way, if the changes to the standard
kernel cause stability problems, a user can simply tell the Pi to load the emergency kernel
instead.
here are two ways to boot into the emergency kernel, and both require the use of a PC and
an SD card reader if the Pi can't boot. Otherwise, the following can be carried out on the Pi
itself.
he easiest way to boot the emergency kernel is to rename the existing
kernel.img
ile to
kernel.img.bak
, and then rename the
kernel_emergency.img
ile to
kernel.img
.
When the Pi loads, it will now load the emergency kernel by default. To go back to the stan-
dard kernel, simply reverse the process: rename
kernel.img
to
kernel_emergency.img
and
kernel.img.bak
to
kernel.img
.
An alternative method to load the emergency kernel is to edit the
cmdline.xt
ile (located
in the
/boot
directory) by adding the following entry at the end of the existing command
line:
kernel=kernel_emergency.img
his tells the Pi that it should load the kernel named
kernel_emergency.img
instead of
the usual
kernel.img
. Reversing the process is as simple as opening
cmdline.txt
again
and removing the entry.
You'll learn more about
cmdline.txt
and how it afects the operation of the Raspberry Pi
in Chapter 6, “Coniguring the Raspberry Pi”.