- 论坛徽章:
- 0
|
Compiling a custom kernel on RedHat Enterprise
Andrew P Myers : 25/05/2004
# The following commands can be used to compile a new
# linux kernel, e.g. to include IEEE1394 support.
# You will need to do this everytime there is a kernel update, so download and install these first. Then,
# Make a backup of /boot/grub.conf
cp /boot/grub.conf /boot/grub.conf.backup
cd /usr/src/linux-2.4.21-15.EL # or whatever the latest kernel is
make mrproper
make config # yes to all (default = y = )
# "make xconfig" needs to import initial config file - fiddly!
# leda/dram=P4 ; castor/pollux=athlon
make dep
make clean
make bzImage
make modules
make modules_install # populates /lib/modules – look for ieee1394
# Now install the new kernel in /boot
cp System.map /boot/System.map-2.4.21-15.ELcustom
cp arch/i386/boot/bzImage /boot/vmlinuz-2.4.21-15.ELcustom
cp .config /boot/config-2.4.21-15.ELcustom
cp vmlinux /boot/vmlinux-2.4.21-15.ELcustom
mkinitrd /boot/initrd-2.4.21-15.ELcustom.img 2.4.21-15.ELcustom
# Now edit /boot/grub/grub.conf to boot into new kernel.
vi /boot/grub/grub.conf
# Insert something like:
title Red Hat Enterprise Linux WS (2.4.21-15.EL with IEEE1394)
root (hd0,0)
kernel /vmlinuz-2.4.21-15.ELcustom ro root=LABEL=/ hda=ide-scsi
initrd /initrd-2.4.21-15.ELcustom.img
# And change the default boot kernel ID in grub.conf
# Now reboot!!!
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/17184/showart_98788.html |
|