summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorCody A.W. Somerville <cody.somerville@canonical.com>2011-07-20 18:39:09 +0200
committerDaniel Baumann <daniel@debian.org>2011-07-20 18:39:09 +0200
commitebc7a72501339a76f4ab66d37d4aefc0d0ee4a67 (patch)
tree540101c44e21738290fa567c324ea42d7ed171f4 /scripts
parent346397d2e0e5add283c1de7287fa25a4d9c32f54 (diff)
downloadvyos-live-build-ebc7a72501339a76f4ab66d37d4aefc0d0ee4a67.tar.gz
vyos-live-build-ebc7a72501339a76f4ab66d37d4aefc0d0ee4a67.zip
Setting partition flags in source_usb after creating the filesystem in order to avoid bug in parted that makes them forget the flags.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build/lb_source_usb7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/build/lb_source_usb b/scripts/build/lb_source_usb
index 0af9e1081..166e86ace 100755
--- a/scripts/build/lb_source_usb
+++ b/scripts/build/lb_source_usb
@@ -93,7 +93,6 @@ Echo_warning "!!! The following error/warning messages can be ignored !!!"
Losetup $FREELO source.img 0
Chroot chroot "parted -s ${FREELO} mklabel msdos" || true
Chroot chroot "parted -s ${FREELO} mkpart primary ${PARTITION_TYPE} 0.0 100%" || true
-Chroot chroot "parted -s ${FREELO} set 1 lba off" || true
sleep 1
${LB_LOSETUP} -d ${FREELO}
@@ -127,6 +126,12 @@ sleep 1
${LB_LOSETUP} -d ${FREELO}
Echo_warning "!!! The above error/warning messages can be ignored !!!"
+FREELO="$(${LB_LOSETUP} -f)"
+Losetup "$FREELO" source.img 0
+Chroot chroot "parted -s ${FREELO} set 1 lba off" || true
+sleep 1
+${LB_LOSETUP} -d ${FREELO}
+
if [ -n "${MAKEDEV}" ]
then
rm -rf chroot/dev