Skip to content

Instantly share code, notes, and snippets.

@dysinger
Created July 1, 2010 12:30
Show Gist options
  • Select an option

  • Save dysinger/459900 to your computer and use it in GitHub Desktop.

Select an option

Save dysinger/459900 to your computer and use it in GitHub Desktop.
FUSE Kernel Modules on EC2
# Fuse Compiled for EC2
K=2.6.18
X=3.1.0
F=2.8.1
# V=v1.0
# 32bit ami-215fba48 aki-9b00e5f2 ari-67b95e0e
# 64bit ami-2d5fba44 aki-9800e5f1 ari-64b95e0d
# V=v1.4
# 32bit ami-2b5fba42 aki-5642a03f ari-2242a04b
# 64bit ami-2d5fba44 aki-2a42a043 ari-2c42a045
# 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-$X-src-ec2-$V.tgz | tar oxz
cd xen-$X-src-ec2-$V
make prep-kernels
cd linux-$K-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-$F.tar.gz | tar oxz
cd fuse-$F
./configure --enable-kernel-module \
--with-kernel=/usr/src/xen-$X-src-ec2-$V/linux-$K-xen
make
make install
# package 'em
cd /lib/modules
mv $K-ec2-$V $(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