diff --git a/.gitignore b/.gitignore index 3bdcd8f..b1812db 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,4 @@ v00001/ boot/ image.squashfs cache/ -tmp.qcow2 +tmp.ext4 diff --git a/qemu.sh b/qemu.sh index 00b9c4d..a88544e 100755 --- a/qemu.sh +++ b/qemu.sh @@ -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