Unable to update dom0 - package database error

I’m trying to update dom0 using the gui but getting the following error. I’m on 4.2.3. What’s going on? I don’t have a /home/xxxx/.rpmdb directory. (Note: xxxx is the user but removed for security purposes).

Checking for available updates for dom0…
Using sys-firewall as UpdateVM for Dom0
Checking for dom0 updates…
error: cannot open Packages database in /home/xxxx/.rpmdb
Error: Error: rpmdb open failed
error: cannot open Packages database in /home/xxxx/.rpmdb
Error: Error: rpmdb open failed
error: cannot open Packages database in
Available updates:
Fedora 37 - x86_64 11 kB/s | 6.0 kB 00:00
Fedora 37 - x86_64 - Updates 28 kB/s | 5.9 kB 00:00
Qubes Host Repository (updates) 6.5 kB/s | 2.7 kB 00:00

qubes-core-dom0.noarch 4.2.37-1.fc37 qubes-dom0-current
qubes-core-dom0.src 4.2.37-1.fc37 qubes-dom0-current
qubes-core-qrexec.x86_64 4.2.23-1.fc37 qubes-dom0-current
qubes-core-qrexec-dom0.x86_64 4.2.23-1.fc37 qubes-dom0-current
qubes-core-qrexec-libs.x86_64 4.2.23-1.fc37 qubes-dom0-current
There are dom0 updates available
Using sys-firewall as UpdateVM for Dom0
Downloading updates. This may take a while…
error: cannot open Packages database in /home/xxxx/.rpmdb
Error: Error: rpmdb open failed
error: cannot open Packages database in /home/xxxx/.rpmdb
Error: Error: rpmdb open failed
error: cannot open Packages database in
error: cannot open Packages database in /home/xxxx/.rpmdb
Error: Error: rpmdb open failed
Fedora 37 - x86_64 30 kB/s | 6.0 kB 00:00
Fedora 37 - x86_64 - Updates 27 kB/s | 5.9 kB 00:00
Qubes Host Repository (updates) 7.2 kB/s | 2.7 kB 00:00
Dependencies resolved.

Package Arch Version Repository Size

Upgrading:
qubes-core-dom0 noarch 4.2.37-1.fc37 qubes-dom0-current 1.0 M
qubes-core-qrexec x86_64 4.2.23-1.fc37 qubes-dom0-current 280 k
qubes-core-qrexec-dom0 x86_64 4.2.23-1.fc37 qubes-dom0-current 46 k
qubes-core-qrexec-libs x86_64 4.2.23-1.fc37 qubes-dom0-current 34 k

Transaction Summary

Upgrade 4 Packages

Total size: 1.4 M
Downloading Packages:
[SKIPPED] qubes-core-dom0-4.2.37-1.fc37.noarch.rpm: Already downloaded
[SKIPPED] qubes-core-qrexec-4.2.23-1.fc37.x86_64.rpm: Already downloaded
[SKIPPED] qubes-core-qrexec-dom0-4.2.23-1.fc37.x86_64.rpm: Already downloaded
[SKIPPED] qubes-core-qrexec-libs-4.2.23-1.fc37.x86_64.rpm: Already downloaded
Running transaction check
Transaction check succeeded.
Running transaction test
RPM: error: Unable to change root directory: Operation not permitted
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing ‘dnf clean packages’.
Error: Transaction test error:
Errors occurred during test transaction.

No, you wouldn’t have that file, but root should, because technically root is the one doing the upgrading, which is why it sounds like the commands possibly aren’t being run as root…


  • Are you getting any errors such as “permission denied” anywhere else?

  • If you run sudo qubes-dom0-update in a dom0 terminal, do you get the same errors?

Yes I do get a permission denied error. The user I’m.logged in us the root user. Its the only user I have currently.

This was working before. I’m using the same process too. Something happened to break it but don’t know what. I also did a sudo su and tried the update via the CLI and it failed also.

I get the following error when I execute the following in dom0 after sudo su - and running the command ERROR ] Command qubesctl --show-output state.sls update-qubes-dom0

ERROR ] Command ‘systemd-run’ failed with return code: 1
[ERROR ] stdout:
[ERROR ] stderr: Running scope as unit: run-r9f76fab7d975435abeb3d738c54cc2b6.scope
Using sys-firewall as UpdateVM for Dom0
Downloading updates. This may take a while…
error: cannot open Packages database in /home/user/.rpmdb
Error: Error: rpmdb open failed
error: cannot open Packages database in /home/user/.rpmdb
Error: Error: rpmdb open failed
error: cannot open Packages database in
error: cannot open Packages database in /home/user/.rpmdb
Error: Error: rpmdb open failed
RPM: error: Unable to change root directory: Operation not permitted
Error: Transaction test error:
Errors occurred during test transaction.
[ERROR ] retcode: 1
[ERROR ] Problem encountered upgrading packages. Additional info follows:

result:
----------
pid:
8938
retcode:
1
stderr:
Running scope as unit: run-r9f76fab7d975435abeb3d738c54cc2b6.scope
Using sys-firewall as UpdateVM for Dom0
Downloading updates. This may take a while…
error: cannot open Packages database in /home/user/.rpmdb
Error: Error: rpmdb open failed
error: cannot open Packages database in /home/user/.rpmdb
Error: Error: rpmdb open failed
error: cannot open Packages database in
error: cannot open Packages database in /home/user/.rpmdb
Error: Error: rpmdb open failed
RPM: error: Unable to change root directory: Operation not permitted
Error: Transaction test error:
Errors occurred during test transaction.
stdout:
local:

      ID: /etc/yum.repos.d/qubes-dom0.repo
Function: file.replace
  Result: True
 Comment: No changes needed to be made
 Started: 23:12:22.931225
Duration: 8.677 ms
 Changes:   

      ID: /etc/yum.repos.d/qubes-templates.repo
Function: file.replace
  Result: True
 Comment: No changes needed to be made
 Started: 23:12:22.940012
Duration: 1.872 ms
 Changes:   

      ID: update
Function: cmd.script
  Result: True
 Comment: Cache cleaned
 Started: 23:12:22.942542
Duration: 5758.419 ms
 Changes:   

      ID: update
Function: pkg.uptodate
  Result: False
 Comment: Problem encountered upgrading packages. Additional info follows:
          
          result:
              ----------
              pid:
                  8938
              retcode:
                  1
              stderr:
                  Running scope as unit: run-r9f76fab7d975435abeb3d738c54cc2b6.scope
                  Using sys-firewall as UpdateVM for Dom0
                  Downloading updates. This may take a while...
                  error: cannot open Packages database in /home/user/.rpmdb
                  Error: Error: rpmdb open failed
                  error: cannot open Packages database in /home/user/.rpmdb
                  Error: Error: rpmdb open failed
                  error: cannot open Packages database in 
                  error: cannot open Packages database in /home/user/.rpmdb
                  Error: Error: rpmdb open failed
                  RPM: error: Unable to change root directory: Operation not permitted
                  Error: Transaction test error:
                    Errors occurred during test transaction.
              stdout:
 Started: 23:12:29.790237
Duration: 75571.263 ms
 Changes:   

Summary for local

Succeeded: 3
Failed: 1

Total states run: 4
Total run time: 81.340 s
DOM0 configuration failed, not continuing

Am I right in understanding that you DELETED your regular user, and are logging into everything as root?

Sorry I what I mean to say is that other than root I have one other user.

That said, I was able to update dom0 yesterday however I had to change from sys-firewall to sys-whonix and then the update went through. I don’t understand why it why sys-firewall was failing and what all those errors meant. Something just isn’t right. I’m now on version 4.2.4r2