Closed yanfalies closed 12 years ago
Hi there,
I switched to appending because I didn't want to overwrite anything a previous task inserted by a plugin wrote in there. I also want to preserve the comments to approach a more original debian installation. Work on wheezy will commence very soon.
Could you maybe post the contents of /etc/network/interfaces
in the image.
You can use this little plugin to avoid creating a snapshot and AMI and leave the volume attached to the host:
#!/bin/bash
remove_task "72-unmount-volume"
remove_task "73-detach-volume"
remove_task "80-ebs-snapshot"
remove_task "82-delete-volume"
remove_task "95-register-ami"
Ok, thanks. Running it now.
BTW, I the wheezy integration was fairly low drama, though it may not meet your standards
Subject: [PATCH] Wheezy fixes
Just enough to get Wheezy running on EC2
---
ec2debian-build-ami | 4 ++--
tasks/01-packages | 2 +-
tasks/51-init-scripts | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/ec2debian-build-ami b/ec2debian-build-ami
index 7756d5c..ad1c2c7 100755
--- a/ec2debian-build-ami
+++ b/ec2debian-build-ami
@@ -36,7 +36,7 @@ apt_mirror='http://http.debian.net/debian'
# Hardcoded params.
# This script would explode if we had to take care of other distributions
distribution='debian'
-codename='squeeze'
+codename='wheezy'
ami_name_suffix=$(date +%Y%m%d)
description=
@@ -47,7 +47,7 @@ availability_zone=
# Volume and AMI info
# Filesystem, hardcoded for now, maybe we'll add a parameter later on
-filesystem='xfs'
+filesystem='ext4'
mountoptions=
volume_size='1'
device_path=
diff --git a/tasks/01-packages b/tasks/01-packages
index 40e9d47..3a507aa 100644
--- a/tasks/01-packages
+++ b/tasks/01-packages
@@ -14,7 +14,7 @@ packages+=('file')
packages+=('dhcpcd')
[ $arch = 'i386' ] && packages+=('linux-image-xen-686')
-[ $arch = 'amd64' ] && packages+=('linux-image-xen-amd64')
+[ $arch = 'amd64' ] && packages+=('linux-image-amd64')
# We use dhcpcd instead
exclude_packages+=('isc-dhcp-client')
diff --git a/tasks/51-init-scripts b/tasks/51-init-scripts
index 4cc608f..dbedb12 100644
--- a/tasks/51-init-scripts
+++ b/tasks/51-init-scripts
@@ -9,4 +9,4 @@ done
# Inside Xen, CMOS clock is irrelevant, so save seconds at boot
chroot $imagedir insserv -r hwclock.sh
-chroot $imagedir insserv -r hwclockfirst.sh
+#chroot $imagedir insserv -r hwclockfirst.sh
--
1.7.9.5
OK, here's the contents. Looks like there's 2 lo entries which may be confusing the distribution. There is a warning in the ec2 startup logs about the lo interface, which clued me into the problem. Guessing it doesn't like the 2nd declaration and bails before the eth0 entry.
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
Fixed in the wheezy branch. Try it out! :-)
Very nice, thanks!
So everything is working? I tried bootstrapping myself and booted it, I didn't encounter any errors. It would be nice if you could report back with some details. Even the smallest detail is fixable and should be fixed :-) e.g. errors on startup, latent log/cache files
I ran the tool and booted the resulting image, but didn't poke around too much yet. I will try and take a look around in more detail tomorrow. I'm just glad not to have to deal with my own patch set. So far so evil. I haven't tried writing any new plugins yet, which is my ultimate goal with your stuff :)
Hello,
Thank you for maintaining and working on this project. Today, re-pulled from master and tried to make an AMI. The AMI booted, but I was unable to get a network interface. I took a look at task 39 and I noticed you changed it to append instead of overwrite.
This seems to be break networking, and the instance no longer gets assigned an IP address. Only the local interface comes up.
I changed it back to overwrite and it started working again. Not sure what the motivation was behind making it append, but it doesn't work for me.
I'm using debian wheezy though, so if it's just a problem for that distribution, I can live with it.
Thanks