Installing Ubuntu MATE using qemu-kvm to external or internal drive

The below guide allows one to install latest Ubuntu MATE to the external or internal drive.

It allows one to run installation of the fresh system while continuing to work on host system.

At first one needs to obtain installation ISO image from

Then one needs to install QEMU-KVM by executing the following commands:

sudo apt-get install qemu-kvm
sudo usermod -a -G kvm,disk $USER

and reboot.

Then one needs to get the device name of the target device (external or internal) using GNOME Disks (gnome-disks). Be careful here, selecting wrong device will end with erasing all its contents. For example we chose /dev/sdd:


Then to start the installation in legacy mode one can use command as shown below:

kvm -m 2048 -drive file=/dev/sdd,format=raw -cdrom hirsute-desktop-amd64.iso -boot d


  • -m 2048 sets RAM size as 2048 Mb;
  • -drive file=/dev/sdd,format=raw sets hard drive as /dev/sdd with RAW format;
  • -cdrom hirsute-desktop-amd64.iso sets path to downloaded ISO file;
  • -boot d sets boot from second drive, thus from ISO-file.

When QEMU window is appeared one can follow the installation wizard as usual then when it finished - shutdown the virtual machine, eject the drive from host machine and boot legacy system using just created drive.

1 Like