Bazzite/Aurora – Advanced rpm-ostree

With Bazzite, Aurora, Bluefin, etc, because of how hard the “Immutable OS” is pushed, it often leads to the belief that the OS is “Immutable” unchanging in every way. But Fedora has it right when they call it Fedora Atomic. Because its not unchangeable, its just atomic. If you change it, it becomes a different version of the OS.

The rpm-ostree is the gateway to making changes.

The simple commands are rpm-ostree update or rpm-ostree upgrade to update your system. rpm-ostree rollback to rollback, and rpm-ostree status to check the status.

These commands are honestly more than most people will use, because they’ll get into the computer, open whatever programs, and that’s it. Most people really don’t need to muck around with the internal workings of the OS, or install weird dependencies.

A lot of people have Bazzite installed on their gaming handhelds, and don’t need to touch the command line.

A lot of people can run Aurora or Bluefin to breath life into older hardware, and they just run their apps/browser and never think about that scary text thing people call the terminal.

 

For this reason, Universal Blue recommending against rpm layering is really strange to me. Most people don’t rebase, or even know what it means. And since that’s the biggest thing the documentation says you won’t be able to do, its really weird how much emphasis is placed on not layering.

 

rpm-ostree install


With rpm-ostree install <package-name> you can layer a package onto your OS, to add it in. So for example if you wanted to try using Howdy to use your Windows Hello camera, you can install it with layering.

Depending on the circumstance, you may layer something, and then find out that the config for that application is in the immutable OS, so you still can’t use it. But because of how Atomic Fedora works, the worst part will just be the rebooting.

rpm-ostree uninstall <package-name> or rpm-ostree reset can remove the layering. With uninstall being for a specific package, or reset to remove them all.

This won’t let you uninstall a system package though.

 

rpm-ostree override


rpm-ostree override remove

With rpm-ostree override remove <package-name> you can remove a package that the maintainer has included with the OS. So say you just don’t want to have firefox installed. Not just that you won’t use it, but that you don’t want it installed at all. you can just rpm-ostree override remove firefox firefox-langpacks and then the next time you reboot it will be gone.

 

This does potentially require you to know multiple packages depending on what you’re trying to remove.

And it may fail because its fulfilling a dependency. And you may need to install something else to fulfill the dependency.

 

rpm-ostree override replace

With rpm-ostree override replace <rpm-package-files-or-url> you can replace a package with a different version of it.

I recently experimented with a fork of Input Remapper. I downloaded the rpm package, extracted it, changed one of the python files, and then repackaged it. Then I was able to override replace the installed version with my version.

This allows me the freedom of having my own version with modifications while still having the safety of the atomic distro.

 

You could also use this if you needed a specific version of a program, because perhaps theres a crash in an essential workflow in the system installed version and you want to use a version that is newer or older than what is installed.

 

rpm-ostree usroverlay


When I was experimenting with a fork of Input Remapper, I wanted to be able to change the files to rapidly iterate. Doing an override replace for every small change would have been annoying. rpm-ostree usroverlay makes a writable overlay file on /usr what this means is that you can make whatever changes you want to, and when you reboot, you’ll be right back to how you had been before.

This can be really useful if you’re trying modifications to installed applications, or if you’re just trying to see if modifying a file or creating a file would fix a problem you’re having. Then if it works, you figure out the right way to make it persist across reboots.

Leave a Comment

Your email address will not be published. Required fields are marked *