Vmm /

Create Devuan ISO for VMM

To use VMM, the ISO image you provide must support the serial console. In this guide, we download and modify the devuan ISO to boot from serial console.

Download and verify ISO

$ ftp https://files.devuan.org/devuan_chimaera/installer-iso/devuan_chimaera_4.0.0_amd64_netinstall.iso
$ ftp https://files.devuan.org/devuan_chimaera/installer-iso/SHA256SUMS
$ ftp https://files.devuan.org/devuan_chimaera/installer-iso/SHA256SUMS.asc

If gpg is not already installed:

$ doas pkg_add gnupg
$ gpg --keyserver keyserver.ubuntu.com --recv-keys E93D7167A4F5FA9E9FED497770285BA5CF280BA4
gpg: key 70285BA5CF280BA4: public key "Ralph Ronnquist (rrq) <ralph.ronnquist@gmail.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1
$ gpg --verify SHA256SUMS.asc SHA256SUMS
gpg: Signature made Fri Mar 26 17:50:56 2021 CDT
gpg:                using RSA key E93D7167A4F5FA9E9FED497770285BA5CF280BA4
gpg: Good signature from "Ralph Ronnquist (rrq) <ralph.ronnquist@gmail.com>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: E93D 7167 A4F5 FA9E 9FED  4977 7028 5BA5 CF28 0BA4
$ sha256 devuan_chimaera_4.0.0_amd64_netinstall.iso
SHA256 (devuan_chimaera_4.0.0_amd64_netinstall.iso) = 1723cbbeb1aee26a54e1370b688e7dc03921402348d2a60086c58c18cd9cf24b
$ grep devuan_chimaera_4.0.0_amd64_netinstall.iso SHA256SUMS
1723cbbeb1aee26a54e1370b688e7dc03921402348d2a60086c58c18cd9cf24b  devuan_chimaera_4.0.0_amd64_netinstall.iso

The two checksums must match perfectly or else you should stop installation.

We run these steps as root:

# vnconfig vnd0 devuan_chimaera_4.0.0_amd64_netinstall.iso
# mkdir old new
# mount /dev/vnd0c old
# cp -R old/* new
# cp -R old/.disk new
# umount old
# vnconfig -u vnd0

Make Changes

Here are the diffs of the changes we make:

jrmu# diff -ru {old,new}/isolinux/
diff -ru old/isolinux/isolinux.cfg new/isolinux/isolinux.cfg
--- old/isolinux/isolinux.cfg   Mon Feb  1 11:57:37 2021
+++ new/isolinux/isolinux.cfg   Sun Aug 22 00:34:12 2021
@@ -1,5 +1,7 @@
 # D-I config version 2.0
 # search path for the c32 support libraries (libcom32, libutil etc.)
+serial 0 115200
+console 0
 path
 include menu.cfg
 default vesamenu.c32
diff -ru old/isolinux/txt.cfg new/isolinux/txt.cfg
--- old/isolinux/txt.cfg        Mon Feb  1 11:57:37 2021
+++ new/isolinux/txt.cfg        Sun Aug 22 00:35:37 2021
@@ -2,11 +2,11 @@
 label live
   menu label ^Install Ubuntu Server
   kernel /casper/vmlinuz
-  append   initrd=/casper/initrd quiet  ---
+  append vga=normal initrd=/casper/initrd --- console=ttyS0,115200n8
 label hwe-live
   menu label ^Install Ubuntu Server with the HWE kernel
   kernel /casper/hwe-vmlinuz
-  append   initrd=/casper/hwe-initrd quiet  ---
+  append vga=normal initrd=/casper/hwe-initrd --- console=ttyS0,115200n8
 label memtest
   menu label Test ^memory
   kernel /install/mt86plus

Generate ISO

# pkg_add xorriso
# xorriso -as mkisofs -r -J -joliet-long -l -cache-inodes -partition_offset 16 -A "Ubuntu/VMM" -b isolinux/isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o devuan-chimaera-4.0.0-vmm.iso  ./new

VMM

In /etc/vm.conf, we update the cdrom image:

vm "username" {
        owner username
        memory 1024M
        cdrom "/home/iso/devuan-chimaera-4.0.0-vmm.iso"
        disk /home/username/username.qcow2
        interface { 
                locked lladdr aa:bb:cc:dd:ee:ff
                switch "switch0"
        }
}
  1. Install

Install grub into /dev/vda

Ideas taken from: https://giocher.com/words/2018/ubuntu-on-openbsd-vmm/