summaryrefslogtreecommitdiff
path: root/src/qemu.sh
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2017-03-25 15:15:08 -0400
committerAndrew Cady <d@jerkface.net>2017-03-25 15:15:08 -0400
commit20af6a738d3d5ca1889c530dcdc2180eb32dc8ff (patch)
tree43eec324ff0138e10cf05a1237cc78e8af436fd6 /src/qemu.sh
parentd130d8961e6cb7ae8464ec2621a1d0a67269c695 (diff)
qemu script will use built-in linux loader by default
The script was modified so that it would still use PXE to load the other things that are loaded during network boot. The network style booting is also now the default This is the fastest way to boot, though it does not permit testing the bootloader on the CDROM or the PXE boot setup. To test the bootloader, you must now export SLOW_BOOT=y To boot from CDROM image, you must export USE_ISO=y
Diffstat (limited to 'src/qemu.sh')
-rwxr-xr-xsrc/qemu.sh22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/qemu.sh b/src/qemu.sh
index 207ca68..f9982c4 100755
--- a/src/qemu.sh
+++ b/src/qemu.sh
@@ -2,11 +2,8 @@
2 2
3. samizdat-paths.sh 3. samizdat-paths.sh
4 4
5# iso=debian-live-8.4.0-amd64-gnome-desktop.iso
6# iso=debian-live-8.4.0-amd64-standard.iso
7# iso=debian-live-8.4.0-amd64-standard.btrfs.iso
8iso=${samizdat_iso_dir}/samizdat.iso 5iso=${samizdat_iso_dir}/samizdat.iso
9disk=${samizdat_iso_dir}/debian-live-8.4.0-amd64-standard.btrfs.disk 6disk=${samizdat_iso_dir}/samizdat.disk.img
10layered=${samizdat_iso_dir}/${iso%.iso}.layered.iso 7layered=${samizdat_iso_dir}/${iso%.iso}.layered.iso
11 8
12[ -f "$layered" ] && iso=$layered 9[ -f "$layered" ] && iso=$layered
@@ -17,21 +14,22 @@ initrd.sh || { echo "initrd.sh failed" >&2; exit 1; };
17 14
18NET='tap,vlan=0,ifname=tap0,script=no,downscript=no' 15NET='tap,vlan=0,ifname=tap0,script=no,downscript=no'
19 16
20# To test local pxe boot server: 17[ "$SLOW_BOOT" ] || QEMU_LOADS_LINUX=y
18
19# To use qemu built-in pxe boot server:
21# NET='user,tftp=isolinux,bootfile=/pxelinux.0' 20# NET='user,tftp=isolinux,bootfile=/pxelinux.0'
22 21
23initrd=${samizdat_isolinux_dir}/linux/initrd.img 22initrd=${samizdat_isolinux_dir}/linux/initrd.img
24kernel=${samizdat_isolinux_dir}/linux/vmlinuz 23kernel=${samizdat_isolinux_dir}/linux/vmlinuz
25kcmdline='boot=samizdat components quiet splash' 24kcmdline_NET='boot=samizdat components quiet splash nbdroot=192.168.10.1,samizdat.btrfs nbddev=/dev/nbd0 ip=dhcp'
26 25kcmdline_CDROM='boot=samizdat components quiet splash'
27if [ "$QEMU_LOADS_LINUX" ]; then
28 set -- -initrd "$initrd" -kernel "$kernel" -append "$kcmdline"
29fi
30 26
31if [ "$USE_ISO" ]; then 27if [ "$USE_ISO" ]; then
32 set -- -cdrom "$iso" 28 [ "$QEMU_LOADS_LINUX" ] && set -- -initrd "$initrd" -kernel "$kernel" -append "$kcmdline_CDROM"
29 set -- -cdrom "$iso"
33else 30else
34 set -- -boot n 31 [ "$QEMU_LOADS_LINUX" ] && set -- -initrd "$initrd" -kernel "$kernel" -append "$kcmdline_NET"
32 set -- -boot n
35fi 33fi
36 34
37sudo qemu-system-x86_64 -enable-kvm -smp 2 -m 640 -k en-us \ 35sudo qemu-system-x86_64 -enable-kvm -smp 2 -m 640 -k en-us \