Linux - Compile kernel 2.6
Prepare compiler
# yum install gcc
Download the latest kernel from http://www.kernel.org/
# cd /tmp
# wget http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.22.1.tar.bz2
Extract tar file:
# mv linux-2.6.22.1.tar.bz2 /usr/src
# tar -xjvf linux-2.6.22.1.tar.bz2
# cd /usr/src
Configure kernel
# make menuconfig (Text based menus)
(optional) # make xconfig (KDE configuration tool)
(optional) # make gconfig (GNOME configuration tool)
(select different options depends on your own environment)
Compile kernel
# make
# make modules
# make modules_install
Install kernel
# make install
(three files installed into /boot directory)
(System.map-2.6.22.1)
(config-2.6.22.1)
(vmlinuz-2.6.22.1)
Create an initrd image:
# cd /boot
# mkinitrd -o initrd.img-2.6.22.1 2.6.22.1
Modify grub
# vi /boot/grub/menu.lst
title Debian GNU/Linux, kernel 2.6.22.1 Default
root (hd0,0)
kernel /boot/vmlinuz root=/dev/hdb1 ro
initrd /boot/initrd.img-2.6.22.1
savedefault
boot
# update-grub
Reboot computer and boot into your new kernel
# yum install gcc
Download the latest kernel from http://www.kernel.org/
# cd /tmp
# wget http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.22.1.tar.bz2
Extract tar file:
# mv linux-2.6.22.1.tar.bz2 /usr/src
# tar -xjvf linux-2.6.22.1.tar.bz2
# cd /usr/src
Configure kernel
# make menuconfig (Text based menus)
(optional) # make xconfig (KDE configuration tool)
(optional) # make gconfig (GNOME configuration tool)
(select different options depends on your own environment)
Compile kernel
# make
# make modules
# make modules_install
Install kernel
# make install
(three files installed into /boot directory)
(System.map-2.6.22.1)
(config-2.6.22.1)
(vmlinuz-2.6.22.1)
Create an initrd image:
# cd /boot
# mkinitrd -o initrd.img-2.6.22.1 2.6.22.1
Modify grub
# vi /boot/grub/menu.lst
title Debian GNU/Linux, kernel 2.6.22.1 Default
root (hd0,0)
kernel /boot/vmlinuz root=/dev/hdb1 ro
initrd /boot/initrd.img-2.6.22.1
savedefault
boot
# update-grub
Reboot computer and boot into your new kernel
Comments
Post a Comment