Target:
minimized way to upgrade to kernel version 2.6.8 and have
network for used.
Prerequisition:
Debian 3.0 r2
wget 1.8.1
gcc 2.95.4
make 3.79.1
kernel 2.6.8
libncurses5-dev
dhcp3-client
Description:
Lately I endeavor to play around with newly kernel released. Though
there're many ways to update to newer kernel version, such as apt-get or use
debian pacakge management tool; however, I choose an alternative way to help
myself be familar with some basic operation in linux environment.
First, to setup debian system successfully is a basic stone for
processin' further. That means we have to, at least, be able to use apt-get
to obtain necessary packages, inclusive of wget, gcc, make and so on.
Note: gcc, make as well as libncurses can be obtained through
apt-get install gcc (make/ libncurses5-dev)
command; and that's why i choose debian.
Second, make use of wget to obtain kernel source code from
http://www.kernel.org (version 2.6.8 located at http://www.kernel.org/pub/linux/kernel/v2.6/).
wget -c http://www.kernel.org/pub/linux/kernel/ ... 6.8.tar.gz
Third, uncompress the downloaded file, e.g., linux-2.6.8.tar.gz
via issuin' following commands:
gunzip *gz
tar xvf *tar
Then get into the folder (here in our example is linux-2.6.8 ) to choose
proper setting for kernel config.
make menuconfig
Here we have to pay attention to some setting that may result in error
after using newly built kernel to boot the system; as follow-up the troubleshoot
states. a.) ATA/ATAPI/MFM/RLL support. b.) dhcp client version. That can be
avoided via a.) check weather the flag CONFIG_BLK_DEV_IDEDISK has been
set to y. b.) install newly version dhcp client package, i.e., dhcp3-client.
Rest of the setting is free for you to choose.
Fourth, build the kernel.
make (or make clean if necessary)
After process finished. we need to copy kernel image file to /boot
folder and setup lilo to make our system using of newly kernel version.
(Note: here I only test lilo to configure my system; grub can be referenced
in the kernel HOW-TO document; )
(cd to the linux-2.6.8 - e.g, $KERNEL_SRC - folder where the source
code uncompressed)
cp $KERNEL_SRC/arch/i386/boot/bzImage /boot/vmlinuz-2.6.8
cp $KERNEL_SRC/System.map /boot/System.map-2.6.8
cd /boot
(if there's vmlinuz exsited in the /, remove it first)
ln -s /boot/vmlinuz-2.6.8 /vmlinuz
ln -s /boot/System.map-2.6.8 /boot/System.map
Then, vi /etc/lilo.conf; add the follow lines after 'Boot up Linux
by default' section.
default=vmlinuz-2.6.8
image=/boot/vmlinuz-2.6.8
label=vmlinuz-2.6.8
root=/dev/hda1 #if not sure, use 'df -k' command to check the
file system mounted on /
read-only
Next, issue command lilo; the newly label would be added.
Finally, reboot your system.
That's it! Have fun.
Bibliography:
http://www.digitalhermit.com/linux/Kern ... HOWTO.html
Troubleshooting:
A.) VFS: Cannot open root device "hda1" or unknown-block(3,1)
make ATA/ATAPI/MFM/RLL support default when 'make menuconfig'.
B.) cat /var/run/dhclient.pid : No such file or directory.
1. remove dhcp client package default installed
in debian 3.0 r2.
apt-get remove dhcp-client
2. install newly version of dhcp client package.
apt-get install dhcp3-client