Chapter 15. Rebuilding the Linux Kernel


15. Rebuilding the Linux Kernel

IN THIS CHAPTER

Locating the Source Code

526

Installing the Source Code

527

Configuring and Compiling the Linux Kernel

529

Installing the Kernel and Associated Files

532

Boot Loader

533

dmesg: Displays Kernel Messages

535


Once you have installed Red Hat Enterprise Linux or Fedora Core, you may want to reconfigure and rebuild the Linux kernel. Red Hat Linux comes with a prebuilt kernel that simplifies the installation process. This kernel may not be properly configured for all of your system's features, however. By reconfiguring and rebuilding the kernel, you can create one that is customized for your system and your unique needs.

Because recent releases of the Linux kernel are modular, you do not usually need to rebuild the kernel. Instead, you can dynamically change many things that used to require rebuilding the kernel. Two ways to make these changes are by using boot options or by modifying /etc/sysctl.conf, which is used by sysctl when the system is booted.

You can also append a string to the kernel line in /boot/grub/grub.conf or to its symbolic link, /etc/grub.conf. For example, norelocate prevents the substitution of CPU-specific optimizations and acpi=off prevents acpid (the advanced configuration and power interface daemon) from starting.

Tip: Maybe you just need to install a new Linux kernel binary

Refer to "Installing a Linux Kernel Binary" on page 490 when you want to install a Linux kernel binary that you do not need to configure or build.


sysctl


The sysctl utility modifies kernel parameters while the system is running. This utility takes advantage of the facilities of /proc/sys, which defines the parameters that sysctl can modify.

The command sysctl a displays a complete list of sysctl parameters. An example of displaying and changing the domainname kernel parameter follows. The quotation marks are not required in this example, but you must quote any characters that would otherwise be interpreted by the shell.

# /sbin/sysctl kernel.domainname kernel.domainname = tcorp.com # /sbin/sysctl -w kernel.domainname="testing.com" kernel.domainname = testing.com


Caution: Have the first installation CD or the installation DVD handy when you rebuild the kernel

When you rebuild the Linux kernel to install a new version or to change the configuration of the existing version, make sure that you have the first installation CD or the installation DVD handy. You can also use the rescue CD; see page 40. These disks allow you to reboot the system, even when you have destroyed the system software completely. Having this CD or DVD can make the difference between momentary panic and a full-scale nervous breakdown. Refer to "Rescue Mode" on page 397 for instructions on bringing the system up in rescue mode.





A Practical Guide to Red Hat Linux
A Practical Guide to Red HatВ® LinuxВ®: Fedoraв„ў Core and Red Hat Enterprise Linux (3rd Edition)
ISBN: 0132280272
EAN: 2147483647
Year: 2006
Pages: 383

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net