summaryrefslogtreecommitdiffstats
path: root/scripts/test-reexec
diff options
context:
space:
mode:
authorAlejandro Hernandez Samaniego <alhe@linux.microsoft.com>2022-01-29 12:48:39 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-03-01 23:44:59 +0000
commited323de4dcb600dd71d544f5994f52307b6db564 (patch)
tree581575b6fa10b8f987dedff95ecc7f0e1f7716f9 /scripts/test-reexec
parent31bca6db85302e4b178c274b026fe0f42cbfa10f (diff)
downloadpoky-ed323de4dcb600dd71d544f5994f52307b6db564.tar.gz
initramfs-framework: Add overlayroot module
When installed, this module mounts a read-write (RW) overlay on top of a root filesystem, which is kept read-only (RO), free from modifications by the user, this might prove to be useful if we want to access or restore the original unmodified rootfs. The existing overlay-etc.bbclass does something similar, it mounts an overlay on top of the /etc directory, however doing the same for root causes the original root to be inaccessible once the system is booted, hence why this module is added to the initramfs boot flow, allowing us to mount the RW overlay, while keeping the original rootfs mounted at /rofs once the system finishes booting. This script is loosely based on that class. This module requires rootrw=<foo> to be passed as a kernel parameter to specify the device/partition to be used as RW by the overlay and has a dependency on overlayfs support being present in the running kernel. It does not require the read-only IMAGE_FEATURE to be enabled. The module needs to be executed after the initramfs-module-rootfs since it relies on it to mount the filesystem at initramfs startup but before the finish module which normally switches root. After overlayroot is executed the usual boot flow continues from the real init process. If something goes wrong while running this module, the rootfs is still mounted RO (with no overlay) and the finish module is executed to continue booting normally. Its worth noting that, on purpose, this isnt installed by default on any images that use initramfs-framework to keep the boot flow unmodified, only when a user manually requests to install it, then it becomes functional. (From OE-Core rev: 4f876982a856c54a8074c85346632e33caa7ef53) Signed-off-by: Alejandro Enedino Hernandez Samaniego <alhe@linux.microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/test-reexec')
0 files changed, 0 insertions, 0 deletions