Click to See Complete Forum and Search --> : Updating My Kernel


rpmilius
12-10-1999, 12:16 PM
How I Updated My Kernel:

I had RedHat 6.1 with the 2.2.12-20 kernel installed. For various reasons, I wanted to update the kernel to 2.2.13. I did the following which seems to have worked.

downloaded the latest stable kernel from
ftp://ftp.kernel.org/pub/linux/kernel/v2.2/linux-2.2.13.tar.gz into my home directory (~bob).

I ran the following commands (comments are indicated with a "#")


su -
cd /usr/src
ls -l
# showed that /usr/src/linux was a link to /usr/src/linux-2.2.12-20
#
rm /usr/src/linux
tar xzvf ~bob/linux-2.2.13.tar.gz
# last command created a new "linux" directory containing new kernel
# source files
#
mv /usr/src/linux /usr/src/linux-2.2.13
ln -s /usr/src/linux-2.2.13 /usr/src/linux
# did that just for consistancy
#
cd /usr/src/linux
#
# read through the README which explains the make commands
#
make mrproper
#
# preserve my previous configuration options
cp /usr/src/linux-2.2.12-20/.config .
#
make oldconfig
# when prompted, entered "m" to make a module for new options
#
make dep
make bzImage
make modules
make modules_install
cd /boot
ls -l
# showed that old System.map is a link to System.map-2.2.12-20
# and that the old vmlinuz is a link to linuz-2.2.12.20
#
rm /boot/System.map
rm /boot/vmlinuz
#
# copy newly created kernel and system.map to /boot
cp /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz-2.2.13
ln -s /boot/vmlinuz-2.2.13 /boot/vmlinuz
cp /usr/src/linux/System.map /boot/System.map-2.2.13
ln -s /boot/System.map-2.2.13 /boot/System.map
#
# create /boot/initrd.2.2.13.img
mkinitrd /boot/initrd-2.2.13.img 2.2.13
#
# edited my /etc/lilo.conf by copying the linux section and
# giving it a new label and updating the image and intitrd files.
------my /etc/lilo.conf starts after this line------------------------
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
default=win98

image=/boot/vmlinuz-2.2.12-20
label=linux
initrd=/boot/initrd-2.2.12-20.img
read-only
root=/dev/hda5

image=/boot/vmlinuz-2.2.13
label=newlinux
initrd=/boot/initrd-2.2.13.img
read-only
root=/dev/hda5

other=/dev/hda2
label=win98
------/etc/lilo.conf ends before this line------------------------
#
/sbin/lilo
#
# Win98 is my default (so kids can run their games). To run the new
# kernel, I enter "newlinux" at lilo prompt. If I have problems, I can
# go back and run "linux" to get original kernel.
# Once I'm satisfied it works okay, I'll update /etc/lilo.conf so that
# new linux is labeled "linux" and orig linux is labeled "oldlinux"
# and then I'll rerun /sbin/lilo
#



[This message has been edited by rpmilius (edited 11 December 1999).]

Once-Ler
12-27-2000, 06:23 AM
some questions... there is a line that says

#preserve my previous configuration options
cp /usr/src/linux-2.2.12-20/.config

where am i copying this to... and when i trying saving it somewhere it give me a file not found type thing.

did you forget to put a comment?

I'm using caldera2.4

the command mkinitrd didn't work... it gave me a command not found type thing.

I'm having problems with my modules (I think). I can't get anything to work (well at least my usb mouse and nic card) I went back and turned all the usb stuff on and I turned on 3c59x (wich is the correct module for my nic) and neither worked.

thank you for the rest of the post... i can feel that i'm almost there in getting this kernel thing under my belt.

Sterling
12-27-2000, 12:57 PM
Once-Ler - There's a . you're missing at the end of that cp line, I think...

Anyway, there's a kernel compiling NHF, so read that if you haven't already. There's also a HOWTO or two you might find useful.

------------------
-Sterling
-This post made with the Lizard! (http://www.mozilla.org)

Xtrecate
01-03-2001, 06:55 PM
Keep in mind that as long as your vmlinuz is /vmlinuz, and lilo is /usr/sbin (i believe), than instead of all that lilo config, vmlinuz renaming and moving, simply use "make bzlilo" after you do "make bzImage" (or make bzdisk, either way).

its much easier that way.

-lee