init.flounder.rc: work around emmc timeouts that lead to read-only /data
We can't panic outright on mount (http://b/17382778)
But we must reboot (e.g. panic on emmc errors) http://b/17640053
This requires a kernel with the f2fs fix that honors the
errors=panic and does not just remount ro.
Bug: 17382778
Bug: 17640053
Change-Id: I8ddfd2da2e3d52aea15886e5eaaa9b65e15d6c6c
diff --git a/init.flounder.rc b/init.flounder.rc
index c2ea4c2..2213a87 100644
--- a/init.flounder.rc
+++ b/init.flounder.rc
@@ -27,6 +27,12 @@
write /proc/sys/vm/page-cluster 0
on post-fs-data
+ # Now that are booted all the way and out of mount panics, ensure that we panic on later errors.
+ # This is a hack to work around the fact that we can't recover from all errors that would lead to a panic
+ # during the initial mount (http://b/17382778), yet we need to panic on emmc errors (http://b/17640053)
+ # For a remount only the flags and the target mount point are relevant.
+ mount dummy dummy /data remount nosuid nodev noatime rw seclabel,background_gc=on,user_xattr,acl,errors=panic
+
mkdir /data/media 0770 media_rw media_rw
mkdir /data/nvcam 0700 media camera