Skip to content

Instantly share code, notes, and snippets.

@ctennis
Forked from dysinger/2.6.18-ec2-modules.sh
Created April 24, 2009 20:31
Show Gist options
  • Save ctennis/101333 to your computer and use it in GitHub Desktop.
Save ctennis/101333 to your computer and use it in GitHub Desktop.
# 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