2011-04-11 06:28:12 -04:00
|
|
|
---
|
2021-03-13 13:06:18 -05:00
|
|
|
lang: en
|
2015-04-10 16:17:45 -04:00
|
|
|
layout: doc
|
2021-06-17 07:23:57 -04:00
|
|
|
permalink: /doc/how-to-install-software-in-dom0/
|
2015-10-11 03:04:59 -04:00
|
|
|
redirect_from:
|
2021-06-17 07:23:57 -04:00
|
|
|
- /doc/software-update-dom0/
|
2015-10-28 18:14:40 -04:00
|
|
|
- /en/doc/software-update-dom0/
|
2015-10-11 03:04:59 -04:00
|
|
|
- /doc/SoftwareUpdateDom0/
|
|
|
|
- /wiki/SoftwareUpdateDom0/
|
2021-03-13 13:06:18 -05:00
|
|
|
ref: 194
|
2021-06-17 07:23:57 -04:00
|
|
|
title: How to Install Software in Dom0
|
2011-04-11 06:28:12 -04:00
|
|
|
---
|
|
|
|
|
2021-06-20 00:01:26 -04:00
|
|
|
**Warning:** Installing software in dom0 is for advanced users only. Doing so
|
|
|
|
has the potential to compromise your entire Qubes OS installation. Exercise
|
|
|
|
extreme caution.
|
2011-04-11 06:28:12 -04:00
|
|
|
|
2019-08-26 20:44:13 -04:00
|
|
|
## Security
|
2011-04-11 06:28:12 -04:00
|
|
|
|
2021-06-20 00:01:26 -04:00
|
|
|
Since there is no networking in dom0, any bugs discovered in dom0 desktop
|
|
|
|
components (e.g., the window manager) are unlikely to pose a problem for Qubes,
|
|
|
|
since none of the third-party software running in dom0 is accessible from VMs
|
|
|
|
or the network in any way. Nonetheless, since software running in dom0 can
|
|
|
|
potentially exercise full control over the system, it is important to install
|
|
|
|
only trusted software in dom0.
|
|
|
|
|
|
|
|
The install/update process is split into two phases: *resolve and download* and
|
|
|
|
*verify and install*. The *resolve and download* phase is handled by the
|
|
|
|
UpdateVM. (The role of UpdateVM can be assigned to any VM in the Qube Manager,
|
|
|
|
and there are no significant security implications in this choice. By default,
|
|
|
|
this role is assigned to the FirewallVM.) After the UpdateVM has successfully
|
|
|
|
downloaded new packages, they are sent to dom0, where they are verified and
|
|
|
|
installed. This separation of duties significantly reduces the attack surface,
|
|
|
|
since all of the network and metadata processing code is removed from the TCB.
|
|
|
|
|
|
|
|
Although this update scheme is far more secure than directly downloading
|
|
|
|
updates in dom0, it is not invulnerable. For example, there is nothing that the
|
|
|
|
Qubes OS Project can feasibly do to prevent a malicious RPM from exploiting a
|
|
|
|
hypothetical bug in the cryptographic signature verification operation. At
|
|
|
|
best, we could switch to a different distro or package manager, but any of them
|
|
|
|
could be vulnerable to the same (or a similar) attack. While we could, in
|
|
|
|
theory, write a custom solution, it would only be effective if Qubes repos
|
|
|
|
included all of the regular template distro's updates, and this would be far
|
|
|
|
too costly for us to maintain.
|
2014-08-18 06:50:50 -04:00
|
|
|
|
2019-08-26 20:44:13 -04:00
|
|
|
## How to update dom0
|
2011-09-16 09:11:49 -04:00
|
|
|
|
2021-06-21 00:54:36 -04:00
|
|
|
See [How to Update](/doc/how-to-update/).
|
2013-12-30 20:48:06 -05:00
|
|
|
|
2019-08-26 20:44:13 -04:00
|
|
|
## How to install a specific package
|
2018-10-08 20:28:48 -04:00
|
|
|
|
|
|
|
To install additional packages in dom0 (usually not recommended):
|
2011-09-16 09:11:49 -04:00
|
|
|
|
2021-03-13 12:03:23 -05:00
|
|
|
```
|
|
|
|
$ sudo qubes-dom0-update anti-evil-maid
|
|
|
|
```
|
2011-09-16 09:11:49 -04:00
|
|
|
|
2021-06-20 00:01:26 -04:00
|
|
|
You may also pass the `--enablerepo=` option in order to enable optional
|
|
|
|
repositories (see yum configuration in dom0). However, this is only for
|
|
|
|
advanced users who really understand what they are doing. You can also pass
|
|
|
|
commands to `dnf` using `--action=...`.
|
2011-09-13 12:55:23 -04:00
|
|
|
|
2019-08-26 20:44:13 -04:00
|
|
|
## How to downgrade a specific package
|
2012-05-29 20:12:33 -04:00
|
|
|
|
2021-06-20 00:01:26 -04:00
|
|
|
**WARNING:** Downgrading a package can expose your system to security
|
|
|
|
vulnerabilities.
|
2018-04-01 16:09:21 -04:00
|
|
|
|
2021-03-13 12:03:23 -05:00
|
|
|
1. Download an older version of the package:
|
2012-05-29 20:12:33 -04:00
|
|
|
|
2015-09-26 19:00:33 -04:00
|
|
|
~~~
|
2012-05-29 20:12:33 -04:00
|
|
|
sudo qubes-dom0-update package-version
|
2015-09-26 19:00:33 -04:00
|
|
|
~~~
|
2012-05-29 20:12:33 -04:00
|
|
|
|
2021-06-20 00:01:26 -04:00
|
|
|
Dnf will say that there is no update, but the package will nonetheless be
|
|
|
|
downloaded to dom0.
|
2012-05-29 20:12:33 -04:00
|
|
|
|
2021-03-13 12:03:23 -05:00
|
|
|
2. Downgrade the package:
|
2012-05-29 20:12:33 -04:00
|
|
|
|
2015-09-26 19:00:33 -04:00
|
|
|
~~~
|
2018-01-26 06:55:26 -05:00
|
|
|
sudo dnf downgrade package-version
|
2015-09-26 19:00:33 -04:00
|
|
|
~~~
|
2012-05-29 20:12:33 -04:00
|
|
|
|
2019-08-26 20:44:13 -04:00
|
|
|
## How to re-install a package
|
2016-06-03 08:13:51 -04:00
|
|
|
|
|
|
|
You can re-install in a similar fashion to downgrading.
|
|
|
|
|
2021-03-13 12:03:23 -05:00
|
|
|
1. Download the package:
|
2016-06-03 08:13:51 -04:00
|
|
|
|
|
|
|
~~~
|
|
|
|
sudo qubes-dom0-update package
|
|
|
|
~~~
|
|
|
|
|
2021-06-20 00:01:26 -04:00
|
|
|
Dnf will say that there is no update, but the package will nonetheless be
|
|
|
|
downloaded to dom0.
|
2016-06-03 08:13:51 -04:00
|
|
|
|
2021-03-13 12:03:23 -05:00
|
|
|
2. Re-install the package:
|
2016-06-03 08:13:51 -04:00
|
|
|
|
|
|
|
~~~
|
2018-01-26 06:55:26 -05:00
|
|
|
sudo dnf reinstall package
|
2016-06-03 08:13:51 -04:00
|
|
|
~~~
|
|
|
|
|
2021-06-20 00:01:26 -04:00
|
|
|
Note that `dnf` will only re-install if the installed and downloaded
|
|
|
|
versions match. You can ensure they match by either updating the package to
|
|
|
|
the latest version, or specifying the package version in the first step
|
|
|
|
using the form `package-version`.
|
2016-06-03 08:13:51 -04:00
|
|
|
|
2019-08-26 20:44:13 -04:00
|
|
|
## How to uninstall a package
|
2016-02-14 14:50:31 -05:00
|
|
|
|
2021-06-20 00:01:26 -04:00
|
|
|
If you've installed a package such as anti-evil-maid, you can remove it with
|
|
|
|
the following command:
|
2016-02-14 14:50:31 -05:00
|
|
|
|
2021-03-13 12:03:23 -05:00
|
|
|
```
|
|
|
|
sudo dnf remove anti-evil-maid
|
|
|
|
```
|
|
|
|
|
2019-08-26 20:44:13 -04:00
|
|
|
## Testing repositories
|
2016-06-12 14:31:52 -04:00
|
|
|
|
2021-04-10 18:09:05 -04:00
|
|
|
There are three Qubes dom0 [testing](/doc/testing/) repositories:
|
2016-06-12 14:31:52 -04:00
|
|
|
|
2021-06-20 00:01:26 -04:00
|
|
|
- `qubes-dom0-current-testing` -- testing packages that will eventually land in
|
|
|
|
the stable (`current`) repository
|
|
|
|
- `qubes-dom0-security-testing` -- a subset of `qubes-dom0-current-testing`
|
|
|
|
that contains packages that qualify as security fixes
|
|
|
|
- `qubes-dom0-unstable` -- packages that are not intended to land in the stable
|
|
|
|
(`qubes-dom0-current`) repository; mostly experimental debugging packages
|
2016-06-12 14:31:52 -04:00
|
|
|
|
2021-06-20 00:01:26 -04:00
|
|
|
To temporarily enable any of these repos, use the `--enablerepo=<repo-name>`
|
|
|
|
option. Example commands:
|
2016-06-12 14:31:52 -04:00
|
|
|
|
|
|
|
~~~
|
|
|
|
sudo qubes-dom0-update --enablerepo=qubes-dom0-current-testing
|
|
|
|
sudo qubes-dom0-update --enablerepo=qubes-dom0-security-testing
|
|
|
|
sudo qubes-dom0-update --enablerepo=qubes-dom0-unstable
|
|
|
|
~~~
|
|
|
|
|
2021-06-20 00:01:26 -04:00
|
|
|
To enable or disable any of these repos permanently, change the corresponding
|
|
|
|
`enabled` value to `1` in `/etc/yum.repos.d/qubes-dom0.repo`.
|
2016-06-12 14:31:52 -04:00
|
|
|
|
2020-10-19 14:39:51 -04:00
|
|
|
## Contributed package repository
|
|
|
|
|
2021-06-20 00:01:26 -04:00
|
|
|
Please see [installing contributed
|
|
|
|
packages](/doc/installing-contributed-packages/).
|
2020-10-19 14:39:51 -04:00
|
|
|
|
2019-08-26 20:44:13 -04:00
|
|
|
## Kernel upgrade
|
|
|
|
|
|
|
|
This section describes upgrading the kernel in dom0 and domUs.
|
|
|
|
|
|
|
|
### dom0
|
|
|
|
|
|
|
|
The packages `kernel` and `kernel-latest` are for dom0.
|
|
|
|
|
|
|
|
In the `current` repository:
|
2021-03-13 12:03:23 -05:00
|
|
|
|
2021-06-20 00:01:26 -04:00
|
|
|
- `kernel`: an older LTS kernel that has passed Qubes [testing](/doc/testing/)
|
|
|
|
(the default dom0 kernel)
|
|
|
|
- `kernel-latest`: the latest release from kernel.org that has passed Qubes
|
|
|
|
[testing](/doc/testing/) (useful for [troubleshooting newer
|
|
|
|
hardware](/doc/newer-hardware-troubleshooting/))
|
2019-08-26 20:44:13 -04:00
|
|
|
|
|
|
|
In the `current-testing` repository:
|
2021-03-13 12:03:23 -05:00
|
|
|
|
|
|
|
- `kernel`: the latest LTS kernel from kernel.org at the time it was built.
|
|
|
|
- `kernel-latest`: the latest release from kernel.org at the time it was built.
|
2019-08-26 20:44:13 -04:00
|
|
|
|
|
|
|
### domU
|
|
|
|
|
2021-06-20 00:01:26 -04:00
|
|
|
The packages `kernel-qubes-vm` and `kernel-latest-qubes-vm` are for domUs. See
|
|
|
|
[Managing VM kernel](/doc/managing-vm-kernels/) for more information.
|
2019-08-26 20:44:13 -04:00
|
|
|
|
|
|
|
### Example
|
2011-04-11 06:28:12 -04:00
|
|
|
|
2019-08-18 13:45:27 -04:00
|
|
|
(Note that the following example enables the unstable repo.)
|
2015-06-29 09:57:16 -04:00
|
|
|
|
2016-01-04 17:31:32 -05:00
|
|
|
~~~
|
2017-04-07 18:28:48 -04:00
|
|
|
sudo qubes-dom0-update --enablerepo=qubes-dom0-unstable kernel kernel-qubes-vm
|
2016-01-04 17:31:32 -05:00
|
|
|
~~~
|
2015-06-29 09:57:16 -04:00
|
|
|
|
2021-06-20 00:01:26 -04:00
|
|
|
If the update process does not automatically do it (you should see it mentioned
|
|
|
|
in the CLI output from the update command), you may need to manually rebuild
|
|
|
|
the EFI or grub config depending on which your system uses.
|
|
|
|
|
|
|
|
#### EFI
|
2015-06-29 09:57:16 -04:00
|
|
|
|
2021-06-20 00:01:26 -04:00
|
|
|
Replace the example version numbers with the one you are upgrading to.
|
2021-03-13 12:03:23 -05:00
|
|
|
|
2018-01-26 06:55:26 -05:00
|
|
|
~~~
|
2018-07-25 02:31:19 -04:00
|
|
|
sudo dracut -f /boot/efi/EFI/qubes/initramfs-4.14.35-1.pvops.qubes.x86_64.img 4.14.35-1.pvops.qubes.x86_64
|
2018-01-26 06:55:26 -05:00
|
|
|
~~~
|
2015-06-29 09:57:16 -04:00
|
|
|
|
2021-06-20 00:01:26 -04:00
|
|
|
#### Grub2
|
2021-03-13 12:03:23 -05:00
|
|
|
|
2016-01-04 17:31:32 -05:00
|
|
|
~~~
|
|
|
|
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
|
|
|
|
~~~
|
2015-06-29 09:57:16 -04:00
|
|
|
|
|
|
|
Reboot required.
|
2016-01-03 11:25:36 -05:00
|
|
|
|
2016-08-04 22:24:33 -04:00
|
|
|
If you wish to upgrade to a kernel that is not available from the repos, then
|
|
|
|
there is no easy way to do so, but [it may still be possible if you're willing
|
|
|
|
to do a lot of work yourself](https://groups.google.com/d/msg/qubes-users/m8sWoyV58_E/HYdReRIYBAAJ).
|
|
|
|
|
2019-09-14 07:25:27 -04:00
|
|
|
## Changing default kernel
|
|
|
|
|
2021-06-20 00:01:26 -04:00
|
|
|
This section describes changing the default kernel in dom0. It is sometimes
|
|
|
|
needed if you have upgraded to a newer kernel and are having problems booting,
|
|
|
|
for example. The procedure varies depending on if you are booting with UEFI or
|
|
|
|
grub. On the next kernel update, the default will revert to the newest.
|
2019-09-14 07:25:27 -04:00
|
|
|
|
2021-06-20 00:01:26 -04:00
|
|
|
### EFI
|
2021-03-13 12:03:23 -05:00
|
|
|
|
2019-09-14 07:25:27 -04:00
|
|
|
~~~
|
|
|
|
sudo nano /boot/efi/EFI/qubes/xen.cfg
|
|
|
|
~~~
|
2021-03-13 12:03:23 -05:00
|
|
|
|
2021-06-20 00:01:26 -04:00
|
|
|
In the `[global]` section at the top, change the `default=` line to match one
|
|
|
|
of the three boot entries listed below. For example:
|
2021-03-13 12:03:23 -05:00
|
|
|
|
2019-09-14 07:25:27 -04:00
|
|
|
~~~
|
|
|
|
default=4.19.67-1.pvops.qubes.x86_64
|
|
|
|
~~~
|
|
|
|
|
2021-06-20 00:01:26 -04:00
|
|
|
### Grub2
|
2021-03-13 12:03:23 -05:00
|
|
|
|
2019-09-14 07:25:27 -04:00
|
|
|
~~~
|
|
|
|
sudo nano /etc/default/grub
|
|
|
|
[update the following two lines, add if needed]
|
|
|
|
GRUB_DISABLE_SUBMENU=false
|
|
|
|
GRUB_SAVEDEFAULT=true
|
|
|
|
[save and exit nano]
|
|
|
|
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
|
|
|
|
~~~
|
2021-03-13 12:03:23 -05:00
|
|
|
|
2021-06-20 00:01:26 -04:00
|
|
|
Then, reboot. Once the grub menu appears, choose "Advanced Options for Qubes
|
|
|
|
(with Xen hypervisor)". Next, the top menu item (for example, "Xen hypervisor,
|
|
|
|
version 4.8.5-9.fc25"). Select the kernel you want as default, and it will be
|
|
|
|
remembered for next boot.
|
2019-09-14 07:25:27 -04:00
|
|
|
|
2021-03-13 12:03:23 -05:00
|
|
|
## Updating over Tor
|
2016-01-03 11:25:36 -05:00
|
|
|
|
|
|
|
Requires installed [Whonix](/doc/privacy/whonix/).
|
|
|
|
|
2021-06-20 00:01:26 -04:00
|
|
|
Go to Qubes VM Manager -> System -> Global Settings. See the UpdateVM setting.
|
|
|
|
Choose your desired Whonix-Gateway ProxyVM from the list. For example:
|
|
|
|
sys-whonix.
|
2016-01-03 11:25:36 -05:00
|
|
|
|
2021-06-20 00:01:26 -04:00
|
|
|
```
|
2021-03-13 12:03:23 -05:00
|
|
|
Qubes VM Manager -> System -> Global Settings -> UpdateVM -> sys-whonix
|
2021-06-20 00:01:26 -04:00
|
|
|
```
|
2019-08-26 20:44:13 -04:00
|
|
|
|