From 2de427228fdfbf454002ebe61cd0530b58b34ebd Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Sun, 3 May 2009 01:41:25 -0400 Subject: [PATCH 1/1] 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