红联Linux门户
Linux帮助

安装linux新内核,fedora方式

发布时间:2007-12-02 00:38:57来源:红联作者:verytow
创建rpmbuild目录:
cd ~
cp -a /usr/src/redhat/ rpmbuild
echo '%_topdir %(echo $HOME)/rpmbuild' >> .rpmmacros
yum install fedora-rpmdevtools unifdef
fedora-buildrpmtree
cd /usr/src
wget http://download.fedora.redhat.com/pub/fedora/linux/core/6/source/SRPMS/kernel-2.6.18-1.2798.fc6.src.rpm

#好像现在只有这个老东西,所以我从development树拿东西

wget http://download.fedora.redhat.com/pub/fedora/linux/development/source/SRPMS/kernel-2.6.23-0.202.rc8.fc8.src.rpm
rpm -ivh kernel-2.6.23-0.202.rc8.fc8.src.rpm
cd ~/rpmbuild/SPECS/
rpmbuild -bp kernel.spec
cd /root/rpmbuild/BUILD/kernel-2.6.23rc8
make menuconfig
make rpm

然后你将在~/rpmbuild/SRPMS/目录发现一个新的src.rpm包
当然这个src.rpm包的作用是安装补丁后的新src.rpm包

安装新内核
cd ~/rpmbuild/RPMS/i386
rpm -ivh kernel-2.6.23rc8.i386.rpm
mkinitrd /boot/initrd-2.6.23-rc8.img 2.6.23-rc8

编辑grub
cd /boot/grub
vi ./grub.conf


default=2
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu

下,添加
title Fefora (2.6.23-rc5)
root (hd0,0)
kernel /vmlinuz-2.6.23-rc5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.23-rc5.img

这样shutdown -r now就可以在grub看见新内核了。
文章评论

共有 0 条评论