Setting partition flags in source_usb after creating the filesystem in order to avoid bug in parted that makes them forget the flags.

This commit is contained in:
Cody A.W. Somerville 2011-07-20 18:39:09 +02:00 committed by Daniel Baumann
parent 346397d2e0
commit ebc7a72501
1 changed files with 6 additions and 1 deletions

View File

@ -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