From 7454a5e6f5863cea9cef191472de0e5363665071 Mon Sep 17 00:00:00 2001 From: Zdenek Behan Date: Fri, 25 Mar 2011 01:25:41 +0100 Subject: [PATCH] build_image: always specify filesystem type for mount BUG=chromium-os:13221 TEST=Run build_images without ext2 loaded Specifying a filesystem type explicitly for ext* filesystems will avoid weird fallbacks like mounting ext2 filesystem as ext3 or even ext4. Instead it attempts to autoload the given filesystem as a module if available or fail right away. Change-Id: I6be7f3f994babd8efc8eda97ea9c802e04d98be6 R=dgarret@chromium.org,sosa@chromium.org Review URL: http://codereview.chromium.org/6696092 --- build_image | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build_image b/build_image index 23c462ce40..21dab799cf 100755 --- a/build_image +++ b/build_image @@ -572,7 +572,7 @@ create_base_image() { -e remount-ro \ "${LOOP_DEV}" # TODO(wad) call tune2fs prior to finalization to set the mount count to 0. - sudo mount "${LOOP_DEV}" "${ROOT_FS_DIR}" + sudo mount -t ext2 "${LOOP_DEV}" "${ROOT_FS_DIR}" # Create stateful partition of the same size as the rootfs. STATEFUL_LOOP_DEV=$(sudo losetup -f) @@ -590,7 +590,7 @@ create_base_image() { sudo losetup "${STATEFUL_LOOP_DEV}" "${STATEFUL_FS_IMG}" sudo mkfs.ext3 "${STATEFUL_LOOP_DEV}" sudo tune2fs -L "${DISK_LABEL}" -U "${UUID}" -c 0 -i 0 "${STATEFUL_LOOP_DEV}" - sudo mount "${STATEFUL_LOOP_DEV}" "${STATEFUL_FS_DIR}" + sudo mount -t ext3 "${STATEFUL_LOOP_DEV}" "${STATEFUL_FS_DIR}" # -- Install packages into the root file system --