Travis Angle
Adam Fuller
Roger Smith
Rajiv Zutshi

Assignment 8

The Kernel Upgrade

Introduction

(Travis Angle)

In this assignment we upgraded the kernel from version 2.0.36 to version 2.2.3 and then to 2.2.4. In a unix system, there are essentially three layers:

The kernel is the software that actually allows for communication between the application programs and the physical hardware. It is written mostly in C with a little assembly language for low-level processing functionality. The kernel contains device drivers, which are pieces of software designed to manage specific pieces of hardware. In the kernel configuration, we decided to compile in sound support as this enabled us to run the x11AMP program described in last week's installation.

We were interested in upgrading the kernel because none of the members of the group had ever attempted such an experiment. Considering the kernel lies at the heart and soul of the operating system, it seemed like an exciting challenge...

Narrative

(Adam Fuller, Rajiv Zutshi)

Well, we got our arse's thoroughly kicked by the kernel. We compiled four different kernels, each with varying degrees of success. In the end, we decided to cut our loses and just play with lilo for a little while. Check out the script file for our first kernel, the "secure kernel".

Part 1 : Kernel 2.2.3 "The Secure Kernel"

At the time we began this little experiment, 2.2.3 was the latest kernel. We snagged a copy from Metalab and unpacked it in /usr/src. The kernel put itself in /usr/src/linux/, which, to our dismay afterwards, was originally a symbolic link to /usr/src/linux-2.0.36/. Now, if we ever had a problem, we wouldn't be able to go back to the old kernel and see how that kernel was configured.

We read through the README and went ahead with the configuration and compilation. make xconfig launched a graphical configuration tool. We were unfamilar with most of the options, but we knew we needed to get sound running, so we read the sound HOWTO and properly configured the sound modules (the successful running of x11amp was our proof).

make dep was the next step. This ran rather smoothly. However, make zImage didn't work. It complained that zImage was too big, and that we should use bzImage. So we ran make bzImage and the kernel compiled successfully. Next we compiled and installed the modules with make modules; make modules_install.

After the kernel was successfully compiled, we moved zImage out of /usr/src/linux/arch/i386/boot and into /boot. We added the kernel to /etc/lilo.conf, ran /sbin/lilo, and rebooted.

When the machine came back up, we selected the new kernel from the menu and watched the kernel messages as they appeared. Unfortunately, our plan to compile in multiple ethernet drivers (we've got the card with no name) didn't work and we had no network connectivity. But the sound did work!!

Part 2 : Kernel 2.2.4 "The Mini-Kernel"

A week later the source code for 2.2.4 was released. Roger downloaded the code and did make config. We haven't tested his kernel yet. It's a rather sketchy kernel. Compared to the other kernels, we're highly suspicious of it's capabilities:


% ls -l *vmlinuz*
-rw-r--r--   1 root     root       464209 Apr  1 08:53 nutha_vmlinuz-2.2.4
-rw-r--r--   1 root     root       454325 Oct 13 22:41 vmlinuz-2.0.36
-rw-r--r--   1 root     root       522638 Mar 16 16:31 vmlinuz-2.2.3
-rw-r--r--   1 root     root       511683 Mar 28 11:06 vmlinuz-2.2.4-adam
-rw-r--r--   1 root     root         2560 Mar 25 12:10 vmlinuz-2.2.4-roger

Part 3 : Kernel 2.2.4 "The Crippled Kernel"

Next, Adam took a solo shot at the kernel, producing vmlinuz-2.2.4-adam, which, upon booting, notified us that it could not find the floppy disk, the cdrom drive, or the ethernet card. It complained about the video card, but we were still able to get into X. This kernel was a miserable failure.

Part 4: Kernel 2.2.4 "The 'It's not just awfule...it's god-awful' Kernel"

Compiled this morning, bytes hot off the press, nutha_vmlinuz-2.2.4 is the penultimate in kernel failures. This one didn't even come all the way up, freezing halfway through booting with a "Kernel Panic" message. Thank god, too, or rm -rf * would have been applied to the system with little regard to the safety of those standing nearby.

Part 5: "A happy ending after all–sort of"

Despite the troubles with the kernel, a great lesson in lilo configuration was had by all. We learned how to boot multiple kernels using lilo much the same way you boot multiple OSes. Here's our /etc/lilo.conf:


# global configuration
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
prompt
timeout=100
# end global configuration

# default kernel
image=/boot/vmlinuz-2.0.36
        label=orig_kernel
        root=/dev/hda1
        read-only

# ultra-secure kernel (with sound!!)
image=/boot/vmlinuz-2.2.3
        label=secure_kernel
        root=/dev/hda1
        read-only

# roger's kernel (optimized to kick ass)
image=/boot/vmlinuz-2.2.4-roger
        label=rog_kernel
        root=/dev/hda1
        read-only

# adam's kernel (cdrom and floppy drives are for pansies)
image=/boot/vmlinuz-2.2.4-adam
        label=adam_kernel
        root=/dev/hda1
        read-only

# adam and rajiv's second kernel (this one'll work, I know it!)
image=/boot/nutha_vmlinuz-2.2.4
        label=nutha_kernel
        root=/dev/hda1
        read-only

Functionality

(Rogé Smith)

We had developed a secure standalone system after we booted the 2.2.3 kernel. Magenta was not connected to the network as it did not respond when we 'pinged' it. This proved to be a major problem. To obtain network functionality we proceeded with the following measures:

  1. We had initally compiled ALL the 3Com NIC drivers and booted the kernel. This did not work.
  2. We then picked the driver for the 3Com 3c5x9 card and recompiled the kernel. Still no network connectivity.
  3. We then used a program to identify the NIC which we downloaded from 3Com's web site. When we ran this program, it stated that no 3Com adapters could be found!! We had been on the wrong track the entire time. We pulled out the unidentifiable PCI NIC and replaced it with a ISA/EISA 3Com 3C509 NIC. We proceeded to reconfigure and then recompile the kernel again using this 3C509 driver. When we tried to reboot magenta with the new kernel, we had more problems and recevied messages regarding a 'kernel panic'
  4. Having spent several hours trying to obtain network functionality on magenta, we finally decided to cut our losses and just reboot the 2.0.36 kernel. Phew!!

April 1, 1999 -- and that's no joke!