Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mounting /boot read-only #10

Open
bitinerant opened this issue Oct 24, 2019 · 2 comments
Open

Mounting /boot read-only #10

bitinerant opened this issue Oct 24, 2019 · 2 comments

Comments

@bitinerant
Copy link
Contributor

I noticed in rootwork that the /boot partition is remounted rw and then ro on exit, but I don't see where /boot is mounted ro to begin with. On Rasbian, is the /boot partition actually mounted ro after a reboot but before running rootwork?

Just a note - mounting /boot as ro may not be that important because nothing should write to it during normal operation, only during things like kernel updates. However, I don't know what risk power failures would pose.

Related to this, to support Ubuntu Server and other systems that use /boot/firmware rather than /boot (see issue #9), the rootwork script needs to be updated - perhaps to use /boot/firmware if it is a mountpoint, and otherwise use /boot.

@chesty - I want to add to others' comments about how valuable this project is for long-term RPi stable operation. We appreciate the time and energy you've contributed to write, test, publish, and support this project.

@chesty
Copy link
Owner

chesty commented Oct 24, 2019

interesting thought about /boot being read-write after boot. I didn't consider it and I don't know.
I'll be able to test it soon. I guess editing /etc/fstab to mount it read-only would be a way to make it read-only after boot.

re /boot/firmware, if you haven't already made changes, I guess changing line 63 and and 93 in rootwork would do the trick, ie

line 63 from
for DIR in boot run; do
to
for DIR in boot boot/firmware run; do

and line 93 from
for DIR in boot; do
to
for DIR in boot/firmware boot; do

If you're able to make those changes and it works ok, send me a pull request and I'll add them in. I'll test on a raspbian to make sure it doesn't cause any problems, but I don't see how it would, it should silently ignore /boot/firmware as it doesn't exist on raspbian.

@bitinerant
Copy link
Contributor Author

I submitted PR#11 which fixes the rootwork portion of this. The question about making /boot ro at boot remains.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants