Fix Fedora Silverblue after “rpm-ostree ex livefs” failed

This is just a quick post, I mainly write for myself, in case it should happen to me again. I temporarily broke my Fedora Silverblue installation for the second time by running the command:

sudo rpm-ostree ex livefs --i-like-danger

after I installed a new package.

One has to append --i-like-danger for a reason, but I didn’t want to hear. I wanted to try the new package directly without rebooting my PC.

The ex command from rpm-ostree hides experimental features and livefs is an experimental feature to apply pending deployment changes to the booted environment.

Here’s how I fixed rpm-ostree crashing on boot with the following error message:

error: Couldn't start daemon: Error setting up sysroot: Parsing deployment 0 in stateroot 'fedora': readlinkat: No such file or directory

With this command you can see the the current boot parameters and find out with deployment is booted:

sudo cat /proc/cmdline

In the BOOT_IMAGE variable you can see an ID. Now go and see the boot loader entries:

cd /boot/loader/entries
ls -la
cat ostree-1-fedora.conf
cat ostree-2-fedora.conf # you have probably some more deployments

See which of those files doesn’t have the ID from above and delete it. In this example it’s ostree-1-fedora.conf:

sudo rm ostree-1-fedora.conf

Now you can reboot and rpm-ostree should work with no problems.

Interactions & Comments