From 5885d772f7089c5f958835d9039baff336d1e8e5 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 28 Jun 2012 17:55:17 -0400 Subject: [PATCH] build_image: make initial fs setup quieter No need to dump all these mkfs/dd details early on. BUG=None TEST=`./build_image` still works, and doesn't spew as much Change-Id: Ia8113d2ce2c0e6a8a13535b67b37372f0f146398 Reviewed-on: https://gerrit.chromium.org/gerrit/29366 Reviewed-by: Richard Barnette Commit-Ready: Mike Frysinger Tested-by: Mike Frysinger --- build_library/base_image_util.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/build_library/base_image_util.sh b/build_library/base_image_util.sh index b2fd6cd3ac..5dabddb9e4 100755 --- a/build_library/base_image_util.sh +++ b/build_library/base_image_util.sh @@ -49,7 +49,7 @@ zero_free_space() { # dd is a silly thing and will produce a "No space left on device" message # that cannot be turned off and is confusing to unsuspecting victims. ( sudo dd if=/dev/zero of="${fs_mount_point}/filler" bs=4096 conv=fdatasync \ - || true ) 2>&1 | grep -v "No space left on device" + status=noxfer || true ) 2>&1 | grep -v "No space left on device" sudo rm "${fs_mount_point}/filler" } @@ -69,7 +69,7 @@ create_base_image() { info "Padding the rootfs image by ${ROOT_HASH_PAD} bytes for hash data" dd if=/dev/zero of="${ROOT_FS_IMG}" bs=1 count=1 \ - seek=$((ROOT_SIZE_BYTES + ROOT_HASH_PAD - 1)) + seek=$((ROOT_SIZE_BYTES + ROOT_HASH_PAD - 1)) status=noxfer ROOT_LOOP_DEV=$(sudo losetup --show -f "${ROOT_FS_IMG}") if [ -z "${ROOT_LOOP_DEV}" ] ; then @@ -78,7 +78,7 @@ create_base_image() { fi # Specify a block size and block count to avoid using the hash pad. - sudo mkfs.ext2 -b 4096 "${ROOT_LOOP_DEV}" "$((ROOT_SIZE_BYTES / 4096))" + sudo mkfs.ext2 -q -b 4096 "${ROOT_LOOP_DEV}" "$((ROOT_SIZE_BYTES / 4096))" # Tune and mount rootfs. DISK_LABEL="C-ROOT" @@ -99,7 +99,7 @@ create_base_image() { # Create stateful partition of the same size as the rootfs. STATEFUL_SIZE_BYTES=$((1024 * 1024 * ${FLAGS_statefulfs_size})) dd if=/dev/zero of="${STATEFUL_FS_IMG}" bs=1 count=1 \ - seek=$((STATEFUL_SIZE_BYTES - 1)) + seek=$((STATEFUL_SIZE_BYTES - 1)) status=noxfer # Tune and mount the stateful partition. UUID=$(uuidgen) @@ -109,7 +109,7 @@ create_base_image() { die_notrace \ "No free loop device. Free up a loop device or reboot. exiting. " fi - sudo mkfs.ext4 "${STATEFUL_LOOP_DEV}" + sudo mkfs.ext4 -q "${STATEFUL_LOOP_DEV}" sudo tune2fs -L "${DISK_LABEL}" -U "${UUID}" -c 0 -i 0 "${STATEFUL_LOOP_DEV}" sudo mount -t ext4 "${STATEFUL_LOOP_DEV}" "${STATEFUL_FS_DIR}"