APC Australia

Troublesho­oting

-

The are two types of people: those whose first kernel compiled and booted correctly and those who tell the truth. It can take a few tries to get it right, look at the sub-version number on distro releases, but you cannot break your system. This is because installing a new kernel version doesn’t touch your old kernel, and your Grub menu will contain all the kernels it finds in /boot. So experiment away knowing you have a safety net. The most common failures, especially if you are not using an initramfs, are not including essential items like your hard disk controller and root filesystem type as built-ins. Remember, you cannot load any modules until the root filesystem is mounted.

The usual sign of a failure is a kernel panic, the kernel is doing it so you don’t need to, or it simply stops with an error message. Read the error messages onscreen, you can scroll back a bit with Shift-PageUp providing the kernel is still running. The default scrollback buffer is fairly small, but you can set it larger in the kernel with the VGACON_ SOFT_ SCROLLBACK_ SIZE option — press ‘/’ to find it! You can also override this setting by passing fbcon=scrollback:Nk to the kernel via the bootloader, where N is the size in KB, but it’s probably easier to set this to something like 128K in the kernel while you are experiment­ing. Speaking of bootloader options, you may want to disable the GRUB_ HIDDEN_TIMEOUT option in /etc/ default/grub so you see a menu with the kernel choices, just in case you need to select your fallback kernel. You should also disable any splash screens in here so you can see what is going on.

When you go back into your kernel source, make some changes, recompile and install, the previous version will be renamed with ‘.old’. The old .old version will be lost. If you want to keep track of all your experiment­al versions, you can either set LOCALVERSI­ON in the config or create a file called localversi­on in the source tree. The contents of these will be added to the kernel version, so you can increment them as you go along. That will mean you could have a lot of kernels in /boot, feel free to delete any you no longer need, along with the accompanyi­ng System.map and initramfs files. You should also delete the correspond­ing directorie­s from /lib/modules.

Newspapers in English

Newspapers from Australia