Operation Manual
You can test the networking by using the ping command, which sends data to a remote computer and waits for a response. If
everything’s working, you should see the same response as shown in Figure 3-3. If not, you may need to manually configure your
network settings, which you’ll learn how to do in Chapter 4, “Network Configuration”.
Figure 3-3: The result of a successful test of the network, using the ping command
The Emergency Kernel
The Linux kernel is the heart of the operating system that drives the Pi. It’s responsible for everything from making sure that you
can access your files to allowing programs to talk to other programs.
When switched on, your Pi will load the normal, default kernel. There’s also a second kernel included in most distributions,
which sits unused. This is the emergency kernel, and as the name suggests, it is typically used only when the normal kernel isn’t
working.
It’s highly unlikely that you’ll ever need to boot a Pi using the emergency kernel, but it’s worth learning how to do so just in case.
This is especially important if you’re upgrading your kernel or are using a new and potentially poorly tested distribution.
Sometimes, newly-released software can have bugs which aren’t spotted before its release. When encountering strange errors
after upgrading, the emergency kernel can be used to narrow down the problem to the new kernel version.
The Linux kernel is a single file located in the /boot directory called kernel.img. When the Pi is first switched on and begins to
load the operating system, it looks for this file, and if the file is missing, the Pi won’t work. The emergency kernel is a second file,
again in the /boot directory, called kernel_emergency.img.
The 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. This way, if the changes to the
standard kernel cause stability problems, a user can simply tell the Pi to load the emergency kernel instead.
There 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.
The easiest way to boot the emergency kernel is to rename the existing kernel.img file to kernel.img.bak, and then rename
the kernel_emergency.img file to kernel.img. When the Pi loads, it will now load the emergency kernel by default. To go
back to the standard 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 file (located in the /boot directory) by adding the
following entry at the end of the existing command line: