]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/fstab-generator/fstab-generator.c
fstab-generator: if we mount via roothash=/usrhash= let's imply "ro" mount option
authorLennart Poettering <lennart@poettering.net>
Fri, 2 Jun 2023 07:54:18 +0000 (09:54 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 2 Jun 2023 11:31:31 +0000 (13:31 +0200)
commit2130a2e5a6bcc12bd5417f8e2aadec89aac4ed60
tree49b60199fa2fbc495cbe927ea202c234ec836e4c
parent014e811e8672e60d22c7f5b09aee77b04a8e0734
fstab-generator: if we mount via roothash=/usrhash= let's imply "ro" mount option

If we discover the root or /usr/ fs via roothash=/usrhash= we know the
file system mounted on it will be read-only, since Verity volumes are by
definition immutable. Hence, let's imply the "ro" mount option for them.

This way the "kernel: /dev/mapper/usr: Can't open blockdev" boot-time
log message goes away, reported here:

https://github.com/systemd/systemd/issues/27682

(I do wonder though why erofs even tries to open the block device as
writable, that sounds utterly pointless for a file system that carries
the fact it is read-only even in the name...)
src/fstab-generator/fstab-generator.c