LoginSignup
18
18

More than 5 years have passed since last update.

CentOS6.5のカーネルを3.x系にバージョンアップ

Last updated at Posted at 2014-05-13

Linux kernel 3.x系に対応していないモジュールが解決していないので、実運用には向きません

ビルドに必要なパッケージのインストール

$ sudo yum -y groupinstall "Development tools"
$ sudo yum -y install ncurses-devel

ビルド用ディレクトリの作成

$ mkdir -p ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}

カーネルのソースを展開

The Linux Kernel Archivesから最新の安定版をダウンロードします。

$ cd ~/rpmbuild/SOURCES/
$ wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.14.3.tar.xz
$ xz -cd linux-3.14.3.tar.xz | tar xf -

カーネルの再構築

現在インストールされているカーネルのconfigファイルを元に再構築

$ cd linux-3.14.3
$ cp /boot/config-2.6.32-431.17.1.el6.x86_64 ./.config

出てくる質問は全てデフォルト(Enter長押し)応答

$ make oldconfig

カーネルのビルド

$ make rpm

インストール

$ cd ~/rpmbuild/RPMS/x86_64
$ ls -1
kernel-3.14.3-1.x86_64.rpm
kernel-devel-3.14.3-1.x86_64.rpm
kernel-headers-3.14.3-1.x86_64.rpm
$ sudo rpm -Uvh kernel-*
ERROR: modinfo: could not find module ipt_addrtype
ERROR: modinfo: could not find module ipt_MASQUERADE
ERROR: modinfo: could not find module iptable_nat
ERROR: modinfo: could not find module nf_nat
ERROR: modinfo: could not find module snd_page_alloc

※kernel 3.x に対応していないモジュールはロードできずにエラーになる(要調査)

再起動

$ reboot

カーネルバージョン確認

$ uname -r
3.14.3
18
18
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
18
18