The Kernel Upgrade
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:
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...
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 allsort 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
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:
April 1, 1999 -- and that's no joke!