How can I pin a version? Latest update is unstable

Hello,

After the latest update, my laptop has frozen twice within a couple of hours, and I had to force-power-off by holding the power button pressed. I used the grub menu to boot into the previous version. How can I “pin” this stable “40.20240518.0” configuration so that it does not get “erased”? I’m worried that if another update arrives, it will remove the olders and keep just the unstable “40.20240522.0” and whatever the new update is…

❯ rpm-ostree status
State: idle
AutomaticUpdates: stage; rpm-ostreed-automatic.timer: no runs since boot
Deployments:
  ostree-image-signed:docker://ghcr.io/ublue-os/bluefin-dx-nvidia:latest
                   Digest: sha256:c06d2bbdc9ec056e319eb65e41a5aa7ee82f78573fc01861ba4f7f06e3305b7e
                  Version: 40.20240522.0 (2024-05-22T17:18:52Z)
                     Diff: 34 upgraded, 1 removed, 7 added
          LayeredPackages: adcli oddjob-mkhomedir sssd-ad sssd-krb5 touchegg v4l-utils

● ostree-image-signed:docker://ghcr.io/ublue-os/bluefin-dx-nvidia:latest
                   Digest: sha256:ca2e8767e525d12af07e06c302274d4e328c832a0798487b403fe3c6d19dcae7
                  Version: 40.20240518.0 (2024-05-19T16:56:29Z)
          LayeredPackages: adcli lm_sensors oddjob-mkhomedir samba-common-tools sssd-ad sssd-krb5
                           touchegg v4l-utils
2 Likes

ostree admin pin 1

Change 1 to the number of the image you want to pin starting at 0

ostree admin pin 1 —unpin

Will unpin it later if you want.

2 Likes

Thank you @ebits21 - I have not dared reboot (just sleep/resume) but this seems to me like it means the 40.20240518.0 version is clearly pinned:

❯ rpm-ostree status
State: idle
AutomaticUpdates: stage; rpm-ostreed-automatic.timer: last run 21h ago
Deployments:
  ostree-image-signed:docker://ghcr.io/ublue-os/bluefin-dx-nvidia:latest
                   Digest: sha256:196e5f6c0c50e70c0631008ba261789b31aa37a1e4a8e15cb109771102202395
                  Version: 40.20240522.0 (2024-05-22T19:33:02Z)
            SecAdvisories: 2 moderate
                     Diff: 34 upgraded, 1 removed, 7 added
          LayeredPackages: adcli lm_sensors oddjob-mkhomedir samba-common-tools sssd-ad sssd-krb5 touchegg v4l-utils

  ostree-image-signed:docker://ghcr.io/ublue-os/bluefin-dx-nvidia:latest
                   Digest: sha256:c06d2bbdc9ec056e319eb65e41a5aa7ee82f78573fc01861ba4f7f06e3305b7e
                  Version: 40.20240522.0 (2024-05-22T17:18:52Z)
          LayeredPackages: adcli oddjob-mkhomedir sssd-ad sssd-krb5 touchegg v4l-utils

● ostree-image-signed:docker://ghcr.io/ublue-os/bluefin-dx-nvidia:latest
                   Digest: sha256:ca2e8767e525d12af07e06c302274d4e328c832a0798487b403fe3c6d19dcae7
                  Version: 40.20240518.0 (2024-05-19T16:56:29Z)
          LayeredPackages: adcli lm_sensors oddjob-mkhomedir samba-common-tools sssd-ad sssd-krb5 touchegg v4l-utils
                   Pinned: yes

There’s already a newer update, but I now think that the process is:

  • install new update as a 3rd oprtion
  • remove the oldest option after a successful boot

I was worried that when 40.20240522.0 arrives, it would overwrite 40.20240518.0 (i.e. there are “two slots”, the active (booted) and inactive, update overwrites inactive. Clearly this is not the case.

Yeah pinned images (40.20240518.0) will stay pinned until you unpin them. You can pin as many images as you want.

Eventually you’ll have two newer unpinned images and then all the images you’ve pinned will follow.

I usually keep a couple pinned, and definitely pin images before a big update (like a new major release).

This is very good advice. I’m now on the latest 40.20240523.0 image which so far works, but I’ve kept the 40.20240518.0 just in case. I’ll make sure to always keep a “known to work well” on my laptop image pinned just in case.

I have a further question. Ever since I pinned a version, it seems like I’m getting increasingly more images. Currently there are four (of which one is pinned):

❯ rpm-ostree status
State: idle
AutomaticUpdates: stage; rpm-ostreed-automatic.timer: last run 13h ago
Deployments:
  ostree-image-signed:docker://ghcr.io/ublue-os/bluefin-dx-nvidia:latest
                   Digest: sha256:f2c103c98857d9fa60086995dc40badae30bd1c6f13dc08c252331f844ffea59
                  Version: 40.20240523.0 (2024-05-24T16:52:58Z)
          LayeredPackages: adcli lm_sensors oddjob-mkhomedir samba-common-tools sssd-ad sssd-krb5 touchegg v4l-utils

● ostree-image-signed:docker://ghcr.io/ublue-os/bluefin-dx-nvidia:latest
                   Digest: sha256:f2c103c98857d9fa60086995dc40badae30bd1c6f13dc08c252331f844ffea59
                  Version: 40.20240523.0 (2024-05-24T16:52:58Z)
          LayeredPackages: adcli oddjob-mkhomedir sssd-ad sssd-krb5 touchegg v4l-utils

  ostree-image-signed:docker://ghcr.io/ublue-os/bluefin-dx-nvidia:latest
                   Digest: sha256:c170f6cb19764a198953777e2d51d12746593e0ba6b5f21b6c1542ff2f296a96
                  Version: 40.20240523.0 (2024-05-23T16:52:55Z)
          LayeredPackages: adcli lm_sensors oddjob-mkhomedir samba-common-tools sssd-ad sssd-krb5 touchegg v4l-utils

  ostree-image-signed:docker://ghcr.io/ublue-os/bluefin-dx-nvidia:latest
                   Digest: sha256:ca2e8767e525d12af07e06c302274d4e328c832a0798487b403fe3c6d19dcae7
                  Version: 40.20240518.0 (2024-05-19T16:56:29Z)
          LayeredPackages: adcli lm_sensors oddjob-mkhomedir samba-common-tools sssd-ad sssd-krb5 touchegg v4l-utils
                   Pinned: yes

The image with the 6.8.10 kernel is stable again, so I am no longer using the pinned 40.20240518.0 version. I just want to keep it around as per your advice (a just in case thing).

I guess my question is: why has this list grown to 4 items? Does the pin work like “keep everything starting from hereon”? I just want to pin that one image and then receive updates as per usual (I think there’s typically just 2 images: the “current” and the “update”).

Thanks again!

From your status:

  • The first image is an update to be applied on reboot.
  • The second image is your currently booted image.
  • The third image is the 1 previous image you always have to rollback to.
  • The fourth image is the one you pinned.

Most of the time, there’s 3 - previous, current and update. Your status shows these 3 + the pinned.

Once you reboot, you’ll have 3:

  • The first one from your status (was update before reboot) will become current
  • the second one from your status (was current before the reboot) becomes the previous to rollback to
  • the third one from your status (was previous before the reboot) will be deleted
  • the fourth one from your status will be the pinned one.

Then after the system updates, you’ll have 4 (all of the above + the first one will be update)

Hopefully it’s understandable

3 Likes

Oh I see, that makes sense. Thanks for clarifying.

The top update is staged but isn’t loaded yet. Reset your computer and it’ll boot into that image and the third one will disappear.

The update is downloaded in the background. So just shutoff your computer when you’re done and it’ll always stay up to date.

I just tried to pin a prior image in Aurora with

rpm-ostree admin pin 1

and

rpm-ostree pin 1

Both admin and pin come up as invalid commands.

I’m currently in a pickle since the most recent version cause Plasma to crash.

The right command is sudo ostree admin pin [index]

1 Like

Newbie here…
Is there documentation explaining pinning?
Will the pinned image always be booted or is it just saved?
In case of multiple pinned images how can I specify which one to boot?

It is just saved (prevents deletion as new versions arrive). It will stay forever until you unpin it (or manually delete).

When starting your system, press a key to enter the GRUB boot menu. All versions show up there and you can pick one.

Also I see a set-default command. Have not tried it but:

Usage:
  ostree admin [OPTION…] --print-current-dir|COMMAND

Commands for managing a host system booted with ostree

Builtin "admin" Commands:
...
  set-default        Make deployment INDEX the default

So it seems you can set a pinned version as default if you want. Not sure if this “sticks” for when new versions arrive…

The system will always attempt to boot image 0 (the newest version) by default unless you select a different image in grub.

If you always want the grub menu to show during boot, that setting can be done using

ujust configure-grub

you’d just arrow to the always show and hit enter.

1 Like

Thanks akarypid
May I ask one more. Right now I am booted with:
Image version: 41.20241117.3 (2024-11-17 15:51:27 UTC)
Does that xx.3 mean this is the third image released on 20241117?
Assuming so, it means someone has already fixed xx.1 that gave me problems coming out of sleep. Three versions in one day - impressive!

Thanks for telling me how to set a default. I wrote it down but given I reboot maybe once a week I don’t need it right now.

Thanks again - Jerry

Thanks Harold. Something else I learned today. Jerry

1 Like

There is documentation in the Bazzite files but it applies to all Ublue images.

Devoras - most helpful :grinning: Thank you. Jerry

1 Like