#!/bin/sh . samizdat-paths.sh iso=${samizdat_iso_dir}/samizdat.iso disk=${samizdat_iso_dir}/samizdat.disk.img layered=${samizdat_iso_dir}/${iso%.iso}.layered.iso [ -f "$layered" ] && iso=$layered [ "$1" ] && iso=$1 initrd.sh || { echo "initrd.sh failed" >&2; exit 1; }; NET='tap,vlan=0,ifname=tap0,script=no,downscript=no' [ "$SLOW_BOOT" ] || QEMU_LOADS_LINUX=y # To use qemu built-in pxe boot server: # NET='user,tftp=isolinux,bootfile=/pxelinux.0' initrd=${samizdat_isolinux_dir}/linux/initrd.img kernel=${samizdat_isolinux_dir}/linux/vmlinuz kcmdline_NET='boot=samizdat components quiet splash nbdroot=192.168.10.1,samizdat.btrfs nbddev=/dev/nbd0 ip=dhcp' kcmdline_CDROM='boot=samizdat components quiet splash' if [ "$USE_ISO" ]; then [ "$QEMU_LOADS_LINUX" ] && set -- -initrd "$initrd" -kernel "$kernel" -append "$kcmdline_CDROM" set -- -cdrom "$iso" else [ "$QEMU_LOADS_LINUX" ] && set -- -initrd "$initrd" -kernel "$kernel" -append "$kcmdline_NET" set -- -boot n fi sudo qemu-system-x86_64 -enable-kvm -smp 2 -m 640 -k en-us \ -vga qxl \ -net nic,vlan=0,model=virtio \ -net "$NET" \ -rtc base=localtime \ -hda "$disk" \ "$@"