From 2474b8974984512a284adba5c77d87606843a911 Mon Sep 17 00:00:00 2001 From: zador-blood-stained Date: Fri, 18 Dec 2015 17:55:57 +0300 Subject: [PATCH] Fix for old version of pv on Trusty --- configuration.sh | 2 +- debootstrap.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/configuration.sh b/configuration.sh index 85e61c41a3..6de849c9a3 100644 --- a/configuration.sh +++ b/configuration.sh @@ -28,7 +28,7 @@ # common options REVISION="5.00" # all boards have same revision - SDSIZE="4G" # SD image size in MB + SDSIZE="4000" # SD image size in MB TZDATA=`cat /etc/timezone` # Timezone for target is taken from host or defined here. USEALLCORES="yes" # Use all CPU cores for compiling SYSTEMD="no" # Enable or disable systemd on Jessie in debootstrap process diff --git a/debootstrap.sh b/debootstrap.sh index 2fa059d09f..a993b43c8b 100644 --- a/debootstrap.sh +++ b/debootstrap.sh @@ -38,10 +38,10 @@ BOOTEND=$(($ROOTSTART-1)) # Create image file if [ "$OUTPUT_DIALOG" = "yes" ]; then - (pv -n -s $SDSIZE -S /dev/zero | dd status=none of=$DEST/cache/tmprootfs.raw) 2>&1 \ - | dialog --backtitle "$backtitle" --title "Creating blank image ($SDSIZE Mb), please wait ..." --gauge "" 5 70 + (dd if=/dev/zero bs=1M status=none count=$SDSIZE | pv -n -s $(( $SDSIZE * 1024 * 1024 )) | dd status=none of=$DEST/cache/tmprootfs.raw) 2>&1 \ + | dialog --backtitle "$backtitle" --title "Creating blank image ($SDSIZE), please wait ..." --gauge "" 5 70 else - pv -p -b -r -s $SDSIZE -S /dev/zero | dd status=none of=$DEST/cache/tmprootfs.raw + dd if=/dev/zero bs=1M status=none count=$SDSIZE | pv -p -b -r -s $(( $SDSIZE * 1024 * 1024 )) | dd status=none of=$DEST/cache/tmprootfs.raw fi # Find first available free device