LIVE_BOOT/qemu-bios.sh
2023-11-22 00:28:13 -05:00

22 lines
584 B
Bash
Executable File

#!/bin/sh
# Use this script without arguments to run the generated ISO image with QEMU.
# If you get kernel panic with message "No working init found", then try to
# increase the RAM from 128M to 256M.
if [ "`uname -m`" = "x86_64" ] ; then
ARCH="x86_64"
else
ARCH="i386"
fi
cmd="qemu-system-$ARCH -m 1024M -cdrom debian-custom.iso -net nic,model=virtio"
if [ "$1" = "-hdd" -o "$1" = "-h" ] ; then
echo "Starting QEMU with attached ISO image and hard disk."
echo 'console' | $cmd -hda hdd.img
else
echo "Starting QEMU with attached ISO image."
echo 'console' | $cmd
fi