Article Summary:
On the many Fedora ostree systems, mainly because of the immutable root feature, the /usr filesystem is shipped as read-only and can’t be written to.
However, the rpm-ostree usroverlay
command can be used to unblock the root, making it possible to write to a overlay which adds the ability to override files in /usr provided by the current ostree commit.
Article Description:
I think it might make sense to first explain why I think knowing the rpm-ostree usroverlay
command is useful, since I have a personal use case.
So, previously on Linux I used to use Deja Dup as the backup tool, but more recently I had to move to Windows for a while, so looking for a backup tool there I found Duplicati, which is the closest to how it works.
On coming back to Linux, I wanted to use Duplicati, but unfortunately it has a problem with openssl which requires overriding specific lib file with an alternative compatible with latest dll.
The alternatives here are extracting the files from the RPM, and repackaging it (didn’t figure out an easy way), dumping directly on the installed system (could work on non-ostree, but won’t work on ostree-based due to ro /usr) and using the overlay feature on ostree.
I plan on demonstrating on the Duplicati example, but I guess other use cases could work.
Like, for exameple, maybe a temporary /usr/local could be useful? You could dump the compiled programs you are dealing there and know for sure it will be cleared on reboot.