From 5b5636bab78f5352fc0c66477dc40b042df80fb3 Mon Sep 17 00:00:00 2001 From: Greg Price Date: Thu, 19 Feb 2009 03:09:36 -0500 Subject: [PATCH 01/16] renumber {36,96}-clear-root-password to go after install-base-system svn path=/trunk/packages/invirt-autoinstaller/; revision=2172 --- ...-clear-root-password => 96-clear-root-password} | 2 ++ debian/changelog | 1 + 2 files changed, 3 insertions(+) rename common/usr/lib/xen-tools/debian.d/{36-clear-root-password => 96-clear-root-password} (79%) diff --git a/common/usr/lib/xen-tools/debian.d/36-clear-root-password b/common/usr/lib/xen-tools/debian.d/96-clear-root-password similarity index 79% rename from common/usr/lib/xen-tools/debian.d/36-clear-root-password rename to common/usr/lib/xen-tools/debian.d/96-clear-root-password index e3ed53d..2812872 100755 --- a/common/usr/lib/xen-tools/debian.d/36-clear-root-password +++ b/common/usr/lib/xen-tools/debian.d/96-clear-root-password @@ -3,6 +3,8 @@ # This script unsets the root password, so the VM owner can log in at # the console. # +# Must come after 95-install-base-system, since that disables root's password. +# prefix=$1 diff --git a/debian/changelog b/debian/changelog index a0d3700..d07912a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ invirt-autoinstaller (0.0.18) unstable; urgency=low * Renumber our 9x-* hook scripts to make some room. + * Move 36-clear-root-password to 96- so it sticks. -- Greg Price Thu, 19 Feb 2009 03:03:39 -0500 -- 1.7.9.5 From 25f7a8e7decd603a76a52655260985f7249ada8c Mon Sep 17 00:00:00 2001 From: Greg Price Date: Thu, 19 Feb 2009 03:15:42 -0500 Subject: [PATCH 02/16] fix symlinks in xen-tools/edgy.d svn path=/trunk/packages/invirt-autoinstaller/; revision=2174 --- .../lib/xen-tools/edgy.d/36-clear-root-password | 1 - common/usr/lib/xen-tools/edgy.d/93-setup-grub | 2 +- .../usr/lib/xen-tools/edgy.d/95-fix-eth-checksums | 2 +- .../lib/xen-tools/edgy.d/95-install-base-system | 2 +- .../lib/xen-tools/edgy.d/96-clear-root-password | 1 + debian/changelog | 6 ++++++ 6 files changed, 10 insertions(+), 4 deletions(-) delete mode 120000 common/usr/lib/xen-tools/edgy.d/36-clear-root-password create mode 120000 common/usr/lib/xen-tools/edgy.d/96-clear-root-password diff --git a/common/usr/lib/xen-tools/edgy.d/36-clear-root-password b/common/usr/lib/xen-tools/edgy.d/36-clear-root-password deleted file mode 120000 index 323800f..0000000 --- a/common/usr/lib/xen-tools/edgy.d/36-clear-root-password +++ /dev/null @@ -1 +0,0 @@ -../debian.d/36-clear-root-password \ No newline at end of file diff --git a/common/usr/lib/xen-tools/edgy.d/93-setup-grub b/common/usr/lib/xen-tools/edgy.d/93-setup-grub index 9c09136..079e440 120000 --- a/common/usr/lib/xen-tools/edgy.d/93-setup-grub +++ b/common/usr/lib/xen-tools/edgy.d/93-setup-grub @@ -1 +1 @@ -../debian.d/97-setup-grub \ No newline at end of file +../debian.d/93-setup-grub \ No newline at end of file diff --git a/common/usr/lib/xen-tools/edgy.d/95-fix-eth-checksums b/common/usr/lib/xen-tools/edgy.d/95-fix-eth-checksums index 3708335..96b4ea7 120000 --- a/common/usr/lib/xen-tools/edgy.d/95-fix-eth-checksums +++ b/common/usr/lib/xen-tools/edgy.d/95-fix-eth-checksums @@ -1 +1 @@ -../debian.d/98-fix-eth-checksums \ No newline at end of file +../debian.d/95-fix-eth-checksums \ No newline at end of file diff --git a/common/usr/lib/xen-tools/edgy.d/95-install-base-system b/common/usr/lib/xen-tools/edgy.d/95-install-base-system index e8c5cb9..e8ebf66 120000 --- a/common/usr/lib/xen-tools/edgy.d/95-install-base-system +++ b/common/usr/lib/xen-tools/edgy.d/95-install-base-system @@ -1 +1 @@ -../debian.d/98-install-base-system \ No newline at end of file +../debian.d/95-install-base-system \ No newline at end of file diff --git a/common/usr/lib/xen-tools/edgy.d/96-clear-root-password b/common/usr/lib/xen-tools/edgy.d/96-clear-root-password new file mode 120000 index 0000000..ab12635 --- /dev/null +++ b/common/usr/lib/xen-tools/edgy.d/96-clear-root-password @@ -0,0 +1 @@ +../debian.d/96-clear-root-password \ No newline at end of file diff --git a/debian/changelog b/debian/changelog index d07912a..c56a864 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +invirt-autoinstaller (0.0.19) unstable; urgency=low + + * fix symlinks + + -- Greg Price Thu, 19 Feb 2009 03:15:03 -0500 + invirt-autoinstaller (0.0.18) unstable; urgency=low * Renumber our 9x-* hook scripts to make some room. -- 1.7.9.5 From 8bd79487b199202794ea13de4cc93934ba0f1f12 Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Sat, 2 May 2009 21:34:40 -0400 Subject: [PATCH 03/16] Update the setup-grub hook in the autoinstaller to work with pv_ops Ubuntu kernels. svn path=/trunk/packages/invirt-autoinstaller/; revision=2325 --- common/usr/lib/xen-tools/debian.d/93-setup-grub | 26 ++++++++++++++++++++--- debian/changelog | 6 ++++++ 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/common/usr/lib/xen-tools/debian.d/93-setup-grub b/common/usr/lib/xen-tools/debian.d/93-setup-grub index 2539e6b..26fbdda 100755 --- a/common/usr/lib/xen-tools/debian.d/93-setup-grub +++ b/common/usr/lib/xen-tools/debian.d/93-setup-grub @@ -24,9 +24,19 @@ logMessage Script $0 starting # Install the xen kernel. linux-image-xen is in ubuntu, # linux-image-xen-{amd64,686} in debian. # -installDebianPackage ${prefix} linux-image-xen-amd64 -installDebianPackage ${prefix} linux-image-xen-686 -installDebianPackage ${prefix} linux-image-xen + +installDebianPackage ${prefix} lsb-release + +if [ "$(chroot ${prefix} lsb_release -is)" = "Ubuntu" ]; then + if dpkg --compare-versions "$(chroot ${prefix} lsb_release -rs)" ge 8.10; then + installDebianPackage ${prefix} linux-image-virtual + else + installDebianPackage ${prefix} linux-image-xen + fi +else + installDebianPackage ${prefix} linux-image-xen-amd64 + installDebianPackage ${prefix} linux-image-xen-686 +fi installDebianPackage ${prefix} grub @@ -48,6 +58,16 @@ for patch in $dir/patches/*; do done # +# If this is a pv_ops kernel, then we need to make some more changes +# to make the console work right +# +if [ "$(chroot ${prefix} lsb_release -is)" = "Ubuntu" ] && \ + dpkg --compare-versions "$(chroot ${prefix} lsb_release -rs)" ge 8.10; then + sed -i -e 's/xvc0/hvc0/' /etc/event.d/tty1 + sed -i -e 's/console=ttyS0[^ ]*/console=hvc0/' /boot/grub/menu.lst +fi + +# # Regenerate automagic kernels list # chroot ${prefix} /usr/sbin/update-grub -y diff --git a/debian/changelog b/debian/changelog index c56a864..dc4a04c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +invirt-autoinstaller (0.0.20) unstable; urgency=low + + * Update the setup-grub hook to work with pv_ops Ubuntu kernels. + + -- Evan Broder Sat, 02 May 2009 21:33:44 -0400 + invirt-autoinstaller (0.0.19) unstable; urgency=low * fix symlinks -- 1.7.9.5 From e658c77954ef2ee58479c080501de801e719d51c Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Sat, 2 May 2009 21:42:16 -0400 Subject: [PATCH 04/16] In invirt-autoinstaller: * Create xen-tools symlinks for installing Intrepid and Jaunty. svn path=/trunk/packages/invirt-autoinstaller/; revision=2327 --- debian/changelog | 6 ++++++ debian/invirt-autoinstaller-guest.links | 2 ++ debian/invirt-autoinstaller-host.links | 2 ++ 3 files changed, 10 insertions(+) create mode 100644 debian/invirt-autoinstaller-guest.links create mode 100644 debian/invirt-autoinstaller-host.links diff --git a/debian/changelog b/debian/changelog index dc4a04c..38ccb06 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +invirt-autoinstaller (0.0.21) unstable; urgency=low + + * Create xen-tools symlinks for installing Intrepid and Jaunty. + + -- Evan Broder Sat, 02 May 2009 21:41:43 -0400 + invirt-autoinstaller (0.0.20) unstable; urgency=low * Update the setup-grub hook to work with pv_ops Ubuntu kernels. diff --git a/debian/invirt-autoinstaller-guest.links b/debian/invirt-autoinstaller-guest.links new file mode 100644 index 0000000..438da9c --- /dev/null +++ b/debian/invirt-autoinstaller-guest.links @@ -0,0 +1,2 @@ +usr/lib/xen-tools/intrepid.d usr/lib/xen-tools/edgy.d +usr/lib/xen-tools/jaunty.d usr/lib/xen-tools/edgy.d diff --git a/debian/invirt-autoinstaller-host.links b/debian/invirt-autoinstaller-host.links new file mode 100644 index 0000000..438da9c --- /dev/null +++ b/debian/invirt-autoinstaller-host.links @@ -0,0 +1,2 @@ +usr/lib/xen-tools/intrepid.d usr/lib/xen-tools/edgy.d +usr/lib/xen-tools/jaunty.d usr/lib/xen-tools/edgy.d -- 1.7.9.5 From e17a22b27263f4a0846a0c5c66aab7c96a3b34b7 Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Sat, 2 May 2009 21:44:24 -0400 Subject: [PATCH 05/16] Whoops - I'm an idiot and reversed the argument order of ln. svn path=/trunk/packages/invirt-autoinstaller/; revision=2328 --- debian/invirt-autoinstaller-guest.links | 4 ++-- debian/invirt-autoinstaller-host.links | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/debian/invirt-autoinstaller-guest.links b/debian/invirt-autoinstaller-guest.links index 438da9c..6bff0fb 100644 --- a/debian/invirt-autoinstaller-guest.links +++ b/debian/invirt-autoinstaller-guest.links @@ -1,2 +1,2 @@ -usr/lib/xen-tools/intrepid.d usr/lib/xen-tools/edgy.d -usr/lib/xen-tools/jaunty.d usr/lib/xen-tools/edgy.d +usr/lib/xen-tools/edgy.d usr/lib/xen-tools/intrepid.d +usr/lib/xen-tools/edgy.d usr/lib/xen-tools/jaunty.d diff --git a/debian/invirt-autoinstaller-host.links b/debian/invirt-autoinstaller-host.links index 438da9c..6bff0fb 100644 --- a/debian/invirt-autoinstaller-host.links +++ b/debian/invirt-autoinstaller-host.links @@ -1,2 +1,2 @@ -usr/lib/xen-tools/intrepid.d usr/lib/xen-tools/edgy.d -usr/lib/xen-tools/jaunty.d usr/lib/xen-tools/edgy.d +usr/lib/xen-tools/edgy.d usr/lib/xen-tools/intrepid.d +usr/lib/xen-tools/edgy.d usr/lib/xen-tools/jaunty.d -- 1.7.9.5 From 9ee3c4d1f220f49c2dbab202e64bfea5039b2096 Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Sat, 2 May 2009 22:21:11 -0400 Subject: [PATCH 06/16] In invirt-autoinstaller: * For Jaunty systems, edit /boot/grub/menu.lst appropriately to work with the fix for LP #291256. svn path=/trunk/packages/invirt-autoinstaller/; revision=2330 --- common/usr/lib/xen-tools/debian.d/93-setup-grub | 7 +++++++ debian/changelog | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/common/usr/lib/xen-tools/debian.d/93-setup-grub b/common/usr/lib/xen-tools/debian.d/93-setup-grub index 26fbdda..61deefb 100755 --- a/common/usr/lib/xen-tools/debian.d/93-setup-grub +++ b/common/usr/lib/xen-tools/debian.d/93-setup-grub @@ -68,6 +68,13 @@ if [ "$(chroot ${prefix} lsb_release -is)" = "Ubuntu" ] && \ fi # +# If this is a Jaunty machine, the fix from LP #291256 caused our +# patch to update-grub to not work, so let's use that mechanism +# instead +# +sed -i -e 's/indomU=detect/indomU=true/' /boot/grub/menu.lst + +# # Regenerate automagic kernels list # chroot ${prefix} /usr/sbin/update-grub -y diff --git a/debian/changelog b/debian/changelog index 38ccb06..50f5f5f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +invirt-autoinstaller (0.0.22) unstable; urgency=low + + * For Jaunty systems, edit /boot/grub/menu.lst appropriately to work + with the fix for LP #291256. + + -- Evan Broder Sat, 02 May 2009 22:20:29 -0400 + invirt-autoinstaller (0.0.21) unstable; urgency=low * Create xen-tools symlinks for installing Intrepid and Jaunty. -- 1.7.9.5 From 0075cd9598b004555699090b2b71bc5efbcbc320 Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Sat, 2 May 2009 22:56:47 -0400 Subject: [PATCH 07/16] In invirt-autoinstaller: * Create the shell of a menu.lst file needed to successfully parse indomU=true out of it. svn path=/trunk/packages/invirt-autoinstaller/; revision=2333 --- common/usr/lib/xen-tools/debian.d/93-setup-grub | 15 +++++++++++++-- debian/changelog | 7 +++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/common/usr/lib/xen-tools/debian.d/93-setup-grub b/common/usr/lib/xen-tools/debian.d/93-setup-grub index 61deefb..ce54ad6 100755 --- a/common/usr/lib/xen-tools/debian.d/93-setup-grub +++ b/common/usr/lib/xen-tools/debian.d/93-setup-grub @@ -70,8 +70,19 @@ fi # # If this is a Jaunty machine, the fix from LP #291256 caused our # patch to update-grub to not work, so let's use that mechanism -# instead -# +# instead. +# +# Since we haven't run update-grub yet, we need to generate the +# skeleton of a Debian menu.lst so that update-grub extracts the +# options correctly +# +cat >/boot/grub/menu.lst < Sat, 02 May 2009 22:56:30 -0400 + invirt-autoinstaller (0.0.22) unstable; urgency=low * For Jaunty systems, edit /boot/grub/menu.lst appropriately to work -- 1.7.9.5 From be692f1eb06d2cd719dc301c82378e45d8bf358f Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Sat, 2 May 2009 23:46:02 -0400 Subject: [PATCH 08/16] In invirt-autoinstaller: * Add a new version of our patches to work with the current Ubuntu update-grub, instead of trying to use the indomU variable (which still excludes kernels from showing up in the menu.lst). svn path=/trunk/packages/invirt-autoinstaller/; revision=2335 --- common/usr/lib/xen-tools/debian.d/93-setup-grub | 18 ------------------ common/usr/lib/xen-tools/patches/common.diff | 19 +++++++++++++++++++ debian/changelog | 8 ++++++++ 3 files changed, 27 insertions(+), 18 deletions(-) diff --git a/common/usr/lib/xen-tools/debian.d/93-setup-grub b/common/usr/lib/xen-tools/debian.d/93-setup-grub index ce54ad6..26fbdda 100755 --- a/common/usr/lib/xen-tools/debian.d/93-setup-grub +++ b/common/usr/lib/xen-tools/debian.d/93-setup-grub @@ -68,24 +68,6 @@ if [ "$(chroot ${prefix} lsb_release -is)" = "Ubuntu" ] && \ fi # -# If this is a Jaunty machine, the fix from LP #291256 caused our -# patch to update-grub to not work, so let's use that mechanism -# instead. -# -# Since we haven't run update-grub yet, we need to generate the -# skeleton of a Debian menu.lst so that update-grub extracts the -# options correctly -# -cat >/boot/grub/menu.lst < Sat, 02 May 2009 23:45:03 -0400 + invirt-autoinstaller (0.0.23) unstable; urgency=low * Create the shell of a menu.lst file needed to successfully parse -- 1.7.9.5 From f32d14b0bccb12f07abab1ab89d8db57ad2dad9d Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Sun, 3 May 2009 00:15:12 -0400 Subject: [PATCH 09/16] In invirt-autoinstaller: * Uh...right. Let's edit the event.d file and menu.lst within the install prefix for Intrepid/Jaunty. svn path=/trunk/packages/invirt-autoinstaller/; revision=2337 --- common/usr/lib/xen-tools/debian.d/93-setup-grub | 4 ++-- debian/changelog | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/common/usr/lib/xen-tools/debian.d/93-setup-grub b/common/usr/lib/xen-tools/debian.d/93-setup-grub index 26fbdda..c6b6cb2 100755 --- a/common/usr/lib/xen-tools/debian.d/93-setup-grub +++ b/common/usr/lib/xen-tools/debian.d/93-setup-grub @@ -63,8 +63,8 @@ done # if [ "$(chroot ${prefix} lsb_release -is)" = "Ubuntu" ] && \ dpkg --compare-versions "$(chroot ${prefix} lsb_release -rs)" ge 8.10; then - sed -i -e 's/xvc0/hvc0/' /etc/event.d/tty1 - sed -i -e 's/console=ttyS0[^ ]*/console=hvc0/' /boot/grub/menu.lst + sed -i -e 's/xvc0/hvc0/' ${prefix}/etc/event.d/tty1 + sed -i -e 's/console=ttyS0[^ ]*/console=hvc0/' ${prefix}/boot/grub/menu.lst fi # diff --git a/debian/changelog b/debian/changelog index 492fbc4..db1f706 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +invirt-autoinstaller (0.0.25) unstable; urgency=low + + * Uh...right. Let's edit the event.d file and menu.lst within the + install prefix for Intrepid/Jaunty. + + -- Evan Broder Sun, 03 May 2009 00:14:50 -0400 + invirt-autoinstaller (0.0.24) unstable; urgency=low * Add a new version of our patches to work with the current Ubuntu -- 1.7.9.5 From da4a13c018dda4214fbd77428c6f2b0d24aab435 Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Sun, 3 May 2009 01:19:10 -0400 Subject: [PATCH 10/16] In invirt-autoinstaller: * Switch the grub config and /etc/fstab to using UUIDs for specifying the boot and swap partitions. svn path=/trunk/packages/invirt-autoinstaller/; revision=2339 --- common/usr/lib/xen-tools/debian.d/93-setup-grub | 15 +++++++++++++++ debian/changelog | 7 +++++++ 2 files changed, 22 insertions(+) diff --git a/common/usr/lib/xen-tools/debian.d/93-setup-grub b/common/usr/lib/xen-tools/debian.d/93-setup-grub index c6b6cb2..5102c4a 100755 --- a/common/usr/lib/xen-tools/debian.d/93-setup-grub +++ b/common/usr/lib/xen-tools/debian.d/93-setup-grub @@ -68,6 +68,21 @@ if [ "$(chroot ${prefix} lsb_release -is)" = "Ubuntu" ] && \ fi # +# Since pv_ops kernels force block device names to xvda, xvdb, etc, +# the default root value of root=/dev/hda won't actually help us. +# +# To work around that, find a UUID for the swap and root partitions +# and use that in the grub config (and also in /etc/fstab) +# +ROOT_DEV="$(perl -e 'print $ENV{"image-dev"}')" +SWAP_DEV="$(perl -e 'print $ENV{"swap-dev"}')" +ROOT_UUID="$(vol_id --uuid "$ROOT_DEV")" +SWAP_UUID="$(vol_id --uuid "$SWAP_DEV")" +sed -i -e "s#root=[^ ]*#root=UUID=$ROOT_UUID#" ${prefix}/boot/grub/menu.lst +sed -i -e "s#${ROOT_DEV}#${ROOT_UUID}#" ${prefix}/etc/fstab +sed -i -e "s#${SWAP_DEV}#${SWAP_UUID}#" ${prefix}/etc/fstab + +# # Regenerate automagic kernels list # chroot ${prefix} /usr/sbin/update-grub -y diff --git a/debian/changelog b/debian/changelog index db1f706..1123964 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +invirt-autoinstaller (0.0.26) unstable; urgency=low + + * Switch the grub config and /etc/fstab to using UUIDs for specifying + the boot and swap partitions. + + -- Evan Broder Sun, 03 May 2009 01:18:45 -0400 + invirt-autoinstaller (0.0.25) unstable; urgency=low * Uh...right. Let's edit the event.d file and menu.lst within the -- 1.7.9.5 From 2de427228fdfbf454002ebe61cd0530b58b34ebd Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Sun, 3 May 2009 01:41:25 -0400 Subject: [PATCH 11/16] In invirt-autoinstaller: * Correctly detect what the path to the block devices in fstab are. * Never prompt when updating the grub config after frobbing it. svn path=/trunk/packages/invirt-autoinstaller/; revision=2341 --- common/usr/lib/xen-tools/debian.d/93-setup-grub | 15 +++++++++++---- debian/changelog | 7 +++++++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/common/usr/lib/xen-tools/debian.d/93-setup-grub b/common/usr/lib/xen-tools/debian.d/93-setup-grub index 5102c4a..7989591 100755 --- a/common/usr/lib/xen-tools/debian.d/93-setup-grub +++ b/common/usr/lib/xen-tools/debian.d/93-setup-grub @@ -78,14 +78,21 @@ ROOT_DEV="$(perl -e 'print $ENV{"image-dev"}')" SWAP_DEV="$(perl -e 'print $ENV{"swap-dev"}')" ROOT_UUID="$(vol_id --uuid "$ROOT_DEV")" SWAP_UUID="$(vol_id --uuid "$SWAP_DEV")" +for i in $(seq 1 "$NUMPARTITIONS"); do + var="PARTITION${i}" + case "$(echo ${!var} | cut -f1 -d:)" in + disk) ROOT_GUEST="$(echo ${!var} | cut -f8 -d:)";; + swap) SWAP_GUEST="$(echo ${!var} | cut -f8 -d:)";; + esac +done sed -i -e "s#root=[^ ]*#root=UUID=$ROOT_UUID#" ${prefix}/boot/grub/menu.lst -sed -i -e "s#${ROOT_DEV}#${ROOT_UUID}#" ${prefix}/etc/fstab -sed -i -e "s#${SWAP_DEV}#${SWAP_UUID}#" ${prefix}/etc/fstab +sed -i -e "s#${ROOT_GUEST}#${ROOT_UUID}#" ${prefix}/etc/fstab +sed -i -e "s#${SWAP_GUEST}#${SWAP_UUID}#" ${prefix}/etc/fstab # -# Regenerate automagic kernels list +# Regenerate automagic kernels list, saving our changes # -chroot ${prefix} /usr/sbin/update-grub -y +chroot ${prefix} env UCF_FORCE_CONFFOLD=1 /usr/sbin/update-grub -y # # Log our finish diff --git a/debian/changelog b/debian/changelog index 1123964..f25f38c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +invirt-autoinstaller (0.0.27) unstable; urgency=low + + * Correctly detect what the path to the block devices in fstab are. + * Never prompt when updating the grub config after frobbing it. + + -- Evan Broder Sun, 03 May 2009 01:40:55 -0400 + invirt-autoinstaller (0.0.26) unstable; urgency=low * Switch the grub config and /etc/fstab to using UUIDs for specifying -- 1.7.9.5 From 8929ee9ac8f2e697241ba4cc74a9425474f3c9d3 Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Sun, 3 May 2009 02:50:29 -0400 Subject: [PATCH 12/16] In invirt-autoinstaller: * We're using bashisms in 93-setup-grub, so let's use bash. svn path=/trunk/packages/invirt-autoinstaller/; revision=2343 --- common/usr/lib/xen-tools/debian.d/93-setup-grub | 6 +++--- debian/changelog | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/common/usr/lib/xen-tools/debian.d/93-setup-grub b/common/usr/lib/xen-tools/debian.d/93-setup-grub index 7989591..8447743 100755 --- a/common/usr/lib/xen-tools/debian.d/93-setup-grub +++ b/common/usr/lib/xen-tools/debian.d/93-setup-grub @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # # This script sets up the ParaVM to use pygrub # @@ -86,8 +86,8 @@ for i in $(seq 1 "$NUMPARTITIONS"); do esac done sed -i -e "s#root=[^ ]*#root=UUID=$ROOT_UUID#" ${prefix}/boot/grub/menu.lst -sed -i -e "s#${ROOT_GUEST}#${ROOT_UUID}#" ${prefix}/etc/fstab -sed -i -e "s#${SWAP_GUEST}#${SWAP_UUID}#" ${prefix}/etc/fstab +sed -i -e "s#${ROOT_GUEST}#UUID=${ROOT_UUID}#" ${prefix}/etc/fstab +sed -i -e "s#${SWAP_GUEST}#UUID=${SWAP_UUID}#" ${prefix}/etc/fstab # # Regenerate automagic kernels list, saving our changes diff --git a/debian/changelog b/debian/changelog index f25f38c..175d31b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +invirt-autoinstaller (0.0.28) unstable; urgency=low + + * We're using bashisms in 93-setup-grub, so let's use bash. + + -- Evan Broder Sun, 03 May 2009 02:40:54 -0400 + invirt-autoinstaller (0.0.27) unstable; urgency=low * Correctly detect what the path to the block devices in fstab are. -- 1.7.9.5 From c259e83ac33dad3706a232f04cc1661a99007d83 Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Sat, 13 Jun 2009 22:33:39 -0400 Subject: [PATCH 13/16] In invirt-autoinstaller: * Be more specific when replacing root= lines with UUID equivalents in the grub menu.lst. This avoids replacing things like groot, which makes pygrub unhappy. svn path=/trunk/packages/invirt-autoinstaller/; revision=2359 --- common/usr/lib/xen-tools/debian.d/93-setup-grub | 6 +++--- debian/changelog | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/common/usr/lib/xen-tools/debian.d/93-setup-grub b/common/usr/lib/xen-tools/debian.d/93-setup-grub index 8447743..d3ba6fd 100755 --- a/common/usr/lib/xen-tools/debian.d/93-setup-grub +++ b/common/usr/lib/xen-tools/debian.d/93-setup-grub @@ -85,9 +85,9 @@ for i in $(seq 1 "$NUMPARTITIONS"); do swap) SWAP_GUEST="$(echo ${!var} | cut -f8 -d:)";; esac done -sed -i -e "s#root=[^ ]*#root=UUID=$ROOT_UUID#" ${prefix}/boot/grub/menu.lst -sed -i -e "s#${ROOT_GUEST}#UUID=${ROOT_UUID}#" ${prefix}/etc/fstab -sed -i -e "s#${SWAP_GUEST}#UUID=${SWAP_UUID}#" ${prefix}/etc/fstab +sed -i -re "s%^(# *kopt=.*root=)[^ ]*%\1UUID=$ROOT_UUID%" ${prefix}/boot/grub/menu.lst +sed -i -e "s%${ROOT_GUEST}%UUID=${ROOT_UUID}%" ${prefix}/etc/fstab +sed -i -e "s%${SWAP_GUEST}%UUID=${SWAP_UUID}%" ${prefix}/etc/fstab # # Regenerate automagic kernels list, saving our changes diff --git a/debian/changelog b/debian/changelog index 175d31b..6c4e299 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +invirt-autoinstaller (0.0.29) unstable; urgency=low + + * Be more specific when replacing root= lines with UUID equivalents in + the grub menu.lst. This avoids replacing things like groot, which + makes pygrub unhappy. + + -- Evan Broder Sat, 13 Jun 2009 19:33:01 -0700 + invirt-autoinstaller (0.0.28) unstable; urgency=low * We're using bashisms in 93-setup-grub, so let's use bash. -- 1.7.9.5 From 1d2965f3aef41252ee6b66e5768bf298466558b9 Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Sun, 26 Jul 2009 23:00:11 -0400 Subject: [PATCH 14/16] In invirt-autoinstaller: * When we're installing the world, be sure to block debconf prompts from coming up. svn path=/trunk/packages/invirt-autoinstaller/; revision=2365 --- .../lib/xen-tools/debian.d/95-install-base-system | 2 +- debian/changelog | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/common/usr/lib/xen-tools/debian.d/95-install-base-system b/common/usr/lib/xen-tools/debian.d/95-install-base-system index d6737ae..9d6fb8f 100755 --- a/common/usr/lib/xen-tools/debian.d/95-install-base-system +++ b/common/usr/lib/xen-tools/debian.d/95-install-base-system @@ -32,7 +32,7 @@ installDebianPackage ${prefix} aptitude logMessage "Installing Debian standard system to prefix ${prefix}" echo -e '#!/bin/bash\nexit 101\n' > ${prefix}/usr/sbin/policy-rc.d chmod +x ${prefix}/usr/sbin/policy-rc.d -chroot ${prefix} aptitude -y install '~prequired|~pimportant|~pstandard' +chroot ${prefix} env DEBIAN_FRONTEND=noninteractive aptitude -y install '~prequired|~pimportant|~pstandard' rm -f {$prefix}/usr/sbin/policy-rc.d diff --git a/debian/changelog b/debian/changelog index 6c4e299..d9a3187 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +invirt-autoinstaller (0.0.30) unstable; urgency=low + + * When we're installing the world, be sure to block debconf prompts from + coming up. + + -- Evan Broder Sun, 26 Jul 2009 19:59:01 -0700 + invirt-autoinstaller (0.0.29) unstable; urgency=low * Be more specific when replacing root= lines with UUID equivalents in -- 1.7.9.5 From 230a7c475907a824d3a51c989e8cb68571b2d52d Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Sun, 9 Aug 2009 14:01:18 -0400 Subject: [PATCH 15/16] In invirt-autoinstaller: * Hack to be differently specific when replacing the root= lines. This should replace both the actual grub config lines and the kopt line, but leave lines like groot alone. svn path=/trunk/packages/invirt-autoinstaller/; revision=2376 --- common/usr/lib/xen-tools/debian.d/93-setup-grub | 2 +- debian/changelog | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/common/usr/lib/xen-tools/debian.d/93-setup-grub b/common/usr/lib/xen-tools/debian.d/93-setup-grub index d3ba6fd..071f61c 100755 --- a/common/usr/lib/xen-tools/debian.d/93-setup-grub +++ b/common/usr/lib/xen-tools/debian.d/93-setup-grub @@ -85,7 +85,7 @@ for i in $(seq 1 "$NUMPARTITIONS"); do swap) SWAP_GUEST="$(echo ${!var} | cut -f8 -d:)";; esac done -sed -i -re "s%^(# *kopt=.*root=)[^ ]*%\1UUID=$ROOT_UUID%" ${prefix}/boot/grub/menu.lst +sed -i -re "s%^([= ]root=)[^ ]*%\1UUID=$ROOT_UUID%" ${prefix}/boot/grub/menu.lst sed -i -e "s%${ROOT_GUEST}%UUID=${ROOT_UUID}%" ${prefix}/etc/fstab sed -i -e "s%${SWAP_GUEST}%UUID=${SWAP_UUID}%" ${prefix}/etc/fstab diff --git a/debian/changelog b/debian/changelog index d9a3187..f1b5d24 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +invirt-autoinstaller (0.0.31) unstable; urgency=low + + * Hack to be differently specific when replacing the root= lines. This + should replace both the actual grub config lines and the kopt line, + but leave lines like groot alone. + + -- Evan Broder Tue, 28 Jul 2009 14:39:25 -0700 + invirt-autoinstaller (0.0.30) unstable; urgency=low * When we're installing the world, be sure to block debconf prompts from -- 1.7.9.5 From e7799ab47e4d9397a3b4a96f40cbb329bd977296 Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Thu, 13 Aug 2009 11:36:13 -0400 Subject: [PATCH 16/16] Revert the "Hack to be differently specific". It wasn't working. This reverts commit r2376. svn path=/trunk/packages/invirt-autoinstaller/; revision=2441 --- common/usr/lib/xen-tools/debian.d/93-setup-grub | 2 +- debian/changelog | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/common/usr/lib/xen-tools/debian.d/93-setup-grub b/common/usr/lib/xen-tools/debian.d/93-setup-grub index 071f61c..d3ba6fd 100755 --- a/common/usr/lib/xen-tools/debian.d/93-setup-grub +++ b/common/usr/lib/xen-tools/debian.d/93-setup-grub @@ -85,7 +85,7 @@ for i in $(seq 1 "$NUMPARTITIONS"); do swap) SWAP_GUEST="$(echo ${!var} | cut -f8 -d:)";; esac done -sed -i -re "s%^([= ]root=)[^ ]*%\1UUID=$ROOT_UUID%" ${prefix}/boot/grub/menu.lst +sed -i -re "s%^(# *kopt=.*root=)[^ ]*%\1UUID=$ROOT_UUID%" ${prefix}/boot/grub/menu.lst sed -i -e "s%${ROOT_GUEST}%UUID=${ROOT_UUID}%" ${prefix}/etc/fstab sed -i -e "s%${SWAP_GUEST}%UUID=${SWAP_UUID}%" ${prefix}/etc/fstab diff --git a/debian/changelog b/debian/changelog index f1b5d24..bdd5899 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +invirt-autoinstaller (0.0.32) unstable; urgency=low + + * Revert 0.0.31 - it didn't work, and left autoinstalled VMs that used + to work without anything in their grub menu.lst. + + -- Evan Broder Thu, 13 Aug 2009 08:35:50 -0700 + invirt-autoinstaller (0.0.31) unstable; urgency=low * Hack to be differently specific when replacing the root= lines. This -- 1.7.9.5