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

Unified Diff: bin/cros_make_image_bootable

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 | « no previous file | build_image » ('j') | build_image » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bin/cros_make_image_bootable
diff --git a/bin/cros_make_image_bootable b/bin/cros_make_image_bootable
index 7179b89a6b2c6614e6cbf1d7fb56022011d88e4b..3517c85ec8cdbd38143b2784d3652815fd1977e2 100755
--- a/bin/cros_make_image_bootable
+++ b/bin/cros_make_image_bootable
@@ -148,6 +148,15 @@ make_image_bootable() {
root_dev=$(mount | grep -- "on ${FLAGS_rootfs_mountpoint} type" |
cut -f1 -d' ' | tail -1)
+ # Make the filesystem un-mountable as read-write.
+ # mount_gpt_image.sh will undo this as needed.
+ # TODO(wad) make sure there is parity in the signing scripts.
+ if [ ${FLAGS_enable_rootfs_verification} -eq ${FLAGS_TRUE} ]; then
+ # TODO(wad) this would be a good place to reset any other ext2 metadata.
+ warn "Disabling r/w mount of the root filesystem"
+ disable_rw_mount "$root_dev"
+ fi
+
if [ ${FLAGS_use_dev_keys} -eq ${FLAGS_TRUE} ]; then
use_dev_keys="--use_dev_keys"
fi
« no previous file with comments | « no previous file | build_image » ('j') | build_image » ('J')

Powered by Google App Engine
This is Rietveld 408576698