3

I'm learning how to write a basic OS kernel with intermezzos.github.io

I'm running in Windows Subsystem for Linux on Windows 10 v1607.

I'm at the point where I want to run my .iso with qemu-systems-x86_64 -cdrom os.iso.

Previously I was able to run the command and QEMU would run a window, which was running into another problem, posted here: QEMU, No bootable device, Windows Subsystem for Linux

Now when running the command, I receive the following error: Could not initialize SDL(No available video device) - exiting

When I ran into this problem before I installed Xming, ran it, and then QEMU successfully ran. But now, when I try to run Xming it no longer solves the problem.

I even tried installing xorg and running startx on WSL but that starts another issue: xf86OpenConsole: Cannot open /dev/tty0 (No such file or directory)

I really don't know what I'm doing and I have so many questions.

I'm under the impression that for QEMU to successfully run, it needs to be able to find a video driver. Is that the purpose of X11?

Community
  • 1
  • 1
Hunter Lester
  • 2,972
  • 3
  • 15
  • 19
  • 1
    WSL behaves like a headless box with a hardware terminal connected. It can stream X protocol over TCP (looping back to localhost) which is why Xming worked. StartX starts a local X server on a machine that _has_ a monitor (X servers are the things that multiplex and output window data to the screens, while X clients are the programs that create windows). – Harry Gindi Sep 01 '16 at 18:05
  • @HunterLester any luck? Running into exactly the same problem... – Ben Gubler Jun 02 '18 at 06:52
  • @BenGubler Hi Ben. Other than setting `export DISPLAY=:0`, I also had to `apt-get install grub-pc-bin`. See this issue: https://stackoverflow.com/questions/39232676/qemu-no-bootable-device-windows-subsystem-for-linux – Hunter Lester Jun 03 '18 at 15:55
  • @HunterLester thanks! I got it working. – Ben Gubler Jun 04 '18 at 05:59

1 Answers1

1

I am able to get qemu-system-x86_64 -cdrom os.iso to run the expected window after setting: export DISPLAY=:0

Partially solves my problem because I'm still running into QEMU, No bootable device, Windows Subsystem for Linux

I'm wondering if I'm setting the DISPLAY environment variable correctly.

Here's documentation on the DISPLAY variable, for anyone else that wants to learn: http://gerardnico.com/wiki/linux/display

Anyway, this portion is solved!

Community
  • 1
  • 1
Hunter Lester
  • 2,972
  • 3
  • 15
  • 19