E-Mail:
Get our new Windows 7 eBook (PDF) for $7 with 70+ Tips. Download Now!

Kernel Fundamentals Part 6

  • No Related Post

Kernel Fundamentals - Part 6

We’re nearly at the end of the kernel series in Penguin Shell. So far, you’ve configured the kernel for your needs, recompiled and created an image of that kernel, built the loadable modules, and installed them accordingly. You’ve also moved that new image to the /boot partition. What’s left? Three pretty simple steps:

8. Delete any symbolic links that point to the old kernel version and create new ones.

9. Modify lilo, or, at a minimum, make sure that it points to the new kernel image.

10. Commit lilo, using the /sbin/lilo command.

Take a quick look in the /boot directory.

    ls -l /boot

You’re likely to see a file called “vmlinuz.” If you look closely at the properties column on the left of the ls listing, you’ll see that this file is a symbolic link to the actual kernel image, as denoted both by the “l” and by the arrow pointing from “vmlinuz” to the name of the actual image. The first step today is to delete and recreate this symbolic link.

    rm -f vmlinuz
    ln -s vmlinuz-12.26.01 vmlinuz

The first command [rm -f] forces a deletion of the old vmlinuz symlink. That’s to say that it removes the symlink without asking for confirmation that you do, in fact, want to delete it. Use this [-f] option carefully. The second command creates a symlink [ln -s] from the new kernel [vmlinuz-12.26.01] to a new vmlinuz file [vmlinuz]. We’ll discuss the reason for this symlink tomorrow, when we wrap up the kernel configuration.

Now, with this new kernel in place, you’ll need to let lilo know which image to use to load the operating system. Using vi (or your favorite editor) as root, open the /etc/lilo.conf file. You’re looking for the line in lilo that begins, “image=”. Make sure that this line reads “image=/boot/vmlinuz” (no quotes), then save and close your editor.

Finally, you’ll need to commit this new lilo configuration. As root, use the following command:

    /sbin/lilo

If you’ve followed the process correctly, you’ll be returned some lines beginning with “Added”. These should correctly describe the operating systems you’ve defined in lilo. If Linux is your default OS, the “Added” line that describes Linux will also display an asterisk at the end, denoting the default OS. Once you’re returned to the command prompt, you’re ready to reboot with your new kernel.

We’ll wrap up the kernel configuration series tomorrow with some distro specific “gotchas,” with a way to preserve your old kernel just in case there’s been an error in the process, and with some other general housekeeping tips and tidbits.

A new year, a new Linux kernel. Seems a bit like parallel processing, doesn’t it?

What Do You Think?

 
35 queries / 0.341 seconds.