[ubuntu-cloud] deboostrapped lucid image from maverick fails on ec2 (with and without AKI/custom kernel)

Spike Spiegel fsmlab at gmail.com
Wed Nov 17 23:20:37 GMT 2010


Hi there,

hope it's appropriate to ask ec2 related questions here, the archives
seem to point the ubuntu-ec2 ml to this list.

I'm trying to create a basic lucid image with only the openssh server
to run on ec2. To build it I'm using debootstrap on maverick and then
ec2-ami-bundle + upload-bundle. I've looked at vmbuilder too, but it
seems to use debootstrap anyway and plus it is broken for me (but
that's for another post). The command I'm using is:

export ARCH="i386"
export VERSION="lucid"
export TIMESTAMP=$(date +"%s")
export IMAGE_NAME="${VERSION}-${ARCH2}-${TIMESTAMP}"
export CHROOT_BASEDIR="/mnt"
export CHROOT_NAME="chroot-${IMAGE_NAME}"
export CHROOT_DIR=${CHROOT_BASEDIR}/$CHROOT_NAME
export PACKAGES="gnupg,openssh-server,apache2-mpm-worker"

debootstrap --variant=minbase --include=$PACKAGES --arch $ARCH
$VERSION $CHROOT_DIR $MIRROR

this works fine. I then bundle it all up with:

sudo ec2-bundle-vol -k $EC2_PRIVATE_KEY -c $EC2_CERT -u $EC2_ACCNO
--no-inherit -r $ARCH -s $IMAGE_SIZE -p $IMAGE_PREFIX -v $CHROOT_DIR
-d $BUNDLE_DIR

Instantiating this AMI will result in the following error:

libudev: udev_monitor_new_from_netlink: error getting socket: Invalid argument
mountall:mountall.c:3194: Assertion failed in main: udev_monitor =
udev_monitor_new_from_netlink (udev, "udev")
init: mountall main process (595) killed by ABRT signal
General error mounting filesystems.

it seems to be the same as this bug:
https://bugs.launchpad.net/ubuntu/+source/mountall/+bug/592891

and this:
https://bugs.launchpad.net/ubuntu/+source/mountall/+bug/516684

I've also found this:
http://alestic.com/2010/09/ec2-bug-mountall

which suggests a workaround and points to a bug fixed in maverick, but
the workaround doesn't do anything for me, I create the fstab myself
as a fixup after debootstrap.

Since the problem seemed to be due to older kernels and mountall and
the alestic uses the newer ec2 kernel I tried to do that. I repeated
the above except that:
* I installed the ec2 kernel + grub + created a menu.lst as specified
in the amazon user kernel guide
* I bundled using --kernel aki-407d9529 which is the recommended
kernel for i386 and s3

This image booted and in theory from ec2-console-output I saw a login
prompt, but it looked rather weird as no service or nothing was
started, there weren't even messages about the FS.

I then came across:
http://uec-images.ubuntu.com/query/lucid/server/released.current.txt
which lists a different AKI (a simpler way to figure this stuff out
would be great btw, which AKI and ARI and if you need a ARI is a pure
headache inducing question). With this AKI I got further, but still no
joy. I see stuff about apache being started, but no ssh and even
apache won't respond to any connections.

the output is pretty much the same as in this thread:
https://forums.aws.amazon.com/message.jspa?messageID=186905

I'd very much appreciate if somebody could shed some light on both
failures, but more importantly explain how the alestic images are
built since the "standard" process seems to fail miserably while those
AMIs work like a charm.

thanks,

Spike

-- 
"Behind every great man there's a great backpack" - B.



More information about the Ubuntu-cloud mailing list