Can't change deployments order, help!

Can’t find a way to make needed deployment as default, i.e with index 0.
Should I manually edit boot entry files for this, or some utility exists?
Found bootctl but it doesn’t work for Silverblue because SB doesn’t honor Boot Spec and doesn’t keep it’s boot entry configs on ESP partition.

Also asked here but still no answer: can't change boot order · Issue #2234 · ostreedev/ostree · GitHub
Please help!

You should be able to press any key at boot to get the grub menu then select the commit to use there. If you want a good tutorial on Silverblue by the person who created project atomic try here https://miabbott.github.io/2019/01/22/silverblue-day-1.html

Thanks for a quick answer @jakfrost!
I know I can select needed deployment in bootloader menu, but I need solution to do it at runtime for a reasons. One of that is I have Bluetooth keyboard which is non-functional at boot time early.
I looked the link but it seems do not have info on the topic.

There is an rpm-ostree rollback command.

It is explained here: rpm-ostree: Hybrid image/package system for host operating system updates | rpm-ostree Commands | Man Pages | ManKier

It can change the boot order, but only to boot previous deployment, nothing else.

I don’t know about any other merhod to reorder boot entries.

You use sudo ostree admin deploy <commit> to set the default commit. See ostree admin deploy --help or go here https://ostreedev.github.io/ostree/introduction/ to look at it in greater detail.

sudo ostree admin deploy ...
Tried it, it creates new deployment without my layered packages. Not what I need.

1 Like

For now, I managed to boot other deployment just by changing boot entry files manually.
Not sure if other solution exists…
Thanks to all anyway!

You’re supposed to tell it a specific deploy you want to be default, it can already exist on your system. Besides layering your packages again is no big deal.

Nah, layering my packages is a big deal by itself. And I don’t want new deployment (it will be created even if I set existing commit).

Not a solution but related:

Can you explain why you want to do this?

I have several pinned deployments with different SB versions.
I want to switch between them by a will, changing default deployments easily.

Earlier I found a hacky way to change the order in bootloader .config file, changing some symbolic links or something like that, I forgot already.

Now I need proper documented way of doing it, after all these years passed.

To my knowledge, that doesn’t exist. Being able to boot an older deployment is useful in an emergency or for testing, but you’re not meant to use such a deployment long-term. Instead, you should make a new deployment by rebasing, etc. This has the advantage that it incorporates recent changes in /etc.

That could be a big problem if you don’t have an alternative keyboard available. How would you escape an unbootable deployment?

It would be nice if you could use systemctl reboot --boot-loader-entry=. Is that only compatible with systemd-boot?

That’s just silly if I’m not meant. Of course, one should be able to do that.
Here is one of the many similar requests:

Of course I have an alternative keyboard for emergency cases, but as you can imagine, I don’t keep it on hands.
For an unbootable deployments fallback mechanism exists.

$ systemctl reboot --dry-run --boot-loader-entry b55dcfd2dabe4fa480e5a25d9fad5577-5.5.10-200.fc31.x86_64.conf 
Cannot set boot into loader entry 'b55dcfd2dabe4fa480e5a25d9fad5577-5.5.10-200.fc31.x86_64.conf': Loader does not support boot into boot loader entry.

I’m not saying this isn’t a missing feature. I was just clarifying that it isn’t a typical use case for rpm-ostree, and that’s probably why no one has implemented it.

What is that? AFAIK, if a deployment fails to boot correctly, your only recourse is to select another one from from the bootloader menu.

Not at all:
Boot counting

That’s interesting, but is that actually implemented for Fedora Silverblue? It doesn’t seem like it.

It does, in both bootloader/systemd.
I’m not sure if it’s enabled by default, but I recall I tested and it worked several years ago.

Of course it honours the BLS, but it is manipulated via Libostree instead of bootctl or grub2, since it is an atomic variant. So any modification of the boot order are to be done using ostree, something like sudo ostree admin set-default <deploy index>. You can see your desired deployment index by using sudo ostree admin status to get a listing of all your booting deployments.

3 Likes

Thanks, that did the trick!

Correction: sudo is not needed for ostree admin status.

I didn’t find the equivalent for “boot once” or systemctl reboot --boot-loader-entry= functionality, but it’s not critical.

PS:
unfortunately, I seems can’t change the solution post set once here…