summaryrefslogtreecommitdiff
path: root/scripts/build/lb_binary_usb
diff options
context:
space:
mode:
authorAndreas Loibl <andreas@andreas-loibl.de>2011-09-23 11:16:22 +0200
committerAndreas Loibl <andreas@andreas-loibl.de>2011-09-23 11:16:22 +0200
commit097f1d44ce8da48ca61dac8d2fa2363fe48c1e6b (patch)
tree9c78f8488d8abf95cc6375b5798937398627cb75 /scripts/build/lb_binary_usb
parent2e73ac04b782972c1dbf35b21c4fbb198d6fa0ba (diff)
parentf8c765ea228f87733d86875eabaff0b7de780d74 (diff)
downloadlive-build-097f1d44ce8da48ca61dac8d2fa2363fe48c1e6b.zip
live-build-097f1d44ce8da48ca61dac8d2fa2363fe48c1e6b.tar.gz
Merge branch 'debian-old-2.0' into burg
Diffstat (limited to 'scripts/build/lb_binary_usb')
-rwxr-xr-xscripts/build/lb_binary_usb24
1 files changed, 18 insertions, 6 deletions
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