I made 2 public Archlinux EC2 AMI.
Important Notes:
- Most instructions on this page are outdated. All necessary packages have been included inside latest AMI
- If you want to build your own AMI, I released this build script on gitub and aur packages.
Update 2011/1/25
Update kernel to 2.6.37 and fix account creation.
Update 2010/8/30
Change static ip to kernel dhcp and remove initrd
Update 2010/8/28
The network configure will be saved when image first time booted. If you want to revert to dhcp in case you need to rebuild or stop. You should run this
sudo /etc/rc.d/ec2 stop
I also changed default cflags, so if you want to recompile packages, you can use srcpac. For example
sudo abs extra/python
sudo srcpac -Sb python
Update 2010/8/21
Add a user arch with the same ssh key as root.
The hostname is now static, if you want to rebundle, make sure change HOSTNAME in rc.conf to myhost and remove last line of /etc/hosts.
Here is the new build script.
Update 2010/7/23:
Updated to BTRFS as root.
Update 2010/7/20:
Updated to pvgrub and EBS.
Here is the updated script to generate an EC2 EBS.
I also made an aur package for kernel26 with patch from gentoo and opensuse.
There is a simple patch for mainline kernel from amazon.
Updates:
10/21/2009: Updated all packages and use ubuntu kernels. Here is the new AMI making script. Those kernels will load some unnecessary modules, you will need to unload them manually. I will update again if I can found more stable kernel.
They are very basic installation with just ssh. If you need tools like ec2-ami-tools or ec2-api-tools, you can find my aur packages here. Or you can add my private repo to your pacman.conf.
[iphash]
Server = http://static.iphash.net/public/i686/
or
[iphash]
Server = http://static.iphash.net/public/x86_64/
Then
pacman -Sy ec2-ami-tools ec2-api-tools
If you want to roll your own image. Here (outdated - see beginning of this post) is the script I used to make these AMIs.
If you wish to set hostname and domainname you can pass following script as instance user-data.
MYHOST=yourhost #set your real hostname here
MYDOMAIN=yourdomain #set your domainname here
sed -i s/myhost/$MYHOST/ /etc/rc.conf
hostname $MYHOST
echo "NISDOMAINNAME=\"$MYDOMAIN\"" >/etc/conf.d/nisdomainname
nisdomainname $MYDOMAIN
/etc/rc.d/syslog-ng restart
x=$(curl -s http://169.254.169.254/latest/meta-data/local-ipv4)
if [ $(echo $x|grep 404|wc -l) -eq 0 ]; then
cat <<EOF>/etc/hosts
#<ip-address> <hostname.domain.org> <hostname>
127.0.0.1 localhost.localdomain localhost
$x $MYHOST.$MYDOMAIN $MYHOST
# End of file
EOF
fi
cp /etc/skel/.bash* /root/
Yejun Linux ami, arch, archlinux, cloud, ec2