[SCM] live-build branch, debian-old-2.0, updated. 2610155ec6f65f82b8a0881629d07935a79816c5

Daniel Baumann daniel at debian.org
Wed Jul 20 07:04:59 UTC 2011


The following commit has been merged in the debian-old-2.0 branch:
commit 2610155ec6f65f82b8a0881629d07935a79816c5
Author: Cody A.W. Somerville <cody.somerville at canonical.com>
Date:   Wed Jul 20 08:46:11 2011 +0200

    Fixing corruption of usb binary images caused by trying to modify flags in partition table when image is mounted with offset.

diff --git a/scripts/build/lb_binary_usb b/scripts/build/lb_binary_usb
index 51e6ca7..8a168c3 100755
--- a/scripts/build/lb_binary_usb
+++ b/scripts/build/lb_binary_usb
@@ -190,16 +190,10 @@ esac
 case "${LB_BUILD_WITH_CHROOT}" in
 	true)
 		Chroot chroot "mkfs.${MKFS} ${MKFS_OPTIONS} ${FREELO}"
-
-		Chroot chroot "parted -s ${FREELO} set 1 boot on" || true
-		Chroot chroot "parted -s ${FREELO} set 1 lba off" || true
 		;;
 
 	false)
 		mkfs.${MKFS} ${MKFS_OPTIONS} ${FREELO}
-
-		parted -s ${FREELO} set 1 boot on || true
-		parted -s ${FREELO} set 1 lba off || true
 		;;
 esac
 
@@ -265,6 +259,24 @@ ${LB_LOSETUP} -d ${FREELO}
 
 echo "!!! The above error/warning messages can be ignored !!!"
 
+FREELO="$(${LB_LOSETUP} -f)"
+Losetup "${FREELO}" chroot/binary.img 0
+
+case "${LB_BUILD_WITH_CHROOT}" in
+	true)
+		Chroot chroot "parted -s ${FREELO} set 1 boot on" || true
+		Chroot chroot "parted -s ${FREELO} set 1 lba off" || true
+		;;
+
+	false)
+		parted -s "${FREELO}" set 1 boot on || true
+		parted -s "${FREELO}" set 1 lba off || true
+		;;
+esac
+
+sleep 1
+${LB_LOSETUP} -d ${FREELO}
+
 if [ -n "${MAKEDEV}" ]
 then
 	rm -rf chroot/dev

-- 
live-build



More information about the debian-live-changes mailing list