diff options
author | Toyam Cox <Vaelatern@gmail.com> | 2016-01-12 18:13:03 -0500 |
---|---|---|
committer | Toyam Cox <Vaelatern@gmail.com> | 2016-01-14 08:48:43 -0500 |
commit | a25ec4a9b0d2fca05f87db62d05e7cf6eca3e506 (patch) | |
tree | 2f5e85a1b461c269226258c3632feb3b959aafff /mklive.sh.in | |
parent | 6653bb6057f8a3b42c69b3bc0fa5ef40ade1e679 (diff) | |
download | hrmpf-a25ec4a9b0d2fca05f87db62d05e7cf6eca3e506.tar.gz hrmpf-a25ec4a9b0d2fca05f87db62d05e7cf6eca3e506.tar.xz hrmpf-a25ec4a9b0d2fca05f87db62d05e7cf6eca3e506.zip |
Switch to truncate to allocate storage for images
Works in low memory situations
Diffstat (limited to 'mklive.sh.in')
-rw-r--r-- | mklive.sh.in | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mklive.sh.in b/mklive.sh.in index 5edd289..55751dd 100644 --- a/mklive.sh.in +++ b/mklive.sh.in @@ -200,7 +200,7 @@ generate_grub_efi_boot() { modprobe -q loop || : # Create EFI vfat image. - dd if=/dev/zero of=$GRUB_DIR/efiboot.img bs=1024 count=16384 >/dev/null 2>&1 + truncate -s 16M $GRUB_DIR/efiboot.img >/dev/null 2>&1 mkfs.vfat -F12 -S 512 -n "grub_uefi" "$GRUB_DIR/efiboot.img" >/dev/null 2>&1 GRUB_EFI_TMPDIR="$(mktemp --tmpdir=$HOME -d)" @@ -249,8 +249,8 @@ generate_squashfs() { ROOTFS_FREESIZE="$((ROOTFS_SIZE/6))" fi mkdir -p "$BUILDDIR/tmp/LiveOS" - dd if=/dev/zero of="$BUILDDIR/tmp/LiveOS/ext3fs.img" \ - bs="$((ROOTFS_SIZE+ROOTFS_FREESIZE))M" count=1 >/dev/null 2>&1 + truncate -s "$((ROOTFS_SIZE+ROOTFS_FREESIZE))M" \ + $BUILDDIR/tmp/LiveOS/ext3fs.img >/dev/null 2>&1 mkdir -p "$BUILDDIR/tmp-rootfs" mkfs.ext3 -F -m1 "$BUILDDIR/tmp/LiveOS/ext3fs.img" >/dev/null 2>&1 mount -o loop "$BUILDDIR/tmp/LiveOS/ext3fs.img" "$BUILDDIR/tmp-rootfs" |