diff options
-rw-r--r-- | README.md | 35 |
1 files changed, 32 insertions, 3 deletions
@@ -1,7 +1,36 @@ | |||
1 | This README.md file contains information on the contents of the | 1 | # meta-readonly-rootfs-overlay |
2 | readonly-rootfs-overlay layer. | ||
3 | 2 | ||
4 | Please see the corresponding sections below for details. | 3 | This yocto layer provides the necessary scripts and configurations to setup a |
4 | writable root file system overlay on top of a read-only root filesystem. | ||
5 | |||
6 | ## Why does this exists? | ||
7 | |||
8 | Having a read-only root file system is useful for many scenarios: | ||
9 | |||
10 | - Have a unmodifiable factory root file system | ||
11 | - Seperate user specific changes from system configuration | ||
12 | - Allow factory reset, by deleting the user specfic changes | ||
13 | - Have a fallback image in case the user specific changes made the root file | ||
14 | system no longer bootable. | ||
15 | |||
16 | Because some data on the root file system changes on first boot or while the | ||
17 | system is running, just mounting the complete root file system as read-only | ||
18 | breaks many applications. There are different solutions to this problem: | ||
19 | |||
20 | - Symlinking/Bind mounting files and directories that could potentially change | ||
21 | while the system is running to a writable partition | ||
22 | - Instead of having a read-only root files system, mounting a writable overlay | ||
23 | root file system, that uses a read-only file system as its base and writes | ||
24 | changed data to another writable partition. | ||
25 | |||
26 | To implement the first solution, the developer needs to analyse which file | ||
27 | needs to change and then create symlinks for them. When doing factory reset, | ||
28 | the developer "empties" every file that is linked, to avoid dangling | ||
29 | symlinks/binds. While this is more work on the developer side, it might | ||
30 | increase the security, because only files that are symlinked/bind-mounted can | ||
31 | be changed. | ||
32 | |||
33 | This meta-layer provides the second solution. | ||
5 | 34 | ||
6 | # Dependencies | 35 | # Dependencies |
7 | 36 | ||