- 抓 source code 回來 compile 當然是一種方法,
這樣做的好處是可以調整細部選項,也可以練習 compile kernel 的步驟。
- 如果沒時間,或是比較懶時,Red Hat 也幫你做出 RPM 檔,
內含 compile 好的新版 kernel,
可以逛逛
ftp://linux.sinica.edu.tw/redhat/updates/
在這個目錄裡,大致可看到
athlon/ i486/ i686/ images/ s390/
i386/ i586/ ia64/ noarch/ SRPMS/
這些子目錄,其中
- 安裝新版 kernel 的 RPM 檔時,記得使用 rpm -ivh 的方式,這樣才會保留舊版的 kernel:
[root@linux1:~]# rpm -ivh kernel-2.4.9-31.i686.rpm
error: failed dependencies:
modutils >= 2.4.13 is needed by kernel-2.4.9-31
tux < 2.1.1-10 conflicts with kernel-2.4.9-31
怎麼回事?怎麼會這樣?不要慌,這代表要裝 2.4.9 版的 kernel 時必須
更新modutils 這個套件,而目前系統上的 tux 套件無法與新的 kernel 相容。
解決方式為
- 把新版的 modutils 以及 tux 這兩個套件抓回來,
- 再利用 rpm -Uvh (注意,不是 -ivh) 的方式更新,
- 最後再把 kernel 更新即可。
- 更新 kernel 後,再看看 /boot/grub/grub.conf,會發現也多了一段:
title Red Hat Linux (2.4.9-31)
root (hd0,0)
kernel /vmlinuz-2.4.9-31 ro root=/dev/hda5
initrd /initrd-2.4.9-31.img
重新開機時會看到這項開機選擇。