RedHatのカーネルバージョンアップ
RedHatのカーネルバージョンアップ
0.改訂履歴
1.はじめに
このドキュメントでは,RedHatのカーネルを手動でバージョンアップする手順を説明する. 手動と言っても,RedHat Networkから直接アップデートを行わないだけで,RPMを用いて手順は簡単にする.
このアップデートは,RHSA-2005:472-05で警告されているRedHatの重要なセキュリティアップデートもかねており,RedHat ES3を利用している人は必ず適用するようにとメーカから推奨されている.
2.環境の確認
- 現在のOSのバージョンを確認する.
- まずはカーネルバージョン.
変更前のカーネル
[root@mars root]# uname -a
Linux mars 2.4.21-4.EL #1 Fri Oct 3 18:13:58 EDT 2003 i686 i686 i386
GNU/Linux
[root@mars root]#
|
変更前のRedHatリリース
[root@mars root]# cat /etc/redhat-release
Red Hat Enterprise Linux ES release 3 (Taroon)
[root@mars root]#
|
3.カーネルのアップデート
- カーネルモジュールも,RPMで提供されている.
- 今回導入するパッケージは次の通り.
[root@mars Download]# ls -la kernel-2.4.21-32.0.1.EL.i686.rpm
-rw-r--r-- 1 root root 9172299 May 26 01:14 kernel-2.4.21-
32.0.1.EL.i686.rpm
[root@mars Download]#
|
- ファイル名通りで行けば,Kernel 2.4-21-32.0.1になるはず.
- 早速RPMでインストールを行う.
[root@mars Download]# rpm -ihv kernel-2.4.21-32.0.1.EL.i686.rpm
warning: kernel-2.4.21-32.0.1.EL.i686.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing... ########################################### [100%]
1:kernel ########################################### [100%]
[root@mars Download]#
|
- 特に何もなく終了.
- ちなみにカーネルを確認してみる.
[root@mars Download]# uname -a
Linux mars 2.4.21-4.EL #1 Fri Oct 3 18:13:58 EDT 2003 i686 i686 i386 GNU/Linux
[root@mars Download]#
|
[root@mars Download]# reboot
Broadcast message from root (pts/1) (Tue Sep 6 10:24:29 2005):
The system is going down for reboot NOW!
[root@mars Download]#
|
[root@mars root]# uname -a
Linux mars 2.4.21-32.0.1.EL #1 Tue May 17 18:01:37 EDT 2005 i686 i686 i386 GNU/Linux
[root@mars root]#
|
- 変わっている事が確認できる.
- リリースを確認する.
[root@mars root]# cat /etc/redhat-release
Red Hat Enterprise Linux ES release 3 (Taroon)
[root@mars root]#
|
4.grub.confの確認
- カーネルアップデート後の再起動で,grubのエントリが増えていた事が確認できたはず.
- エントリを確認する.
[root@mars root]# cat /etc/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/hda2
# initrd /initrd-version.img
#boot=/dev/hda
default=1
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Enterprise Linux ES (2.4.21-32.0.1.EL)
root (hd0,0)
kernel /vmlinuz-2.4.21-32.0.1.EL ro root=LABEL=/
initrd /initrd-2.4.21-32.0.1.EL.img
title Red Hat Enterprise Linux ES (2.4.21-4.EL)
root (hd0,0)
kernel /vmlinuz-2.4.21-4.EL ro root=LABEL=/
initrd /initrd-2.4.21-4.EL.img
[root@mars root]#
|
- 必要な時に古いカーネルで起動する事も可能なようである.