Read-only FS

44 views
Skip to first unread message

Rok

unread,
Sep 13, 2021, 3:11:40 AM9/13/21
to Android-x86
Hi,
Have anyone tried to install Android X86 as Read-Only FS ? I use Android X86 as a kiosk and would be nice the possibility to put in read only mode to avoid file system corruption when improperly powered off (which is always the case.. :) )
Thanks

Michael Goffioul

unread,
Sep 13, 2021, 6:43:23 AM9/13/21
to Android-x86
By default, the system partition is read-only (unless you switch to read-write during installation). However, Android needs a data partition, and I don't think you could get away with a read-only data partition, it must be writable. You could use a tmpfs data partition, which is what the LIVE mode is doing.

There are of course other options. You could have /system and /data on different partitions, keeping /system read-only. However, there's still a risk of corrupting the /data partition. But you could tweak the boot script to check and fix the /data partition before handing it over to Android (that is, before switch_root).

I took a different approach on my hardware, although the end result is the same: I let Android mounting (and unmounting) the /data partition, by injecting the proper entry in fstab. You can then tell Android to check the partition before mounting. I did it that way, because experience demonstrated that even regular reboot could lead to data corruption, Android only properly unmounting partitions it knows about.

Hope this helps.
Michael.


--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-x86/46554824-60d9-43bf-a98d-48a21ea3e9acn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages