qemu.sh: Arreglar/aclarar formatos
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

tmp.qcow2 nunca se usaba como qcow2 porque se convertía en ext4 como si fuese un archivo raw
This commit is contained in:
Cat /dev/Nulo 2022-09-10 09:10:07 -03:00
parent 9f2ff0530f
commit f595076479
2 changed files with 7 additions and 5 deletions

2
.gitignore vendored
View file

@ -3,4 +3,4 @@ v00001/
boot/
image.squashfs
cache/
tmp.qcow2
tmp.ext4

10
qemu.sh
View file

@ -5,12 +5,14 @@ if test "$NOGRAPHIC" = true; then
qemuappend="-nographic"
fi
qemu-img create -f qcow2 tmp.qcow2 1G
mkfs.ext4 tmp.qcow2
fallocate --length 1G tmp.ext4
mkfs.ext4 tmp.ext4
sudo chown root:$(id -u) -R boot/ && sudo chmod g+rw -R boot/
qemu-system-x86_64 -enable-kvm -m 2048 \
-drive file=image.squashfs,media=disk \
-drive file=tmp.qcow2,media=disk \
-drive file=image.squashfs,media=disk,format=raw \
-drive file=tmp.ext4,media=disk,format=raw \
-net nic,model=virtio-net-pci \
-net user,hostfwd=tcp:10.69.0.2:8080-:80 \
-kernel boot/vmlinuz-virt -initrd boot/initramfs-virt \
-append "root=/dev/sda rootfstype=squashfs modules=ext4 init=/sbin/runit-init $append" $qemuappend