Chapter 5. Installing and Booting From a Kernel

Previous chapters showed you how to download and build your kernel. Now that you have an executable file -- along with any modules you built -- it is time to install the kernel and attempt to boot it. In this chapter, unlike earlier ones, all of the commands need to be run as the root user. This can be done by prefixing each command with sudo, by using the su command to become root, or actually by logging in as root.

To see if you have sudo installed and the proper access set up, do the following:

$ sudo ls ~/linux/linux-2.6.17.11/Makefile
Password:
Makefile

Enter either your own password at the password prompt, or the password of the system administrator (root). The choice depends on how the sudo command is set up. If this is successful, and you see the line containing:

Makefile

then you can skip to the next section.

If sudo is not installed or giving you the proper rights, then try using the su command:

$ su
Password:
# exit
exit
$

At the password prompt, enter the password of the system administrator (root). When the su program successfully accepts the password, you are transferred to running everything with full root privileges. Be very careful while as root, and do only the minimum needed; then exit the program to continue back as your normal user account.

Using a Distribution's Installation Scripts

Almost all distributions come with a script called installkernel that can be used by the kernel build system to automatically install ...

Get Linux Kernel in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.