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).]
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).]