Can't run Oasis Linux on QEMU 9 under Windows 10
Just out of curiosity wanted to try Oasis Linux on QEMU 9 under Windows 10. I also have "Git for Windows" installed on that Windows 10 machine and that Git distribution also comes with MSYS2, Bash and a few other Linux tools.
So I downloaded the QEMU distribution of Oasis Linux from https://s3.sr.ht/builds.sr.ht/artifacts/~mcf/1138649/ff314f9e1f24ce4f/oasis-qemu.tar.xz as described at https://git.sr.ht/~mcf/oasis and tried to run it by ./run. QEMU on Windows doesn't support KVM so I removed the following line from the run script
-enable-kvm -cpu host -m 2048 \
Then it started to boot but got stuck on the Linux init process stage because it uses some wrong path C:/Program to that init process, probably a truncated path to somewhere at C:\Program Files, most likely C:\Program Files\qemu.
I tried running qemu directly from /c/qemu and even tried placing this path as the very first one in the $PATH variable but nothing helped and the last message line in the stuck Oasis Linux boot is the same.
Finally I've found a workaround:
export MSYS2_ARG_CONV_EXCL="init="
This excludes the path passed into the init parameter to be converted by the MSYS2.
A few other workarounds that could be used instead of the previous one:
- use both single and double quotes to pass the
$appendinto the-appendargument of the qemu:
-append "'$append'" \
- add an extra slash into beginning of the
/bin/sinitpath inside theappendenv variable:
append="init=//bin/sinit root=/dev/vda ro TERM=$TERM"
All three workarounds work independently. Not sure which one is the best. Probably the single with double quotes one.