From 6d18fd73e3a7523106dd5aafd77de98a340e7b67 Mon Sep 17 00:00:00 2001 From: Kroese Date: Mon, 22 Apr 2024 11:28:19 +0200 Subject: [PATCH] fix: Use correct QEMU binary (#44) --- readme.md | 9 ++++++++- src/entry.sh | 2 +- src/reset.sh | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index 2f1f189..3377d29 100644 --- a/readme.md +++ b/readme.md @@ -103,7 +103,14 @@ docker run -it --rm --name qemu -e "BOOT=http://example.com/image.iso" -p 8006:8 * ### How do I boot a local image? - To skip the download, rename your image to `boot.iso` and place it in an empty `/storage` folder. + You can use a local file directly, and skip the download, by binding it in your compose file in this way: + + ```yaml + volumes: + - /home/user/example.iso:/storage/boot.iso + ``` + + Replace the example path `/home/user/example.iso` with the filename of the desired ISO file. * ### How do I assign an individual IP address to the container? diff --git a/src/entry.sh b/src/entry.sh index 4ec0a65..7c05d3e 100755 --- a/src/entry.sh +++ b/src/entry.sh @@ -17,7 +17,7 @@ cd /run trap - ERR -info "Booting image${BOOT_DESC} on ${CPU} using QEMU v${VERS} with kernel $(uname -r)..." +info "Booting image${BOOT_DESC} on a ${CPU} using QEMU v${VERS} with kernel $(uname -r)..." [[ "$DEBUG" == [Yy1]* ]] && set -x exec qemu-system-aarch64 ${ARGS:+ $ARGS} diff --git a/src/reset.sh b/src/reset.sh index 9f2efea..98130e8 100644 --- a/src/reset.sh +++ b/src/reset.sh @@ -44,7 +44,7 @@ HOST=$(hostname -s) KERNEL=$(uname -r | cut -b 1) MINOR=$(uname -r | cut -d '.' -f2) ARCH=$(dpkg --print-architecture) -VERS=$(qemu-system-x86_64 --version | head -n 1 | cut -d '(' -f 1 | awk '{ print $NF }') +VERS=$(qemu-system-aarch64 --version | head -n 1 | cut -d '(' -f 1 | awk '{ print $NF }') CPU=$(lscpu | grep 'Model name' | cut -f 2 -d ":" | awk '{$1=$1}1' | sed 's# @.*##g' | sed s/"(R)"//g | sed 's/[^[:alnum:] ]\+/ /g' | sed 's/ */ /g') # Check system