Shaken-Not-Stirred Technology Mixed Right!

Brett Wynkoop

Subscribe RSS

This site's referrers - 100 hits - 95 hits - 87 hits - 58 hits - 26 hits

Brooklyn Repertory Opera

New Yorkers for Fair Use

Brooklyn On Line

Resume of Brett Wynkoop

Brett Wynkoop's GPG public key

Stand Alone Sysadmin

Virtual within virtual    
For all you FreeBSD lovers who have been upset that you could not get your favorite OS on Amazon EC2 now is the time to rejoice! As of the FreeBSD 9.0 release there are public AMI files for FreeBSD 9.0 that just work when booted in a standard EC2 host. You will find one thing somewhat unpleasing about the experience though......the icon next to the working FreeBSD images is an MS-Windows icon. This is an artifact of the way the author of the AMI had to prepare the image. He started with an Amazon MS-Windows image, tossed the MS-Windows content out and replaced it with FreeBSD 9.

FreeBSD in the Amazon Cloud has been a long time coming. Some of the reasons that have held it back were bugs in AWS and a small bug in the FreeBSD Xen support. These seem to have all been fixed as reported at

Since Amazon is offering free micro images I decided to try the new image out. I went through the standard EC2 micro image setup and picked the FreeBSD 9 Release image (with the ms-windows icon) and booted an instance. A short time later I was logged in as root via ssh using pub/private keys. Well this was too good to be true, so I decided to do what I would on any brand new virgin minimal install system.

# portsnap fetch
...............output redacted for size..........
# portsnap extract
# cd /usr/ports/shells/bash
# make install && make distclean

Well everything worked as expected and in no time I had bash installed. I usually do a make package, and rarely do a dist clean so I can deinstall and reinstall with ease, but the limited size of the Free EC2 disk image made me decide to dump the distfiles and dispense with keeping a package around to clutter things up.

Since this went so well I decided to install a few other tools and toys. The build and install of screen, sudo, and ezjail all were fast non-events.

Since I installed ezjail I had to try it out......So a couple of short ezjail commands latter I had a working jail called demo100 on

[root@ip-10-28-90-182 ~]# uname -a
FreeBSD ip-10-28-90-182 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Mon Jan 16 18:25:55 UTC 2012 root@ip-10-17-42-118:/usr/obj/i386.i386/usr/src/sys/XENHVM i386
[root@ip-10-28-90-182 ~]# jls
JID IP Address Hostname Path
1 demo100 /usr/jails/demo100
[root@ip-10-28-90-182 ~]# df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/ad0a 9.7G 2.5G 6.4G 28% /
devfs 1.0k 1.0k 0B 100% /dev
/usr/jails/basejail 9.7G 2.5G 6.4G 28% /usr/jails/demo100/basejail
devfs 1.0k 1.0k 0B 100% /usr/jails/demo100/dev
fdescfs 1.0k 1.0k 0B 100% /usr/jails/demo100/dev/fd
procfs 4.0k 4.0k 0B 100% /usr/jails/demo100/proc
[root@ip-10-28-90-182 ~]# ezjail-admin console demo100
Last login: Wed Jan 25 05:56:51 on pts/1
FreeBSD 9.0-RELEASE (XENHVM) #0: Mon Jan 16 18:25:55 UTC 2012

Welcome to FreeBSD!

Before seeking technical support, please use the following resources:

o Security advisories and updated errata information for all releases are
at - always consult the ERRATA section
for your release first as it's updated frequently.

o The Handbook and FAQ documents are at and,
along with the mailing lists, can be searched by going to If the doc package has been installed
(or fetched via pkg_add -r lang-freebsd-doc, where lang is the
2-letter language code, e.g. en), they are also available formatted
in /usr/local/share/doc/freebsd.

If you still have a question or problem, please take the output of
`uname -a', along with any relevant error messages, and email it
as a question to the mailing list. If you are
unfamiliar with FreeBSD's directory layout, please refer to the hier(7)
manual page. If you are not familiar with manual pages, type `man man'.

Edit /etc/motd to change this login announcement.

demo100# df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/ad0a 9.7G 2.5G 6.4G 28% /

I do not know about you, but I can see lots of interesting things one could do running jails on an AWS EC2 instance.

I am about to suggest something clever as a solution to a client's problem. If the client goes for the proposal and I make it work I will be sure to tell you all about it!

No Comments Yet - Post Comments