Created
April 8, 2009 20:33
-
-
Save dysinger/92000 to your computer and use it in GitHub Desktop.
Compile custom modules for ec2 2.6.18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# build machine | |
# ami-205fba49 w/ aki-9b00e5f2 | |
# update yum / install dev tools | |
yum clean all | |
perl -p -i -e 's/.?baseurl\=http\:\/\/download.fedora.redhat.com\/pub\/fedora\/linux/baseurl\=http\:\/\/archives.fedoraproject.org\/pub\/archive\/fedora\/linux/g' \ | |
/etc/yum.repos.d/* | |
perl -p -i -e 's/.?mirrorlist(.*)/\#mirrorlist$1/g' /etc/yum.repos.d/* | |
perl -p -i -e 's/gpgkey\=file\:\/\/\/etc\/pki\/rpm-gpg\/RPM-GPG-KEY-fedora/gpgkey\=file\:\/\/\/etc\/pki\/rpm-gpg\/RPM-GPG-KEY/g' \ | |
/etc/yum.repos.d/fedora.repo | |
yum upgrade | |
yum groupinstall "Development Tools" | |
# Get the kernel source for ec2 xen | |
rm -rf /lib/modules/* | |
cd /usr/src | |
curl -L http://ec2-downloads.s3.amazonaws.com/xen-3.1.0-src-ec2-v1.0.tgz | tar oxz | |
cd xen-3.1.0-src-ec2-v1.0 | |
make prep-kernels | |
cd linux-2.6.18-xen | |
zcat /proc/config.gz > .config | |
make oldconfig | |
make && make modules | |
make modules_install | |
# get latest fuse & make a module | |
cd /usr/src | |
curl -L http://downloads.sourceforge.net/fuse/fuse-2.7.4.tar.gz | tar oxz | |
cd fuse-2.7.4 | |
./configure --enable-kernel-module \ | |
--with-kernel=/usr/src/xen-3.1.0-src-ec2-v1.0/linux-2.6.18-xen | |
make | |
make install | |
# package 'em | |
cd /lib/modules | |
mv 2.6.18-ec2-v1.0 $(uname -r) | |
depmod -a | |
tar cjf ~/modules-$(uname -r).tar.bz2 $(uname -r) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment