32-bit arch detection fails on Linux systems different than i386 (e.g. on i686).

This commit is contained in:
Ivan Davidov 2017-12-25 07:46:53 +02:00
parent 963b543b9c
commit e18ee9f175
2 changed files with 14 additions and 2 deletions

View File

@ -10,7 +10,13 @@
# If you get kernel panic with message "No working init found", then try to # If you get kernel panic with message "No working init found", then try to
# increase the RAM from 128M to 256M. # increase the RAM from 128M to 256M.
cmd="qemu-system-$(uname -m) -m 128M -cdrom minimal_linux_live.iso -boot d -vga std" if [ "`uname -m`" = "x86_64" ] ; then
ARCH="x86_64"
else
ARCH="i386"
fi
cmd="qemu-system-$ARCH -m 128M -cdrom minimal_linux_live.iso -boot d -vga std"
if [ "$1" = "-hdd" -o "$1" = "-h" ] ; then if [ "$1" = "-hdd" -o "$1" = "-h" ] ; then
echo "Starting QEMU with attached ISO image and hard disk." echo "Starting QEMU with attached ISO image and hard disk."

View File

@ -17,7 +17,13 @@
# #
OVMF_LOCATION=~/Downloads/OVMF.fd OVMF_LOCATION=~/Downloads/OVMF.fd
cmd="qemu-system-$(uname -m) -pflash $OVMF_LOCATION -m 128M -cdrom minimal_linux_live.iso -boot d -vga std" if [ "`uname -m`" = "x86_64" ] ; then
ARCH="x86_64"
else
ARCH="i386"
fi
cmd="qemu-system-$ARCH -pflash $OVMF_LOCATION -m 128M -cdrom minimal_linux_live.iso -boot d -vga std"
if [ "$1" = "-hdd" -o "$1" = "-h" ] ; then if [ "$1" = "-hdd" -o "$1" = "-h" ] ; then
echo "Starting QEMU with attached ISO image and hard disk." echo "Starting QEMU with attached ISO image and hard disk."