Commit 3dcd376e authored by Guido Gunther's avatar Guido Gunther
Browse files

Merge branch 'update-qemu' into 'master'

Update qemu

See merge request Librem5/developer.puri.sm!60
parents b36a900c 4185d9eb
Pipeline #1725 passed with stage
in 43 seconds
......@@ -15,29 +15,36 @@ Linux Environments
1. Open the Jenkins job building QEMU images on the CI server: https://arm01.puri.sm/job/Images/job/Image%20Build/
2. Find the latest successful build which has the description *qemu-x86_64 image*, e.g. https://arm01.puri.sm/job/Images/job/Image%20Build/172/ . The number at the end of the URL is the build number, in this case ``172``.
2. Find the latest successful build which has the description *qemu-x86_64.qcow2*, see `build 562 <https://arm01.puri.sm/job/Images/job/Image%20Build/562/>`_ for example.
3. Download the build artifact called ``qemu-x86_64.img.xz``. For the build numbered ``172``, it's at the following URL::
3. Download the build artifact called ``qemu-x86_64.qcow2``. For the build numbered ``562``, it's at the following URL::
wget https://arm01.puri.sm/job/Images/job/Image%20Build/172/artifact/qemu-x86_64.img.xz
$ wget https://arm01.puri.sm/job/Images/job/Image%20Build/562/artifact/qemu-x86_64.qcow2
4. Decompress it::
5. Required software:
unxz qemu-x86_64.img.xz
You can use any virtualization application that will create a VM from a qcow2 to run this image.
5. Run it::
**GNOME Boxes**
- On PureOS, `gnome-boxes` is already installed and can be used right away.
- Create a new Box from archive selecting qemu-x86_64.qcow2
qemu-system-x86_64 -boot menu=on -drive file=qemu-x86_64.img,format=raw -vga virtio -display sdl -m 1G -enable-kvm
**Virt-manager**
- On PureOS, you would need to install virt-manager::
If you prefer a GUI:
$ sudo apt install virt-manager
- install org.gnome.Boxes from flatpak: https://flathub.org/apps/details/org.gnome.Boxes
- Create a new Box from archive selecting qemu-x86_64.img
- Create a new virtual machine from your archive selecting qemu-x86_64.qcow2
6. Use it
**Command Line**
You can also run the qcow2 VM from the command line::
.. image:: librem5fromqemu.gif
:alt: QEMU VM running phosh and default apps
$ sudo qemu-system-x86_64 -boot menu=on -drive file=qemu-x86_64.qcow2,format=qcow2 -vga virtio -display gtk -m 1G -enable-kvm
6. Use it (password is 123456):
.. image:: virt-manager.gif
:alt: QEMU VM running phosh
Microsoft Windows
-----------------
......@@ -65,6 +72,33 @@ Microsoft Windows
PowerShell script: :download:`launch-librem5.ps1 <launch-librem5.ps1>`
Expanding the Filesystem
------------------------
The qcow2 image is built such that with a simple command, you can resize the root filesystem to fill the partitioned space.
Before the rootfs is resized, `df -h` will show you that /dev/vda2 has a size of 3.1Gb. To grow the partition, resize the /dev/vda2 partition and then check `df -h` again to see that it is now 31Gb::
purism@pureos:~$ sudo resize2fs /dev/vda2
resize2fs 1.44.4 (18-Aug-2018)
Filesystem at /dev/vda2 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 4
The filesystem on /dev/vda2 is now 8172342 (4k) blocks long.
purism@pureos:~$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 985M 0 985M 0% /dev
tmpfs 200M 1020K 199M 1% /run
/dev/vda2 31G 2.2G 28G 8% /
tmpfs 999M 0 999M 0% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 999M 0 999M 0% /sys/fs/cgroup
/dev/vda1 172M 45M 114M 29% /boot
tmpfs 200M 15M 186M 8% /run/user/1000
Now your additional space on /dev/vda2 is immediately ready for use without any need to reboot.
Resources
---------
......
This image diff could not be displayed because it is too large. You can view the blob instead.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment