Created
February 28, 2026 00:38
-
-
Save CarlFK/fa67852baf3ba5ce39f8542b40e06cdb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -ex | |
| thumb="/dev/sda" | |
| # sudo apt install qemu qemu-utils qemu-system ovmf | |
| # wget -N http://deb.debian.org/debian/dists/trixie/main/installer-amd64/current/images/hd-media/boot.img.gz | |
| wget -N https://d-i.debian.org/daily-images/amd64/daily/hd-media/boot.img.gz | |
| gunzip --keep --force boot.img.gz | |
| sudo dd status=progress if=boot.img of=${thumb} | |
| qemu-system-x86_64 \ | |
| -m 512 \ | |
| -machine q35,accel=kvm \ | |
| -cpu host \ | |
| -drive file=${thumb},if=none,format=raw,id=thumb \ | |
| -usb \ | |
| -device usb-storage,drive=thumb \ | |
| -boot menu=on | |
| fatresize --progress --verbose --size 2G ${thumb} | |
| # legacy | |
| qemu-system-x86_64 \ | |
| -m 512 \ | |
| -machine q35,accel=kvm \ | |
| -cpu host \ | |
| -drive file=${thumb},if=none,format=raw,id=thumb \ | |
| -usb \ | |
| -device usb-storage,drive=thumb \ | |
| -boot menu=on | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment