Linux Kernel messages logging
Debugging the kernel is not necessarily rocket science; in fact it can be achieved using very simple and straight forward techniques and some time, patience and perseverance. This page describes a trick and techniques to help debug the kernel. One important thing is to analyze the kernel messages. They can be seen during the startup, but it is better to record them in a file.
Once the kernel starts, there isn't much to do except watch for potential problems. For RHEL, you will see a Red Hat Enterprise Linux screen with a slow-spinning icon. If you want to watch messages detailing the boot process scroll by, press the Esc key.
At this point, the kernel tries to load the drivers and modules needed to use the hardware on the computer. The main things to look for at this point (although they may scroll by quickly) are hardware failures that may prevent some feature from working properly. Although much more rare than it used to be, there may be no driver available for a piece of hardware, or the wrong drive may get loaded and cause errors.
We will use a couple of commands to capture the kernel messages in a file and then view them using the Less command.
The output of the complete file is too large for this blog screen, so I will use the Less and Tail command to show the last lines output that kernel filled inside the file.
We can see that this particular VM machine has no IPV6 routers present. This can be detected using the ND IPV6 builtin protocol. Many other important messages like: supported CPUs, BIOS version, APIC, and other hardware detection issues can be seen in this file.
What you want to look for are drivers that fail to load or messages that show certain features of the hardware failed to be enabled. As soon as the kernel is done initially detecting hardware and loading drivers,
it passes off control of everything else that needs to be done to boot the system to the init process.
Source http://www.redhat.com/
No comments:
Post a Comment