Amazon Machine Images (AMIs)

Archlinux 32bit Base Image

Click for a printer friendly version of this document Printer Friendly Save to del.icio.us
 

Base Archlinux AMI

Submitted By: Yejun Yang  
US East AMI ID: ami-ca04eea3
AMI Manifest: 545611693861/archlinux-i686-20100830
License: Public
Operating System: Linux/Unix

Update 2010/8/30

Change static ip to kernel dhcp and remove initrd http://github.com/yejun/ec2build

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 wantto 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.

Update 2010/7/22

Updated to BTRFS as root.

Update 2010/7/20

Updated to pvgrub and EBS root. You probably need to "chmod 1777 /tmp" after boot.

Introduction

This is a very basic archlinux with just ssh.
If you need packaged ec2-ami-tools or the script to make this image. You can find them here.

Anything you pass to instance user-data will be run as a bash script on first boot

Updates:

  • 10/21/2009 Updated to latest package and kernel.
  • 4/11/2009 user-data will be run as bash at first boot, nash-hotplug which uses 100% cpu time will be killed

Customization

  • If you wish to set domain and host name on first boot, 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/
    
  • If you want to install ec2-ami-tools on first boot, you can add these script as user-data
    cat <<EOF>>/etc/pacman.conf
    [iphash]
    Server = http://static.iphash.net/public/$(uname -m)/
    EOF
    yes |pacman -Sy ec2-ami-tools
    


Welcome, Guest Help
Login Login