[Article Proposal] Using rpm-ostree usroverlay to overridde files on /usr on ostree systems

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.

This sounds OK to me. (With the caveat that I know very little about ostree.) +1.

+1 from me with the same caveat regarding my understanding of ostree :slight_smile:

I’ve opened Pagure Ticket #167 to track this article. You can use comments on that ticket if you have questions or issues about anything regarding it…

When you have a review copy ready for the editors, please leave a comment on the ticket with the WordPress preview link and we’ll review it and use the ticket comments if we have any questions.

Thanks for contributing to the Fedora Magazine.

This topic was automatically closed after 180 days. New replies are no longer allowed.