Posts: 38
Joined: Thu Jul 18, 2019 8:42 am

Ubuntu 19.10 for the Raspberry Pi 4 with a KVM-enabled kernel & Windows 10 guest

Fri Aug 09, 2019 3:27 pm

I managed to build an Ubuntu 19.10 with KVM enabled thanks to satmandu's docker system:

However, the above is a thin deployment system that remains quite *hit and miss* since there's a lot of dependencies involved that must work in tandem for the final image to be created successfully - so expect many failures - and potentially even corrupt LZ4 files (best to choose IMG.XZ output). Nevertheless, it's still a new project and satmandu has been very helpful in trying to rectify any issues based on different environments - all the while updating the guide on the homepage as the project matures.

[Here] I've provided a successful prebuilt IMG.XZ image via the above that you can immediately write to Micro-SD card by first extracting the .IMG file from the IMG.XZ and then writing that using DD:

Code: Select all

sudo dd if=eoan-preinstalled-server-arm64+raspi4-08_09_2019_0152UTC.img of=/dev/mmcblk0 bs=1M
NOTE: the Micro-SD card must first be erased (I use gparted or windows disk management)

Once written remove the SD Card and reinsert it. You can then mount partition 1:

Code: Select all

sudo mkdir /mnt/piboot
sudo mount /dev/mmcblk0p1 /mnt/piboot
You then need to edit the config.txt to enable VC4 graphics acceleration (could also do this using notepad on a windows system):

Code: Select all

sudo nano /mnt/piboot/config.txt
Append this line to the bottom of the file then CTRL+X to save and exit:

Code: Select all

Boot up in the Pi4 (mini-HDMI plugged in nearest to USB-C) and after a time hit enter to bring up the login screen - but NOT before the cloud-init process has completed, i.e. you must give it a good 5 minutes. Initial login is ubuntu/ubuntu; you will then be prompted to change password.

Once the Terminal prompt appears I found it's better to install both a lightweight and heavyweight desktop environment alongside each other to avoid any bugs with VC4 - particularly when using KVM. If you do get any problems with the login window not appearing you can press Alt+F4 and then sudo startx to prod it into action so to speak. Before logging in ensure you have switched to the lightweight distro via the button at the top-right of the screen; I chose to install the following:

Code: Select all

sudo apt install lxde
sudo apt install ubuntukylin-desktop
sudo reboot
NOTE: LXQT/XFCE will probably work too perhaps alongside ubuntu-desktop even?

Once inside the desktop GUI download these two DEB files [here] and [here] to upgrade to a KVM-enabled kernel with the necessary virtalization software via the following install commands:

Code: Select all

sudo dpkg -i linux-image-5.3.0-rc3-v8-gea837612b_5.3.0-rc3-v8-gea837612b-1_arm64.deb
sudo dpkg -i linux-headers-5.3.0-rc3-v8-gea837612b_5.3.0-rc3-v8-gea837612b-1_arm64.deb
sudo apt install qemu-kvm libvirt-daemon-system
sudo reboot
If there's any interest then in the next part I can describe the steps needed to get a Windows guest running through Qemu/KVM?
Last edited by gilius2k15 on Fri Aug 09, 2019 11:41 pm, edited 2 times in total.

Posts: 1
Joined: Fri Aug 09, 2019 8:02 pm

Re: Ubuntu 19.10 for the Raspberry Pi 4 with a KVM-enabled kernel & Windows 10 guest

Fri Aug 09, 2019 8:06 pm

I'm just wondering, are you aware of the ongoing project to get Windows 10 ARM running on the Raspberry Pi? If not visit
This would be an awesome other method of getting it running on the thing (although this version would require activation via a key rather than being free, I'm guessing)

Thank you very much for posting this awesome tutorial. I would be very glad if you followed it up with how you got Win10 on the thing.
(P.S. if you follow up, please reply with driver information)

And one more thing: Is it just me or is the download slow for the prebuilt image? If you ever need a file host you could host it up on G Drive or Mega or WeTransfer in case there's too much traffic. :)

Posts: 84
Joined: Thu Jun 07, 2012 12:40 pm
Location: London, UK

Re: Ubuntu 19.10 for the Raspberry Pi 4 with a KVM-enabled kernel & Windows 10 guest

Tue Aug 13, 2019 9:25 pm

Code: Select all

[email protected]:~$ uname -a
Linux ubuntu 4.19.64-v8-g76b2727ef #1 SMP PREEMPT Wed Aug 7 14:28:51 UTC 2019 aarch64 aarch64 aarch64 GNU/Linux
[email protected]:~$ free -h
              total        used        free      shared  buff/cache   available
Mem:          2.8Gi       1.1Gi       1.0Gi        36Mi       668Mi       1.6Gi
Swap:            0B          0B          0B
[email protected]:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            1.4G     0  1.4G   0% /dev
tmpfs           287M  3.3M  284M   2% /run
/dev/mmcblk0p2   30G  6.0G   22G  22% /
tmpfs           1.4G     0  1.4G   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           1.4G     0  1.4G   0% /sys/fs/cgroup
/dev/loop1       49M   49M     0 100% /snap/lxd/11444
/dev/loop0       49M   49M     0 100% /snap/lxd/11598
/dev/loop2       79M   79M     0 100% /snap/core/7275
/dev/loop3       79M   79M     0 100% /snap/core/7399
/dev/mmcblk0p1  253M  106M  147M  42% /boot/firmware
tmpfs           287M   20K  287M   1% /run/user/120
tmpfs           287M   52K  287M   1% /run/user/1000
[email protected]:~$ 
64_bit_ubuntu_19.10_Pi4-4.jpg (144.05 KiB) Viewed 789 times

User avatar
Posts: 3438
Joined: Wed Aug 28, 2013 3:31 am

Re: Ubuntu 19.10 for the Raspberry Pi 4 with a KVM-enabled kernel & Windows 10 guest

Wed Aug 14, 2019 7:33 am

Sakaki has now a 4GB version that has the 3GB issue fixed.
Another few months and most major distributions will be running on the Pi4?

Win10 is interesting, did not expect that :D
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Posts: 23
Joined: Wed Aug 13, 2014 12:47 pm

Re: Ubuntu 19.10 for the Raspberry Pi 4 with a KVM-enabled kernel & Windows 10 guest

Mon Aug 19, 2019 10:25 am

I have to say I was very excited to see this post. My two favourite things, raspberry pi and Ubuntu. However I cannot get the image to complete a first boot. All looks good until it gets to installing new bcm2711-rpi-4-b.dtb then it hangs and does nothing. I left it for a good half an hour JIC it needed to download something.

Also is it possible to get a 18.04 LTS based image?

Any ideas?


Return to “Other”