I made 2 public Archlinux EC2 AMI.
- 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 kernel to 2.6.37 and fix account creation.
Change static ip to kernel dhcp and remove initrd
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
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.
Updated to BTRFS as root.
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.
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/
[iphash] Server = http://static.iphash.net/public/x86_64/
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 <
/etc/hosts # 127.0.0.1 localhost.localdomain localhost $x $MYHOST.$MYDOMAIN $MYHOST # End of file EOF fi cp /etc/skel/.bash* /root/