Skip to content

Arch Linux 2012.10.09 AMI releases for Amazon EC2

Hello everyone!

I've started making Amazon EC2 images for Arch Linux, in a pseudo-weekly release cadence. I'm pretty comfortable with the stability at this point, but have a small list of bugs/nitpicks I'm working out in between releases (which are typically Saturdays or Sundays).

If you have the EC2 API tools at your disposal, you can get a list of current releases with this command:

ec2dim -o 460511294004 -F "name=arch-linux-*"

Here's the list of this week's AMIs (release 2012.10.09):

https://us-east-1.ec2.amazonaws.com
ami-3a01bd53 x86_64 hvm         ebs              arch-linux-hvm-2012.10.09.x86_64-ebs
ami-3601bd5f x86_64 paravirtual ebs              arch-linux-pv-2012.10.09.x86_64-ebs
ami-10ed5279 x86_64 paravirtual instance-store   arch-linux-pv-2012.10.09.x86_64-s3

https://us-west-1.ec2.amazonaws.com
ami-6fc3e42a x86_64 paravirtual ebs              arch-linux-pv-2012.10.09.x86_64-ebs
ami-a1c0e7e4 x86_64 paravirtual instance-store   arch-linux-pv-2012.10.09.x86_64-s3

https://us-west-2.ec2.amazonaws.com
ami-c8cb42f8 x86_64 hvm         ebs              arch-linux-hvm-2012.10.09.x86_64-ebs
ami-cecb42fe x86_64 paravirtual ebs              arch-linux-pv-2012.10.09.x86_64-ebs
ami-d2cc45e2 x86_64 paravirtual instance-store   arch-linux-pv-2012.10.09.x86_64-s3

https://eu-west-1.ec2.amazonaws.com
ami-7d7e7e09 x86_64 hvm         ebs              arch-linux-hvm-2012.10.09.x86_64-ebs
ami-657e7e11 x86_64 paravirtual ebs              arch-linux-pv-2012.10.09.x86_64-ebs
ami-910404e5 x86_64 paravirtual instance-store   arch-linux-pv-2012.10.09.x86_64-s3

https://ap-northeast-1.ec2.amazonaws.com
ami-4e64db4f x86_64 paravirtual ebs              arch-linux-pv-2012.10.09.x86_64-ebs
ami-305de231 x86_64 paravirtual instance-store   arch-linux-pv-2012.10.09.x86_64-s3

https://ap-southeast-1.ec2.amazonaws.com
ami-12abeb40 x86_64 paravirtual ebs              arch-linux-pv-2012.10.09.x86_64-ebs
ami-eeadedbc x86_64 paravirtual instance-store   arch-linux-pv-2012.10.09.x86_64-s3

https://sa-east-1.ec2.amazonaws.com
ami-d00bd2cd x86_64 paravirtual ebs              arch-linux-pv-2012.10.09.x86_64-ebs
ami-7c0dd461 x86_64 paravirtual instance-store   arch-linux-pv-2012.10.09.x86_64-s3

They're as close to a "vanilla" install as I can make them without making them non-functional on EC2. But here's the list of differences between the EC2 builds and a stock install:

  • Kernel modules included in initrd, some of which are only there for the initial bootstrap (which I do in KVM): virtio virtio-blk virtio-net virtio-pci virtio-ring xen-blkfront xen-fbfront xen-kbdfront xen-netfront xen-pcifront xen-privcmd button ipmi-msghandler ipmi-poweroff

  • Packages removed: initscripts, sysvinit

  • Extra packages installed: netcfg, openssh, dhclient, ec2-keyring, ec2-pacman-mirrors, rng-tools, systemd-sysvcompat

  • Added an extra package source for ec2-specific packages. the repository currently contains: ec2-keyring, ec2-pacman-mirrors, package-query, yaourt. I'm working on porting cloud-init to Arch Linux so that we don't use the really funky rc.local setup I have it currently using.

  • systemd used instead of sysvinit. I also have a flag in my build process which allows me to build it with sysvinit as the default, but I think since systemd is the future I'll keep that the default for now.

  • Additional services enabled at boot: rngd, sshd, netcfg

  • User's public key is pulled from the EC2 instance metadata service at startup, and added to /root/.ssh/authorized_keys

  • SSH configured with 'PasswordAuthentication no', enforcing public key authentication

  • pacman loads (and automatically lsigns) the 'archlinux' and 'ec2' keyrings on the first boot (the latter keyring contains my public key used for package signing in the ec2 repo).

  • pacman mirror list is automatically selected at boot based on a list I created (based on rankmirrors run on instances in each region). These lists are provided by the package ec2-pacman-mirrors, which is in the ec2 repo.

  • dhclient is used instead of dhcpcd for robustness reasons. I found that dhcpcd gave up too quickly if it tried to do a DHCPREQUEST when the vif wasn't completely up, making the EC2 instance inaccessible.

  • dhclient is configured to retry forever, and request the following dhcp options: subnet-mask, broadcast-address, time-offset, routers, domain-name, domain-name-servers, host-name, interface-mtu, fqdn

  • /usr/bin/pinentry is symlinked to /usr/bin/pinentry-curses instead of the default pinentry-gtk, since gtk isn't available in this install and the primary access method is SSH.

There is one major caveat I know of at the moment. If you launch one of these and create an EBS AMI snapshot based on your instance, any launches of the derived AMI can only be accessed by your SSH key pair. This means you effectively cannot share any derived AMIs unless you first remove /root/.ssh/authorized_keys and /etc/pacman.d/gnupg/* before snapshotting. This is one of the reasons I'm investigating cloud-init.

Anyway, please try it out and let me know what you think. I welcome feedback. Send any Arch Linux on EC2 specific bug reports to me via reddit for now. If this takes off I'll see if I can get a proper bug tracker somewhere.

33 points6 comments
Open on Reddit
About this post
Posted
Archived
Score
33 · 100% up
Kind
Text
ID
11axdn

Author

1
posts
22
comments
0
media
View profile

7 comments

why rng over haveged, the tool used on the wiki?

otherwise, nice!

1 points

I didn't know about haveged, actually. But after looking it up, I think it's slightly concerning that it doesn't do any runtime verification of its generated data before feeding it into the entropy pool.

I'm curious, what advantages does haveged have over rngd?

2 points

honestly, I don't know. I saw rng as the "recommended" method one day, then it was changed to haveged. Usually I just run through mandb or something like that a few times, and do some other crap.

1 points

Awesome, thanks for this!

Now... how about uploading to EU west?

1 points

Uhh, there -is- a EU west set of AMIs there. :)

https://eu-west-1.ec2.amazonaws.com
ami-7d7e7e09 x86_64 hvm         ebs              arch-linux-hvm-2012.10.09.x86_64-ebs
ami-657e7e11 x86_64 paravirtual ebs              arch-linux-pv-2012.10.09.x86_64-ebs
ami-910404e5 x86_64 paravirtual instance-store   arch-linux-pv-2012.10.09.x86_64-s3
3 points
unknown author

Deleted before we saved it.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.