Recompiling the kernel in Corel Linux

I had to recompile the kernel on my Linux box to run a DHCP server and to add Appletalk functionality.

This HOWTO only deals with one implementation, Corel Linux version 1.2 with kernel version 2.2.16.

Download and read the FAQ on 'Compiling the Kernel on Corel LINUX OS' from Corel's Online Documentation page. There are a couple of typos in the copy I used, and I skipped a couple of stages because I wasn't upgrading the kernel, just reconfiguring it. Remember I'm using kernel version 2.2.16. The commands I used were:

1. Change to the /usr/src directory:

  # cd /usr/src

2. Decompress the kernel source file:

  /usr/src# tar xvfz kernel-source-2.2.16.tar.gz

3. Make a soft link from the kernel source directory to a new directory called linux:

  /usr/src# ln -sf /usr/src/kernel-source-2.2.16 /usr/src/linux

4. Change to the linux directory:

  /usr/src# cd linux

5. Type make mrproper to clean out any stale modules (Note to Corel, there is an error in your Kernel HOWTO at this point, where it states the command is 'make proper'):

  /usr/src/linux# make mrproper

6. Launch the graphical configuration utility for the kernel:

  /usr/src/linux# make xconfig

Start by clicking Code maturity level options and continue going through every pane until you've finished. There are help buttons beside every option explaining what it does and the suggested answer. Every computer is unique, and will require different options to function.

Appletalk is in the Networking section, under Appletalk DDP, or CONFIG_ATALK. Set it to Yes to include it in the kernel.

Once you have finished the configuration, click Save configuration and Exit.

7. Make all file dependencies for the kernel:

  /usr/src/linux# make dep

8. Make the compressed kernel image:

  /usr/src/linux# make bzImage

9. Make the loadable modules:

  /usr/src/linux# make modules

10. Install the modules:

  /usr/src/linux# make modules_install

11. Change to the /usr/src/linux/arch/i386/boot directory, where the compressed bzImage will be located:

  /usr/src/linux# cd arch/i386/boot

12. Move the bzImage file to the /boot directory:

  /usr/src/linux/arch/i386/boot# mv bzImage /boot/

Change to the /boot directory:

  /usr/src/linux/arch/i386/boot# cd /boot

13. Rename the bzImage file to something appropriate, without overwriting the old kernel (vmlinuz-2.2.16 in my case):

  /boot# mv bzImage vmlinuz-atalk

14. Change to the root directory:

  /boot# cd /

15. Make a symbolic link to the file in the root directory:

  /# ln -s /boot/vmlinuz-atalk /vmlinuz-new

16. Make a backup copy of the lilo.conf file. I speak from bitter experience here, as I accidently erased a large chunk of the file when trying to copy and paste text within it. I only discovered the problem after I'd saved the corrupted file. Big mistake :(

  /# cp /etc/lilo.conf /etc/lilo.conf.orig

17. Edit the /etc/lilo.conf file, copying the section beginning with image=/vmlinuz, editing it so that it looks similar to the section below, and adding it to the end of the file:

Before

  image=/vmlinuz
        label=[]_{}
        vga=0xf04
        append="no-scroll"
        root=/dev/hdb2
        read-only

After

  image=/vmlinuz
        label=[]_{}
        vga=0xf04
        append="no-scroll"
        root=/dev/hdb2
        read-only
  image=/vmlinuz-new
        label={}~New
        vga=0xf04
        append="no-scroll"
        root=/dev/hdb2
        read-only

This is an example of what it should look like. The 'root' specification will vary from one system to another. Use the one already listed in the lilo.conf file for image=/vmlinuz. (Note to Corel, there is an error in your Kernel HOWTO at this point, the 'label' definition is wrong).

Once this is done, save the file and exit the editor.

18. Type lilo and press Enter. This will update the system to include the new kernel as an option at bootup.

  /# lilo

19. Reboot the system and select the new kernel from the available boot options. If you have a problem, you can reboot the system and select the original kernel at bootup, and then try recompiling again until it works!

Further Reading

The kernel-HOWTO which is part of the Linux Documentation Project

Comments

Your feedback to improve this page is welcomed, so please post your comments, additions and criticisms to eric.oberlanderREM@OVEbigfoot.com.


Back to my Corel Linux index page

Back to my netatalk HOWTO


Last updated 1 December 2000