Skip to content

Instantly share code, notes, and snippets.

@enakai00
Last active December 28, 2015 20:39
Show Gist options
  • Save enakai00/7558549 to your computer and use it in GitHub Desktop.
Save enakai00/7558549 to your computer and use it in GitHub Desktop.
RHEL6でtmpfsでxattrが使えるようにするやっつけの手順。当然ながら、RH non-supportです。
1. カーネルソース「kernel-2.6.32-358.23.2.el6.src.rpm」を入手する。
2. SPECファイルのパッチをダウンロードする。
# rm -f /tmp/kernel.spec.patch
# wget https://gist.github.com/enakai00/7558519/raw/79c52871e08816ab262beea4e715a6f580011c23/kernel.spec.patch -O /tmp/kernel.spec.patch
3. Kernelパッケージをビルドする
# yum -y groupinstall "Development Tools"
# yum -y install xmlto asciidoc elfutils-libelf-devel zlib-devel binutils-devel newt-devel python-devel hmaccalc gtk2-devel
# rpm -ivh kernel-2.6.32-358.23.2.el6.src.rpm
# cd ~/rpmbuild/SPECS
※ここでSPECファイルにパッチを当てる。
# patch -p1 kernel.spec < /tmp/kernel.spec.patch
# rngd -r /dev/urandom
# rpmbuild -bb --with baseonly --with firmware --without debuginfo --target=x86_64 kernel.spec
# pkill rngd
※SPECファイルでビルドする時に下記の2つのパッチをダウンロードして適用しています。
https://gist.github.com/enakai00/7558482
https://gist.github.com/enakai00/7558460
下記にできた、kernelとkernel-firmwareを使います。
# ls -l ../RPMS/x86_64/
合計 52620
-rw-r--r--. 1 root root 27293380 11月 20 18:32 2013 kernel-2.6.32-358.23.2.el6.tmpfshacked.x86_64.rpm
-rw-r--r--. 1 root root 8639120 11月 20 18:32 2013 kernel-devel-2.6.32-358.23.2.el6.tmpfshacked.x86_64.rpm
-rw-r--r--. 1 root root 11478516 11月 20 18:32 2013 kernel-firmware-2.6.32-358.23.2.el6.tmpfshacked.x86_64.rpm
-rw-r--r--. 1 root root 2455076 11月 20 18:32 2013 kernel-headers-2.6.32-358.23.2.el6.tmpfshacked.x86_64.rpm
-rw-r--r--. 1 root root 2193516 11月 20 18:32 2013 perf-2.6.32-358.23.2.el6.tmpfshacked.x86_64.rpm
-rw-r--r--. 1 root root 1809020 11月 20 18:32 2013 python-perf-2.6.32-358.23.2.el6.tmpfshacked.x86_64.rpm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment