I have installed nVidia drivers following the rpmfusion manual. I’m currently playing with config files in /etc/udev/rules.d
The issue is that sometimes, I break the system (e.g not bootable anymore) because I changed a file in /etc and rebooted.
So instead of booting on ostree:0. I switch to ostree:1. From there, I use rpm-ostree rollback. The issue is that I lost all the modifications (packages, stuff in /etc) I’ve done so far (normal as it’s a rollback!).
However what I need is only modifying the offending config file in /etc to make ostree:0 boot again. So the question is:
Given that I booted on ostree:1, can I modify the content of /etc in ostree:0 to go back in a stable state?
Before I change a file in /etc/udev/rules.d, I make a backup suffixed with _ORG. That way I can quickly roll back any change that causes problems after booting a LiveCD, deleting the bad file and renaming the backup by removing the _ORG suffix.
Although this info does not address your current challenge it may prevent similar ones in the future.
A workaround would be to take your stable deployment, pin it, then perform a minimal change on that deployment, e.g.:
layer a small package with rpm-ostree install
or
append a non-impacting kernel argument with rpm-ostree kargs --append.
Either of these actions would create a new deployment similar to the existing one, which you could then tweak to your liking.
The same procedure could be applied to perform modifications incrementally.
sysroot is mounted read-only, so the files from non-booted deployments stored under /sysroot/ostree/deploy/fedora/deploy/ cannot be altered, and that’s a good think.
You can look for the copy of /etc for the other deployment in /sysroot/ostree/deploy/fedora/deploy/<long hash>.0/etc (get the hashes from rpm-ostree status). If you want to edit it there, you can remount /sysroot read-write (sudo mount -o remout,rw /sysroot) and do the edits there directly.
Additionally, if you cannot boot the installed system, you can always boot from a LiveCD, regardless of whether the installation on the disk is in package mode or image mode, i.e. Fedora Workstation or Silverblue.