Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1378)

Unified Diff: build_image

Issue 3916002: cros_make_image_bootable, mount_gpt_image, common.sh: root filesystem changes: ext2, ro by default (Closed)
Patch Set: line len Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « bin/cros_make_image_bootable ('k') | common.sh » ('j') | common.sh » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build_image
diff --git a/build_image b/build_image
index 3b3f061df6604739040167e80dacd7a0d5bc461a..9d5749e69ed8e3ff22715e2953facd2111100000 100755
--- a/build_image
+++ b/build_image
@@ -476,8 +476,6 @@ create_base_image() {
trap "cleanup && delete_prompt" EXIT
- UUID=$(uuidgen)
-
# Create and format the root file system.
# Check for loop device before creating image.
@@ -498,13 +496,22 @@ create_base_image() {
seek=$((ROOT_SIZE_BYTES + ROOT_HASH_PAD - 1))
sudo losetup "${LOOP_DEV}" "${ROOT_FS_IMG}"
# Specify a block size and block count to avoid using the hash pad.
- sudo mkfs.ext3 -b 4096 "${LOOP_DEV}" "$((ROOT_SIZE_BYTES / 4096))"
+ sudo mkfs.ext2 -b 4096 "${LOOP_DEV}" "$((ROOT_SIZE_BYTES / 4096))"
# Tune and mount rootfs.
- # TODO(wad) rename the disk label to match the GPT since we
- # can't change it later.
- DISK_LABEL="C-KEYFOB"
- sudo tune2fs -L "${DISK_LABEL}" -U "${UUID}" -c 0 -i 0 "${LOOP_DEV}"
+ DISK_LABEL="C-ROOT"
+ # Disable checking and minimize metadata differences across builds
+ # and wasted reserved space.
+ sudo tune2fs -L "${DISK_LABEL}" \
+ -U clear \
+ -T 20091119110000 \
+ -c 0 \
+ -i 0 \
+ -m 0 \
gauravsh 2010/10/20 19:06:55 do you expect any performance effected from changi
Will Drewry 2010/10/20 19:11:49 I actually just wanted to make sure we use our fil
+ -r 0 \
+ -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}"
# Create stateful partition of the same size as the rootfs.
« no previous file with comments | « bin/cros_make_image_bootable ('k') | common.sh » ('j') | common.sh » ('J')

Powered by Google App Engine
This is Rietveld 408576698