Wednesday, October 22, 2008

Steps to build OpenVZ

mkdir ovz-kernel
cd ovz-kernel
wget ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.18.tar.bz2
wget http://download.openvz.org/kernel/branches/rhel5-2.6.18/028stab027.1/patches/patch-8.el5.028stab027.1-combined.gz
wget http://download.openvz.org/kernel/branches/rhel5-2.6.18/028stab027.1/configs/kernel-2.6.18-i686.config.ovz
wget http://download.openvz.org/~vass/diff-ubc-mm-null-pointer-for-kthread-20070406 # this patch will be not necessary soon.
tar xjf linux-2.6.18.tar.bz2
zcat patch-8.el5.028stab027.1-combined.gz patch -p1 -d linux-2.6.18
patch -p1 -d linux-2.6.18 < diff-ubc-mm-null-pointer-for-kthread-20070406
mv linux-2.6.18 linux-2.6.18-8.el5-028test027
vim linux-2.6.18-8.el5-028test027/Makefile # here we add right extraversion: -8.el5-028test027
cp linux-2.6.19 linux-2.6.18/.config
cd linux-2.6.18-8.el5-028test027
make oldconfig # pressing enter here
vim .config # switching off some config options
make-kpkg --revision=.1 kernel_image
cd ..
cd ..


Reference:
http://wiki.openvz.org/Creating_OpenVZ_LiveCD

No comments: