From f4b17d9459ff995007db8fa016947de458522907 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 14 Aug 2025 09:59:21 +0200 Subject: [PATCH] Start working on bin to boot the iso --- bin/omarchy-iso-boot | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100755 bin/omarchy-iso-boot diff --git a/bin/omarchy-iso-boot b/bin/omarchy-iso-boot new file mode 100755 index 0000000..58eb61a --- /dev/null +++ b/bin/omarchy-iso-boot @@ -0,0 +1,42 @@ +#!/bin/bash + +if [[ -z "$1" ]]; then + echo "Usage: omarchy-launch " + exit 1 +fi + +if ! command -v qemu-system-x86 >/dev/null; then + sudo pacman -S --noconfirm --needed qemu-system-x86 qemu-img +fi + +# Setup storage +if [[ ! -f "/tmp/test.qcow2" ]]; then + qemu-img create -f qcow2 /tmp/test.qcow2 20G + qemu-img create -f qcow2 /tmp/test_large.qcow2 20G +fi + +# Start iso +qemu-system-x86_64 \ + -cpu host \ + -enable-kvm \ + -machine q35,accel=kvm \ + -device VGA,edid=on,xres=1280,yres=720 \ + -device intel-iommu \ + -m 8192 \ + -drive if=pflash,format=raw,readonly=on,file=/usr/share/ovmf/x64/OVMF_CODE.4m.fd \ + -drive if=pflash,format=raw,readonly=on,file=/usr/share/ovmf/x64/OVMF_VARS.4m.fd \ + -device virtio-scsi-pci,bus=pcie.0,id=scsi0,addr=0x8 \ + -device scsi-hd,drive=libvirt-0-format,bus=scsi0.0,id=scsi0-0-0-0,channel=0,scsi-id=0,lun=0,device_id=drive-scsi0-0-0-0,bootindex=2,write-cache=on \ + -blockdev '{"driver":"file","filename":"/tmp/test.qcow2","aio":"threads","node-name":"libvirt-0-storage","cache":{"direct":false,"no-flush":false},"auto-read-only":true,"discard":"unmap"}' \ + -blockdev '{"node-name":"libvirt-0-format","read-only":false,"discard":"unmap","cache":{"direct":true,"no-flush":false},"driver":"qcow2","file":"libvirt-0-storage","backing":null}' \ + -device virtio-scsi-pci,bus=pcie.0,id=scsi1,addr=0x9 \ + -device scsi-hd,drive=libvirt-1-format,bus=scsi1.0,id=scsi1-0-0-0,channel=0,scsi-id=0,lun=0,device_id=drive-scsi1-0-0-0,bootindex=3,write-cache=on \ + -blockdev '{"driver":"file","filename":"/tmp/test_large.qcow2","aio":"threads","node-name":"libvirt-1-storage","cache":{"direct":false,"no-flush":false},"auto-read-only":true,"discard":"unmap"}' \ + -blockdev '{"node-name":"libvirt-1-format","read-only":false,"discard":"unmap","cache":{"direct":true,"no-flush":false},"driver":"qcow2","file":"libvirt-1-storage","backing":null}' \ + -device virtio-scsi-pci,bus=pcie.0,id=scsi2 \ + -device scsi-cd,drive=cdrom0,bus=scsi2.0,bootindex=1 \ + -drive "file=$1,media=cdrom,if=none,format=raw,cache=none,id=cdrom0" \ + -device virtio-vga,virgl=on \ + -usb -device usb-tablet \ + -display gtk,gl=on,zoom-to-fit=on \ + -vnc none