diff -Nru cloud-initramfs-tools-0.3ubuntu1/debian/changelog cloud-initramfs-tools-0.4ubuntu1/debian/changelog --- cloud-initramfs-tools-0.3ubuntu1/debian/changelog 2011-12-20 18:24:47.000000000 +0000 +++ cloud-initramfs-tools-0.4ubuntu1/debian/changelog 2012-02-24 03:19:21.000000000 +0000 @@ -1,3 +1,10 @@ +cloud-initramfs-tools (0.4ubuntu1) precise; urgency=low + + * growroot: run 'udevadm settle' before attempting growpart to + allow initial events to finish (LP: #937352) + + -- Scott Moser Thu, 23 Feb 2012 22:19:20 -0500 + cloud-initramfs-tools (0.3ubuntu1) precise; urgency=low * growroot: unmount root before attempting to grow the root diff -Nru cloud-initramfs-tools-0.3ubuntu1/growroot/scripts/local-bottom/growroot cloud-initramfs-tools-0.4ubuntu1/growroot/scripts/local-bottom/growroot --- cloud-initramfs-tools-0.3ubuntu1/growroot/scripts/local-bottom/growroot 2011-12-20 17:57:16.000000000 +0000 +++ cloud-initramfs-tools-0.4ubuntu1/growroot/scripts/local-bottom/growroot 2012-02-24 03:19:05.000000000 +0000 @@ -65,6 +65,12 @@ umount "${rootmnt}" || fail "failed to umount ${rootmnt}"; +# Wait for any of the initial udev events to finish +# This is to avoid any other processes using the block device that the +# root partition is on, which would cause the sfdisk 'BLKRRPART' to fail. +udevadm settle --timeout ${ROOTDELAY:-30} || + error "GROWROOT: WARNING: udevadm settle prior to growpart failed" + if out=$(growpart "${rootdisk}" "${partnum}" 2>&1); then case "$out" in CHANGED:*) echo "GROWROOT: $out";;