summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2011-03-21 20:52:04 +0100
committerDaniel Baumann <daniel@debian.org>2011-03-21 20:54:36 +0100
commit3fa575103c6549ad7df429e385ce69f228e7ee31 (patch)
tree8cafa5ccc1a92ea1db1817b3d90e113e45f62988 /scripts
parent5ee20800049808498d0e5550d2842bfac5ccd25c (diff)
downloadlive-build-3fa575103c6549ad7df429e385ce69f228e7ee31.zip
live-build-3fa575103c6549ad7df429e385ce69f228e7ee31.tar.gz
Setting partition flags after creating the filesystem, workaround for bug in parted where we result in having the partition type set to linux otherways, thanks to Cody A.W. Somerville <cody.somerville@canonical.com> for the idea.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build/lb_binary_usb10
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/build/lb_binary_usb b/scripts/build/lb_binary_usb
index 5b3c645..51e6ca7 100755
--- a/scripts/build/lb_binary_usb
+++ b/scripts/build/lb_binary_usb
@@ -146,8 +146,6 @@ case "${LB_BUILD_WITH_CHROOT}" in
true)
Chroot chroot "parted -s ${FREELO} mklabel ${PARTITION_TABLE_TYPE}" || true
Chroot chroot "parted -s ${FREELO} mkpart primary ${PARTITION_TYPE} 0.0 100%" || true
- Chroot chroot "parted -s ${FREELO} set 1 boot on" || true
- Chroot chroot "parted -s ${FREELO} set 1 lba off" || true
if [ "${LB_BOOTLOADER}" = "syslinux" ]
then
@@ -158,8 +156,6 @@ case "${LB_BUILD_WITH_CHROOT}" in
false)
parted -s ${FREELO} mklabel ${PARTITION_TABLE_TYPE} || true
parted -s ${FREELO} mkpart primary ${PARTITION_TYPE} 0.0 100% || true
- parted -s ${FREELO} set 1 boot on || true
- parted -s ${FREELO} set 1 lba off || true
if [ "${LB_BOOTLOADER}" = "syslinux" ]
then
@@ -194,10 +190,16 @@ 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