mirror of
https://github.com/QubesOS/qubes-doc.git
synced 2024-12-28 00:39:30 -05:00
all wiki trac {% highlight trac-wiki %}{% endhighlight %} replaced with the ``` used for markdown code
This commit is contained in:
parent
4ea778ccbc
commit
1c8b80339c
@ -18,9 +18,9 @@ Installing
|
||||
|
||||
In Dom0 install anti-evil-maid:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo qubes-dom0-update anti-evil-maid
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
More information regarding configuration in the [README](https://github.com/QubesOS/qubes-antievilmaid/blob/master/README) file.
|
||||
|
||||
|
@ -10,21 +10,21 @@ Assigning Devices to VMs
|
||||
|
||||
In order to assign a whole PCI(e) device to a VM, one should use `qvm-pci` tool. E.g.
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
lspci
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Find the BDF address of the device you want to assign, and then:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
qvm-pci -a <vmname> <bdf>
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
E.g. assuming 00:1a.0 is a BDF of the device I want to assign to the "personal" domain:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
qvm-pci -a personal 00:1a.0
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Note that one can only assign full PCI or PCI Express devices. This means one cannot assign single USB devices -- only the whole USB controller with whatever USB devices connected to it. This limit is imposed by PC and VT-d architecture.
|
||||
|
||||
@ -40,33 +40,33 @@ Finding the right USB controller
|
||||
|
||||
If you want assign certain USB device to a VM (by attaching a whole USB controller), you need to figure out which PCI device is the right controller. First check to which USB bus the device is connected:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
lsusb
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
For example I want assign a broadband modem to the netvm. In lsusb output it can be listed as something like this (in this case device isn't fully identified):
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
Bus 003 Device 003: ID 413c:818d Dell Computer Corp.
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
The device is connected to the USB bus \#3. Then check which other devices are connected to the same bus - all of them will be assigned to the same VM. Now is the time to find right USB controller:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
readlink /sys/bus/usb/devices/usb3
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
This should output something like:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
../../../devices/pci-0/pci0000:00/0000:00:1a.0/usb3
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Now you see BDF address in the path (right before final usb3). Strip leading "0000:" and pass the rest to qvm-pci tool:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
qvm-pci -a netvm 00:1a.0
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Possible issues
|
||||
---------------
|
||||
@ -75,11 +75,11 @@ Possible issues
|
||||
|
||||
VMs with assigned PCI devices in Qubes have allocated a small buffer for DMA operations (called swiotlb). By default it is 2MB, but some devices need a larger buffer. To change this allocation, edit VM's kernel parameters (this is expressed in 512B chunks):
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
# qvm-prefs netvm |grep kernelopts
|
||||
kernelopts : iommu=soft swiotlb=2048 (default)
|
||||
# qvm-prefs -s netvm kernelopts "iommu=soft swiotlb=4096"
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
This is [known to be needed](https://groups.google.com/group/qubes-devel/browse_thread/thread/631c4a3a9d1186e3) for Realtek RTL8111DL Gigabit Ethernet Controller.
|
||||
|
||||
@ -87,7 +87,7 @@ This is [known to be needed](https://groups.google.com/group/qubes-devel/browse_
|
||||
|
||||
Sometimes PCI arbitrator is too strict. There is a way to enable permissive mode for it. Create `/etc/systemd/system/qubes-pre-netvm.service`:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
[Unit]
|
||||
Description=Netvm fixup
|
||||
Before=qubes-netvm.service
|
||||
@ -99,7 +99,7 @@ RemainAfterExit=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Then enable it with `systemctl enable qubes-pre-netvm.service`
|
||||
|
||||
@ -118,11 +118,11 @@ or
|
||||
|
||||
1. Go to the sysfs (`/sys/bus/pci`), find the right device, detach it from the pciback driver and attach back to the original driver. Replace `<BDF>` with your device, for example `00:1c.2`:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
echo 0000:<BDF> > /sys/bus/pci/drivers/pciback/unbind
|
||||
MODALIAS=`cat /sys/bus/pci/devices/0000:<BDF>/modalias`
|
||||
MOD=`modprobe -R $MODALIAS | head -n 1`
|
||||
echo <BDF> > /sys/bus/pci/drivers/$MOD/bind
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
|
||||
|
@ -15,7 +15,7 @@ The Qubes backup system has been designed with emergency disaster recovery in mi
|
||||
|
||||
1. Untar the main backup file.
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
[user@restore ~]$ tar -i -xvf qubes-backup-2013-12-26-123456
|
||||
backup-header
|
||||
backup-header.hmac
|
||||
@ -31,17 +31,17 @@ The Qubes backup system has been designed with emergency disaster recovery in mi
|
||||
vm1/whitelisted-appmenus.list.000.hmac
|
||||
dom0-home/dom0user.000
|
||||
dom0-home/dom0user.000.hmac
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
1. Verify the integrity of the `private.img` file which houses your data.
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
[user@restore ~]$ cd vm1/
|
||||
[user@restore vm1]$ openssl dgst -sha512 -hmac "your_passphrase" private.img.000
|
||||
HMAC-SHA512(private.img.000)= cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e
|
||||
[user@restore vm1]$ cat private.img.000.hmac
|
||||
(stdin)= cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
**Note:** The hash values should match. If they do not match, then the backup file may have been tampered with, or there may have been a storage error.
|
||||
|
||||
@ -49,59 +49,59 @@ The Qubes backup system has been designed with emergency disaster recovery in mi
|
||||
|
||||
1. Decrypt the `private.img` file.
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
[user@restore vm1]$ openssl enc -d -pass pass:your_passphrase -aes-256-cbc -in private.img.000 -out private.img.dec.000
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
**Note:** For multi-part files, a loop can be used:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
for f in private.img.*; do
|
||||
openssl enc -d -pass pass:your_passphrase -aes-256-cbc -in $f -out
|
||||
${f/.img/.img.dec}
|
||||
done
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
**Note:** If your backup was encrypted with a cipher algorithm other than `aes-256-cbc`, you must substitute the correct cipher command. A complete list of supported cipher algorithms can be found with `openssl list-cipher-algorithms`.
|
||||
|
||||
1. Decompress the decrypted `private.img` file.
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
[user@restore vm1]$ zforce private.img.dec.*
|
||||
[user@restore vm1]$ gunzip private.img.dec.000.gz
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
**Note:** If your backup was compressed with a program other than `gzip`, you must substitute the correct compression program.
|
||||
|
||||
1. Untar the decrypted and decompressed `private.img` file.
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
[user@restore vm1]$ tar -M -xvf private.img.dec.000
|
||||
vm1/private.img
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
**Note:** For multi-part files, a script is required:
|
||||
|
||||
1. Create a `new-volume-script`:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
#!/bin/sh
|
||||
name=`expr $TAR_ARCHIVE : '\(.*\)\..*'`
|
||||
suffix=`printf %03d $[ $TAR_VOLUME - 1 ]`
|
||||
echo $name.$suffix >&$TAR_FD
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
2. `chmod +x new-volume-script`.
|
||||
3. `tar --new-volume-script=./new-volume-script -xvf private.img.dec.000`. (The `--new-volume-script` option enables multi-volume untaring.)
|
||||
|
||||
1. Mount the private.img file and access your data.
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
[user@restore vm1]$ sudo mkdir /mnt/img
|
||||
[user@restore vm1]$ sudo mount -o loop vm1/private.img /mnt/img/
|
||||
[user@restore vm1]$ cat /mnt/img/home/user/your_data.txt
|
||||
This data has been successfully recovered!
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
**Note:** You may wish to store a plain text copy of these instructions with your Qubes backups in the event that you fail to recall the above procedure while this web page is inaccessible. You may obtain a plaintext version of this file in Git repository housing all the documentation at:
|
||||
|
||||
|
@ -23,17 +23,17 @@ Change the following variables GIT\_SUBDIR=marmarek DISTS\_VM=archlinux
|
||||
Get all required sources
|
||||
------------------------
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
make get-sources
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Note that make get-sources sometimes fails because it didn't download packages that are not used by archlinux such as xfce or kde packages.
|
||||
|
||||
You can ignore the repositories that are failing by adding the following line to your builder.conf:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
COMPONENTS:=$(filter-out desktop-linux-kde desktop-linux-xfce,$(COMPONENTS))
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Just don't forget that you need to comment this line again if you want to build the whole Qubes-OS install CD.
|
||||
|
||||
@ -42,23 +42,23 @@ Make all required qubes components
|
||||
|
||||
The first use of the builder can take several hours depending on your bandwidth as it will install an archlinux chroot:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
make vmm-xen-vm
|
||||
make core-vchan-xen-vm
|
||||
make linux-utils-vm
|
||||
make core-agent-linux-vm
|
||||
make gui-common-vm
|
||||
make gui-agent-linux-vm
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Now build the template itself
|
||||
-----------------------------
|
||||
|
||||
This can take again several hours, especially the first time you built and archlinux template:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
make linux-template-builder
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Retrieve your template
|
||||
----------------------
|
||||
@ -75,30 +75,30 @@ Can't open file archlinux-2013.02.01-dual.iso
|
||||
|
||||
Archlinux ISO files are sometimes removed from mirrors. Check the last version available on the archlinux mirror (eg: [http://mir.archlinux.fr/iso/](http://mir.archlinux.fr/iso/)), and update qubes-src/linux-template-builder/scripts\_archlinux/00\_prepare.sh accordingly:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
ISO_VERSION=2013.06.01
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
You will also need to download the signature matching this ISO version inside qubes-src/linux-template-builder/scripts\_archlinux/:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
wget http://mir.archlinux.fr/iso/2013.06.01/archlinux-2013.06.01-dual.iso.sig
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
The nm-applet (network manager icon) fails to start when archlinux is defined as a template-vm:
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
In fact /etc/dbus-1/system.d/org.freedesktop.NetworkManager.conf does not allow a standard user to run network manager clients. To allow this, one need to change inside \<policy context="default"\>:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
<deny send_destination="org.freedesktop.NetworkManager"/>
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
to
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
<allow send_destination="org.freedesktop.NetworkManager"/>
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
DispVM, Yum proxy and most Qubes addons (thunderbird ...) have not been tested at all.
|
||||
--------------------------------------------------------------------------------------
|
||||
@ -111,26 +111,26 @@ This is apparently a bug in Archlinux between glibc and pulseaudio package 4.0-6
|
||||
Error when building the gui-agent-linux with pulsecore error
|
||||
------------------------------------------------------------
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
module-vchan-sink.c:62:34: fatal error: pulsecore/core-error.h: No such file or directory
|
||||
#include <pulsecore/core-error.h>
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
This error is because Archlinux update package too quickly. Probably, a new version of pulseaudio has been released, but the qubes team has not imported the new development headers yet.
|
||||
|
||||
You can create fake new headers just by copying the old headers:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
cd qubes-builder/qubes-src/gui-agent-linux/pulse
|
||||
ls
|
||||
cp -r pulsecore-#lastversion pulsecore-#archlinuxversion
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
You can check the current archlinux pulseaudio version like this:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo chroot chroot-archlinux/ pacman -Qi pulseaudio
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
chroot-archlinux/dev/pts has not been unmounted
|
||||
-----------------------------------------------
|
||||
@ -154,15 +154,15 @@ The boot process fails without visible errors in the logs, but spawn a recovery
|
||||
|
||||
The problem is a new conflict between systemd and the old sysvinit style. To fix this, you can change the master xen template in dom0 to remove sysvinit remains: Edit **INSIDE DOM0** /usr/share/qubes/vm-template.conf, and change the variable 'extra' that contains the kernel variables: from:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
extra="ro nomodeset 3 console=hvc0 rd_NO_PLYMOUTH {kernelopts}"
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
to:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
extra="ro nomodeset console=hvc0 rd_NO_PLYMOUTH {kernelopts}"
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Qubes-OS is now using different xenstore variable names, which makes to archlinux VM failing to boot
|
||||
----------------------------------------------------------------------------------------------------
|
||||
@ -171,15 +171,15 @@ Apply the following fix in the template to revert the variable name to the old Q
|
||||
|
||||
You can edit the template the following way:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo mkdir /mnt/vm
|
||||
sudo mount /var/lib/qubes/vm-templates/archlinux-x64/root.img /mnt/vm
|
||||
sudo chroot /mnt/vm
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Then apply the fix:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo sed 's:qubes-keyboard:qubes_keyboard:g' -i /etc/X11/xinit/xinitrc.d/qubes-keymap.sh
|
||||
|
||||
sudo sed 's:qubes-netvm-domid:qubes_netvm_domid:g' -i /etc/NetworkManager/dispatcher.d/30-qubes-external-ip
|
||||
@ -212,19 +212,19 @@ sudo sed 's:qubes-vm-updateable:qubes_vm_updateable:g' -i /usr/lib/qubes/qubes_t
|
||||
|
||||
sudo sed 's:qubes-vm-type:qubes_vm_type:g' -i /usr/bin/qubes-session
|
||||
sudo sed 's:qubes-vm-updateable:qubes_vm_updateable:g' -i /usr/bin/qubes-session
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Do not forgot to:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
umount /mnt/vm
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Installing the template in dom0 fails because of a missing dependency (qubes-core-dom0-linux)
|
||||
---------------------------------------------------------------------------------------------
|
||||
|
||||
Again you built a template based on a recent Qubes API which has not been released yet. So skip the dependency for now:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo rpm -U --nodeps yourpackage.rpm
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
@ -24,11 +24,11 @@ You need to install your OS inside a chroot that will be used to build all the r
|
||||
|
||||
The scripts you will be interested in will be inside the qubes-src/linux-template-builder project:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
scripts_fedora
|
||||
scripts_archlinux
|
||||
scripts_yourOSname
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
### 00\_prepare.sh
|
||||
|
||||
@ -42,19 +42,19 @@ The goal of this script is to install a base environment of your target OS insid
|
||||
|
||||
Edit the builder.conf file to change the variable DISTS\_VM to your OS name (DISTS\_VM=your\_os\_name). The try to make the template to check that at least these to first scripts are working correctly:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
make linux-template-builder
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Qubes builder Makefiles
|
||||
-----------------------
|
||||
|
||||
Now you need to create Makefiles specific to your OS. You will find the required scripts directly inside qubes-builder:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
prepare-chroot-yourOSname
|
||||
Makefile.yourOSname
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
### prepare-chroot-yourOSname
|
||||
|
||||
@ -103,11 +103,11 @@ Additional Installation scripts
|
||||
|
||||
Again you need to work on scripts inside the qubes-src/linux-template-builder project:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
scripts_fedora
|
||||
scripts_archlinux
|
||||
scripts_yourOSname
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
### 02\_install\_groups.sh
|
||||
|
||||
|
@ -47,14 +47,14 @@ General typographic conventions
|
||||
|
||||
- Comments should be indent together with the code, e.g. like this:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
for (...) {
|
||||
// The following code finds PGP private key matching the given public key in O(1)
|
||||
while (key_found) {
|
||||
(...)
|
||||
}
|
||||
}
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
File naming conventions
|
||||
-----------------------
|
||||
@ -87,29 +87,29 @@ General programming style guidelines
|
||||
- Use comments to explain non-trivial code fragments, or expected behavior of more complex functions, if it is not clear from their name.
|
||||
- Do **not** use comments for code fragments where it is immediately clear what the code does. E.g. avoid constructs like this:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
// Return window id
|
||||
int get_window_id (...) {
|
||||
(...)
|
||||
return id;
|
||||
}
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
- Do **not** use comments to disable code fragments. In a production code there should really be no commented or disabled code fragments. If you really, really have a good reason to retain some fragment of unused code, use \#if or \#ifdef to disable it, e.g.:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
#if 0
|
||||
(...) // Some unused code here
|
||||
#endif
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
... and preferably use some descriptive macro instead of just `0`, e.g.:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
#if USE_OLD_WINDOW_TRAVERSING
|
||||
(...) // Some unused code here
|
||||
#endif
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Not sure how to do similar thing in Python... Anyone?
|
||||
|
||||
@ -137,7 +137,7 @@ Security coding guidelines
|
||||
- Any input that comes from untrusted, or less trusted, or just differently-trusted, entity should always be considered as malicious and should always be sanitized and verified. So, if your software runs in Dom0 and processes some input from any of the VMs, this input should be considered to be malicious. Even if your software runs in a VM, and processes input from some other VM, you should also assume that the input is malicious and verify it.
|
||||
- Use `untrusted_` prefix for all variables that hold values read from untrusted party and which have not yet been verified to be decent, e.g.:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
read_struct(untrusted_conf);
|
||||
/* sanitize start */
|
||||
if (untrusted_conf.width > MAX_WINDOW_WIDTH)
|
||||
@ -146,7 +146,7 @@ Security coding guidelines
|
||||
untrusted_conf.height = MAX_WINDOW_HEIGHT;
|
||||
width = untrusted_conf.width;
|
||||
height = untrusted_conf.height;
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
- Use another variables, without the `untrusted_` prefix to hold the sanitized values, as shown above.
|
||||
|
||||
|
12
CopyPaste.md
12
CopyPaste.md
@ -52,22 +52,22 @@ Clipboard automatic policy enforcement
|
||||
|
||||
The Qubes clipboard policy is configurable in:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
/etc/qubes-rpc/policy/qubes.ClipboardPaste
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
You may wish to configure this policy in order to prevent user error. For example, if you are certain that you never wish to paste *into* your "vault" AppVM (and it is highly recommended that you do not), then you should edit the policy as follows:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
$anyvm vault deny
|
||||
$anyvm $anyvm ask
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Shortcut Configuration
|
||||
----------------------
|
||||
|
||||
The copy/paste shortcuts are configurable in:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
/etc/qubes/guid.conf
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
@ -12,15 +12,15 @@ First, there should normally be few reasons for the user to want to copy files f
|
||||
|
||||
For this reason we intentionally do not provide a convenient tool for copying files between VMs and Dom0 (while we provide a tool for copying files between VMs). However, if you're determined to copy some files to Dom0 anyway, you can use the following method (run this command from Dom0's console):
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
qvm-run --pass-io <src_domain> 'cat /path/to/file_in_src_domain' > /path/to/file_name_in_dom0
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
BTW, you can use the same method to copy files from Dom0 to VMs:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
cat /path/to/file_in_dom0 | qvm-run --pass-io <dst_domain> 'cat > /path/to/file_name_in_appvm'
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
### Copying logs from dom0
|
||||
|
||||
|
@ -22,10 +22,10 @@ The best way to write and contribute code is to create a git repo somewhere (e.g
|
||||
|
||||
**Example:**
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
$ cd qubes-builder/qubes-src/qubes-manager
|
||||
$ git remote add abel git@github.com:abeluck/qubes-manager.git
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
You can then proceed to easily develop in your own branches, pull in new commits from the dev branches, merge them, and eventually push to your own repo on github.
|
||||
|
||||
@ -37,55 +37,55 @@ When you are ready to submit your changes to Qubes to be merged, push your chang
|
||||
|
||||
In qubes-builder/qubes-src/kernel:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
make prep
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
The resulting tree will be in kernel-\<VERSION\>/linux-\<VERSION\>:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
ls -ltrd kernel*/linux*
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
drwxr-xr-x 23 user user 4096 Nov 5 09:50 kernel-3.4.18/linux-3.4.18
|
||||
drwxr-xr-x 6 user user 4096 Nov 21 20:48 kernel-3.4.18/linux-obj
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
#### Go to the kernel tree and update the version
|
||||
|
||||
In qubes-builder/qubes-src/kernel:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
cd kernel-3.4.18/linux-3.4.18
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
#### Changing the config
|
||||
|
||||
In kernel-3.4.18/linux-3.4.18:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
cp ../../config-pvops .config
|
||||
make oldconfig
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Now change the configuration. For example, in kernel-3.4.18/linux-3.4.18:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
make menuconfig
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Copy the modified config back into the kernel tree:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
cp .config ../../../config-pvops
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
#### Patching the code
|
||||
|
||||
TODO: describe the workflow for patching the code, below are some random notes, not working well
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
ln -s ../../patches.xen
|
||||
export QUILT_PATCHES=patches.xen
|
||||
export QUILT_REFRESH_ARGS="-p ab --no-timestamps --no-index"
|
||||
@ -101,7 +101,7 @@ quilt add drivers/usb/host/Kconfig drivers/usb/host/Makefile \
|
||||
quilt refresh
|
||||
cd ../..
|
||||
vi series-pvops.conf
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
#### Building RPMS
|
||||
|
||||
@ -113,20 +113,20 @@ You might want to take a moment here to review (git diff, git status), commit yo
|
||||
|
||||
To actually build RPMS, in qubes-src/kernel:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
make rpms
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
RPMS will appear in qubes-src/kernel/rpm/x86\_64:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
-rw-rw-r-- 1 user user 42996126 Nov 17 04:08 kernel-3.4.18-1debug20121116c.pvops.qubes.x86_64.rpm
|
||||
-rw-rw-r-- 1 user user 43001450 Nov 17 05:36 kernel-3.4.18-1debug20121117a.pvops.qubes.x86_64.rpm
|
||||
-rw-rw-r-- 1 user user 8940138 Nov 17 04:08 kernel-devel-3.4.18-1debug20121116c.pvops.qubes.x86_64.rpm
|
||||
-rw-rw-r-- 1 user user 8937818 Nov 17 05:36 kernel-devel-3.4.18-1debug20121117a.pvops.qubes.x86_64.rpm
|
||||
-rw-rw-r-- 1 user user 54490741 Nov 17 04:08 kernel-qubes-vm-3.4.18-1debug20121116c.pvops.qubes.x86_64.rpm
|
||||
-rw-rw-r-- 1 user user 54502117 Nov 17 05:37 kernel-qubes-vm-3.4.18-1debug20121117a.pvops.qubes.x86_64.rpm
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
### Useful [QubesBuilder](/doc/QubesBuilder/) commands
|
||||
|
||||
@ -148,7 +148,7 @@ You may also like to run your [test environment on separate machine](/doc/TestBe
|
||||
|
||||
TODO: edit this script to be more generic
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
#!/bin/sh
|
||||
|
||||
set -x
|
||||
@ -171,24 +171,24 @@ sudo cp misc/qubes-start.desktop /usr/share/qubes/
|
||||
sudo cp misc/block-snapshot /etc/xen/scripts/
|
||||
sudo cp aux-tools/qubes-dom0-updates.cron /etc/cron.daily/
|
||||
# FIXME(Abel Luck): I hope to
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
### Apply qvm-tools
|
||||
|
||||
TODO: make it more generic
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
#!/bin/sh
|
||||
|
||||
BAK=qvm-tools.bak$$
|
||||
mkdir -p $BAK
|
||||
cp -a /usr/bin/qvm-* /usr/bin/qubes-* $BAK/
|
||||
sudo cp qvm-tools/qvm-* qvm-tools/qubes-* /usr/bin/
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
### Copy from dom0 to an appvm
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
#/bin/sh
|
||||
#
|
||||
# usage ./cp-domain <vm_name> <file_to_copy>
|
||||
@ -199,4 +199,4 @@ fname=`basename $file`
|
||||
|
||||
qvm-run $domain 'mkdir /home/user/incoming/dom0 -p'
|
||||
cat $file| qvm-run --pass-io $domain "cat > /home/user/incoming/dom0/$fname"
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
12
DiskTRIM.md
12
DiskTRIM.md
@ -11,23 +11,23 @@ To enable TRIM in dom0 you need:
|
||||
|
||||
1. Get your LUKS device UUID:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
ls /dev/mapper/luks-*
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
2. Add entry to `/etc/crypttab` (replace luks-\<UUID\> with the device name and the \<UUID\> with UUID alone):
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
luks-<UUID> UUID=<UUID> none allow-discards
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
3. Add `rd.luks.allow-discards=1` to kernel cmdline (`/etc/default/grub`, GRUB\_CMDLINE\_LINUX line)
|
||||
4. Rebuild grub config (`grub2-mkconfig -o /boot/grub2/grub.cfg`)
|
||||
5. Rebuild initrd **in hostonly mode**:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
dracut -H -f
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
6. Add "discard" option to `/etc/fstab` for root device
|
||||
7. Reboot the system, verify that allow-discards is really enabled (`dmsetup table`)
|
||||
|
@ -38,9 +38,9 @@ Opening a file in a Disposable VM via command line (from AppVM)
|
||||
|
||||
Use the `qvm-open-in-dvm` command line (from your AppVM), e.g.:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
[user@work-pub ~]$ qvm-open-in-dvm Downloads/apple-sandbox.pdf
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
The qvm-open-in-dvm will not exit until you close the application in the Disposable VM.
|
||||
|
||||
@ -49,9 +49,9 @@ Starting an arbitrary application in a disposable VM via command line (from Dom0
|
||||
|
||||
**Note:** Normally there should be no need for doing this -- this is just for Qubes hackers ;)
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
[joanna@dom0 ~]$ echo xterm | /usr/lib/qubes/qfile-daemon-dvm qubes.VMShell dom0 DEFAULT red
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
In fact the Disposable VM appmenu used for starting Firefox contains a very similar command to the above. Please note, however, that it generally makes little sense to start any other application other than a Web Browser this way...
|
||||
|
||||
@ -60,9 +60,9 @@ Starting an arbitrary program in a Disposable VM from an AppVM
|
||||
|
||||
Sometimes it might be useful to start an arbitrary program, such as e.g. terminal in an Disposable VM from an AppVM. This could be simply done this way:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
[user@vault ~]$ qvm-run '$dispvm' xterm
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Note the above command is issued in an AppVM, not in Dom0. The created Disposable VM can be normally accessed via other tools, such as e.g. `qvm-copy-to-vm`, using its 'dispX' name, as shown by the Qubes Manager or `qvm-ls` tools.
|
||||
|
||||
|
@ -10,9 +10,9 @@ Donating to the Qubes Project
|
||||
|
||||
The Qubes project is now accepting donations in Bitcoins. You can use the following address to send Bitcoins to the project (but you might want to read the short FAQ below first):
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
14zockMSKKp5MK6X2cHJ3mQwm9MwYsJ39j
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
This address can also be found in a message posted to Qubes mailing list, which can be viewed via Google Groups Web interface over SSL [here](https://groups.google.com/d/msg/qubes-devel/u3wAzm1dB5Y/s5CiUGDebL4J), for double verification. For additional verification, you can verify the digital signature on the message, which should come from Joanna Rutkowska.
|
||||
|
||||
|
@ -22,16 +22,16 @@ First you need to identify an user VM dedicated to audio and [assign a device](/
|
||||
|
||||
In a terminal of the template from which you user VM depends, install pavucontrol with:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo yum install pavucontrol
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Close the template and start or restart your user VM, insert your external audio device, open a terminal and prepare pulseaudio to use it with:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo chmod a+rw /dev/snd/*
|
||||
pactl load-module module-udev-detect
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Start the audio application that is going to use the external audio device.
|
||||
|
||||
@ -39,8 +39,8 @@ Launch pavucontrol, for example using "run command in VM" of Qubes Manager and s
|
||||
|
||||
If you detach your external audio device, then want to insert it again, or change it with another one, you need to repeat the previous commands in terminal, adding an other line at the beginning:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
pactl unload-module module-udev-detect
|
||||
sudo chmod a+rw /dev/snd/*
|
||||
pactl load-module module-udev-detect
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
@ -7,8 +7,8 @@ redirect_from: /wiki/ExternalDeviceMountPoint/
|
||||
|
||||
All external storage devices connected to an AppVM using the Fedora template can be found under
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
/run/media/user/
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
...of that AppVM's filesystem.
|
||||
|
@ -17,32 +17,32 @@ Upgrading Fedora 18 to Fedora 20
|
||||
|
||||
Commands to run in dom0 console (you can do the same from Qubes Manager):
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
qvm-clone fedora-18-x64 fedora-20-x64
|
||||
qvm-run -a fedora-20-x64 gnome-terminal
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Commands to run in new fedora-20-x64 template:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo yum --releasever=20 distro-sync
|
||||
poweroff
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
If you have installed a lot of software in your template, it may happen that you don't have enough disk space for upgrade. Yum will tell you this just after confirming the operation (before it change anything to your system). In that case you need to provide some "external" place for yum cache (uses about 2GB during upgrade). For example attach virtual disk stored in some file. Prepare the file in dom0:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
truncate -s 5GB /var/tmp/template-upgrade-cache.img
|
||||
qvm-block -A fedora-20-x64 dom0:/var/tmp/template-upgrade-cache.img
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Then use it in template:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo mkfs.ext4 /dev/xvdi
|
||||
sudo mount /dev/xvdi /mnt/removable
|
||||
sudo yum --releasever=20 --setopt=cachedir=/mnt/removable distro-sync
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
After upgrade is finished, you can remove /var/tmp/template-upgrade-cache.img file.
|
||||
|
||||
@ -55,17 +55,17 @@ fstrim, nor "discard" mount option do not work on template root fs, so when some
|
||||
|
||||
You can compact root.img in the "old way", you'll need about 15GB (template's max size + really used space there) in dom0 for this operation: Start the template, fill all the free space with zeros, for example with:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
dd if=/dev/zero of=/var/tmp/zero
|
||||
(wait for "No space left on device" error)
|
||||
rm -f /var/tmp/zero
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Then shutdown template and all VMs based on it. Go into template directory in dom0 (/var/lib/qubes/vm-templates/fedora-20-x64 or so) and issue:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
cp --sparse=always root.img root.img.new
|
||||
mv root.img.new root.img
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Done.
|
||||
|
12
Fetchmail.md
12
Fetchmail.md
@ -24,7 +24,7 @@ Assuming you have more than one account (safe assumption these days), you need t
|
||||
|
||||
In TemplateVM create `/etc/systemd/system/fetchmail@.service`:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
[Unit]
|
||||
Description=Mail Retrieval Agent
|
||||
After=network.target
|
||||
@ -34,11 +34,11 @@ Requires=postfix.service
|
||||
User=user
|
||||
ExecStart=/bin/fetchmail -f /usr/local/etc/fetchmail/%I.rc -d 60 -i /usr/local/etc/fetchmail/.%I.fetchids --pidfile /usr/local/etc/fetchmail/.%I.pid
|
||||
RestartSec=1
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Then shutdown TemplateVM, start AppVM and create directory `/usr/local/etc/fetchmail`. In it, create one `.rc` file for each instance of fetchmail, ie. `personal1.rc` and `personal2.rc`. Sample configuration file:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
set syslog
|
||||
set no bouncemail
|
||||
#set daemon 600
|
||||
@ -57,13 +57,13 @@ user woju pass supersecret
|
||||
idle
|
||||
|
||||
# vim: ft=fetchmail
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Then `chown -R user:user /usr/local/etc/fetchmail` and `chmod 600 /usr/local/etc/fetchmail/*.rc`. **This is important**, fetchmail will refuse to run with wrong permissions on its rc-file.
|
||||
|
||||
Next, add this to `/rw/config/rc.local`:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
#!/bin/sh
|
||||
|
||||
for rc in /usr/local/etc/fetchmail/*.rc; do
|
||||
@ -71,6 +71,6 @@ for rc in /usr/local/etc/fetchmail/*.rc; do
|
||||
instance=${instance##*/}
|
||||
echo systemctl --no-block start fetchmail@${instance}
|
||||
done
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Now reboot your AppVM and you are done.
|
||||
|
@ -30,19 +30,19 @@ If you want to enable full screen mode for select VMs, you can do that by creati
|
||||
|
||||
**Note:** There should be only one `VM: {}` block in the file (or you will [get into problems](https://groups.google.com/d/msg/qubes-users/-Yf9yNvTsVI/xXsEm8y2lrYJ))
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
VM: {
|
||||
personal: {
|
||||
allow_fullscreen = true;
|
||||
};
|
||||
};
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
The string 'personal' above is exemplary and should be replaced by the actual name of the VM for which you want to enable this functionality.
|
||||
|
||||
One can also enable this functionality for all the VMs globally in the same file, by modifying the 'global' section:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
global: {
|
||||
# default values
|
||||
allow_fullscreen = true;
|
||||
@ -51,6 +51,6 @@ global: {
|
||||
#secure_paste_sequence = "Ctrl-Shift-v";
|
||||
#windows_count_limit = 500;
|
||||
};
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Be sure to restart the VM(s) after modifying this file, for the changes to take effect.
|
||||
|
@ -100,7 +100,7 @@ Window manager hints and flags are described at [http://standards.freedesktop.or
|
||||
|
||||
Each message starts with the following header
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
struct msghdr {
|
||||
uint32_t type;
|
||||
uint32_t window;
|
||||
@ -111,7 +111,7 @@ struct msghdr {
|
||||
* whatever it wants! */
|
||||
uint32_t untrusted_len;
|
||||
};
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
The header is followed by message-specific data.
|
||||
|
||||
@ -183,12 +183,12 @@ Proper handling of the below messages is NOT security-critical.
|
||||
|
||||
Each message starts with the following header
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
struct msghdr {
|
||||
uint32_t type;
|
||||
uint32_t window;
|
||||
};
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
The header is followed by message-specific data.
|
||||
` KEYPRESS, BUTTON, MOTION, FOCUS ` messages pass information extracted from dom0 XEvent; see appropriate event documentation.
|
||||
|
@ -55,15 +55,15 @@ By default, each domain's menu contains only a few shortcuts. If you'd like to a
|
||||
|
||||
To start apps from the console in dom0, type:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
qvm-run -a <domain> "<app name> [arguments]"
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
e.g.:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
qvm-run -a untrusted firefox
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Adding, Removing, and Listing Domains
|
||||
-------------------------------------
|
||||
@ -96,7 +96,7 @@ To allow domains to enter full screen mode, one should edit the `/etc/qubes/guid
|
||||
|
||||
E.g. to allow all domains to enter full screen mode, set `allow_fullscreen` flag to `true` in the `global` section:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
global: {
|
||||
# default values
|
||||
allow_fullscreen = false;
|
||||
@ -105,18 +105,18 @@ global: {
|
||||
#secure_paste_sequence = "Ctrl-Shift-v";
|
||||
#windows_count_limit = 500;
|
||||
};
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
To allow only select AppVMs to enter full screen mode, create a per-VM section, and set `allow_fullscreen` flag there to `true`:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
VM: {
|
||||
work: {
|
||||
allow_fullscreen = true;
|
||||
};
|
||||
|
||||
};
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
In order for the changes to take effect, restart the AppVM(s).
|
||||
|
||||
|
60
HvmCreate.md
60
HvmCreate.md
@ -20,23 +20,23 @@ Creating an HVM domain
|
||||
|
||||
First, lets create a new HVM domain (use the --hvm switch to qvm-create, or choose HVM type in the Qubes Manager VM creation dialog box):
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
qvm-create win7 --hvm --label green
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
(Of course, the name of the domain ("win7"), as well as it's label ("green"), are just exemplary).
|
||||
|
||||
Now, we need to install an OS inside this VM, this can done by attaching an installation ISO upon starting the VM (this currently can be done only from command line, but in the future we surely will added an option to do this also from the manager):
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
qvm-start win7 --cdrom=/usr/local/iso/win7_en.iso
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
The command above assumes the installation ISO was somehow transferred to Dom0, e.g. copied using `dd` command from an installation CDROM. If one wishes to use the actual physical media without copying it first to a file, then one can just pass `/dev/cdrom` as an argument to `--cdrom`:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
qvm-start win7 --cdrom=/dev/cdrom
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Now, the VM will start booting from the attached CDROM device, which in the example above just happens to be the Windows 7 installation disk. Depending on the OS that is being installed in the VM, one might be required to start the VM several times (as is the case e.g. with Windows 7 installation), because whenever the installer wants to "reboot the system", it actually shutdowns the VM (and Qubes won't automatically start it), so several invocations of qvm-start command (as shown above) might be needed.
|
||||
|
||||
@ -47,16 +47,16 @@ Using Installation ISOs located in other VMs
|
||||
|
||||
Sometimes one wants to download the installation ISO from the Web and use it for HVM creation. However, for security reasons, networking is disabled for Qubes Dom0, which makes it not possible to download an ISO within Dom0. Also Qubes do not provide any (easy to use) mechanisms for copying files between AppVMs and Dom0, and generally tries to discourage such actions. So, it would be inconvenient to require that the installation ISO for an HVM domain be always located in Dom0. And the good news is that this is indeed not required -- one can use the following syntax when specifying the location of /usr/local/iso/win7\_en.iso the installation ISO:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
--cdrom=[appvm]:[/path/to/iso/within/appvm]
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Assuming e.g. the an installation ISO named `ubuntu-12.10-desktop-i386.iso` has been downloaded in `work-web` AppVM, and located within `/home/user/Downloads` directory within this AppVM, one can immediately create a new HVM and use this ISO as an installation media with the following command (issued in Dom0, of course):
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
qvm-create --hvm ubuntu --label red
|
||||
qvm-start ubuntu --cdrom=work-web:/home/user/Downloads/ubuntu-12.10-desktop-i386.iso
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Of course the AppVM where the ISO is kept must also be running for this to work (this VM is now serving the ISO and acting as a disk backend).
|
||||
|
||||
@ -93,7 +93,7 @@ Just like normal AppVMs, the HVM domains can also be cloned, either using a comm
|
||||
|
||||
The cloned VM will get identical root and private image, and essentially will be identical to the original VM, except that it will get a different MAC address for the networking interface:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
[joanna@dom0 ~]$ qvm-prefs win7
|
||||
name : win7
|
||||
label : green
|
||||
@ -145,21 +145,21 @@ qrexec_installed : False
|
||||
qrexec timeout : 60
|
||||
drive : None
|
||||
timezone : localtime
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Note how the MAC addresses differ between those two, otherwise identical VMs. Of course, the IP addresses, assigned by Qubes, will also be different, to allow networking to function properly:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
[joanna@dom0 ~]$ qvm-ls -n
|
||||
/.../
|
||||
win7-copy | | Halted | Yes | | *firewallvm | green | 10.137.2.3 | n/a | 10.137.2.1 |
|
||||
win7 | | Halted | Yes | | *firewallvm | green | 10.137.2.7 | n/a | 10.137.2.1 |
|
||||
/.../
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
If, for any reason, one would like to make sure that the two VMs have the same MAC address, one can use qvm-prefs to set a fixed MAC address for the VM:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
[joanna@dom0 ~]$ qvm-prefs win7-copy -s mac 00:16:3E:5E:6C:05
|
||||
[joanna@dom0 ~]$ qvm-prefs win7-copy
|
||||
name : win7-copy
|
||||
@ -184,7 +184,7 @@ qrexec_installed : False
|
||||
qrexec timeout : 60
|
||||
drive : None
|
||||
timezone : localtime
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Please note that as of now Qubes does not support shared templates for HVM domains. This means that HVM domains cloned this way will have two separate copies of the whole filesystems. This has consequences in taking much more disk space compared to standard AppVMs that share the root fs with the Template VM. Another consequence is that it's probably not legal to clone a proprietary OS, such as Windows this way, unless your license specifically allows for that (even though Windows Activation won't complain when one sets identical MAC address for the cloned VMs, it's doubtful practice at best).
|
||||
|
||||
@ -211,22 +211,22 @@ Qubes Windows Support Tools are not open source and are distributed under a comm
|
||||
|
||||
Because the Windows Support Tools are not licensed under a GPL license they are not distributed with Qubes installation ISO. Instead, one can download them when needed using the standard Qubes command for installing software in Dom0:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo qubes-dom0-update qubes-windows-tools
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
This should install `qubes-windows-tools-*.rpm` in your system, a package that brings an ISO with Windows Support Tools:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
[joanna@dom0 ~]$ rpm -ql qubes-windows-tools-1-201211301354.noarch
|
||||
/usr/lib/qubes/qubes-windows-tools-201211301354.iso
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Now, in order to install the tools in a Windows VM one should start the VM with the ISO attached:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
qvm-start lab-win7 --cdrom=/usr/lib/qubes/qubes-windows-tools-201211301354.iso
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Once the Windows VM boots, a CDROM should appear in the 'My Computer' menu (typically as `D:`) with a setup program in its main directory:
|
||||
|
||||
@ -242,25 +242,25 @@ After successful installation, the Windows VM must be shut down.
|
||||
|
||||
Additionally, once should inform Qubes that tools have been installed in this VM by setting the `qrexec_installed` flag in the VM's properties -- this can be done using the `qvm-prefs` command in Dom0, e.g.:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
qvm-prefs lab-win7 -s qrexec_installed true
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Also, by default Qubes assumes that the default user in the Windows VM is named `user` -- if one has chosen a different user during Windows installation, Qubes should be informed about this by setting the `default_user` property for the VM, e.g.:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
qvm-prefs lab-win7 -s default_user joanna
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
If everything went fine (please remember about the need to reboot the Windows VM after installation of the tools), one can run some simple tests to see if qrexec service runs fine with this VM, e.g.:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
qvm-run lab-win7 calc
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
... or something more fancy (a "networkless" telnet to Windows ;):
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
[joanna@dom0 ~]$ qvm-run lab-win7 -p cmd.exe
|
||||
Microsoft Windows [Version 6.1.7601]
|
||||
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
|
||||
@ -283,7 +283,7 @@ dir c:\
|
||||
|
||||
C:\Windows\system32>exit
|
||||
exit
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Another things to check are if clipboard copy/paste and file copy works fine with this VM. If it doesn't, then perhaps one more VM reboot is necessary (seriously, hey this is Windows!).
|
||||
|
||||
|
@ -17,19 +17,19 @@ There are rpm packages with all necessary software on rpmfusion. The only packag
|
||||
|
||||
You will need any Fedora 18 system to download and build packages. You can use Qubes AppVM for it, but it isn't necessary. To download packages from rpmfusion - add this repository to your yum configuration (instructions are on their website). Then download packages using yumdownloader:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
yumdownloader --resolve xorg-x11-drv-nvidia
|
||||
yumdownloader --source nvidia-kmod
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
###Build kernel package
|
||||
|
||||
You will need at least kernel-devel (matching your Qubes dom0 kernel), rpmbuild tool and kmodtool, and then you can use it to build package:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
yum install kernel-devel rpm-build kmodtool
|
||||
rpmbuild --nodeps -D "kernels `uname -r`" --rebuild nvidia-kmod-260.19.36-1.fc13.3.src.rpm
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
In above command replace `uname -r` with kernel version from your Qubes dom0. If everything went right, you have now complete packages with nvidia drivers for Qubes system. Transfer them to dom0 (eg using USB stick) and install (using standard "yum install /path/to/file").
|
||||
|
||||
@ -37,15 +37,15 @@ Then you need to disable nouveau (normally it is done by install scripts from nv
|
||||
|
||||
Edit /etc/default/grub:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
GRUB_CMDLINE_LINUX="quiet rhgb nouveau.modeset=0 rd.driver.blacklist=nouveau video=vesa:off"
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Regenerate grub configuration:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
grub2-mkconfig -o /boot/grub2/grub.cfg
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Reboot.
|
||||
|
||||
@ -65,9 +65,9 @@ See [this page](/doc/CopyToDomZero/) for instructions on how to transfer files t
|
||||
|
||||
Install libraries, Xorg driver, configuration utilities. This can by done by nvidia-installer:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
./NVIDIA-Linux-x86_64-260.19.44.run --ui=none --no-x-check --keep --no-nouveau-check --no-kernel-module
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
###Kernel module
|
||||
|
||||
@ -85,21 +85,21 @@ This installation must be done manually, because nvidia-installer refused to ins
|
||||
|
||||
If all the files are not there correct the errors manually. To build kernel module, enter *NVIDIA-Linux-x86\_64-260.19.44/kernel* directory and execute:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
make
|
||||
IGNORE_XEN_PRESENCE=1 CC="gcc -DNV_VMAP_4_PRESENT -DNV_SIGNAL_STRUCT_RLIM" make -f Makefile.kbuild
|
||||
mv /lib/modules/2.6.34.1-12.xenlinux.qubes.x86_64/kernel/drivers/video/nvidia.ko /lib/modules/2.6.34.1-12.xenlinux.qubes.x86_64/extra/
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Ignore any errors while inserting nvidia.ko (at the end of make phase).
|
||||
|
||||
###Disable nouveau:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
cat /etc/modprobe.d/nouveau-disable.conf
|
||||
# blacklist isn't enough...
|
||||
install nouveau /bin/true
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Add *rdblacklist=nouveau* option to /boot/grub/menu.lst (at the end of line containing *vmlinuz*).
|
||||
|
||||
@ -107,11 +107,11 @@ Add *rdblacklist=nouveau* option to /boot/grub/menu.lst (at the end of line cont
|
||||
|
||||
After all, you should configure Xorg to use nvidia driver. You can use *nvidia-xconfig* or do it manually:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
X -configure
|
||||
mv /root/xorg.conf.new /etc/X11/xorg.conf
|
||||
# replace Driver in Device section by "nvidia"
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
@ -17,10 +17,10 @@ Build installer packages
|
||||
|
||||
Get [Qubes Installer repository](http://git.qubes-os.org/?p=smoku/installer) and build its packages:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
cd installer
|
||||
make rpms
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Packages will be in `rpm/noarch` and `rpm/x86_64`.
|
||||
|
||||
@ -29,10 +29,10 @@ Install Revisor
|
||||
|
||||
Next install the freshly built revisor and anaconda:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
yum install rpm/noarch/revisor*.rpm
|
||||
yum install rpm/x86_64/anaconda*.rpm
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Review configuration files
|
||||
--------------------------
|
||||
@ -68,18 +68,18 @@ The ```build/yum/dom0-updates``` is to be used for select rpms that should also
|
||||
|
||||
Update your local repos:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
make update-repo
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Build ISO
|
||||
---------
|
||||
|
||||
Now you're finally ready to build the ISO image:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
make iso
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
and wait...
|
||||
|
||||
|
20
KdeDom0.md
20
KdeDom0.md
@ -13,9 +13,9 @@ The Qubes kde-dom0 project (see [Source Code](/doc/SourceCode/)) contains the so
|
||||
Getting the sources
|
||||
-------------------
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
git clone git://qubes-os.org/mainstream/kde-dom0.git kde-dom0
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Building the packages
|
||||
---------------------
|
||||
@ -24,27 +24,27 @@ It's best to use Fedora 12 or 13 as a development system.
|
||||
|
||||
First, you should download and verify the original KDE sources (not part of the kde-dom0 repository):
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
make get-sources verify-sources
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Now, check if you have all the required build dependencies:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
make prep
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Install any required packages that `make` might have complained about. Then you're ready to build the rpms (you might want to adjust the release of each rpm package by editing the `rel` variable at the beginning of each `.spec` file):
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
make rpms
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
**Note:** The `kdebase-*` packages build process requires corresponding `kdelibs-devel` package to be installed first. If your build system is based on Fedora 12/13, and if the `kdelibs-devel` package exist in Fedora repo that is based the same KDE software version (e.g. 4.4.3) as the KDE packages you're building (see the `version` file), than you should be able to use the Fedora package:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
yum install kdelibs-devel-{version}
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
If not, then you should build your `kdelibs-devel` first (`cd kdelibs-devel && make rpms`), then install it on your build system, and then you can build all the rest (`make rpms`).
|
||||
|
||||
|
@ -20,24 +20,24 @@ To achieve it (all commands run as root):
|
||||
|
||||
1. Generate XOrg configuratio (if you don't have it):
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
X -configure :1 && mv ~/xorg.conf.new /etc/X11/xorg.conf
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
2. Add HorizSync line to Monitor section, it should look something like:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
Section "Monitor"
|
||||
Identifier "Monitor0"
|
||||
VendorName "Monitor Vendor"
|
||||
ModelName "Monitor Model"
|
||||
HorizSync 30.0 - 60.0
|
||||
EndSection
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
3. Change driver to "vesa" in Device section:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
Section "Device"
|
||||
# (...)
|
||||
Identifier "Card0"
|
||||
@ -46,7 +46,7 @@ To achieve it (all commands run as root):
|
||||
BoardName "Unknown Board"
|
||||
BusID "PCI:0:2:0"
|
||||
EndSection
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Now you should get at least 1280x1024 and be able to choose other modes.
|
||||
|
||||
|
12
Mutt.md
12
Mutt.md
@ -33,7 +33,7 @@ Mutt generally works out of the box. This configuration guide discusses only Qub
|
||||
|
||||
First, paste this to `/etc/Muttrc.local` in TemplateVM:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
# specify your key or override in ~/.mutt/muttrc in AppVM
|
||||
set pgp_sign_as="0xDEADBEEF"
|
||||
|
||||
@ -105,11 +105,11 @@ send-hook "~A" set pgp_autoinline=no crypt_autoencrypt=no
|
||||
send-hook "~t @invisiblethingslab\.com" set crypt_autoencrypt=yes
|
||||
|
||||
# vim:ft=muttrc
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Then shutdown your TemplateVM. Next open your AppVM, create file `/home/user/.mutt/muttrc` and adjust for your needs:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
#
|
||||
# accounts
|
||||
#
|
||||
@ -134,14 +134,14 @@ subscribe (qubes-(users|devel)|othergroup)@googlegroups\.com
|
||||
fcc-save-hook qubes-users@googlegroups\.com =list/qubes-users/
|
||||
fcc-save-hook qubes-devel@googlegroups\.com =list/qubes-devel/
|
||||
fcc-save-hook othergroup@googlegroups\.com =list/othergroup/
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
You may also create `/home/user/.signature`:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
regards,
|
||||
Wojciech Porczyk
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Some additional useful settings
|
||||
-------------------------------
|
||||
|
@ -22,20 +22,20 @@ Qubes manager patch (Qubes R2B2)
|
||||
|
||||
The following patches can be applied to the Qubes Manager GUI in order to add an option to easily bridge a VM. Use it at your own risk. If the patch breaks the Qubes Manager, you can try to restore the qubes packages:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
# qubes-dom-update qubes-core-dom0 qubes-manager
|
||||
# yum reinstall qubes-core-dom0
|
||||
# yum reinstall qubes-manager
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
First, retrieve the attachment of this Wifi article in dom0. Then apply the three patches the following way after installing the patch tool :
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
# qubes-dom0-update patch
|
||||
# patch /usr/lib64/python2.7/site-package/qubes/qubes.py < qubes.py-bridge.diff
|
||||
# patch /usr/lib64/python2.7/site-package/qubesmanager/settings.py < settings.py-bridge.diff
|
||||
# patch /usr/lib64/python2.7/site-package/qubesmanager/ui_settingsdlg.py < ui_settingsdlg.py-bridge.diff
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Finally restart the qubes manager GUI.
|
||||
|
||||
@ -50,7 +50,7 @@ Modify manually the Template you use for your NetVM (not the NetVM itself). This
|
||||
|
||||
- Starting from the line -A POSTROUTING -j MASQUERADE that you need to comment :
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
# Bridge support
|
||||
# Comment the following line
|
||||
#-A POSTROUTING -j MASQUERADE
|
||||
@ -59,26 +59,26 @@ Modify manually the Template you use for your NetVM (not the NetVM itself). This
|
||||
# Allow redirection of bridge packets (optional as POSTROUTING default is ACCEPT)
|
||||
#-A POSTROUTING -o bridge+ -j ACCEPT
|
||||
# End Bridge support
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
- Starting from the line -A FORWARD -i vif+ -j ACCEPT:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
-A FORWARD -i vif+ -o vif+ -j DROP
|
||||
-A FORWARD -i vif+ -j ACCEPT
|
||||
# Bridge Support
|
||||
-A FORWARD -i bridge+ -j ACCEPT
|
||||
# End Bridge Support
|
||||
-A FORWARD -j DROP
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Ensure that the IP addresses used by default in qubes are in the form 10.137.1.\* or 10.137.2.\* by running ifconfig. Of course, this setup won't work with IPv6.
|
||||
|
||||
Now you need to restart the NetVM and FirewallVM or only iptables in both VMs if you prefer:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
# systemctl restart iptables
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Create a Bridge inside the NetVM
|
||||
--------------------------------
|
||||
@ -96,7 +96,7 @@ The bridge edition GUI is somehow buggy as it does not remember all the paramete
|
||||
|
||||
- Bridge-DHCP
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
[connection]
|
||||
id=Bridge-DHCP
|
||||
uuid=fd68198b-313a-47cb-9155-52e95cdc67f3
|
||||
@ -113,13 +113,13 @@ The bridge edition GUI is somehow buggy as it does not remember all the paramete
|
||||
[bridge]
|
||||
interface-name=bridge0
|
||||
stp=false
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Note: Do not forget to put stp=false if you bridge only eth0 because sending BPDUs could make your admins angry :)
|
||||
|
||||
- bridge0-eth0
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
[802-3-ethernet]
|
||||
duplex=full
|
||||
mac-address=88:AE:1D:AE:30:31
|
||||
@ -132,12 +132,12 @@ Note: Do not forget to put stp=false if you bridge only eth0 because sending BPD
|
||||
timestamp=1363601650
|
||||
master=fd68198b-313a-47cb-9155-52e95cdc67f3
|
||||
slave-type=bridge
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
If you do not manager to start your bridge, you can start it manually from a NetVM terminal:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
$ nmcli con up id bridge0-eth0
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Now that the bridge is ready, the bridged AppVM can be started...
|
||||
|
@ -22,15 +22,15 @@ Assuming your X Window System works fine now when you booted from the "failsafe"
|
||||
|
||||
1. Switch to runlevel 3 (this should kill your X server):
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
init 3
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
1. Run X-autoconfiguration:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
Xorg -configure
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
This should generate a file `xorg.conf.new` in the `/root` directory.
|
||||
|
||||
@ -40,29 +40,29 @@ In most cases you can ignore any warning or error messages displayed by the X se
|
||||
|
||||
- Uncomment the ShadowFB option, so that you should now have something like this:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
Option "ShadowFB" # [<bool>]
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
- Change the driver name to `nouveau` (you will probably have `nv` written there):
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
Driver "nouveau"
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Save the modification, exit the editor.
|
||||
|
||||
1. Move the file to `/etc/X11` and rename it as `xorg.conf`:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
mv /root/xorg.conf.new /etc/X11/xorg.conf
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
1. Verify that X will work with those new settings:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
xinit
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
If you see a terminal window in the top left corner, it means you most likely succeeded, even if your keyboard or mouse do not work now (don't worry about them).
|
||||
|
||||
|
@ -9,18 +9,18 @@ VMs specially templates use disk space. Also default private storage max size is
|
||||
|
||||
So it is a good practice to regularly check disk space usage with command
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
df
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
in dom0 terminal.
|
||||
|
||||
A system in out of space condition should be able to boot, but may be unable to load a desktop manager. In this case it is possible to login to dom0 terminal with Alt + Ctrl + F2. To recover disk space it may be possible to delete files in a userVM connecting to the userVM terminal:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
qvm-start <VMname>
|
||||
sudo xl console <VMname>
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
If this does not work, check the size of /var/lib/qubes/qubes.xml. If it is zero, you'll need to use one of the file backup (stored in /var/lib/qubes/backup), hopefully you have the current data there. Find the most recent one and place in /var/lib/qubes/qubes.xml instead of the empty file.
|
||||
|
||||
@ -28,25 +28,25 @@ In any case you'll need some disk space to start the VM. Check "df" output if yo
|
||||
|
||||
1. Clean yum cache:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo yum clean all
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
1. Delete .img files of a less important VM, that can be found in
|
||||
|
||||
/var/lib/qubes/appvms/. Then, when the system is working again, cleanup the rest with:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
qvm-remove <VMname>
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
With this method you lose one VM data, but it'll more securely work.
|
||||
|
||||
1. Decrease filesystem safety margin (5% by default):
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo tune2fs -m 4 /dev/mapper/vg_dom0-lv_root
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
1. Remove some unneeded files in dom0 home (if you have one, most likely no).
|
||||
|
||||
|
36
Postfix.md
36
Postfix.md
@ -22,9 +22,9 @@ Configuration
|
||||
|
||||
In TemplateVM open `/etc/aliases` and add line:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
root: user
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
and run `newaliases`.
|
||||
|
||||
@ -36,7 +36,7 @@ Now shutdown TemplateVM, start AppVM. Create directory `/usr/local/etc/postfix`
|
||||
|
||||
Postfix keeps its lookup tables in bdb hash databases. They need to be compiled from source files. Postfix admins like to keep track of them by means of `/usr/local/etc/postfix/Makefile`:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
all: $(addsuffix .db,$(shell sed -n -e '/^[^#].*hash:\/etc\/postfix/s:.*/::p' main.cf))
|
||||
newaliases
|
||||
clean:
|
||||
@ -45,13 +45,13 @@ clean:
|
||||
|
||||
%.db: %
|
||||
/usr/sbin/postmap hash:$<
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
### Postfix main configuration
|
||||
|
||||
`/usr/local/etc/postfix/main.cf` (`/etc/postfix` is intentional, don't correct it):
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
mydestination = $myhostname, $myhostname.$mydomain, $myhostname.localdomain, localhost, localhost.$mydomain, localhost.localdomain, $mydomain, localdomain
|
||||
mynetworks_style = host
|
||||
|
||||
@ -84,36 +84,36 @@ sendmail_path = /usr/sbin/sendmail
|
||||
newaliases_path = /usr/bin/newaliases
|
||||
mailq_path = /usr/bin/mailq
|
||||
alias_maps = hash:/etc/aliases
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
### Lookup tables
|
||||
|
||||
`/usr/local/etc/postfix/generic` (put there your primary address):
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
@localhost your.mail@example.com
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
`/usr/local/etc/postfix/sender_relay`. This is important file. Put there all your SMTP servers. Pay attention to port (smtp/submission). Square brackets have their special meaning, they are almost certainly needed. For more info consult Postfix manual.
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
your.mail@exmaple.com [mail.example.com]:submission
|
||||
your.other@mail.com [smtp.mail.com]:smtp
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
`/usr/local/etc/postfix/saslpass`. Here you put passwords to abovementioned servers. It depends on provider if you need to put whole email as username or just the part before `@`.
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
[mail.example.com]:submission your.mail:y0urP4ssw0rd
|
||||
[smtp.mail.com]:smtp your.other@mail.com:supers3cret
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
`/usr/local/etc/postfix/sender_access`. I use it to nullroute known spam domains. If you do not need it, comment respective line in `main.cf`.
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
spamdomain1.com DISCARD
|
||||
spamdomain2.com DISCARD
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Now run `make` in `/usr/local/etc/postfix`. It will hopefully compile four abovementioned lookup tables (`generic.db`, `sender_relay.db`, `saslpass.db` and `sender_access`).
|
||||
|
||||
@ -121,7 +121,7 @@ Now run `make` in `/usr/local/etc/postfix`. It will hopefully compile four above
|
||||
|
||||
Don't start postfix or fetchmail yet, first create `/home/user/.procmailrc`:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
MAILDIR = "${HOME}/.maildir"
|
||||
ORGMAIL = "${MAILDIR}/"
|
||||
DEFAULT = "${MAILDIR}/"
|
||||
@ -133,18 +133,18 @@ list/qubes-users/
|
||||
:0
|
||||
* ^List-Id:.*qubes-devel\.googlegroups\.com
|
||||
list/qubes-devel/
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Run
|
||||
---
|
||||
|
||||
Open `/rw/config/rc.local` and add those two lines (before fetchmail lines, if you have them):
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
#!/bin/sh
|
||||
|
||||
mount --bind /usr/local/etc/postfix /etc/postfix
|
||||
systemctl --no-block start postfix
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Reboot your AppVM and you are done.
|
||||
|
24
Profiling.md
24
Profiling.md
@ -15,17 +15,17 @@ For the purpose of this document, `qubes-dev` is name of the domain used for pos
|
||||
Requirements
|
||||
------------
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
yum install gprof2dot graphviz
|
||||
git clone http://git.woju.eu/qubes/profiling.git
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
If you profile something on dom0, move `Upload.sh` from repository to dom0:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
mkdir -p ~/profiling
|
||||
qvm-run -p qubes-dev 'cat ~/profiling/Upload.sh' > ~/profiling/Upload.sh
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
- WARNING: this will obviously be running third party code which is not signed by ITL nor Fedora. You have been warned.
|
||||
|
||||
@ -62,28 +62,28 @@ Remember to revert your changes to application afterwards.
|
||||
|
||||
If you are in dom0:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
cd ~/profiling
|
||||
./Upload.sh
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
### Analyse
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
make
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
For every `${basename}.pstats` this will produce `${basename}.txt` and `${basename}.svg`. SVG contains call graph. Text file contains list of all functions sorted by cumulative execution time. You may also try `make all-png`.
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
make index.html
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
This creates `index.html` with all SVG graphics linked to TXT files. Ready for upload.
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
make REMOTE=example.com:public_html/qubes/profiling/ upload
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Example
|
||||
-------
|
||||
|
36
Qrexec.md
36
Qrexec.md
@ -19,9 +19,9 @@ Typically, the first thing that a `qrexec-client` instance does is to send a req
|
||||
|
||||
E.g., to start a primitive shell in a VM type the following in Dom0 console:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
[user@dom0 ~]$ /usr/lib/qubes/qrexec-client -d <vm name> user:bash
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
The string before first semicolon specifies what user to run the command as.
|
||||
|
||||
@ -65,9 +65,9 @@ In dom0, there is a bunch of files in `/etc/qubes-rpc/policy/` directory, whose
|
||||
|
||||
These files contain lines with the following format:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
srcvm destvm (allow|deny|ask)[,user=user_to_run_as][,target=VM_to_redirect_to]
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
You can specify `srcvm` and `destvm` by name, or by one of `$anyvm`, `$dispvm`, `dom0` reserved keywords (note string `dom0` does not match the `$anyvm` pattern; all other names do). Only `$anyvm` keyword makes sense in the `srcvm` field (service calls from dom0 are currently always allowed, `$dispvm` means "new VM created for this particular request" - so it is never a source of request). Currently, there is no way to specify source VM by type, but this is planned for Qubes R3.
|
||||
|
||||
@ -80,9 +80,9 @@ Requesting VM-VM (and VM-Dom0) services execution
|
||||
|
||||
In a src VM, one should invoke the qrexec client via the following command:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
/usr/lib/qubes/qrexec-client-vm <target vm name> <service name> <local program path> [local program arguments]`
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Note that only stdin/stdout is passed between RPC server and client - notably, no cmdline argument are passed.
|
||||
|
||||
@ -103,9 +103,9 @@ Qubes RPC policy supports an "ask" action, that will prompt the user whether a g
|
||||
|
||||
In order to remove such authorization, issue this command from a Dom0 terminal (example below for qubes.Filecopy service):
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo nano /etc/qubes-rpc/policy/qubes.Filecopy
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
and then remove any line(s) ending in "allow" (before the first \#\# comment) which are the "Yes to All" results.
|
||||
|
||||
@ -117,37 +117,37 @@ We will show the necessary files to create a simple RPC call that adds two integ
|
||||
|
||||
- Client code on source VM (`/usr/bin/our_test_add_client`)
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
#!/bin/sh
|
||||
echo $1 $2 # pass data to rpc server
|
||||
exec cat >&$SAVED_FD_1 # print result to the original stdout, not to the other rpc endpoint
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
- Server code on target VM (`/usr/bin/our_test_add_server`)
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
#!/bin/sh
|
||||
read arg1 arg2 # read from stdin, which is received from the rpc client
|
||||
echo $(($arg1+$arg2)) # print to stdout - so, pass to the rpc client
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
- Policy file in dom0 (`/etc/qubes-rpc/policy/test.Add`)
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
$anyvm $anyvm ask
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
- Server path definition on target VM (`/etc/qubes-rpc/test.Add`)
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
/usr/bin/our_test_add_server
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
- To test this service, run the following in the source VM:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
/usr/lib/qubes/qrexec-client-vm <target VM> test.Add /usr/bin/our_test_add_client 1 2
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
and we should get "3" as answer, provided dom0 policy allows the call to pass through, which would happen after we click "Yes" in the popup that should appear after the invocation of this command. If we changed the policy from "ask" to "allow", then no popup should be presented, and the call will always be allowed.
|
||||
|
||||
|
20
Qrexec3.md
20
Qrexec3.md
@ -87,37 +87,37 @@ We will show the necessary files to create rpc call that adds two integers on th
|
||||
|
||||
- rpc client code (*/usr/bin/our\_test\_add\_client*)
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
#!/bin/sh
|
||||
echo $1 $2 # pass data to rpc server
|
||||
exec cat >&$SAVED_FD_1 # print result to the original stdout, not to the other rpc endpoint
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
- rpc server code (*/usr/bin/our\_test\_add\_server*)
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
#!/bin/sh
|
||||
read arg1 arg2 # read from stdin, which is received from the rpc client
|
||||
echo $(($arg1+$arg2)) # print to stdout - so, pass to the rpc client
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
- policy file in dom0 (*/etc/qubes-rpc/policy/test.Add* )
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
$anyvm $anyvm ask
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
- server path definition ( */etc/qubes-rpc/test.Add*)
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
/usr/bin/our_test_add_server
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
- invoke rpc via
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
/usr/lib/qubes/qrexec-client-vm target_vm test.Add /usr/bin/our_test_add_client 1 2
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
and we should get "3" as answer, after dom0 allows it.
|
||||
|
||||
|
@ -66,21 +66,21 @@ Qrexec protocol details
|
||||
|
||||
Qrexec protocol is message-based. All messages share a common header followed by an optional data packet.
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
/* uniform for all peers, data type depends on message type */
|
||||
struct msg_header {
|
||||
uint32_t type; /* message type */
|
||||
uint32_t len; /* data length */
|
||||
};
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
When two peers establish connection, the server sends `MSG_HELLO` followed by `peer_info` struct:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
struct peer_info {
|
||||
uint32_t version; /* qrexec protocol version */
|
||||
};
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
The client then should reply with its own `MSG_HELLO` and `peer_info`. If protocol versions don't match, the connection is closed. TODO: fallback for backwards compatibility, don't do handshake in the same domain?.
|
||||
|
||||
@ -101,14 +101,14 @@ Details of all possible use cases and the messages involved are described below.
|
||||
- **dom0**: `qrexec-client` replies with `MSG_HELLO` header followed by `peer_info` to `qrexec-daemon`.
|
||||
- **dom0**: `qrexec-client` sends `MSG_EXEC_CMDLINE` header followed by `exec_params` to `qrexec-daemon`
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
/* variable size */
|
||||
struct exec_params {
|
||||
uint32_t connect_domain; /* target domain id */
|
||||
uint32_t connect_port; /* target vchan port for i/o exchange */
|
||||
char cmdline[0]; /* command line to execute, size = msg_header.len - sizeof(struct exec_params) */
|
||||
};
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
In this case, `connect_domain` and `connect_port` are set to 0.
|
||||
|
||||
@ -133,7 +133,7 @@ Details of all possible use cases and the messages involved are described below.
|
||||
- **domY**: `qrexec-client-vm` connects to `qrexec-agent` (via local socket/named pipe).
|
||||
- **domY**: `qrexec-client-vm` sends `trigger_service_params` data to `qrexec-agent` (without filling the `request_id` field):
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
struct trigger_service_params {
|
||||
char service_name[64];
|
||||
char target_domain[32];
|
||||
@ -143,7 +143,7 @@ Details of all possible use cases and the messages involved are described below.
|
||||
struct service_params {
|
||||
char ident[32];
|
||||
};
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
- **domY**: `qrexec-agent` allocates a locally-unique (for this domain) `request_id` (let's say `13`) and fills it in the `trigger_service_params` struct received from `qrexec-client-vm`.
|
||||
- **domY**: `qrexec-agent` sends `MSG_TRIGGER_SERVICE` header followed by `trigger_service_params` to `qrexec-daemon` in **dom0** via vchan.
|
||||
@ -159,14 +159,14 @@ Details of all possible use cases and the messages involved are described below.
|
||||
- **dom0**: `qrexec-client` replies with `MSG_HELLO` header followed by `peer_info` to **domX**'s`qrexec-daemon`.
|
||||
- **dom0**: `qrexec-client` sends `MSG_EXEC_CMDLINE` header followed by `exec_params` to **domX**'s`qrexec-daemon`
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
/* variable size */
|
||||
struct exec_params {
|
||||
uint32_t connect_domain; /* target domain id */
|
||||
uint32_t connect_port; /* target vchan port for i/o exchange */
|
||||
char cmdline[0]; /* command line to execute, size = msg_header.len - sizeof(struct exec_params) */
|
||||
};
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
In this case, `connect_domain` is set to id of **domY** (from the `-c` parameter) and `connect_port` is set to 0. `cmdline` field contains the RPC to execute, in this case `user:QUBESRPC qubes.SomeRpc domY`.
|
||||
|
||||
|
@ -26,15 +26,15 @@ In order to use it one should use an rpm-based distro, like Fedora :) and should
|
||||
|
||||
Unusually one can install those packages by just issuing:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo yum install git createrepo rpm-build make wget rpmdevtools python-sh dialog rpm-sign
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
The build system creates build environments in chroots and so no other packages are needed on the host. All files created by the build system are contained within the qubes-builder directory. The full build requires some 25GB of free space, so keep that in mind when deciding where to place this directory.
|
||||
|
||||
The build system is configured via builder.conf file -- one should copy the attached builder.conf.default, and modify it as needed, e.g.:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
cp builder.conf.default builder.conf
|
||||
# edit the builder.conf file and set the following variables:
|
||||
# (make sure to leave no spaces around '=' sign!)
|
||||
@ -44,23 +44,23 @@ NO_SIGN=1
|
||||
# and VMs is fc20 so if you want to build Qubes 2
|
||||
DIST_DOM0=fc20
|
||||
DISTS_VM=fc20
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
One additional useful requirement is that 'sudo root' work without any prompt, which is default on most distros (e.g. 'sudo bash' brings you the root shell without asking for any password). This is important as the builder needs to switch to root and then back to user several times during the build process.
|
||||
|
||||
Additionally, if building with signing enabled (so NO\_SIGN is not set), one must adjust \~/.rpmmacro file so that it point to the GPG key used for package signing, e.g.:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
%_signature gpg
|
||||
%_gpg_path /home/user/.gnupg
|
||||
%_gpg_name AC1BF9B3 # <-- Key ID used for signing
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
It is also recommended to use an empty passphrase for the private key used for signing. Contrary to a popular belief, this doesn't affect your key or sources security -- if somebody compromised your system, then the game is over, whether you use additional passphrase for the key or not.
|
||||
|
||||
So, to build Qubes one would do:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
# Import the Qubes master key
|
||||
gpg --recv-keys 0x36879494
|
||||
|
||||
@ -90,7 +90,7 @@ make qubes
|
||||
# ... and then to build the ISO
|
||||
|
||||
make iso
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
And this should produce a shiny new ISO.
|
||||
|
||||
@ -128,9 +128,9 @@ If you want to somehow modify sources, you can also do it, here are some basic s
|
||||
|
||||
> `get-sources` is already done, so continue with the next one. You can skip `sign-all` if you've disabled signing
|
||||
>
|
||||
> {% highlight trac-wiki %}
|
||||
> ```
|
||||
> make xen core kernel gui addons docs template kde-dom0 installer qubes-manager dom0-updates
|
||||
> {% endhighlight %}
|
||||
> ```
|
||||
|
||||
1. build iso installation image
|
||||
|
||||
@ -141,11 +141,11 @@ Code verification keys management
|
||||
|
||||
[QubesBuilder](/doc/QubesBuilder/) by default verifies signed tags on every downloaded code. Public keys used for that are stored in `keyrings/git`. By default Qubes developers' keys are imported automatically, but if you need some additional keys (for example your own), you can add them using:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
GNUPGHOME=$PWD/keyrings/git gpg --import /path/to/key.asc
|
||||
GNUPGHOME=$PWD/keyrings/git gpg --edit-key ID_OF_JUST_IMPORTED_KEY
|
||||
# here use "trust" command to set key fully or ultimately trusted - only those keys are accepted by QubesBuilder
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
All Qubes developers' keys are signed by the Qubes Master Signing Key (which is set as ultimately trusted key), so are trusted automatically.
|
||||
|
||||
|
@ -34,15 +34,15 @@ Reconnecting AppVMs after a NetVM reboot
|
||||
|
||||
Normally Qubes doesn't let the user to stop a NetVM if there are other AppVMs running which use it as their own NetVM. But in case the NetVM stops for whatever reason (e.g. it crashes, or the user forces its shutdown via qvm-kill via terminal in the netvm), then there is an easy way to restore the connection to the netvm by issuing:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
qvm-prefs <appvm> -s netvm <netvm>
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Normally AppVMs do not connect directly to the actual NetVM which has networking devices, but rather to the default FirewallVM first, and in most cases it would be the NetVM that would crash, e.g. in response to S3 sleep/restore or other issues with WiFi drivers. In that case it is necessary to just issue the above command once, for the FirewallVM (this assumes default VM-nameing used by the default Qubes installation):
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
qvm-prefs firewallvm -s netvm netvm
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Enabling networking between two AppVMs
|
||||
--------------------------------------
|
||||
@ -56,18 +56,18 @@ In order to allow networking between AppVM A and B follow those steps:
|
||||
- Start both AppVMs, and also open a terminal in the firewall VM
|
||||
- In the firewall VM's terminal enter the following iptables rule:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo iptables -I FORWARD 2 -s <IP address of A> -d <IP address of B> -j ACCEPT
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
- Now you should be able to reach the AppVM B from A -- test it using e.g. ping issues from AppVM A. Note however, that this doesn't allow you to reach A from B -- for this you would need another rule, with A and B addresses swapped.
|
||||
- If everything works as expected, then the above iptables rule(s) should be written into firewall VM's `qubes_firewall_user_script` script which is run on every firewall update. This is necessary, because Qubes orders every firewall VM to update all the rules whenever new VM is started in the system. If we didn't enter our rules into this "hook" script, then shortly our custom rules would disappear and inter-VM networking would stop working. Here's an example how to update the script (note that, by default, there is no script file present, so we likely will be creating it, unless we had some other custom rules defines earlier in this firewallvm):
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
[user@firewallvm ~]$ sudo bash
|
||||
[root@firewallvm user]# echo "iptables -I FORWARD 2 -s 10.137.2.25 -d 10.137.2.6 -j ACCEPT" >> /rw/config/qubes_firewall_user_script
|
||||
[root@firewallvm user]# chmod +x /rw/config/qubes_firewall_user_script
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Port forwarding to an AppVM from the outside world
|
||||
--------------------------------------------------
|
||||
@ -90,15 +90,15 @@ In NetVM terminal, take note of the interface name and IPAddress on which you wa
|
||||
|
||||
Still in NetVM terminal, code the appropriate natting firewall rule to intercept traffic on the inbound interface for the service and nat the destination IP address to the one of the firewallVM for the traffic to be routed there:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 443 -d 192.168.0.10 -j DNAT --to-destination 10.137.1.x
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Code the appropriate new filtering firewall rule to allow new connections for the service:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
iptables -I FORWARD 2 -i eth0 -d 10.137.1.x -p tcp --dport 443 -m conntrack --ctstate NEW -j ACCEPT
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Note: If you want to expose the service on multiple interfaces, repeat the steps described in part 1 for each interface.
|
||||
|
||||
@ -114,23 +114,23 @@ In order to ensure your set-up survive a reboot we need in the NetVM to:
|
||||
|
||||
Store these commands in ` /rw/config/rc.local `:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo nano /rw/config/rc.local
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
#!/bin/sh
|
||||
|
||||
/sbin/iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 443 -d 192.168.0.10 -j DNAT --to-destination 10.137.1.x
|
||||
|
||||
/sbin/iptables -I FORWARD 2 -s 192.168.0.0/24 -d 10.137.1.x -p tcp --dport 443 -m conntrack --ctstate NEW -j ACCEPT
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Make this file executable:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo chmod +x /rw/config/rc.local
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
**2. Allow packets to be routed from the firewallVM to the appVM**
|
||||
|
||||
@ -140,15 +140,15 @@ In FirewallVM Terminal, take note of the IPAddress for interface eth0 using the
|
||||
|
||||
Still in FirewallVM terminal, code the appropriate natting firewall rule to intercept traffic on the inbound interface for the service and nat the destination IP address to the one of the AppVM for the traffic to be routed there:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 443 -d 10.137.1.x -j DNAT --to-destination 10.137.2.y
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Code the appropriate new filtering firewall rule to allow new connections for the service:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
iptables -I FORWARD 2 -i eth0 -s 192.168.0.0/24 -d 10.137.2.y -p tcp --dport 443 -m conntrack --ctstate NEW -j ACCEPT
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
> Note: If you do not wish to limit the IP addresses connecting to the service, remove the ` -s 192.168.0.1/24 `
|
||||
|
||||
@ -158,28 +158,28 @@ This time in order to ensure your set-up survive a reboot we need in the firewal
|
||||
|
||||
Store these commands in ` /rw/config/qubes_firewall_user_script `:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
#!/bin/sh
|
||||
|
||||
/sbin/iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 443 -d 10.137.1.x -j DNAT --to-destination 10.137.2.y
|
||||
|
||||
/sbin/iptables -I FORWARD 4 -i eth0 -s 192.168.0.0/24 -d 10.137.2.y -p tcp --dport 443 -m conntrack --ctstate NEW -j ACCEPT
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
And again make this file executable:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo chmod +x /rw/config/qubes_firewall_user_script
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
**3. Allow packets into the AppVM to reach the service**
|
||||
|
||||
Here no routing is required, only filtering. Proceed in the same way as above but store the filtering rule in the `/rw/config/rc.local` script.
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
#!/bin/sh
|
||||
|
||||
/sbin/iptables -I INPUT 5 -p tcp --dport 443 -m conntrack --ctstate NEW -j ACCEPT
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
This time testing should allow connectivity to the service.
|
||||
|
@ -10,47 +10,47 @@ Building Qubes OS 3.0 ISO
|
||||
|
||||
Ensure your system is rpm-based and that you have necessary dependencies installed (see [QubesBuilder](/doc/QubesBuilder/) for more info):
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo yum install git createrepo rpm-build make wget rpmdevtools pandoc
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Get the necessary keys to verify the sources:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
$ wget https://keys.qubes-os.org/keys/qubes-master-signing-key.asc
|
||||
$ gpg --import qubes-master-signing-key.asc
|
||||
$ gpg --edit-key 36879494
|
||||
# Verify fingerprint!, set trust to *ultimate*
|
||||
$ wget https://keys.qubes-os.org/keys/qubes-developers-keys.asc
|
||||
$ gpg --import qubes-developers-keys.asc
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Note we do *not* relay above on the security of our server (keys.qubes-os.org) nor the connection (ssl, cert) -- we only rely on you getting the Qubes Master Signing Key fingerprint *somehow* and ensure they match!
|
||||
|
||||
Now lets bootstrap the builder. Unfortunately the builder cannot verify itself (the classic Chicken and Egg problem), so we need to verify the signature manually:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
$ git clone git://github.com/QubesOS/qubes-builder.git
|
||||
$ cd qubes-builder
|
||||
$ git describe --exact-match HEAD
|
||||
<some tag>
|
||||
$ git tag -v <some tag>
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Assuming the verification went fine, we're good to go with all the rest without ever thinking more about verifying digital signatures on all the rest of the components, as the builder will do that for us, for each component, every time we, even for all aux files (e.g. Xen or Linux kernel sources).
|
||||
|
||||
Let's configure the builder first (we can use one of the example configs, either for R2 or "master", which currently means pre-released R3):
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
cp example-configs/qubes-os-master.conf builder.conf
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
You can take a loot at the `builder.conf.default` for a description of all available options. Nevertheless, the default config should be enough for start:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
$ make get-sources qubes
|
||||
$ make sign-all # this requires setting SIGN_KEY in the builder.conf, can be skipped for test builds.
|
||||
$ make iso
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Enjoy your new ISO!
|
||||
|
@ -12,11 +12,11 @@ Under the hood enabled service in VM is signaled by file in /var/run/qubes-servi
|
||||
1. Disable old service: `systemctl disable <service name>`
|
||||
2. Create `/etc/systemd/system/<service name>.service` file containing:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
.include /lib/systemd/system/<service name>.service
|
||||
[Unit]
|
||||
ConditionPathExists=/var/run/qubes-service/<service name>
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
3. Enable new service: `systemctl enable <service name>`.
|
||||
|
||||
|
@ -17,17 +17,17 @@ There are several disk images which can be easily extended.
|
||||
|
||||
To grow the private disk image of a AppVM beyond this limit [qubes-grow-private](/doc/Dom0Tools/QvmGrowPrivate/) can be used:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
qvm-grow-private <vm-name> <size>
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Note: Size is the target size (i.e. 4096MB or 16GB, ...), not the size to add to the existing disk.
|
||||
|
||||
Note2: If once the VM is started, the disk is has not been increased, you can issue in the VM's terminal:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo resize2fs /dev/xvdb
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
### Shrinking private disk image (Linux VM)
|
||||
|
||||
@ -40,14 +40,14 @@ The basic idea is to:
|
||||
|
||||
Ext4 does not support online shrinking, so can't be done as convenient as image grown. Note that we don't want to touch the VM filesystem directly in dom0 for security reasons. First you need to start VM without `/rw` mounted. One of the possibility is to interrupt its normal startup by adding `rd.break` kernel option:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
qvm-prefs -s <vm-name> kernelopts rd.break
|
||||
qvm-start --no-guid <vm-name>
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
And wait for qrexec connect timeout (or simply press Ctrl-C). Then you can connect to VM console and shrink the filesystem:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo xl console <vm-name>
|
||||
# you should get dracut emergency shell here
|
||||
mount --bind /dev /sysroot/dev
|
||||
@ -59,19 +59,19 @@ umount /proc
|
||||
exit
|
||||
umount /sysroot/dev
|
||||
poweroff
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Now you can resize the image:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
truncate -s <new-desired-size> /var/lib/qubes/appvms/<vm-name>/private.img
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
**It is critical to use the same (or bigger for some safety margin) size in truncate call compared to resize2fs call. Otherwise you will loose your data!** Then reset kernel options back to default:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
qvm-prefs -s <vm-name> kernelopts default
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Done.
|
||||
|
||||
@ -97,12 +97,12 @@ First, stop/shutdown the HVM.
|
||||
|
||||
Then, from a Dom0 terminal (in KDE: System Tools -\> Terminal Emulator) do the following:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
cd /var/lib/qubes/appvms/<yourHVM>/
|
||||
ls -lh root.img (<--verify current size of disk image)
|
||||
truncate -s 30GB root.img
|
||||
ls -lh root.img (<--verify new size of disk image)
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
The partition table and file-system must be adjusted after this change:
|
||||
|
||||
@ -117,9 +117,9 @@ No reboot required.
|
||||
|
||||
#### FreeBSD
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
gpart recover ada0
|
||||
sysctl kern.geom.debugflags=0x10
|
||||
gpart resize -i index ada0
|
||||
zpool online -e poolname ada0
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
8
Rxvt.md
8
Rxvt.md
@ -20,7 +20,7 @@ Xresources
|
||||
|
||||
In TemplateVM create file `/etc/X11/Xresources.urxvt` and paste config below. `!`-lines are comments and may be left out. `#`-lines are directives to CPP (C preprocessor) and are neccessary. This shouldn't go to `/etc/X11/Xresources`, because that file is not preprocessed by default.
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
! CGA colour palette
|
||||
|
||||
!*color0: #000000
|
||||
@ -123,15 +123,15 @@ URxvt.insecure: False
|
||||
|
||||
! some termcap-aware software sometimes throw '$TERM too long'
|
||||
!URxvt.termName: rxvt-256color
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Then create script to automatically merge those to xrdb. File `/etc/X11/xinit/xinitrc.d/urxvt.sh`:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
#!/bin/sh
|
||||
|
||||
[ -r /etc/X11/Xresources.urxvt ] && xrdb -merge /etc/X11/Xresources.urxvt
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Shortcuts
|
||||
---------
|
||||
|
@ -29,17 +29,17 @@ Download Verification
|
||||
|
||||
Standard program installation
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo yum install <program>
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
on template terminal already accomplishes verification, for fedora and qubes repositories.
|
||||
|
||||
If you install new repositories, they might have gpgcheck disabled. [Check the config files](http://docs.fedoraproject.org/en-US/Fedora/12/html/Deployment_Guide/sec-Configuring_Yum_and_Yum_Repositories.html) and be sure to check that
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
gpgcheck=1
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Plus, also make sure you **safely import their signing keys**. This may require you check from multiple sources that the signing key is always the same.
|
||||
|
||||
@ -66,9 +66,9 @@ Enabling and Verifying VT-d/IOMMU
|
||||
|
||||
In **Dom0** terminal, run:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
qubes-hcl-report <userVM>
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
where \<userVM\> is the name of the VM within which the report will be written (but the report will also be displayed in the Dom0 terminal). If it displays that VT-d is active, you should be able to assign **PCIe devices to a HVM** and **enjoy DMA protection** for your driver domains, so you successfully passed this step.
|
||||
|
||||
@ -79,15 +79,15 @@ Updating Software
|
||||
|
||||
To keep your system regularly updated against security related bugs and get new features, run in Dom0:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo qubes-dom0-update
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
and run in templates and standalone VM
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo yum update
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
or use the equivalent items in Qubes Manager, which displays an icon when an update is available.
|
||||
|
||||
@ -145,9 +145,9 @@ An **USBVM** operates like a dedicated temporary parking area, used just to prev
|
||||
5. Click OK. Restart the AppVM. (Restarting may not even be required.)
|
||||
6. Set the VM to start automatically at Boot using the VM Manager, (under VM Settings), or **In dom0 terminal**, run
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
qvm-prefs -s usbvm autostart true
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
This will cause your new **USBVM** to automatically start when the system starts up. So that in case you forgot to start it and then accidentally plugged a USB stick (or your colleague at work did it while you were at lunch), **it won't compromise the Dom0**.
|
||||
|
||||
|
@ -21,9 +21,9 @@ Qubes Security Team
|
||||
|
||||
The Qubes Security Team can be contacted via email using the following address:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
security at qubes-os dot org
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Qubes Security Team GPG Key
|
||||
---------------------------
|
||||
|
@ -35,15 +35,15 @@ Of course, command line tools are still available for accomplishing various upda
|
||||
|
||||
1. To check and install updates for dom0 software:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
$ sudo qubes-dom0-update
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
1. To install additional packages in dom0 (usually not recommended):
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
$ sudo qubes-dom0-update anti-evil-maid
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
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.
|
||||
|
||||
@ -51,30 +51,30 @@ Of course, command line tools are still available for accomplishing various upda
|
||||
|
||||
1. Download an older version of the package:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo qubes-dom0-update package-version
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Yum will say that there is no update, but the package will nonetheless be downloaded to dom0.
|
||||
|
||||
1. Downgrade the packge:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo yum downgrade package-version
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
### Kernel Upgrade ###
|
||||
|
||||
Install newer kernel. The following example installs kernel 3.19 and was tested on Qubes R3 RC1.
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo qubes-dom0-update kernel-3.19*
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Rebuild grub config.
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Reboot required.
|
||||
|
@ -72,9 +72,9 @@ Sometime it might be convenient to have a VM that has its own filesystem, where
|
||||
|
||||
In order to create a standalone VM you can use a command line like this (from console in Dom0):
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
qvm-create <vmname> --standalone --label <label>
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
... or click appropriate options in the Qubes Manager's Create VM window.
|
||||
|
||||
@ -85,9 +85,9 @@ It's also possible to have more than one template VM in the system. E.g. one cou
|
||||
|
||||
When you create a new domain you can choose which template this VM should be based on. If you use command line, you should use the `--template` switch:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
qvm-create <vmname> --template <templatename> --label <label>
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Temporarily allowing networking for software installation
|
||||
---------------------------------------------------------
|
||||
@ -111,15 +111,15 @@ The proxy is running in selected VMs (by default all the NetVMs (1)) and interce
|
||||
|
||||
1. Updates proxy: It is running as "qubes-yum-proxy" service. Startup script of this service setup firewall rule to intercept proxy traffic:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
iptables -t nat -A PR-QBS-SERVICES -d 10.137.255.254/32 -i vif+ -p tcp -m tcp --dport 8082 -j REDIRECT
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
1. VM using the proxy service Startup script (qubes-misc-post service) configure yum using /etc/yum.conf.d/qubes-proxy.conf file. It can either contain
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
proxy=http://10.137.255.254:8082/
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
line, or be empty. Note that this file is specifically included from main yum.conf, yum does not support real conf.d configuration style...
|
||||
|
||||
|
@ -39,12 +39,12 @@ Applying other fixes
|
||||
|
||||
There are a few more fixes needed for Sony Vaio Z, and we have prepared a special package that you can install in Dom0 that applies them all. After the installation is complete, open console in Dom0 and do the following:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
$ sudo bash
|
||||
# qvm-dom0-networking up
|
||||
# yum install qubes-core-dom0-vaio-fixes
|
||||
# reboot
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
This script takes care about the following:
|
||||
|
||||
|
@ -21,15 +21,15 @@ this `QubesOS` github account.
|
||||
|
||||
To clone a repository:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
git clone git://github.com/QubesOS/<repo_name>.git <repo_name>
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
e.g.:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
git clone git://github.com/QubesOS/qubes-core-admin.git core-admin
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
## Sending a patch
|
||||
|
||||
|
@ -17,25 +17,25 @@ Install
|
||||
|
||||
It can be installed via the following command:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
[user@dom0 ~]$ sudo qubes-dom0-update qubes-template-fedora-21-minimal
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
It is a good idea to clone the original template, and make any changes in the new clone instead:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
[user@dom0 ~]$ qvm-clone fedora-21-minimal <your new template name>
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
The sudo package is not installed by default, so let's install it:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
[user@F21-Minimal ~]$ su -
|
||||
[user@F21-Minimal ~]$ yum install sudo
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
The rsyslog logging service is not installed by default. All logging is now being handled by the systemd journal. Users requiring the rsyslog service should install it manually.
|
||||
|
||||
@ -45,15 +45,15 @@ To access the journald log, use the `journalctl` command.
|
||||
|
||||
If you want to use this template to for standard NetVMs you should install some more packeges:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
[user@F21-Minimal ~]$ sudo yum install NetworkManager NetworkManager-wifi network-manager-applet wireless-tools dbus-x11 dejavu-sans-fonts tar tinyproxy
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
And maybe some more optional but useful packages as well:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
[user@F21-Minimal ~]$ sudo yum install pciutils vim-minimal less tcpdump telnet psmisc nmap nmap-ncat gnome-keyring
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
If your network device needs some firmware then you should also install the corresponding packages as well. The `lspci; yum search firmware` command will help to choose the right one :)
|
||||
|
||||
|
12
TestBench.md
12
TestBench.md
@ -57,9 +57,9 @@ Now configure your DHCP server so your testbench gets static IP and connect your
|
||||
|
||||
Install `openssh-server` on your testbench:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
yum install openssh-server
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Ensure that sudo works without password from your user account (it should by default).
|
||||
|
||||
@ -70,19 +70,19 @@ Development VM
|
||||
|
||||
Arrange firewall so you can reach the testbench from your `qubes-dev` VM. Generate SSH key in `qubes-dev`:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
ssh-keygen -t ecdsa -b 521
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Add the following section in `.ssh/config` in `qubes-dev`:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
Host testbench
|
||||
# substitute username in testbench
|
||||
User user
|
||||
# substitute address of your testbench
|
||||
HostName 192.168.123.45
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Then connect to your testbench and paste newly generated `id_ecdsa.pub` to `.ssh/authorized_keys` on testbench so you can log in without entering password every time.
|
||||
|
||||
|
@ -33,9 +33,9 @@ Note that dom0 in R2 is based on Fedora 20, in contrast to Fedora 18 in previous
|
||||
|
||||
1. Install all the updates for Dom0:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo qubes-dom0-update
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
After this step you should have `qubes-release-2-5` in your Dom0. Important: if you happen to have `qubes-release-2-6*` then you should downgrade to `qubes-release-2-5`! The `qubes-release-2-6*` packages have been uploaded to the testing repos and were kept there for a few hours, until we realized they bring incorrect repo definitions and so we removed them and also have changed the update procedure a bit (simplifying it).
|
||||
|
||||
@ -43,18 +43,18 @@ After this step you should have `qubes-release-2-5` in your Dom0. Important: if
|
||||
|
||||
Note: be sure that the VM used as a update-downloading-vm (by default its the firewallvm based on the default template) has been updated to the latest qubes packages, specifically `qubes-core-vm-2.1.33` or later. This doesn't imply that the VM must already be upgraded to fc20 -- for Dom0 upgrade we could still use an fc18-based VM (updatevm) it is only important to install the latest Qubes packages there.
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo qubes-dom0-update qubes-dom0-dist-upgrade
|
||||
sudo qubes-dom0-update
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
1. If above step completed successfully you should have `qubes-release-2-9` or later. If not, repeat above step with additional `--clean` option.
|
||||
|
||||
4a. If you chose not to upgrade your fc18 templates, but instead to download our new fc20-based template you should now be able to do that by simply typing:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo qubes-dom0-update qubes-template-fedora-20-x64
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
1. Reboot the system.
|
||||
|
||||
|
@ -22,26 +22,26 @@ By default, in Qubes R1, there is only one Template VM, however users are free t
|
||||
1. Open terminal in the template VM (or standalone VM). E.g. use the Qubes Manager's right-click menu and choose Run Command in VM and type `gnome-terminal` there.
|
||||
2. Install `qubes-upgrade-vm` package (this package brings in R2 repo definitions and R2 keys)
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo yum install qubes-upgrade-vm
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
3. Proceed with normal update in the template (this should bring in also the R2 packages for the VMs):
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo yum update
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
The installer (yum) will prompt to accept the new Qubes R2 signing key:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
Importing GPG key 0x0A40E458:
|
||||
Userid : "Qubes OS Release 2 Signing Key"
|
||||
Fingerprint: 3f01 def4 9719 158e f862 66f8 0c73 b9d4 0a40 e458
|
||||
Package : qubes-upgrade-vm-1.0-1.fc17.x86_64 (@qubes-vm-current)
|
||||
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-upgrade-qubes-2-primary
|
||||
Is this ok [y/N]:
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
If you see (as is the case on the "screenshot" above) that the new key was imported from a local filesystem (`/etc/pki/rpm-gpg/...`) you can safely accept the key, without checking its fingerprint. This is because there were only two ways for such a key to make it to your Template VM's filesystem:
|
||||
|
||||
@ -58,17 +58,17 @@ Be sure to do steps described in this section after *all* your template and stan
|
||||
1. Open terminal in Dom0. E.g. Start-\>System Settings-\>Konsole.
|
||||
2. Upgrade the `qubes-release` package to the latest version which brings in new repo definitions and R2 signing keys:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo qubes-dom0-update qubes-release
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
This should install `qubes-release-1-6` in your Dom0.
|
||||
|
||||
3. Install R2 packages:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo qubes-dom0-update --releasever=2
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
4. Reboot your system. Please note that if you use Anti Evil Maid, then it won't be able to unseal the passphrase this time, because the Xen, kernel, and initramfs binaries have changed. Once the system boots up again, you could reseal your Anti Evil Maid's passphrase to the new configuration. Please consult Anti Evil Maid documentation for explanation on how to do that.
|
||||
|
||||
|
@ -20,26 +20,26 @@ By default, in Qubes R1, there is only one Template VM, however users are free t
|
||||
1. Open terminal in the template VM (or standalone VM). E.g. use the Qubes Manager's right-click menu and choose Run Command in VM and type `gnome-terminal` there.
|
||||
2. Install `qubes-upgrade-vm` package (this package brings in R2 repo definitions and R2 keys)
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo yum install qubes-upgrade-vm
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
3. Proceed with normal update in the template (this should bring in also the R2 packages for the VMs):
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo yum update
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
The installer (yum) will prompt to accept the new Qubes R2 signing key:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
Importing GPG key 0x0A40E458:
|
||||
Userid : "Qubes OS Release 2 Signing Key"
|
||||
Fingerprint: 3f01 def4 9719 158e f862 66f8 0c73 b9d4 0a40 e458
|
||||
Package : qubes-upgrade-vm-1.0-1.fc17.x86_64 (@qubes-vm-current)
|
||||
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-upgrade-qubes-2-primary
|
||||
Is this ok [y/N]:
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
If you see (as is the case on the "screenshot" above) that the new key was imported from a local filesystem (`/etc/pki/rpm-gpg/...`) you can safely accept the key, without checking its fingerprint. This is because there were only two ways for such a key to make it to your Template VM's filesystem:
|
||||
|
||||
@ -53,13 +53,13 @@ Installing new template
|
||||
|
||||
Qubes R2 Beta2 brings new fedora-18-x64 template (based on Fedora 18). You can install it from Qubes installation DVD. Insert installation DVD into your drive and issue following commmands:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
$ sudo -s
|
||||
# mkdir -p /mnt/cdrom
|
||||
# mount /dev/cdrom /mnt/cdrom # you can also use ISO image instead of /dev/cdrom; then add -o loop option
|
||||
# yum install /mnt/cdrom/Packages/q/qubes-template-fedora-18-x64*rpm
|
||||
# umount /mnt/cdrom
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
If you already have fedora-17-x64, you can also upgrade it to fedora-18-x64 following [standard Fedora upgrade procedure](http://fedoraproject.org/wiki/Upgrading_Fedora_using_yum) (only "yum" method will work in Qubes VM).
|
||||
|
||||
@ -71,31 +71,31 @@ Be sure to do steps described in this section after *all* your template and stan
|
||||
1. Open terminal in Dom0. E.g. Start-\>System Settings-\>Konsole.
|
||||
2. Upgrade the `qubes-release` package to the latest version which brings in new repo definitions and R2 signing keys:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo qubes-dom0-update qubes-release
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
This should install `qubes-release-1-6` in your Dom0.
|
||||
|
||||
3. Install R2 upgrade package:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo qubes-dom0-update --releasever=1 qubes-dist-upgrade
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
4. Start upgrade process:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo qubes-dist-upgrade
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
5. Follow instructions on screen, first stage of upgrade should end up with reboot request.
|
||||
6. Reboot your system, ensure that you choose "Qubes Upgrade" boot option.
|
||||
7. When system starts up, login and start start
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo qubes-dist-upgrade
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
again. This will start second stage of upgrade, here most packages will be upgraded, so this will take a while.
|
||||
|
||||
|
@ -24,21 +24,21 @@ It is critical to complete this step **before** proceeding to dom0 upgrade. Othe
|
||||
1. Open terminal in the template VM (or standalone VM). E.g. use the Qubes Manager's right-click menu and choose Run Command in VM and type `gnome-terminal` there.
|
||||
2. Proceed with normal update in the template:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo yum update
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
3. Ensure that you've got qubes-core-vm package version 2.1.13-3.fc18:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
rpm -q qubes-core-vm
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
4. Update the system to R2 beta3 packages:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo yum --enablerepo=qubes-vm-r2b3-current update
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
5. **Do not** shutdown the VM.
|
||||
|
||||
@ -50,24 +50,24 @@ Be sure to do steps described in this section after *all* your template and stan
|
||||
1. Open terminal in Dom0. E.g. Start-\>System Settings-\>Konsole.
|
||||
2. Upgrade the `qubes-release` package to the latest version which brings in new repo definitions and R2 signing keys:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo qubes-dom0-update qubes-release
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
This should install `qubes-release-2-3.1` in your Dom0.
|
||||
|
||||
3. Upgrade dom0 to R2 beta3:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo qubes-dom0-update --enablerepo=qubes-dom0-r2b3-current
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
4. If above step completed successfully you should have qubes-core-dom0 at least 2.1.34. If not, repeat above step with additional `--clean` option.
|
||||
5. Now is the time to shutdown all the VMs:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
qvm-shutdown --all --wait
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
6. Reboot the system.
|
||||
|
||||
|
@ -10,8 +10,8 @@ How to create a bootable USB stick from Qubes ISO
|
||||
|
||||
Qubes ISO image is already prepared to boot from USB disk, you just need to copy the ISO onto the USB device, e.g. using dd:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
dd if=Qubes-R2-Beta2-x86_64-DVD.iso of=/dev/sdX
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
**Be sure to use a correct device as the target in the dd command above (instead of sdX)**
|
||||
|
@ -12,11 +12,11 @@ Those files are placed in /rw, which survives VM restart, so can be used to cust
|
||||
|
||||
- `/rw/config/rc.local` - script run at VM startup. Good place to change some service settings, replace config files with its copy stored in /rw/config etc. Example usage:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
# Store bluetooth keys in /rw to keep them across VM restarts
|
||||
rm -rf /var/lib/bluetooth
|
||||
ln -s /rw/config/var-lib-bluetooth /var/lib/bluetooth
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
- `/rw/config/qubes-ip-change-hook` - script run in NetVM after external IP change (or connection to the network)
|
||||
- `/rw/config/qubes-firewall-user-script` - script run in ProxyVM after firewall update. Good place to write own custom firewall rules
|
||||
@ -29,7 +29,7 @@ GUI and audio configuration in dom0
|
||||
|
||||
GUI configuration file `/etc/qubes/guid.conf` in one of few not managed by qubes-prefs nor Qubes Manager tool. Sample config (included in default installation):
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
# Sample configuration file for Qubes GUI daemon
|
||||
# For syntax go http://www.hyperrealm.com/libconfig/libconfig_manual.html
|
||||
|
||||
@ -53,7 +53,7 @@ VM: {
|
||||
#allow_fullscreen = true;
|
||||
};
|
||||
};
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Currently supported settings:
|
||||
|
||||
|
@ -12,21 +12,21 @@ You may want to use a non-default template as a basis for Disposable VM. One exa
|
||||
|
||||
In order to regenerate the Disposable VM "snapshot" (called 'savefile' on Qubes) one can use the following command in Dom0:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
[joanna@dom0 ~]$ qvm-create-default-dvm <custom-template-name>
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
This would create a new Disposable VM savefile based on the custom template. Now, whenever one opens a file (from any AppVM) in a Disposable VM, a Disposable VM based on this template will be used.
|
||||
|
||||
One can easily verify if the new Disposable VM template is indeed based on a custom template (in the example below the template called "f17-yellow" was used as a basis for the Disposable VM):
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
[joanna@dom0 ~]$ ll /var/lib/qubes/dvmdata/
|
||||
total 0
|
||||
lrwxrwxrwx 1 joanna joanna 45 Mar 11 13:59 default_dvm.conf -> /var/lib/qubes/appvms/f17-yellow-dvm/dvm.conf
|
||||
lrwxrwxrwx 1 joanna joanna 49 Mar 11 13:59 default_savefile -> /var/lib/qubes/appvms/f17-yellow-dvm/dvm-savefile
|
||||
lrwxrwxrwx 1 joanna joanna 47 Mar 11 13:59 savefile_root -> /var/lib/qubes/vm-templates/f17-yellow/root.img
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
|
||||
Customization of Disposable VM
|
||||
@ -36,9 +36,9 @@ It is possible to change the settings of each new Disposable VM (DispVM). This c
|
||||
|
||||
1. Start a terminal in the `fedora-20-x64-dvm` TemplateVM by running the following command in a dom0 terminal. (By default, this TemplateVM is not shown in Qubes VM Manager. However, it can be shown by selecting "Show/Hide internal VMs.")
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
[user@dom0 ~]$ qvm-run -a fedora-20-x64-dvm gnome-terminal
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
2. Change the VM's settings and/or applications, as desired. Note that currently Qubes supports exactly one DispVM template, so any changes you make here will affect all DispVMs. Some examples of changes you may want to make include:
|
||||
- Changing Firefox's default startup settings and homepage.
|
||||
@ -47,15 +47,15 @@ It is possible to change the settings of each new Disposable VM (DispVM). This c
|
||||
|
||||
3. Create an empty `/home/user/.qubes-dispvm-customized` file:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
[user@fedora-20-x64-dvm ~]$ touch /home/user/.qubes-dispvm-customized
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
4. Shutdown the VM (either by `poweroff` from VM terminal, or `qvm-shutdown` from dom0 terminal).
|
||||
5. Regenerate the DispVM template:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
[user@dom0 ~]$ qvm-create-default-dvm --default-template --default-script
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
**Note:** All of the above requires at least qubes-core-vm \>= 2.1.2 installed in template.
|
||||
|
@ -42,7 +42,7 @@ Start with creating a dedicated AppVM for storing your keys (the GPG backend dom
|
||||
|
||||
Make sure the gpg is installed there and there are some private keys in the keyring, e.g.:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
[user@work-gpg ~]$ gpg -K
|
||||
/home/user/.gnupg/secring.gpg
|
||||
-----------------------------
|
||||
@ -50,19 +50,19 @@ sec 4096R/3F48CB21 2012-11-15
|
||||
uid Qubes OS Security Team <security@qubes-os.org>
|
||||
ssb 4096R/30498E2A 2012-11-15
|
||||
(...)
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
This is pretty much all that is required. However one might also want to modify the default timeout which tells the backend for how long the user's approval for key access should be valid (default 5 minutes). This is adjustable via `QUBES_GPG_AUTOACCEPT` variable. One can override it e.g. in `~/.bash_profile`:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
[user@work-gpg ~]$ echo "export QUBES_GPG_AUTOACCEPT=86400" >> ~/.bash_profile
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
### Configuring the client apps to use split GPG backend
|
||||
|
||||
Normally it should be enough to set the `QUBES_GPG_DOMAIN` to the GPG backend domain name and use `qubes-gpg-client` in place of `gpg`, e.g.:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
[user@work ~]$ export QUBES_GPG_DOMAIN=work-gpg
|
||||
[user@work ~]$ gpg -K
|
||||
[user@work ~]$ qubes-gpg-client -K
|
||||
@ -75,7 +75,7 @@ ssb 4096R/30498E2A 2012-11-15
|
||||
|
||||
[user@work ~]$ qubes-gpg-client secret_message.txt.asc
|
||||
(...)
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Note that running normal `gpg -K` in the demo above shows no private keys stored in this AppVM.
|
||||
|
||||
@ -87,10 +87,10 @@ However, when using Thunderbird with Enigmail extension it is not enough, becaus
|
||||
|
||||
The script also sets the QUBES\_GPG\_DOMAIN variable automatically based on the content of the file `/rw/config/gpg-split-domain`, which should be set to the name of the GPG backend VM. This file survives the AppVM reboot, of course.
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
[user@work ~]$ sudo bash
|
||||
[user@work ~]$ echo "work-gpg" > /rw/config/gpg-split-domain
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
*NOTE*: A recent engimail update, version `thunderbird-enigmail-1.7-1`, introduced changes in how Enigmail expects to execute GPG binary and so requires an updated split-gpg package with version \>= `qubes-gpg-split-2.0.7-1`. Please make sure you have all the latest qubes packages installed in your template.
|
||||
|
||||
@ -107,10 +107,10 @@ In your GPG backend domain's TemplateVM:
|
||||
|
||||
Use `qubes-gpg-import-key` in the client AppVM to import the key into the GPG backend VM. Of course a (safe, unspoofable) user consent dialog box is displayed to accept this.
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
[user@work ~]$ export QUBES_GPG_DOMAIN=work-gpg
|
||||
[user@work ~]$ qubes-gpg-import-key ~/Downloads/marmarek.asc
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
![r2-split-gpg-5.png](/attachment/wiki/UserDoc/SplitGpg/r2-split-gpg-5.png)
|
||||
|
||||
|
@ -16,15 +16,15 @@ Requirements (as of 10/24/2012):
|
||||
|
||||
Installation:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
qubes-dom0-update --enablerepo=qubes-dom0-unstable @XFCE
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Then you need to create /etc/sysconfig/desktop to stay with KDM, as GDM still starts invalid Xorg startup script:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
DISPLAYMANAGER=KDE
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Reboot the system. At system startup, select "Xfce session" in login screen (menu on the right bottom corner of the screen).
|
||||
|
||||
@ -37,7 +37,7 @@ Things needs/recommended to be done:
|
||||
- create own favorites menu (currently standard XFCE menu isn't modified to use per-VM subsections, which makes it very inconvenient):
|
||||
1. create \~/.config/menus/favorites.menu, example content:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd">
|
||||
|
||||
@ -58,7 +58,7 @@ Things needs/recommended to be done:
|
||||
<Filename>untrusted-firefox.desktop</Filename>
|
||||
</Include>
|
||||
</Menu>
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
2. add it to the panel: right click on panel, "add new items", select "XFCE menu", choose custom menu file - just created one
|
||||
|
||||
|
@ -219,11 +219,11 @@ or
|
||||
|
||||
1. Go to the sysfs (`/sys/bus/pci`), find the right device, detach it from the pciback driver and attach back to the original driver. Replace `<BDF>` with your device, for example `00:1c.2`:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
echo 0000:<BDF> > /sys/bus/pci/drivers/pciback/unbind
|
||||
MODALIAS=`cat /sys/bus/pci/devices/0000:<BDF>/modalias`
|
||||
MOD=`modprobe -R $MODALIAS | head -n 1`
|
||||
echo <BDF> > /sys/bus/pci/drivers/$MOD/bind
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
|
||||
|
@ -32,35 +32,35 @@ Every file published by the Qubes Project (ISO, RPM, TGZ files and git repositor
|
||||
|
||||
The public portion of the Qubes Master Signing Key can be imported directly from a [ keyserver](https://en.wikipedia.org/wiki/Key_server_%28cryptographic%29#Keyserver_examples) (specified on first use with --keyserver URI, keyserver saved in \~/.gnupg/gpg.conf), e.g.,
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
gpg --keyserver pool.sks-keyservers.net --recv-keys 0x427F11FD0FAA4B080123F01CDDFA1A3E36879494
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
or downloaded [here](https://keys.qubes-os.org/keys/qubes-master-signing-key.asc) and imported with gpg,
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
$ gpg --import ./qubes-master-signing-key.asc
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
or fetched directly with gpg.
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
$ gpg --fetch-keys https://keys.qubes-os.org/keys/qubes-master-signing-key.asc
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
For additional security we also publish the fingerprint of the Qubes Master Signing Key ([\`0x36879494\`](https://keys.qubes-os.org/keys/qubes-master-signing-key.asc)) here in this document:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
pub 4096R/36879494 2010-04-01
|
||||
Key fingerprint = 427F 11FD 0FAA 4B08 0123 F01C DDFA 1A3E 3687 9494
|
||||
uid Qubes Master Signing Key
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
There should also be a copy of this key at the project's main website, in the [Qubes Security Pack](/doc/SecurityPack/), and in the archives of the project's [developer](https://groups.google.com/forum/#!msg/qubes-devel/RqR9WPxICwg/kaQwknZPDHkJ) and [user](https://groups.google.com/d/msg/qubes-users/CLnB5uFu_YQ/ZjObBpz0S9UJ) mailing lists.
|
||||
|
||||
Once you have obtained the Qubes Master Signing Key ([\`0x36879494\`](https://keys.qubes-os.org/keys/qubes-master-signing-key.asc)), you should verify the fingerprint of this key very carefully by obtaining copies of the fingerprint from trustworthy independent sources and comparing them to the downloaded key's fingerprint to ensure they match. Then set its trust level to "ultimate" (oh, well), so that it can be used to automatically verify all the keys signed by the Qubes Master Signing Key:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
$ gpg --edit-key 0x36879494
|
||||
gpg (GnuPG) 1.4.18; Copyright (C) 2014 Free Software Foundation, Inc.
|
||||
This is free software: you are free to change and redistribute it.
|
||||
@ -100,13 +100,13 @@ Please note that the shown key validity is not necessarily correct
|
||||
unless you restart the program.
|
||||
|
||||
gpg> q
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Now you can easily download any of the developer or release signing keys that happen to be used to sign particular ISO, RPM, TGZ files or git tags.
|
||||
|
||||
For example: Qubes OS Release 2 Signing Key ([\`0x0A40E458\`](https://keys.qubes-os.org/keys/qubes-release-2-signing-key.asc)) is used for all Release 2 ISO images.
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
$ gpg --recv-keys 0x3F01DEF49719158EF86266F80C73B9D40A40E458
|
||||
gpg: requesting key 0A40E458 from hkp server keys.gnupg.net
|
||||
gpg: key 0A40E458: public key "Qubes OS Release 2 Signing Key" imported
|
||||
@ -115,7 +115,7 @@ gpg: depth: 0 valid: 1 signed: 1 trust: 0-, 0q, 0n, 0m, 0f, 1u
|
||||
gpg: depth: 1 valid: 1 signed: 0 trust: 1-, 0q, 0n, 0m, 0f, 0u
|
||||
gpg: Total number processed: 1
|
||||
gpg: imported: 1 (RSA: 1)
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
You can also download all the currently used developers' signing keys and current and older release signing keys (and also a copy of the Qubes Master Signing Key) from the [keys directory on our server](https://keys.qubes-os.org/keys/) and from the [Qubes Security Pack](/doc/SecurityPack/).
|
||||
|
||||
@ -123,7 +123,7 @@ The developer signing keys are set to be valid for 1 year only, while the Qubes
|
||||
|
||||
You can now verify the ISO image (Qubes-R2-x86\_64-DVD.iso) matches its signature (Qubes-R2-x86\_64-DVD.iso.asc):
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
$ gpg -v --verify Qubes-R2-x86_64-DVD.iso.asc
|
||||
gpg: armor header: Version: GnuPG v1
|
||||
gpg: assuming signed data in `Qubes-R2-x86_64-DVD.iso'
|
||||
@ -131,17 +131,17 @@ gpg: Signature made Tue Sep 23 08:38:40 2014 UTC using RSA key ID 0A40E458
|
||||
gpg: using PGP trust model
|
||||
gpg: Good signature from "Qubes OS Release 2 Signing Key"
|
||||
gpg: binary signature, digest algorithm SHA1
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
The Release 2 Signing Key ([\`0x0A40E458\`](https://keys.qubes-os.org/keys/qubes-release-2-signing-key.asc)) used to sign this ISO image should be signed by the Qubes Master Signing Key ([\`0x36879494\`](https://keys.qubes-os.org/keys/qubes-master-signing-key.asc)):
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
$ gpg --list-sig 0A40E458
|
||||
pub 4096R/0A40E458 2012-11-15
|
||||
uid Qubes OS Release 2 Signing Key
|
||||
sig 36879494 2012-11-15 Qubes Master Signing Key
|
||||
sig 3 0A40E458 2012-11-15 Qubes OS Release 2 Signing Key
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Having problems verifying the ISO images? Make sure you have the corresponding release signing key and see this thread:
|
||||
|
||||
@ -154,6 +154,6 @@ Developers who fetch code from our Git server should always verify tags on the l
|
||||
|
||||
To verify a signature on a git tag, you can use:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
$ git tag -v <tag name>
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
@ -32,17 +32,17 @@ Installing Qubes support tools in Windows 7 VMs
|
||||
|
||||
First, make sure that `qubes-windows-tools` is installed in your system:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo qubes-dom0-update qubes-windows-tools
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
This package brings the ISO with Qubes Windows Tools that is passed to the VM when `--install-windows-tools` is specified for the `qvm-start` command. Please note that even though the Qubes Windows Tools are proprietary, none of this software ever runs in Dom0 or any other part of the system except for the Windows AppVM in which it is to be installed.
|
||||
|
||||
To install the Qubes Windows support tools in a Windows VM one should start the VM passing the additional option `--install-windows-tools`:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
qvm-start lab-win7 --install-windows-tools
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Once the Windows VM boots, a CDROM should appear in the 'My Computer' menu (typically as `D:`) with a setup program in its main directory.
|
||||
|
||||
@ -54,30 +54,30 @@ After successful installation, the Windows VM must be shut down and started agai
|
||||
|
||||
Qubes (R2 Beta 3 and later releases) will automatically detect the tools has been installed in the VM and will set appropriate properties for the VM, such as `qrexec_installed`, `guiagent_installed`, and `default_user`. This can be verified (but is not required) using qvm-prefs command:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
qvm-prefs <your-appvm-name>
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Using Windows AppVMs in seamless mode (Qubes R2 Beta 3 and later)
|
||||
-----------------------------------------------------------------
|
||||
|
||||
Once you start a Windows-based AppVM with Qubes Tools installed, you can easily start individual applications from the VM (note the `-a` switch used here, which will auto-start the VM if it is not running):
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
qvm-run -a my-win7-appvm explorer.exe
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
![windows-seamless-4.png](/attachment/wiki/WindowsAppVms/windows-seamless-4.png) ![windows-seamless-1.png](/attachment/wiki/WindowsAppVms/windows-seamless-1.png)
|
||||
|
||||
Also, the inter-VM services work as usual -- e.g. to request opening a document or URL in the Windows AppVM from another VM:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
[user@work ~]$ qvm-open-in-vm work-win7 roadmap.pptx
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
[user@work ~]$ qvm-open-in-vm work-win7 http://www.invisiblethingslab.com
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
... just like in case of Linux AppVMs. Of course all those operations are governed by central policy engine running in Dom0 -- if the policy
|
||||
|
||||
@ -97,9 +97,9 @@ Using template-based Windows AppVMs (Qubes R2 Beta 3 and later)
|
||||
|
||||
Qubes allows HVM VMs to share a common root filesystem from a select Template VM, just like it is done for Linux AppVMs. This mode is not limited to Windows AppVMs, and can be used for any HVM (e.g. FreeBSD running in a HVM). In order to create a HVM TemplateVM one can use the following command:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
qvm-create --hvm-template win7-x64-template -l green
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
... and install Windows OS (or other OS) into this template the same way as you would install it into a normal HVM -- please see [this page](/doc/HvmCreate/) instructions. However, it would make lots of sense to store the `C:\Users` directory on the 2nd disk which is automatically exposed by Qubes to all HVMs. This 2nd disk is backed by the `private.img` file in the AppVMs' and is not reset upon AppVMs reboot, so the user's directories and profiles would survive the AppVMs reboot, unlike the "root" filesystem which will be reverted to the "golden image" from the Template VM automatically. To facilitate such separation of user profiles, Qubes Windows Tools provide an option to automatically move `C:\Users` directory to the 2nd disk backed by `private.img`. It's a selectable feature of the installer, enabled by default. If that feature is selected during installation, completion of the process requires two reboots:
|
||||
|
||||
@ -110,6 +110,6 @@ It also makes sense to disable Automatic Updates for all the Windows-based AppVM
|
||||
|
||||
Once the template has been created and installed it is easy to create AppVMs based on:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
qvm-create --hvm <new windows appvm name> --template <name of template vm> --label <label color>
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
@ -46,7 +46,7 @@ Things get complicated if you need to perform kernel debugging or troubleshoot p
|
||||
- Run the above shell script in dom0.
|
||||
- If everything is fine you should see the proper kernel debugging output in WinDbg. However, if you see something like that:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
Opened \\.\com1
|
||||
Waiting to reconnect...
|
||||
Connected to Windows 7 7601 x64 target at (Wed Mar 19 20:35:43.262 2014 (UTC + 1:00)), ptr64 TRUE
|
||||
@ -66,7 +66,7 @@ Things get complicated if you need to perform kernel debugging or troubleshoot p
|
||||
**************************************************************************
|
||||
Unable to read debugger data block header
|
||||
**************************************************************************
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
...then you're most likely a victim of the CRLF issue mentioned above. To get around it I wrote a small utility that basically does what socat would do and additionally corrects those replaced bytes in the stream. It's not pretty but it works:
|
||||
|
||||
@ -193,7 +193,7 @@ Things get complicated if you need to perform kernel debugging or troubleshoot p
|
||||
|
||||
> With this everything should be good:
|
||||
>
|
||||
> {% highlight trac-wiki %}
|
||||
> ```
|
||||
> Opened \\.\com1
|
||||
> Waiting to reconnect...
|
||||
> Connected to Windows 7 7601 x64 target at (Wed Mar 19 20:56:31.371 2014 (UTC + 1:00)), ptr64 TRUE
|
||||
@ -205,6 +205,6 @@ Things get complicated if you need to perform kernel debugging or troubleshoot p
|
||||
> Machine Name:
|
||||
> Kernel base = 0xfffff800`0261a000 PsLoadedModuleList = 0xfffff800`0285d6d0
|
||||
> System Uptime: not available
|
||||
> {% endhighlight %}
|
||||
> ```
|
||||
|
||||
Happy debugging!
|
||||
|
56
ZFS.md
56
ZFS.md
@ -20,14 +20,14 @@ Install DKMS style packages for Fedora <sup>(defunct\\ in\\ 0.6.2\\ due\\ to\\ s
|
||||
|
||||
Fetch and install repository for DKMS style packages for your Dom0 Fedora version [http://zfsonlinux.org/fedora.html](http://zfsonlinux.org/fedora.html):
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
disp1# wget http://archive.zfsonlinux.org/fedora/zfs-release-1-1$(rpm -E %dist).noarch.rpm
|
||||
dom0# qvm-run --pass-io disp1 'cat /home/user/zfs-release-1-1.fc18.noarch.rpm' > /home/user/zfs-release-1-1.fc18.noarch.rpm
|
||||
dom0# sudo yum localinstall /home/user/zfs-release-1-1.fc18.noarch.rpm
|
||||
dom0# sudo sed -i 's/$releasever/18/g' /etc/yum.repo.d/zfs.repo
|
||||
dom0# sudo qubes-dom0-update @development-tools
|
||||
dom0# sudo qubes-dom0-update zfs
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Install DKMS style packages from git-repository
|
||||
-----------------------------------------------
|
||||
@ -38,57 +38,57 @@ Build and install your DKMS or KMOD packages as described in [http://zfsonlinux.
|
||||
|
||||
Checkout repositories for SPL and ZFS:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
mkdir ~/repositories && cd ~/repositories
|
||||
git clone https://github.com/zfsonlinux/spl.git
|
||||
git clone https://github.com/zfsonlinux/zfs.git
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Revert changes in SPL repository due to this bug: [https://github.com/zfsonlinux/spl/issues/284](https://github.com/zfsonlinux/spl/issues/284)
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
cd ~/repositories/spl
|
||||
git config --global user.email "user@example.com"
|
||||
git config --global user.name "user"
|
||||
git revert e3c4d44886a8564e84aa697477b0e37211d634cd
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
### Installation steps in Dom0
|
||||
|
||||
Copy repositories over to Dom0:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
mkdir ~/repositories
|
||||
qvm-run --pass-io disp1 'tar -cf - -C ~/repositories/ {spl,zfs}' | tar -xpf - -C ~/repositories/
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Installing build requirements for SPL and ZFS DKMS modules:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo qubes-dom0-update dkms kernel-devel zlib-devel libuuid-devel libblkid-devel lsscsi bc autoconf automake binutils bison flex gcc gcc-c++ gdb gettext libtool make pkgconfig redhat-rpm-config rpm-build strace
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Configure and build SPL DKMS packages:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
cd ~/repositories/spl
|
||||
./autogen.sh
|
||||
./configure --with-config=user
|
||||
make rpm-utils rpm-dkms
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Configure and build ZFS DKMS packages:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
cd ~/repositories/zfs
|
||||
./autogen.sh
|
||||
./configure --with-config=user
|
||||
make rpm-utils rpm-dkms
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Install SPL and ZFS packages (i.e. version 0.6.2):
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
sudo yum localinstall \
|
||||
~/repositories/spl/spl-0.6.2-1.qbs2.x86_64.rpm \
|
||||
~/repositories/spl/spl-dkms-0.6.2-1.qbs2.noarch.rpm \
|
||||
@ -96,7 +96,7 @@ sudo yum localinstall \
|
||||
~/repositories/zfs/zfs-dkms-0.6.2-1.qbs2.noarch.rpm \
|
||||
~/repositories/zfs/zfs-dracut-0.6.2-1.qbs2.x86_64.rpm \
|
||||
~/repositories/zfs/zfs-test-0.6.2-1.qbs2.x86_64.rpm
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Configure ZFS
|
||||
=============
|
||||
@ -106,13 +106,13 @@ Automatically load modules
|
||||
|
||||
/etc/sysconfig/modules/zfs.modules
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
#!/bin/sh
|
||||
|
||||
for module in spl zfs; do
|
||||
modprobe ${module} >/dev/null 2>&1
|
||||
done
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Make this file executable.
|
||||
|
||||
@ -123,9 +123,9 @@ Tame the memory-eating dragon (i.e. 512 Mb zfs\_arc\_max):
|
||||
|
||||
/etc/modprobe.d/zfs.conf
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
options zfs zfs_arc_max=536870912
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Setup a zpool with ZFS datasets
|
||||
-------------------------------
|
||||
@ -138,7 +138,7 @@ Beware: VMs on a ZFS dataset aren't working, if your ZFS installation deserts yo
|
||||
|
||||
So keep netvm, firewallvm and your templates on your root file-system (preferably on a SSD).
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
zpool create -m none -o ashift=12 -O atime=off -O compression=lz4 qubes mirror /dev/mapper/<cryptname1> /dev/mapper/<cryptname2>
|
||||
zfs create -p qubes/appvms
|
||||
zfs create -m /var/lib/qubes/backup-zfs qubes/backup
|
||||
@ -146,7 +146,7 @@ zfs create -m /var/lib/qubes/appvms/banking qubes/appvms/banking
|
||||
zfs create -m /var/lib/qubes/appvms/personal qubes/appvms/personal
|
||||
zfs create -m /var/lib/qubes/appvms/untrusted qubes/appvms/untrusted
|
||||
zfs create -m /var/lib/qubes/appvms/work qubes/appvms/work
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Have fun with zpool and zfs.
|
||||
|
||||
@ -161,28 +161,28 @@ You're depending on an huge amount of code for this file system, keep this in mi
|
||||
Encrypt underlying devices
|
||||
--------------------------
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
dom0# cryptsetup -c aes-xts-plain64 luksFormat <device1>
|
||||
dom0# cryptsetup luksOpen <device1> <cryptname1>
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
With the use of cryptsetup a keyfile can be specified to decrypt devices.
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
dom0# head -c 256 /dev/random > /root/keyfile1
|
||||
dom0# chmod 0400 /root/keyfile1
|
||||
dom0# cryptsetup luksAddKey <device1> /root/keyfile1
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Decrypt devices on boot
|
||||
-----------------------
|
||||
|
||||
Add your devices to /etc/crypttab.
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
<cryptname1> <device1> <keyfile1>
|
||||
<cryptname2> <device2> none
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
Specifying a keyfile is especially useful, if ZFS should be ready during boot.
|
||||
|
||||
|
@ -20,10 +20,10 @@ Known issues
|
||||
|
||||
- On systems with more than 8GB of RAM there is problem with Disposable VM. To fix it, limit maximum memory allocation for DispVM to 3GB
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
qvm-prefs -s fedora-17-x64-dvm maxmem 3072
|
||||
qvm-create-default-dvm --default-template --default-script
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
- On some systems the KDE Window Manager might freeze upon resuming from S3 sleep when compositing is enabled (and the only method to log in to the system if this happens is to switch to a text console, enter your user's password, kill the kwin process, go back to the Xorg console, log in, and start a new instance of kwin using Konsole application :) If you experience such problems, make sure to disable compositing before putting the system into sleep by pressing Alt-Ctrl-F12 (and then enabling it back once you log in after resume) -- this way you should never see this problem again.
|
||||
|
||||
@ -48,7 +48,7 @@ If you're already running Qubes 1.0-rc1, you don't need to reinstall, it's just
|
||||
|
||||
If you have Qubes Beta 3 currently installed on your system, you must reinstall from scratch, as we offer no direct upgrade option in the installer (sorry). However, we do offer tools for smooth migration of your AppVMs. In order to do that, please backup your AppVMs using the `qvm-backup` tool [as usual](/doc/BackupRestore/). Then, after you install Qubes 1.0 rc1, you can restore them using `qvm-backup-restore` tool. However, because we have changed the default template in RC1, you should tell qvm-back-restore about that by passing `--replace-template` option:
|
||||
|
||||
{% highlight trac-wiki %}
|
||||
```
|
||||
qvm-backup-restore <backup_dir> --replace-template=fedora-15-x64:fedora-17-x64
|
||||
{% endhighlight %}
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user