Absurdponcho/PonchoOS

The filename, directory name, or volume label syntax is incorrect.

Closed this issue · 3 comments

On Windows 10, whenever the run.bat file is run, it throws an error.

My Windows 10 version is 1909

C:\Windows>qemu-system-x86_64 -drive file="\\wsl$\Ubuntu-20.04\home\osdev\Nature\kernel\run.bat"/../bin/CustomOS.img -m 256M -cpu qemu64 -drive if=pflash,format=raw,unit=0,file=""\\wsl$\Ubuntu-20.04\home\osdev\Nature\kernel\run.bat"/../../OVMFbin/OVMF_CODE-pure-efi.fd",readonly=on -drive if=pflash,format=raw,unit=1,file=""\\wsl$\Ubuntu-20.04\home\osdev\Nature\kernel\run.bat"/../../OVMFbin/OVMF_VARS-pure-efi.fd" -net none qemu-system-x86_64: -drive file="\\wsl$\Ubuntu-20.04\home\osdev\Nature\kernel\run.bat"/../bin/CustomOS.img: Could not open '"\\wsl$\Ubuntu-20.04\home\osdev\Nature\kernel\run.bat"/../bin/CustomOS.img': The filename, directory name, or volume label syntax is incorrect.

I'm baffled on why this doesn't work, please help!

maybe \wsl$\Ubuntu-20.04\home\osdev\Nature\kernel\run.bat is not a file

Running the bat script as admin + changing the script to:

set OSNAME=CustomOS
set BUILDDIR=%0/../bin
set OVMFDIR=%0/../../OVMFbin

qemu-system-x86_64 -drive file=%BUILDDIR%/%OSNAME%.img -m 256M -cpu qemu64 -drive if=pflash,format=raw,unit=0,file=%OVMFDIR%/OVMF_CODE-pure-efi.fd,readonly=on -drive if=pflash,format=raw,unit=1,file=%OVMFDIR%/OVMF_VARS-pure-efi.fd -net none
pause

worked for me (I had the same error)

Also if you use an earlier version of qemu it works. Just found out.