Kernelのアップグレードとメンテナンス
[root@localhost ~]# ls -l /usr/src/redhat/
合計 40
drwxr-xr-x 2 root root 4096 3月 15 2007 BUILD
drwxr-xr-x 8 root root 4096 10月 5 04:01 RPMS
drwxr-xr-x 2 root root 4096 10月 14 05:25 SOURCES
drwxr-xr-x 2 root root 4096 10月 14 05:25 SPECS
drwxr-xr-x 2 root root 4096 3月 15 2007 SRPMS
[root@localhost ~]# ls -l /usr/src/kernels/
合計 8
drwxr-xr-x 18 root root 4096 10月 5 04:03 2.6.18-8.el5-i686
[root@localhost ~]# yum update kernel
Loading "installonlyn" plugin
Setting up Update Process
Setting up repositories
base 100% |=========================| 1.1 kB 00:00
updates 100% |=========================| 951 B 00:00
addons 100% |=========================| 951 B 00:00
extras 100% |=========================| 1.1 kB 00:00
Reading repository metadata in from local files
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for kernel to pack into transaction set.
kernel-2.6.18-8.1.14.el5. 100% |=========================| 205 kB 00:00
---> Package kernel.i686 0:2.6.18-8.1.14.el5 set to be installed
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
kernel i686 2.6.18-8.1.14.el5 updates 12 M
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 12 M
Is this ok [y/N]: y
Downloading Packages:
(1/1): kernel-2.6.18-8.1. 100% |=========================| 12 MB 00:02
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: kernel ######################### [1/1]
Installed: kernel.i686 0:2.6.18-8.1.14.el5
Complete!
[root@localhost ~]# ls -l /usr/src/kernels/
合計 8
drwxr-xr-x 18 root root 4096 10月 5 04:03 2.6.18-8.el5-i686
[root@localhost ~]# cat /boot/grub/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=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-8.1.14.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-8.1.14.el5 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.18-8.1.14.el5.img
title CentOS (2.6.18-8.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-8.el5 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.18-8.el5.img
[root@localhost ~]# ls -l /usr/src/kernels/
合計 8
drwxr-xr-x 18 root root 4096 10月 5 04:03 2.6.18-8.el5-i686
[root@localhost ~]#
[root@localhost 2.6.18-8.el5-i686]# make menuconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/docproc
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/kxgettext.o
HOSTCC scripts/kconfig/mconf.o
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/mconf
HOSTCC scripts/kconfig/lxdialog/checklist.o
HOSTCC scripts/kconfig/lxdialog/inputbox.o
HOSTCC scripts/kconfig/lxdialog/lxdialog.o
HOSTCC scripts/kconfig/lxdialog/menubox.o
HOSTCC scripts/kconfig/lxdialog/msgbox.o
HOSTCC scripts/kconfig/lxdialog/textbox.o
HOSTCC scripts/kconfig/lxdialog/util.o
HOSTCC scripts/kconfig/lxdialog/yesno.o
HOSTLD scripts/kconfig/lxdialog/lxdialog
scripts/kconfig/mconf arch/i386/Kconfig
関連コマンド:
make config
make menuconfig
make xconfig
make dep
make clean
make bzImage
make zImage
make modules
make modules_install
modinfo
modprobe
rmmod
※make modules_installでカーネルモジュールをインストールする先。
[root@localhost ~]# ls -l /lib/modules/カーネルバージョン/
合計 16
drwxr-xr-x 6 root root 4096 10月 14 22:52 2.6.18-8.1.14.el5
drwxr-xr-x 6 root root 4096 10月 5 03:54 2.6.18-8.el5
[root@localhost ~]#
[root@localhost ~]# ls -l /lib/modules/2.6.18-8.1.14.el5/
合計 1120
lrwxrwxrwx 1 root root 47 10月 14 22:51 build -> ../../../usr/src/kernels/2.6.18-8.1.14.el5-i686
drwxr-xr-x 2 root root 4096 9月 28 08:41 extra
drwxr-xr-x 9 root root 4096 10月 14 22:51 kernel
-rw-r--r-- 1 root root 236055 10月 14 22:52 modules.alias
-rw-r--r-- 1 root root 69 10月 14 22:52 modules.ccwmap
-rw-r--r-- 1 root root 195218 10月 14 22:52 modules.dep
-rw-r--r-- 1 root root 73 10月 14 22:52 modules.ieee1394map
-rw-r--r-- 1 root root 375 10月 14 22:52 modules.inputmap
-rw-r--r-- 1 root root 2160 10月 14 22:52 modules.isapnpmap
-rw-r--r-- 1 root root 74 10月 14 22:52 modules.ofmap
-rw-r--r-- 1 root root 164718 10月 14 22:52 modules.pcimap
-rw-r--r-- 1 root root 589 10月 14 22:52 modules.seriomap
-rw-r--r-- 1 root root 91187 10月 14 22:52 modules.symbols
-rw-r--r-- 1 root root 319111 10月 14 22:52 modules.usbmap
lrwxrwxrwx 1 root root 5 10月 14 22:51 source -> build
drwxr-xr-x 2 root root 4096 9月 28 08:41 updates
drwxr-xr-x 2 root root 4096 9月 28 08:41 weak-updates
[root@localhost ~]#
※Can't find modulesというエラーになった場合,make modules_installを
行っているか確認。(/lib/modules/カーネルバージョン/以下)にインストールする。
※ディストリブーションによってパスも変わるので,注意。
━━━━━━━ カーネル.configファイルの設定━━━━━━━━
[root@localhost 2.6.18-8.el5-i686]# pwd
/usr/src/kernels/2.6.18-8.el5-i686
[root@localhost 2.6.18-8.el5-i686]# head .config
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.18-8.el5
# Thu Mar 15 19:51:27 2007
#
CONFIG_X86_32=y
CONFIG_GENERIC_TIME=y
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_SEMAPHORE_SLEEPERS=y
[root@localhost 2.6.18-8.el5-i686]#
カテゴリ
system全般トラックバック(0)
このブログ記事を参照しているブログ一覧: Kernelのアップグレードとメンテナンス
このブログ記事に対するトラックバックURL: http://variable.jp/mt/mt-tb.cgi/52

コメントする