Change overlayroot to use /etc/overlayroot.local.conf instead of cmdine.txt, and make it compatible with users' configuration #225
+39
−44
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See raspberrypi/bookworm-feedback#137 for a discussion of what prompted this pull request.
I believe the procedures to enable and disable the readonly file system overlay can be improved.
My understanding is that Raspberry Pi would prefer to follow the conventions and best practices of upstream repositories whenever possible. As I did my research on the aforementioned issue, I discovered, in the overlayroot documentation, that it should be enabled by modifying the /etc/overlayroot.local.conf file (See /etc/overlayroot.conf for documentation), and that changes to any overlayed file system can be made through the
overlayroot-chroot
command. See https://manpages.debian.org/bookworm/overlayroot/overlayroot-chroot.8.en.htmlThis method a few advantages:
Although it is no longer necessary to reboot twice when enabling/disabling write protection on the /boot partition, I have not made such a change to keep this pull request as least intrusive as possible. Should this pull request be pulled, a subsequent pull request could be made to enable/disable overlayroot and the write protection on the boot partition simultaneously when one reboot.