"OSTree Finalize Staged Deployment" not finished due to os-prober

Quite often I cannot overlay packages using rpm-ostree. After the reboot I run:

$ rpm-ostree status
State: idle
Warning: failed to finalize previous deployment
         ostree-finalize-staged.service: Failed with result 'timeout'.
         check `journalctl -b -1 -u ostree-finalize-staged.service`

And indeed it did not finish - during the reboot it hung on the “OSTree Finalize Staged Deployment” service until it reached the timeout.
Inspecting the journal, I understand the os-prober scans all the partitions and more importantly all the btrfs subvolumes - this takes too long on my system and therefore breaks.

this is the end of journalctl -b -1 -u ostree-finalize-staged.service :

Oct 03 23:46:39 root[15229]: os-prober: debug: btrfs volume uuid=UUID partition=/dev/sdc
Oct 03 23:46:39 root[15229]: os-prober: debug: running /usr/libexec/os-probes/50mounted-tests on btrfs /dev/sdc
Oct 03 23:46:39 root[15229]: 50mounted-tests: debug: begin btrfs processing for UUID
Oct 03 23:51:01 root[15229]: 50mounted-tests: debug: btrfs volume UUID mounted
Oct 03 23:51:33 systemd[1]: ostree-finalize-staged.service: Stopping timed out. Terminating.
Oct 03 23:51:33 systemd[1]: ostree-finalize-staged.service: Control process exited, code=killed, status=15/TERM
Oct 03 23:52:01 systemd[1]: ostree-finalize-staged.service: Failed with result 'timeout'.
Oct 03 23:52:01 systemd[1]: Stopped OSTree Finalize Staged Deployment.
  • Please how can I blacklist partitions so that os-prober would not mount and scan them?

  • And out of curiosity: If I disabled the os-prober (how would I do that please?) would it keep the entries for other OSs which it had already created in the past, or are these entries always recreated anew from scratch?

There seems to be GRUB_OS_PROBER_SKIP_LIST for this.

Also, yes, every time the grub config is regenerated all devices are probed from scratch. However, you could maybe check out installing rEFInd and using that to boot into GRUB or another OS, that way grub’s os-prober could be disabled.

FWIW for Fedora CoreOS, we currently don’t enable os-prober at all. Eventually I’d like to get Fedora Silverblue deriving from Fedora CoreOS which would fix this there too.

Also xref Silverblue 31: `finalize-staged` taking over 15 minutes to complete · Issue #1924 · ostreedev/ostree · GitHub