Downgrading Fedora Silverblue to a specific commit
I reboot my Fedora Silverblue workstation every other week, and today my machine decided to freeze on login.
It's no big deal, the beauty of Silverblue is that I can always reboot into the previous deployment if anything goes wrong, but to be an excellent Linux citizen, I'd like to know which of the two dozen packages that have been upgraded since my working two-week old setup and the latest deployment is the culprit.
First, you want to download the commit log for the past few revisions, as it is aggressively pruned every time you reboot your system.
sudo ostree pull fedora:fedora/37/x86_64/silverblue --commit-metadata-only --depth=10 you will download the log for the last 10 commits, starting from the latest published one.
You can now display the full commit log with
ostree log fedora:fedora/37/x86_64/silverblue. This is the output as of today:
commit d38c1174ed1c573d6e992fa5cc9e974b4ec47427f65d5f44bbbecaf5f654c588 Parent: 3c09045143aae2be1a41687535aa9a3c6e9fdacbb7b43552f27b377cc1cb0d06 ContentChecksum: fd7616a4047522e0bbe590cddeef81dceffb3b7009a0c8bde4ec19c87692e5b8 Date: 2023-01-07 00:43:10 +0000 Version: 37.20230107.0 (no subject) commit 3c09045143aae2be1a41687535aa9a3c6e9fdacbb7b43552f27b377cc1cb0d06 Parent: 49e55cc521944c822b406850756d0ea71a04204547347af2c0895eea6ad1764a ContentChecksum: ca8883f5b6ccaf4bc5a7433ef06e6fe92a2dfddef86fec298bccefd045fc6975 Date: 2023-01-06 01:18:04 +0000 Version: 37.20230106.0 (no subject) commit 49e55cc521944c822b406850756d0ea71a04204547347af2c0895eea6ad1764a Parent: 0d4e5f32eb1fd149baf39db0dfb0fba3ff3f63053c1d7a75f26124ea6855ee21 ContentChecksum: d392f4a3b3c3969651a6dcb835ee82d565fbf6f746377e8198c0c4d8d1a83ecf Date: 2023-01-05 00:41:12 +0000 Version: 37.20230105.0 (no subject) [truncated for brevity]
Deploying one of these commits now is as easy as doing
rpm-ostree deploy COMMIT_ID. Suppose I want to roll back to version 37.20230105.0:
rpm-ostree deploy 49e55cc521944c822b406850756d0ea71a04204547347af2c0895eea6ad1764a
Your existing deployments will be preserved, and you will now have a new entry for this commit in your GRUB screen ready to boot into.
Every time you run
rpm-ostree deploy you get a nice summary of the packages that have been changed since your current deployment, so manually upgrading to each subsequent commit should be enough to figure out what package caused your regression. You can also use the command
rpm-ostree db diff FROM_COMMIT TO_COMMIT to get an exhaustive list of changed packages between two commits.