define-alpine/qemu.sh

13 lines
386 B
Bash
Raw Normal View History

2022-06-18 00:06:19 +00:00
#!/bin/sh
if test "$NOGRAPHIC" = true; then
append="console=ttyS0"
qemuappend="-nographic"
fi
doas chown root:$(id -u) -R boot/ && doas chmod g+rw -R boot/
qemu-system-x86_64 -enable-kvm -m 2048 \
-drive file=image.squashfs,media=disk \
-kernel boot/vmlinuz-virt -initrd boot/initramfs-virt \
-append "root=/dev/sda rootfstype=squashfs init=/sbin/runit-init $append" $qemuappend