Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

QEMU, No bootable device, Windows Subsystem for Linux

I'm learning how to build a basic OS kernel with https://intermezzos.github.io

I've create my .iso file and I'm at the point where I am runnning qemu-system-x86_64 -cdrom os.iso When I press enter, QEMU runs a window with the following output:

Booting from Floppy...
Boot failed: could not read the boot disk

Booting from DVD/CD...
Boot failed: Could not read from CDROM (code 0004)
Booting from ROM...
iPXE (PCI 00:03.0) starting execution...ok
iPXE initializing devices...ok

iPXE 1.0.0+git-20131111.c3d1e78-2ubuntu1.1 -- Open Source Network Boot Firmware
-- http://ipxe.org
Features: HTTP HTTPS iSCSI DNS TFTP AoE bzImage ELF MBOOT PXE Menu

net0: 52:54:00:12:34:56 using 82549em on PCI00:03.0 (open)
  [Link:up, TX:0 TXE:0 RX:0 RXE:01]
Configuring (net0 52:54:00:12:34:56)...ok
net0: 10.0.2.15/255.255.255.0 gw 10.0.2.2
Nothing to boot: No such file for directory (http://ipxe.org/2d03e13b)
No more network devices

No bootable device.

I went to the website listed in the output (http://ipxe.org/2d03e13b) and one of the tips is that I might Use the iPXE command line to perform DHCP manually, however when I press CTRL + B to access cli, I'm not able to do so.

Where do I look next to troubleshoot this problem of not being able to boot my .iso?
How do I make QEMU have access to keyboard input?


UPDATE
I don't know how, but I'm am now able to use CTRL + B to access iPXE command line.

This seems like a good place to start diagnosing my problem of not being able to boot my .iso.

What am I looking for?


UPDATE 2
Thanks to Peter Maydell's suggestion below, I've tested a known-good iso image (https://alpinelinux.org/), running qemu-system-x86_64 -cdrom alpine-3.4.3-x86_64.iso and it booted perfectly just as I expected.

I've rewritten my files from https://intermezzos.github.io to create a new iso image, this time copy and pasting the code from the repository, just in case I was previously inputting typos.

Still not booting. On to the next clue...

like image 352
Hunter Lester Avatar asked Feb 07 '23 06:02

Hunter Lester


1 Answers

The first thing to do is to check whether this command line and ISO image work on a normal Linux host system. That will tell you whether the problem is (a) the Windows Subsystem for Linux not correctly implementing something QEMU relies on or (b) your ISO image actually not being a bootable CDROM.

You might also try booting a known-good ISO image such as one for a Linux distribution.

(The general principle here is to try to do diagnostic tests to split the space of "what might be the problem" into smaller sections and determine which side your problem is.)

like image 74
Peter Maydell Avatar answered Apr 06 '23 17:04

Peter Maydell