... | ... | @@ -15,57 +15,70 @@ bst checkout iso/image.bst checkout |
|
|
|
|
|
If GNOME Boxes does not have osinfo entry, if using an updated version of the osinfo entry, you may want to add it manually. See the [related section](#osinfo)
|
|
|
|
|
|
Create a virtual machine using an "Operating System Image
|
|
|
File". Select `installer.iso` from the checkout directory.
|
|
|
Create a virtual machine using an "Operating System Image File". Select `installer.iso` from the checkout directory.
|
|
|
|
|
|
## Enable the boot menu:
|
|
|
|
|
|
In the libvirt config, can be opened from the boxes properties, add the following:
|
|
|
|
|
|
```xml
|
|
|
<os>
|
|
|
<bootmenu enable="yes"/>
|
|
|
</os>
|
|
|
```
|
|
|
|
|
|
## Update from the terminal
|
|
|
|
|
|
Use stock ostree commands:
|
|
|
```
|
|
|
|
|
|
```sh
|
|
|
ostree admin upgrade
|
|
|
```
|
|
|
|
|
|
## Switch to the development branch
|
|
|
|
|
|
Open a terminal and type:
|
|
|
```
|
|
|
sudo ostree admin switch gnome-os:gnome-os/master/x86_64-devel
|
|
|
|
|
|
```sh
|
|
|
ostree admin switch gnome-os:gnome-os/master/x86_64-devel
|
|
|
```
|
|
|
|
|
|
## Updating with local OSTree
|
|
|
|
|
|
Run helper script: `utils/update-local-repo.sh`. This will create a
|
|
|
local repository with the current state of working copy.
|
|
|
Run helper script: `utils/update-local-repo.sh`. This will create a local repository with the current state of working copy.
|
|
|
|
|
|
Then run `utils/run-local-repo.sh` to start a server. This script does
|
|
|
not fork. Leave it to run.
|
|
|
Then run `utils/run-local-repo.sh` to start a server. This script does not fork. Leave it to run.
|
|
|
|
|
|
Open a shell and type `enable-developer-repository`. The server has to
|
|
|
be running at that time. You do not need to pass any parameter if you
|
|
|
are running the image in a QEMU with standard configuration for user
|
|
|
network (`-netdev user`). For other configuration look at
|
|
|
configuration with `--help`.
|
|
|
Open a shell and type `enable-developer-repository`. The server has to be running at that time. You do not need to pass any parameter if you are running the image in a QEMU with standard configuration for user network (`-netdev user`). For other configuration look at configuration with `--help`.
|
|
|
|
|
|
If `enable-developer-repository` succeeded, you can then reboot. Do
|
|
|
not call `enable-developer-repository` again. Further updates will be
|
|
|
done automatically by `eos-updater`. To force update sooner, run
|
|
|
`eos-updater-ctl update`, or use GNOME Software.
|
|
|
If `enable-developer-repository` succeeded, you can then reboot. Do not call `enable-developer-repository` again. Further updates will be done automatically by `eos-updater`. To force update sooner, run `eos-updater-ctl update`, or use GNOME Software.
|
|
|
|
|
|
## Adding osinfo entry for GNOME Boxes
|
|
|
## Always enable the systemd debug shell
|
|
|
|
|
|
This can be done by editing the kernel cli arguments, and then switching to TTY 9, there's a shortcut for the tty in Boxes!
|
|
|
|
|
|
sudo ostree admin deploy --karg-append=systemd.debug-shell=1 gnome-os:gnome-os/master/x86_64-devel\
|
|
|
|
|
|
## Trigger Initial Setup with an existing session\
|
|
|
|
|
|
This can be done by adding gnome.initial-setup=1 to the kernel cli args. Alternatively you can also delete the existing users in a system with `userdel \[user\] -r` and then reboot. Not that you will want to have the debug_shell or equivelant enable in order to inspect the system without a user present.
|
|
|
|
|
|
<a name="osinfo"></a>
|
|
|
|
|
|
## Adding osinfo entry for GNOME Boxes
|
|
|
|
|
|
If you need to update the osinfo entry for GNOME Boxes, copy file `gnome-os-master.xml` to `$XDG_CONFIG_HOME/osinfo/os/gnome.org/gnome-os-master.xml` for GNOME Boxes.
|
|
|
|
|
|
Using GNOME Boxes devel on flatpak, it will be: `~/.var/app/org.gnome.BoxesDevel/config/osinfo/os/gnome.org/gnome-os-master.xml`.
|
|
|
Using GNOME Boxes devel on flatpak, it will be: `\~/.var/app/org.gnome.BoxesDevel/config/osinfo/os/gnome.org/gnome-os-master.xml`.
|
|
|
|
|
|
Using GNOME Boxes stable on flatpak, it will be: `~/.var/app/org.gnome.Boxes/config/osinfo/os/gnome.org/gnome-os-master.xml`.
|
|
|
Using GNOME Boxes stable on flatpak, it will be: `\~/.var/app/org.gnome.Boxes/config/osinfo/os/gnome.org/gnome-os-master.xml`.
|
|
|
|
|
|
Otherwise, `~/.config/osinfo/os/gnome.org/gnome-os-master.xml`
|
|
|
Otherwise, `\~/.config/osinfo/os/gnome.org/gnome-os-master.xml`
|
|
|
|
|
|
## Building the base image (not installer)
|
|
|
|
|
|
Build `vm/image.bst` and checkout. The image will be `disk.qcow2`.
|
|
|
|
|
|
```
|
|
|
```sh
|
|
|
bst build vm/image.bst
|
|
|
bst checkout vm/image.bst checkout
|
|
|
```
|
... | ... | @@ -74,13 +87,13 @@ bst checkout vm/image.bst checkout |
|
|
|
|
|
Before the first run, copy the UEFI variables image.
|
|
|
|
|
|
```
|
|
|
```sh
|
|
|
cp /usr/share/OVMF/OVMF_VARS.fd .
|
|
|
```
|
|
|
|
|
|
Then, run with QEMU:
|
|
|
|
|
|
```
|
|
|
```sh
|
|
|
qemu-system-x86_64 \
|
|
|
-enable-kvm -m 4G -smp 4 -machine q35,accel=kvm -cpu host \
|
|
|
-drive if=pflash,format=raw,unit=0,file=/usr/share/OVMF/OVMF_CODE.fd,readonly=on \
|
... | ... | @@ -92,26 +105,25 @@ qemu-system-x86_64 \ |
|
|
-drive file=checkout/disk.qcow2,format=qcow2,media=disk
|
|
|
```
|
|
|
|
|
|
For more explanations on the QEMU command line see section [Using
|
|
|
QEMU](#using-qemu).
|
|
|
For more explanations on the QEMU command line see section [Using QEMU](#using-qemu).
|
|
|
|
|
|
## Running manually with QEMU the installer
|
|
|
|
|
|
Before the first run, copy the UEFI variables image.
|
|
|
|
|
|
```
|
|
|
```sh
|
|
|
cp /usr/share/OVMF/OVMF_VARS.fd .
|
|
|
```
|
|
|
|
|
|
And create a disk:
|
|
|
|
|
|
```
|
|
|
```sh
|
|
|
qemu-img create -f qcow2 disk.qcow2 64G
|
|
|
```
|
|
|
|
|
|
Then run with QEMU:
|
|
|
|
|
|
```
|
|
|
```sh
|
|
|
qemu-system-x86_64 \
|
|
|
-enable-kvm -m 4G -smp 4 -machine q35,accel=kvm -cpu host \
|
|
|
-drive if=pflash,format=raw,unit=0,file=/usr/share/OVMF/OVMF_CODE.fd,readonly=on \
|
... | ... | @@ -126,7 +138,7 @@ qemu-system-x86_64 \ |
|
|
|
|
|
After installation re-launch QEMU, but remove the last drive (CD-ROM).
|
|
|
|
|
|
```
|
|
|
```sh
|
|
|
qemu-system-x86_64 \
|
|
|
-enable-kvm -m 4G -smp 4 -machine q35,accel=kvm -cpu host \
|
|
|
-drive if=pflash,format=raw,unit=0,file=/usr/share/OVMF/OVMF_CODE.fd,readonly=on \
|
... | ... | @@ -140,8 +152,6 @@ qemu-system-x86_64 \ |
|
|
|
|
|
### Using QEMU
|
|
|
|
|
|
<a name="using-qemu"></a>
|
|
|
|
|
|
#### UEFI boot
|
|
|
|
|
|
You need two files, OVMF/EDK2 code and variables.
|
... | ... | @@ -155,14 +165,13 @@ We assume here we are using x86_64. The paths are: |
|
|
* /usr/share/OVMF/OVMF_CODE.fd
|
|
|
* /usr/share/OVMF/OVMF_VARS.fd
|
|
|
|
|
|
Copy the variable file locally. It is needed to be modified. The code
|
|
|
can stay because it will be read only.
|
|
|
Copy the variable file locally. It is needed to be modified. The code can stay because it will be read only.
|
|
|
|
|
|
#### Creating a hard disk
|
|
|
|
|
|
To create a 64GB disk, for example:
|
|
|
|
|
|
```
|
|
|
```sh
|
|
|
qemu-img create -f qcow2 disk.qcow2 64G
|
|
|
```
|
|
|
|
... | ... | @@ -174,11 +183,11 @@ qemu-img create -f qcow2 disk.qcow2 64G |
|
|
|
|
|
For x86_64 with KVM: `-enable-kvm -machine q35,accel=kvm`
|
|
|
|
|
|
Use same CPU architecture as host: `-cpu host` (the default can be a basic one that doesn't support all instructions modern compilers use, leading to SIGILL crashes)
|
|
|
Use same CPU architecture as host: `-cpu host` (the default can be a basic one that doesn't support all instructions modern compilers use, leading to SIGILL crashes)
|
|
|
|
|
|
UEFI boot:
|
|
|
|
|
|
```
|
|
|
```sh
|
|
|
-drive if=pflash,format=raw,unit=0,file=/usr/share/OVMF/OVMF_CODE.fd,readonly=on
|
|
|
-drive if=pflash,format=raw,unit=1,file=OVMF_VARS.fd
|
|
|
```
|
... | ... | @@ -189,8 +198,7 @@ Enabling sound: `-soundhw hda` |
|
|
|
|
|
Enabling network: `-netdev user,id=net1 -device e1000,netdev=net1`
|
|
|
|
|
|
Getting the mouse pointer to work in windowed mode: `-usb -device
|
|
|
usb-tablet`. Alternatively, you can use `-fullscreen`.
|
|
|
Getting the mouse pointer to work in windowed mode: `-usb -device usb-tablet`. Alternatively, you can use `-fullscreen`.
|
|
|
|
|
|
Adding a hard drive: `-drive file=disk.qcow2,format=qcow2,media=disk`
|
|
|
|
... | ... | @@ -208,7 +216,7 @@ Then you can `spice+unix://${XDG_RUNTIME_DIR:-/tmp}/vm.sock` |
|
|
|
|
|
### Debugging a failed boot
|
|
|
|
|
|
The bootloader is [systemd-boot](https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/), you can press `e` at the menu to edit kernel commandline arguments. If you get a black screen on boot, try removing `quiet` and `splash` arguments.
|
|
|
The bootloader is [systemd-boot](https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/), you can press `e` at the menu to edit kernel commandline arguments. If you get a black screen on boot, try removing `quiet` and `splash` arguments.
|
|
|
|
|
|
Set `console=ttyS0` kernel argument to enable login on the serial console. If running `qemu` from a terminal, you can pass `-serial stdio` to QEMU to connect serial console to your terminal, which allows you to copy and paste.
|
|
|
|
... | ... | @@ -218,10 +226,9 @@ Another way to change shell is to drop to a text tty, and then use `<alt>+<F9>` |
|
|
|
|
|
### nr_entries is too big
|
|
|
|
|
|
GNOME Shell seems to hit a limit in QEMU. If you get this error message
|
|
|
in the standard error stream of QEMU, try the following patch:
|
|
|
GNOME Shell seems to hit a limit in QEMU. If you get this error message in the standard error stream of QEMU, try the following patch:
|
|
|
|
|
|
```
|
|
|
```diff
|
|
|
Index: qemu-4.1/hw/display/virtio-gpu.c
|
|
|
===================================================================
|
|
|
--- qemu-4.1.orig/hw/display/virtio-gpu.c
|
... | ... | @@ -235,4 +242,4 @@ Index: qemu-4.1/hw/display/virtio-gpu.c |
|
|
qemu_log_mask(LOG_GUEST_ERROR,
|
|
|
"%s: nr_entries is too big (%d > 16384)\n",
|
|
|
__func__, ab->nr_entries);
|
|
|
``` |
|
|
``` |
|
|
\ No newline at end of file |