VirtualBox missing `vboxdrv.ko` after Fedora Kinoite 35 upgrade

TLDR: On Fedora Kinoite when VirtualBox is upgraded from the associated repo, it fails to start after an rpm-ostree upgrade due to missing the kernel module vboxdrv.ko that does not get installed into the next deployment. As a work-around, VirtualBox can be removed and re-installed again during the upgrade process, which installs the vboxdr.ko as well, but this requires a couple of reboots. Is there a way to install the kernel driver using only one upgrade command and next reboot?

Hi everyone! I ran into an issue while upgrading using rpm-ostree . I use VirtualBox. installed from the VirtualBox repo, to manage my virtual machines on KDE. FYI, here is the file:

# cat /etc/yum.repos.d/virtualbox.repo
[virtualbox]
name=Fedora $releasever - $basearch - VirtualBox
baseurl=http://download.virtualbox.org/virtualbox/rpm/fedora/34/$basearch
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://www.virtualbox.org/download/oracle_vbox.asc

When I upgrade and reboot, VirtualBox displays the following error. Using the error dialog further, I can see there is a kernel module missing; vboxdrv.ko .

Looks like I need to find the missing module. First I tried running the suggested command and as expected:

# /sbin/vboxconfig
rm: cannot remove '/sbin/rcvboxdrv': Read-only file system
ln: failed to create symbolic link '/sbin/rcvboxdrv': File exists
./routines.sh: line 155: /lib/systemd/system/vboxdrv.service: Read-only file system
rm: cannot remove '/sbin/rcvboxballoonctrl-service': Read-only file system
ln: failed to create symbolic link '/sbin/rcvboxballoonctrl-service': File exists
./routines.sh: line 155: /lib/systemd/system/vboxballoonctrl-service.service: Read-only file system
rm: cannot remove '/sbin/rcvboxautostart-service': Read-only file system
ln: failed to create symbolic link '/sbin/rcvboxautostart-service': File exists
./routines.sh: line 155: /lib/systemd/system/vboxautostart-service.service: Read-only file system
rm: cannot remove '/sbin/rcvboxweb-service': Read-only file system
ln: failed to create symbolic link '/sbin/rcvboxweb-service': File exists
./routines.sh: line 155: /lib/systemd/system/vboxweb-service.service: Read-only file system
ln: failed to create symbolic link '/sbin/vboxconfig': Read-only file system
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
vboxdrv.sh: failed: Look at /var/log/vbox-setup.log to find out what went wrong.

There were problems setting up VirtualBox.  To re-start the set-up process, run
/sbin/vboxconfig
as root.  If your system is using EFI Secure Boot you may need to sign the
kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load
them. Please see your Linux system's documentation for more information.

This fails since I am running Kinoite (Silverblue derivative) and the config application cannot update the associated VirtualBox files. Next the logs for the recent update.

# journalctl -t rpm-ostree

Jan 28 16:26:36 localhost rpm-ostree[97244]: client(id:cli dbus:1.1358 unit:app-org.kde.konsole-5ba09ada5e3c4669a7b2bb4bd86136ee.scope uid:0) added; new total=1
Jan 28 16:26:37 localhost rpm-ostree[97244]: Locked sysroot
Jan 28 16:26:37 localhost rpm-ostree[97244]: Initiated txn Upgrade for client(id:cli dbus:1.1358 unit:app-org.kde.konsole-5ba09ada5e3c4669a7b2bb4bd86136ee.scope uid:0): /org/projectatomic/rpmostree1/fedora
Jan 28 16:26:37 localhost rpm-ostree[97244]: Process [pid: 97233 uid: 0 unit: user@1000.service] connected to transaction progress
Jan 28 16:26:39 localhost rpm-ostree[97244]: Receiving metadata objects: 8/(estimating) 26.3 kB/s 52.6 kB
Jan 28 16:26:45 localhost rpm-ostree[97244]: libostree pull from 'fedora' for fedora/35/x86_64/kinoite complete
                                            security: GPG: commit
                                            security: SIGN: disabled http: TLS
                                            non-delta: meta: 30 content: 45
                                            transfer: secs: 8 size: 88.9 MB
Jan 28 16:27:18 localhost rpm-ostree[97244]: Librepo version: 1.14.2 with CURL_GLOBAL_ACK_EINTR support (libcurl/7.79.1 OpenSSL/1.1.1l-fips zlib/1.2.11 brotli/1.0.9 libidn2/2.3.2 libpsl/0.21.1 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib nghttp2/1.45.1 OpenLDAP/2.4.59)
... <<Downloading>>> ...
Jan 28 16:27:53 localhost rpm-ostree[97244]: Preparing pkg txn; enabled repos: ['fedora-cisco-openh264', 'updates', 'fedora', 'virtualbox', 'updates-archive'] solvables: 106670
Jan 28 16:27:54 localhost rpm-ostree[97244]: Executed %prein for VirtualBox-6.1 in 410 ms
Jan 28 16:28:04 localhost rpm-ostree[97244]: Executed %post for VirtualBox-6.1 in 10221 ms
Jan 28 16:28:04 localhost rpm-ostree[97244]: No files matched %transfiletriggerin(lib) for glibc-common
Jan 28 16:28:04 localhost rpm-ostree[97244]: No files matched %transfiletriggerin(lib64) for glibc-common
Jan 28 16:28:05 localhost rpm-ostree[97244]: Executed %transfiletriggerin(glibc-common) for lib, lib64, usr/lib, usr/lib64 in 652 ms; 34361 matched files
Jan 28 16:28:05 localhost rpm-ostree[97244]: Executed %transfiletriggerin(hicolor-icon-theme) for usr/share/icons/hicolor in 80 ms; 421 matched files
Jan 28 16:28:05 localhost rpm-ostree[97244]: Executed %transfiletriggerin(breeze-icon-theme) for usr/share/icons/breeze in 738 ms; 8669 matched files
Jan 28 16:28:06 localhost rpm-ostree[97244]: Executed %transfiletriggerin(breeze-icon-theme) for usr/share/icons/breeze-dark in 1027 ms; 8682 matched files
Jan 28 16:28:07 localhost rpm-ostree[97244]: Executed %transfiletriggerin(glib2) for usr/lib64/gio/modules in 55 ms; 5 matched files
Jan 28 16:28:07 localhost rpm-ostree[97244]: Executed %transfiletriggerin(glib2) for usr/share/glib-2.0/schemas in 63 ms; 60 matched files
Jan 28 16:28:07 localhost rpm-ostree[97244]: No files matched %transfiletriggerin(usr/local/share/fonts) for fontconfig
Jan 28 16:28:07 localhost rpm-ostree[97244]: No files matched %transfiletriggerin(usr/share/X11/fonts/TTF) for fontconfig
Jan 28 16:28:07 localhost rpm-ostree[97244]: No files matched %transfiletriggerin(usr/share/X11/fonts/Type1) for fontconfig
Jan 28 16:28:07 localhost rpm-ostree[97244]: Executed %transfiletriggerin(fontconfig) for usr/local/share/fonts, usr/share/X11/fonts/TTF, usr/share/X11/fonts/Type1, usr/share/fonts in 75 ms; 360 matched files
Jan 28 16:28:07 localhost rpm-ostree[97244]: Executed %transfiletriggerin(systemd-udev) for usr/lib/udev/hwdb.d in 25 ms; 31 matched files
Jan 28 16:28:07 localhost rpm-ostree[97244]: Executed %transfiletriggerin(systemd-udev) for usr/lib/udev/rules.d in 26 ms; 114 matched files
Jan 28 16:28:07 localhost rpm-ostree[97244]: Executed %transfiletriggerin(shared-mime-info) for usr/share/mime in 32 ms; 1011 matched files
Jan 28 16:28:07 localhost rpm-ostree[97244]: Executed %transfiletriggerin(gdk-pixbuf2) for usr/lib64/gdk-pixbuf-2.0/2.10.0/loaders in 102 ms; 13 matched files
Jan 28 16:28:07 localhost rpm-ostree[97244]: Executed %transfiletriggerin(desktop-file-utils) for usr/share/applications in 39 ms; 94 matched files
Jan 28 16:28:07 localhost rpm-ostree[97244]: Executed %transfiletriggerin(appstream) for usr/share/app-info/xmls in 57 ms; 8 matched files
Jan 28 16:28:07 localhost rpm-ostree[97244]: Executed %transfiletriggerin(adwaita-icon-theme) for usr/share/icons/Adwaita in 217 ms; 6044 matched files
Jan 28 16:28:07 localhost rpm-ostree[97244]: Executed %transfiletriggerin(gtk3) for usr/lib64/gtk-3.0/3.0.0/immodules in 86 ms; 1 matched files
Jan 28 16:28:08 localhost rpm-ostree[97244]: Executed %transfiletriggerin(ibus) for usr/share/ibus/component in 616 ms; 10 matched files
Jan 28 16:28:08 localhost rpm-ostree[97244]: sanitycheck(/usr/bin/true) successful
Jan 28 16:28:09 localhost rpm-ostree[97244]: Regenerating rpmdb for target
Jan 28 16:28:31 localhost rpm-ostree[97244]: Wrote commit: 1749779945868d6c14c15aa92551ddea305d0292a03f48519d0655330c96c46d; New objects: meta:17 content:4 totaling 67.3 MB)
Jan 28 16:28:34 localhost rpm-ostree[97244]: note: Deploying commit 1749779945868d6c14c15aa92551ddea305d0292a03f48519d0655330c96c46d which contains content in /var/lib that will be ignored.
Jan 28 16:28:36 localhost rpm-ostree[97244]: Created new deployment /ostree/deploy/fedora/deploy/1749779945868d6c14c15aa92551ddea305d0292a03f48519d0655330c96c46d.0
Jan 28 16:28:43 localhost rpm-ostree[97244]: Initiating reboot requested from transaction
Jan 28 16:28:43 localhost rpm-ostree[97244]: Txn Upgrade on /org/projectatomic/rpmostree1/fedora successful
Jan 28 16:28:47 localhost rpm-ostree[97244]: Unlocked sysroot
Jan 28 16:28:47 localhost rpm-ostree[97244]: Process [pid: 97233 uid: 0 unit: (unknown)] disconnected from transaction progress
Jan 28 16:28:47 localhost rpm-ostree[97244]: client(id:cli dbus:1.1358 unit:app-org.kde.konsole-5ba09ada5e3c4669a7b2bb4bd86136ee.scope uid:0) vanished; remaining=0
Jan 28 16:28:47 localhost rpm-ostree[97244]: In idle state; will auto-exit in 61 seconds

No explicit concerns there (at least IMHO).

My next idea was to remove and then install VirtualBox. I reckon that by doing so the necessary files would be installed. Therefore I removed VirtualBox.

# rpm-ostree uninstall VirtualBox-6.1

Checking out tree 84c95b0... done
Resolving dependencies... done
Applying 1 override and 14 overlays
Processing packages... done
Running pre scripts... done
Running post scripts... done
Running posttrans scripts... done
Writing rpmdb... done
Writing OSTree commit... done
Staging deployment... done
Freed: 67.4 MB (pkgcache branches: 0)
Removed:
SDL2-2.0.20-1.fc35.x86_64
VirtualBox-6.1-6.1.32_149290_fedora33-1.x86_64
libdecor-0.1.0-1.fc35.x86_64
sdl12-compat-0.0.1~git.20211125.4e4527a-1.fc35.x86_64
Changes queued for next boot. Run "systemctl reboot" to start a reboot

I reviewed the journal again to see any glaring errors.

# journalctl -t rpm-ostree

Jan 28 16:38:06 localhost rpm-ostree[8262]: Reading config file '/etc/rpm-ostreed.conf'
Jan 28 16:38:07 localhost rpm-ostree[8262]: Deleting outdated cached update for OS 'fedora'
Jan 28 16:38:07 localhost rpm-ostree[8262]: In idle state; will auto-exit in 62 seconds
Jan 28 16:38:07 localhost rpm-ostree[8262]: client(id:cli dbus:1.91 unit:app-org.kde.konsole-da3da487fe09496e941ae86dfdaaa405.scope uid:0) added; new total=1
Jan 28 16:38:07 localhost rpm-ostree[8262]: Locked sysroot
Jan 28 16:38:07 localhost rpm-ostree[8262]: Initiated txn PkgChange for client(id:cli dbus:1.91 unit:app-org.kde.konsole-da3da487fe09496e941ae86dfdaaa405.scope uid:0): /org/projectatomic/rpmostree1/fedora
Jan 28 16:38:07 localhost rpm-ostree[8262]: Process [pid: 8251 uid: 0 unit: user@1000.service] connected to transaction progress
Jan 28 16:38:07 localhost rpm-ostree[8262]: Librepo version: 1.14.2 with CURL_GLOBAL_ACK_EINTR support (libcurl/7.79.1 OpenSSL/1.1.1l-fips zlib/1.2.11 brotli/1.0.9 libidn2/2.3.2 libpsl/0.21.1 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib nghttp2/1.45.1 OpenLDAP/2.4.59)
Jan 28 16:38:40 localhost rpm-ostree[8262]: Preparing pkg txn; enabled repos: [] solvables: 0
Jan 28 16:38:41 localhost rpm-ostree[8262]: No files matched %transfiletriggerin(lib) for glibc-common
Jan 28 16:38:41 localhost rpm-ostree[8262]: No files matched %transfiletriggerin(lib64) for glibc-common
Jan 28 16:38:41 localhost rpm-ostree[8262]: Executed %transfiletriggerin(glibc-common) for lib, lib64, usr/lib, usr/lib64 in 581 ms; 34192 matched files
Jan 28 16:38:41 localhost rpm-ostree[8262]: Executed %transfiletriggerin(hicolor-icon-theme) for usr/share/icons/hicolor in 76 ms; 333 matched files
Jan 28 16:38:42 localhost rpm-ostree[8262]: Executed %transfiletriggerin(breeze-icon-theme) for usr/share/icons/breeze in 659 ms; 8669 matched files
Jan 28 16:38:43 localhost rpm-ostree[8262]: Executed %transfiletriggerin(breeze-icon-theme) for usr/share/icons/breeze-dark in 592 ms; 8682 matched files
Jan 28 16:38:43 localhost rpm-ostree[8262]: Executed %transfiletriggerin(glib2) for usr/lib64/gio/modules in 43 ms; 5 matched files
Jan 28 16:38:43 localhost rpm-ostree[8262]: Executed %transfiletriggerin(glib2) for usr/share/glib-2.0/schemas in 52 ms; 60 matched files
Jan 28 16:38:43 localhost rpm-ostree[8262]: No files matched %transfiletriggerin(usr/local/share/fonts) for fontconfig
Jan 28 16:38:43 localhost rpm-ostree[8262]: No files matched %transfiletriggerin(usr/share/X11/fonts/TTF) for fontconfig
Jan 28 16:38:43 localhost rpm-ostree[8262]: No files matched %transfiletriggerin(usr/share/X11/fonts/Type1) for fontconfig
Jan 28 16:38:43 localhost rpm-ostree[8262]: Executed %transfiletriggerin(fontconfig) for usr/local/share/fonts, usr/share/X11/fonts/TTF, usr/share/X11/fonts/Type1, usr/share/fonts in 76 ms; 360 matched files
Jan 28 16:38:43 localhost rpm-ostree[8262]: Executed %transfiletriggerin(systemd-udev) for usr/lib/udev/hwdb.d in 21 ms; 31 matched files
Jan 28 16:38:43 localhost rpm-ostree[8262]: Executed %transfiletriggerin(systemd-udev) for usr/lib/udev/rules.d in 21 ms; 114 matched files
Jan 28 16:38:43 localhost rpm-ostree[8262]: Executed %transfiletriggerin(shared-mime-info) for usr/share/mime in 37 ms; 1002 matched files
Jan 28 16:38:43 localhost rpm-ostree[8262]: Executed %transfiletriggerin(gdk-pixbuf2) for usr/lib64/gdk-pixbuf-2.0/2.10.0/loaders in 70 ms; 13 matched files
Jan 28 16:38:43 localhost rpm-ostree[8262]: Executed %transfiletriggerin(desktop-file-utils) for usr/share/applications in 34 ms; 93 matched files
Jan 28 16:38:43 localhost rpm-ostree[8262]: Executed %transfiletriggerin(appstream) for usr/share/app-info/xmls in 44 ms; 8 matched files
Jan 28 16:38:43 localhost rpm-ostree[8262]: Executed %transfiletriggerin(adwaita-icon-theme) for usr/share/icons/Adwaita in 235 ms; 6044 matched files
Jan 28 16:38:43 localhost rpm-ostree[8262]: Executed %transfiletriggerin(gtk3) for usr/lib64/gtk-3.0/3.0.0/immodules in 79 ms; 1 matched files
Jan 28 16:38:44 localhost rpm-ostree[8262]: Executed %transfiletriggerin(ibus) for usr/share/ibus/component in 619 ms; 10 matched files
Jan 28 16:38:44 localhost rpm-ostree[8262]: sanitycheck(/usr/bin/true) successful
Jan 28 16:38:44 localhost rpm-ostree[8262]: Regenerating rpmdb for target
Jan 28 16:39:08 localhost rpm-ostree[8262]: Wrote commit: 0b9df8049957d3d3a5f881a63fc49e947bd58d0643b2d12651d0fa291a4b8792; New objects: meta:12 content:3 totaling 67.0 MB)
Jan 28 16:39:12 localhost rpm-ostree[8262]: note: Deploying commit 0b9df8049957d3d3a5f881a63fc49e947bd58d0643b2d12651d0fa291a4b8792 which contains content in /var/lib that will be ignored.
Jan 28 16:39:12 localhost rpm-ostree[8262]: Created new deployment /ostree/deploy/fedora/deploy/0b9df8049957d3d3a5f881a63fc49e947bd58d0643b2d12651d0fa291a4b8792.0
Jan 28 16:39:17 localhost rpm-ostree[8262]: Txn PkgChange on /org/projectatomic/rpmostree1/fedora successful
Jan 28 16:39:19 localhost rpm-ostree[8262]: Unlocked sysroot
Jan 28 16:39:19 localhost rpm-ostree[8262]: Process [pid: 8251 uid: 0 unit: user@1000.service] disconnected from transaction progress
Jan 28 16:39:21 localhost rpm-ostree[8262]: client(id:cli dbus:1.91 unit:app-org.kde.konsole-da3da487fe09496e941ae86dfdaaa405.scope uid:0) vanished; remaining=0
Jan 28 16:39:21 localhost rpm-ostree[8262]: In idle state; will auto-exit in 60 seconds
Jan 28 16:40:21 localhost rpm-ostree[8262]: In idle state; will auto-exit in 60 seconds

And then rebooted. Once completed, I re-installed VirtualBox.

# rpm-ostree install VirtualBox-6.1

Checking out tree 84c95b0... done
Enabled rpm-md repositories: fedora-cisco-openh264 updates fedora virtualbox updates-archive
Importing rpm-md... done
rpm-md repo 'fedora-cisco-openh264' (cached); generated: 2021-09-21T18:07:30Z solvables: 4
rpm-md repo 'updates' (cached); generated: 2022-01-28T01:04:30Z solvables: 18274
rpm-md repo 'fedora' (cached); generated: 2021-10-26T05:31:27Z solvables: 65732
rpm-md repo 'virtualbox' (cached); generated: 2022-01-18T15:53:56Z solvables: 7
rpm-md repo 'updates-archive' (cached); generated: 2022-01-28T01:54:01Z solvables: 22653
Resolving dependencies... done
Applying 1 override and 18 overlays
Processing packages... done
Running pre scripts... done
Running post scripts... done
Running posttrans scripts... done
Writing rpmdb... done
Writing OSTree commit... done
Staging deployment... done
Freed: 204.5 MB (pkgcache branches: 0)
Added:
SDL2-2.0.20-1.fc35.x86_64
VirtualBox-6.1-6.1.32_149290_fedora33-1.x86_64
libdecor-0.1.0-1.fc35.x86_64
sdl12-compat-0.0.1~git.20211125.4e4527a-1.fc35.x86_64
Changes queued for next boot. Run "systemctl reboot" to start a reboot

At this time I also took the time to check out the location of the vboxdrv.ko file. Notice that the only the previous and future deployments have the files.

# find / -name *vboxdrv*

/sysroot/ostree/deploy/fedora/deploy/1749779945868d6c14c15aa92551ddea305d0292a03f48519d0655330c96c46d.0/usr/lib/systemd/system/vboxdrv.service
/sysroot/ostree/deploy/fedora/deploy/1749779945868d6c14c15aa92551ddea305d0292a03f48519d0655330c96c46d.0/usr/lib/virtualbox/vboxdrv.sh
/sysroot/ostree/deploy/fedora/deploy/1749779945868d6c14c15aa92551ddea305d0292a03f48519d0655330c96c46d.0/usr/sbin/rcvboxdrv
/sysroot/ostree/deploy/fedora/deploy/1749779945868d6c14c15aa92551ddea305d0292a03f48519d0655330c96c46d.0/usr/share/virtualbox/src/vboxhost/vboxdrv
/sysroot/ostree/deploy/fedora/deploy/1749779945868d6c14c15aa92551ddea305d0292a03f48519d0655330c96c46d.0/etc/systemd/system/multi-user.target.wants/vboxdrv.service
/sysroot/ostree/deploy/fedora/deploy/1749779945868d6c14c15aa92551ddea305d0292a03f48519d0655330c96c46d.0/etc/udev/rules.d/60-vboxdrv.rules
/sysroot/ostree/deploy/fedora/deploy/9cd10da22c46f1ddf1d22ddabb4af956854cd7cfb09da1d58044884c246ab057.0/usr/etc/udev/rules.d/60-vboxdrv.rules
/sysroot/ostree/deploy/fedora/deploy/9cd10da22c46f1ddf1d22ddabb4af956854cd7cfb09da1d58044884c246ab057.0/usr/lib/modules/5.15.16-200.fc35.x86_64/misc/vboxdrv.ko
/sysroot/ostree/deploy/fedora/deploy/9cd10da22c46f1ddf1d22ddabb4af956854cd7cfb09da1d58044884c246ab057.0/usr/lib/systemd/system/vboxdrv.service
/sysroot/ostree/deploy/fedora/deploy/9cd10da22c46f1ddf1d22ddabb4af956854cd7cfb09da1d58044884c246ab057.0/usr/lib/virtualbox/vboxdrv.sh
/sysroot/ostree/deploy/fedora/deploy/9cd10da22c46f1ddf1d22ddabb4af956854cd7cfb09da1d58044884c246ab057.0/usr/sbin/rcvboxdrv
/sysroot/ostree/deploy/fedora/deploy/9cd10da22c46f1ddf1d22ddabb4af956854cd7cfb09da1d58044884c246ab057.0/usr/share/virtualbox/src/vboxhost/vboxdrv
/sysroot/ostree/deploy/fedora/deploy/9cd10da22c46f1ddf1d22ddabb4af956854cd7cfb09da1d58044884c246ab057.0/etc/udev/rules.d/60-vboxdrv.rules
/etc/systemd/system/multi-user.target.wants/vboxdrv.service
/etc/udev/rules.d/60-vboxdrv.rules

To confirm which deployment is which:

# rpm-ostree status

State: idle
Deployments:
fedora:fedora/35/x86_64/kinoite
                Version: 35.20220128.0 (2022-01-28T00:51:29Z)
                BaseCommit: 84c95b01b9c57d3fc27849d15b388cc599f82fba84e2fa9d9f6d2b50f27b0ea6
            GPGSignature: Valid signature by 787EA6AE1147EEE56C40B30CDB4639719867C58F
                    Diff: 4 added
    RemovedBasePackages: firefox 96.0-1.fc35
        LayeredPackages: kde-connect ksshaskpass podman-compose skanlite VirtualBox-6.1

â—Ź fedora:fedora/35/x86_64/kinoite
                Version: 35.20220128.0 (2022-01-28T00:51:29Z)
                BaseCommit: 84c95b01b9c57d3fc27849d15b388cc599f82fba84e2fa9d9f6d2b50f27b0ea6
            GPGSignature: Valid signature by 787EA6AE1147EEE56C40B30CDB4639719867C58F
    RemovedBasePackages: firefox 96.0-1.fc35
        LayeredPackages: kde-connect ksshaskpass podman-compose skanlite

fedora:fedora/35/x86_64/kinoite
                Version: 35.20220128.0 (2022-01-28T00:51:29Z)
                BaseCommit: 84c95b01b9c57d3fc27849d15b388cc599f82fba84e2fa9d9f6d2b50f27b0ea6
            GPGSignature: Valid signature by 787EA6AE1147EEE56C40B30CDB4639719867C58F
    RemovedBasePackages: firefox 96.0-1.fc35
        LayeredPackages: kde-connect ksshaskpass podman-compose skanlite VirtualBox-6.1

… and the deployment directories, where three exist (i.e., previous, current and future) and only the previous and future deployments (confirmed by the timestamp) have VirtualBox installed, and only the future deployment has the necessary kernel module vboxdrv.ko . Note the previous deployment was upgraded with VirtualBox already installed, leading to the missing kernel module…

# ll /sysroot/ostree/deploy/fedora/deploy/

total 12
drwxr-xr-x. 1 root root 158 Jan 28 16:39 0b9df8049957d3d3a5f881a63fc49e947bd58d0643b2d12651d0fa291a4b8792.0
-rw-r--r--. 1 root root 153 Jan 28 16:43 0b9df8049957d3d3a5f881a63fc49e947bd58d0643b2d12651d0fa291a4b8792.0.origin
drwxr-xr-x. 1 root root 158 Jan 28 16:28 1749779945868d6c14c15aa92551ddea305d0292a03f48519d0655330c96c46d.0
-rw-r--r--. 1 root root 168 Jan 28 16:28 1749779945868d6c14c15aa92551ddea305d0292a03f48519d0655330c96c46d.0.origin
drwxr-xr-x. 1 root root 158 Jan 28 16:47 9cd10da22c46f1ddf1d22ddabb4af956854cd7cfb09da1d58044884c246ab057.0
-rw-r--r--. 1 root root 168 Jan 28 16:47 9cd10da22c46f1ddf1d22ddabb4af956854cd7cfb09da1d58044884c246ab057.0.origin

Check out the logs one last time.

# journalctl -t rpm-ostree

Jan 28 16:45:39 localhost rpm-ostree[2326]: Reading config file '/etc/rpm-ostreed.conf'
Jan 28 16:45:40 localhost rpm-ostree[2326]: In idle state; will auto-exit in 63 seconds
Jan 28 16:45:40 localhost rpm-ostree[2326]: client(id:cli dbus:1.86 unit:app-org.kde.konsole-a06c63683d0547e5923f5855e1ac454a.scope uid:0) added; new total=1
Jan 28 16:45:41 localhost rpm-ostree[2326]: Locked sysroot
Jan 28 16:45:41 localhost rpm-ostree[2326]: Initiated txn PkgChange for client(id:cli dbus:1.86 unit:app-org.kde.konsole-a06c63683d0547e5923f5855e1ac454a.scope uid:0): /org/projectatomic/rpmostree1/fedora
Jan 28 16:45:41 localhost rpm-ostree[2326]: Process [pid: 2315 uid: 0 unit: user@1000.service] connected to transaction progress
Jan 28 16:45:41 localhost rpm-ostree[2326]: Librepo version: 1.14.2 with CURL_GLOBAL_ACK_EINTR support (libcurl/7.79.1 OpenSSL/1.1.1l-fips zlib/1.2.11 brotli/1.0.9 libidn2/2.3.2 libpsl/0.21.1 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib nghttp2/1.45.1 OpenLDAP/2.4.59)
Jan 28 16:46:15 localhost rpm-ostree[2326]: Preparing pkg txn; enabled repos: ['fedora-cisco-openh264', 'updates', 'fedora', 'virtualbox', 'updates-archive'] solvables: 106670
Jan 28 16:46:16 localhost rpm-ostree[2326]: Executed %prein for VirtualBox-6.1 in 408 ms
Jan 28 16:47:07 localhost rpm-ostree[2326]: Executed %post for VirtualBox-6.1 in 50426 ms
Jan 28 16:47:07 localhost rpm-ostree[2326]: No files matched %transfiletriggerin(lib) for glibc-common
Jan 28 16:47:07 localhost rpm-ostree[2326]: No files matched %transfiletriggerin(lib64) for glibc-common
Jan 28 16:47:07 localhost rpm-ostree[2326]: Executed %transfiletriggerin(glibc-common) for lib, lib64, usr/lib, usr/lib64 in 376 ms; 34364 matched files
Jan 28 16:47:07 localhost rpm-ostree[2326]: Executed %transfiletriggerin(hicolor-icon-theme) for usr/share/icons/hicolor in 84 ms; 421 matched files
Jan 28 16:47:08 localhost rpm-ostree[2326]: Executed %transfiletriggerin(breeze-icon-theme) for usr/share/icons/breeze in 700 ms; 8669 matched files
Jan 28 16:47:09 localhost rpm-ostree[2326]: Executed %transfiletriggerin(breeze-icon-theme) for usr/share/icons/breeze-dark in 744 ms; 8682 matched files
Jan 28 16:47:09 localhost rpm-ostree[2326]: Executed %transfiletriggerin(glib2) for usr/lib64/gio/modules in 46 ms; 5 matched files
Jan 28 16:47:09 localhost rpm-ostree[2326]: Executed %transfiletriggerin(glib2) for usr/share/glib-2.0/schemas in 56 ms; 60 matched files
Jan 28 16:47:09 localhost rpm-ostree[2326]: No files matched %transfiletriggerin(usr/local/share/fonts) for fontconfig
Jan 28 16:47:09 localhost rpm-ostree[2326]: No files matched %transfiletriggerin(usr/share/X11/fonts/TTF) for fontconfig
Jan 28 16:47:09 localhost rpm-ostree[2326]: No files matched %transfiletriggerin(usr/share/X11/fonts/Type1) for fontconfig
Jan 28 16:47:09 localhost rpm-ostree[2326]: Executed %transfiletriggerin(fontconfig) for usr/local/share/fonts, usr/share/X11/fonts/TTF, usr/share/X11/fonts/Type1, usr/share/fonts in 79 ms; 360 matched files
Jan 28 16:47:09 localhost rpm-ostree[2326]: Executed %transfiletriggerin(systemd-udev) for usr/lib/udev/hwdb.d in 23 ms; 31 matched files
Jan 28 16:47:09 localhost rpm-ostree[2326]: Executed %transfiletriggerin(systemd-udev) for usr/lib/udev/rules.d in 24 ms; 114 matched files
Jan 28 16:47:09 localhost rpm-ostree[2326]: Executed %transfiletriggerin(shared-mime-info) for usr/share/mime in 29 ms; 1011 matched files
Jan 28 16:47:09 localhost rpm-ostree[2326]: Executed %transfiletriggerin(gdk-pixbuf2) for usr/lib64/gdk-pixbuf-2.0/2.10.0/loaders in 81 ms; 13 matched files
Jan 28 16:47:09 localhost rpm-ostree[2326]: Executed %transfiletriggerin(desktop-file-utils) for usr/share/applications in 35 ms; 94 matched files
Jan 28 16:47:09 localhost rpm-ostree[2326]: Executed %transfiletriggerin(appstream) for usr/share/app-info/xmls in 46 ms; 8 matched files
Jan 28 16:47:09 localhost rpm-ostree[2326]: Executed %transfiletriggerin(adwaita-icon-theme) for usr/share/icons/Adwaita in 187 ms; 6044 matched files
Jan 28 16:47:09 localhost rpm-ostree[2326]: Executed %transfiletriggerin(gtk3) for usr/lib64/gtk-3.0/3.0.0/immodules in 81 ms; 1 matched files
Jan 28 16:47:10 localhost rpm-ostree[2326]: Executed %transfiletriggerin(ibus) for usr/share/ibus/component in 672 ms; 10 matched files
Jan 28 16:47:10 localhost rpm-ostree[2326]: sanitycheck(/usr/bin/true) successful
Jan 28 16:47:11 localhost rpm-ostree[2326]: Regenerating rpmdb for target
Jan 28 16:47:32 localhost rpm-ostree[2326]: Wrote commit: 9cd10da22c46f1ddf1d22ddabb4af956854cd7cfb09da1d58044884c246ab057; New objects: meta:12 content:3 totaling 67.3 MB)
Jan 28 16:47:37 localhost rpm-ostree[2326]: note: Deploying commit 9cd10da22c46f1ddf1d22ddabb4af956854cd7cfb09da1d58044884c246ab057 which contains content in /var/lib that will be ignored.
Jan 28 16:47:38 localhost rpm-ostree[2326]: Created new deployment /ostree/deploy/fedora/deploy/9cd10da22c46f1ddf1d22ddabb4af956854cd7cfb09da1d58044884c246ab057.0
Jan 28 16:47:46 localhost rpm-ostree[2326]: Txn PkgChange on /org/projectatomic/rpmostree1/fedora successful
Jan 28 16:47:49 localhost rpm-ostree[2326]: Unlocked sysroot
Jan 28 16:47:49 localhost rpm-ostree[2326]: Process [pid: 2315 uid: 0 unit: user@1000.service] disconnected from transaction progress
Jan 28 16:47:51 localhost rpm-ostree[2326]: client(id:cli dbus:1.86 unit:app-org.kde.konsole-a06c63683d0547e5923f5855e1ac454a.scope uid:0) vanished; remaining=0
Jan 28 16:47:51 localhost rpm-ostree[2326]: In idle state; will auto-exit in 63 seconds
Jan 28 16:51:15 localhost rpm-ostree[9459]: Reading config file '/etc/rpm-ostreed.conf'
Jan 28 16:51:16 localhost rpm-ostree[9459]: In idle state; will auto-exit in 60 seconds
Jan 28 16:51:16 localhost rpm-ostree[9459]: client(id:cli dbus:1.94 unit:app-org.kde.konsole-a06c63683d0547e5923f5855e1ac454a.scope uid:0) added; new total=1
Jan 28 16:51:17 localhost rpm-ostree[9459]: client(id:cli dbus:1.94 unit:app-org.kde.konsole-a06c63683d0547e5923f5855e1ac454a.scope uid:0) vanished; remaining=0
Jan 28 16:51:17 localhost rpm-ostree[9459]: In idle state; will auto-exit in 64 seconds

Next reboot

# systemctl reboot

… and I can now use VirtualBox!

I did come up with a workaround and that is to uninstall VirtualBox prior to upgrading, rebooting and then reinstalling. It gets me down to three commands and two reboots.

sudo rpm-ostree uninstall VirtualBox-6.1
sudo rpm-ostree upgrade --reboot
sudo rpm-ostree install VirtualBox-6.1 --reboot

Although this works, I would rather be able to run rpm-ostree upgrade and reboot once with everything working.

My question is how do I ensure that the necessary kernel modules are installed when upgrading?

1 Like

The short answer is that only akmods based kernel modules are supported right now. Maybe you can try converting the current package to make an akmod one but I don’t know how much work this is.

2 Likes

Hi @siosm, just to clarify are you saying that only akmods-based kernel modules are used/migrated(?) in successive deployments during an rpm-ostree upgrade? And other kernel modules are not migrated into successive deployments?

The vboxdrv.ko is successfully installed (and removed and re-installed), it just does not get installed in successive deployments when only upgrade is used. I was hoping that there might be some configuration change I could make to ensure that previously installed kernel modules are migrated to successive deployments without re-installation.

If not… :man_shrugging:

Support was added for akmods-based kernel modules to make sure that they are built during the rpm-ostree update transaction and against the correct kernel.

I don’t know how the VirtualBox modules are compiled but from you description, it looks like they are built against the currently running kernel and not the future one, thus the need to re-install when you’ve rebooted.

To work around that, you can use the experimental feature from rpm-ostree to live-apply your changes and reload the driver:

$ rpm-ostree update # Initial update that brings a new kernel
$ reboot
$ rpm-ostree uninstall virtualbox
$ rpm-ostree install --live virtualbox
$ systemctl restart ... # or modprobe vboxdrv

Is there a step-by-step guide / convenience script for building variety of (non-akmods) kernel modules in a container, to install them in Kinoite/Silverblue?

If not, maybe one could be made based on this:

Thanks for the guidance @siosm!

1 Like