Create and edit /mnt/ec2-fs/etc/ld.so.conf.d/libc6-xen.conf
hwcap 0 nosegneg
Add Custom Kernel module
cd /mnt/ec2-fs/lib/modules
mkdir 2.6.16-ec2
cd 2.6.16-ec2
wget http://s3.amazonaws.com/ec2-downloads/modules-2.6.16-ec2.tgz
gunzip modules-2.6.16-ec2.tgz
tar -xvf modules-2.6.16-ec2.tar
rm modules-2.6.16-ec2.tar
chroot /mnt/ec2-fs /bin/sh
chkconfig --level 345 sshd on
exit
Cleanup
Cleanup the installation
yum -c /mnt/image/yum-xen.conf --installroot=/mnt/ec2-fs clean all
Unmount the file systems
cd /mnt
umount /mnt/ec2-fs/proc
umount -d /mnt/ec2-fs
Undo mistake
mount -o loop /mnt/image/my-image.fs /mnt/ec2-fs
mount -t proc none /mnt/ec2-fs/proc
... make any changes ...
cd /mnt
umount /mnt/ec2-fs/proc
umount -d /mnt/ec2-fs
Create the EC2 CentOS 5.5 AMI
We assume the AMI tools are installed according to the previous instructions