$rpm-ostree upgrade
[Removed Stuff]
Resolving dependencies… done
Checking out packages… done
Running pre scripts… done
error: Running %prein for unbound-libs: bwrap(/bin/sh): Child process killed by signal 6; run journalctl -t ‘rpm-ostree(unbound-libs.prein)’` for more information or some similar error.
This problem occurs every once in a while and will fix by a reboot, or sometimes more than one reboot. Retrying to upgrade in the same boot will not help.
And of course, here’s the result of journalctl:
$journalctl -t ‘rpm-ostree(unbound-libs.prein)’
Jun 06 00:49:17 fedora rpm-ostree(unbound-libs.prein)[36047]: groupadd: /etc/group.4: lock file already used
Jun 06 00:49:17 fedora rpm-ostree(unbound-libs.prein)[36047]: groupadd: cannot lock /etc/group; try again later.
Jun 06 00:49:17 fedora rpm-ostree(unbound-libs.prein)[36052]: useradd: group ‘unbound’ does not exist
I had this problem since the beginning of using Silverblue (some 3-4 month I guess), and it didn’t go away with rebasing to F36.
Let me know if you need other details. And thank you all in advance!
I’ve seen this happen before. There’s an overlay for /etc/passwd and /etc/group, so the actual files are pretty empty, and if something goes wrong with the overlay computation, the rpm scripts break. To work around that, I’ve added the user/groups to /etc/passwd and /etc/group directly.
This should workaround it for you, as root (sudo -i first):
echo 'unbound:x:995:992:Unbound DNS resolver:/etc/unbound:/sbin/nologin' >> /etc/passwd
echo 'unbound:x:992:' >> /etc/group
Regarding overlays, I currently have: NetworkManager-l2tp NetworkManager-l2tp-gnome xl2tpd. It’s probable that the boots I was unable to upgrade from, were the ones in which some service was using these packages.
This morning on January 9th, 2023 I tried to do a rpm-ostree upgrade.
I got a bunch of these that surfaced to do with unbound/unbound-anchor.
Dec 01 09:09:02 carouselYOW rpm-ostree(unbound-anchor.prein)[3726]: groupadd.rpmostreesave: lock /etc/group.lock already used by PID 4
Dec 01 09:09:02 carouselYOW rpm-ostree(unbound-anchor.prein)[3726]: groupadd.rpmostreesave: cannot lock /etc/group; try again later.
Dec 01 09:09:02 carouselYOW rpm-ostree(unbound-anchor.prein)[3728]: useradd.rpmostreesave: group 'unbound' does not exist
I applied your solution and it worked well. Thank you. Please note “unbound” lines were not in /etc/passwd nor in /etc/group beforehand.