QEMU, No bootable device, Windows Subsystem for Linux - qemu

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...

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.)

Simple solution to the problem. Has to do with systems that use EFI to boot.
source
I needed to apt-get install grub-pc-bin and then rebuild image.

Related

QEMU Monitor on Windows 10

I'm Ronaldo, Newbie of Stackoverflow.
I'm having a problem, On my PC it's running Windows 10 Build 1803, Then I installed QEMU, but not only that, I installed the graphical version which is QtEmu.
Then I wanted to virtualize CentOS 3.1, with Disk 1, Disk 2 and Disk 3. But I don't know how to eject the disk in QtEmu, I tried it in PowerShell and I couldn't, not even in CMD, just the serial0, and the keyboard is not works, only on the PC that works. the Mouse is ok. But QEMU Monitor is out of QtEmu! Is there any way to install QEMU Monitor on Windows, with QtEmu?
Please help me!
QEMU can be started with option "-monitor" so you can send commands to it there. I never used QtEmu so not sure how it starts QEMU. If you figure out how, check out https://qemu.weilnetz.de/w64/2012/2012-08-24/qemu-doc.html#pcsys_005fmonitor.
So basically, you can use "change" command to mount and unmount a CD drive or other storage devices. For example, "change ide1-cd0 /tmp/file.iso" to mount an image file. The device names are not fixed across different VM configurations. "info block" can tell you what name you need to use.
sorry i just discovered QEMU, it's far now, but it can help people in the future.
I dislike QTEmu and others IHM, too much bugs currently (2022)..
With QEMU
default mode: you can directly have an access with the window, go to view and you can switch by clicking on "compat monitor 0" . You can also detach the monitor.
sdl: ctrl+alt 2.
Here:
Identify your devices by "info block"
As you can see here, i ran without anything (it's just to show).
To change/add content of your cd-rom, "Change "
here my device is "ide1-cd0"
Path can be your physical or virtual drive, a disk image, you can always swap according your needs.
As you can see now, i use "R:", a virtual device from a software like daemon tools (an alt).
I think it's better, before to swap, to eject from the guest... But perhaps
it depends of your OS. For the while i used it, the most of time, with win98x.

Chrome nativeMessaging example fails on Windows

I downloaded the official Chrome nativeMessaging example to test it out.
To do this, I installed the app from chrome://extensions, by choosing Load Unpacked. No problems so far.
I then installed the host. I'm using Windows 7, so I ran install_host.bat, which claimed that "The operation completed successfully." However, when I go to chrome://apps/ and click the Connect button, I get this error:
Failed to connect: Native host has exited.
Is there some reason this would happen? Restarting Chrome did not fix the issue, nor did uninstalling and then reinstalling the host program.
(I noticed that native-messaging-example-host.bat requires Python 2, so I modified it to run Python 2 explicitly. If I run native-messaging-example-host.bat from the command line, it pops up a little example program of its own with a GUI and seems to work correctly.)
Turns out I was using a non-standard character in the path leading to the host executable. This wouldn't be a problem for any other program, but Chrome's native messaging API doesn't like it, I guess.
By the way, the documentation on setting up this example is near-nonexistent, but this stack overflow link has some useful info: Chrome Extension NativeMessaging 'connectNative' undefined

Y510P Fedora doesn't start X after faulty drivers installation

I have a Lenovo Y510P with integrated IntelHD 4th gen. VGA and a dedicated Nvidia GT755 VGA.
I run Fedora 21 and until recently had no problems. I never installed any proprietary drivers or special tools to deal with graphics, it just worked under fedora.
(I use a Windows partition to play games, everything there works fine too.)
Quite recently I acquired a second GT755 for my Ultrabay-Slot. Booting to Windows went without a problem, SLI activated like a charm and everything seemed fine. However, booting to fedora caused the CPU to rapidly heat up. I found out later that having both VGAs installed causes the bios to disable IntelHD, which apparently was the only VGA Fedora can run out of the box.
So my first try was to install VGA drivers and IntelHD-drivers in parallel.
(following this guide: https://ask.fedoraproject.org/en/question/36506/changing-default-driver-for-displaying-x/ )
After I found out about the "no IntelHD with SLI"-problem I tried out to get the SLI disabled and rely only on my Intel. There I made a huge mistake:
In the bios, I disabled the GT755 while booting with only one VGA. Forgetting about that, I later tried to install the Nvidia driver again, which could not find the implemented GT755. Believing this was due to some xorg.conf-code within /usr/share/X11/xorg.conf.d/20-intel.conf:
Section "Device"
Identifier "Intel"
Driver "intel"
EndSection
I simply plugged in the second GT755, which caused the bios to disable IntelHD.
Now I installed the Nvidia Driver (bumblebee-nvidia) and everything worked fine, xorg.conf was rewritten autmatically, I disabled nouveau in /etc/default/grub and recompild grub (with grub2-mkconfig -o grub.cfg), and rebooted.
Since then, I could not get to the login-screen. When I enter my LUKS-passwd, I see a yellow Message:
[ 0.093961] Ignoring BGRT: invalid status 0 (expected 1)
But if I remember correctly, this was always displayed, just in white.
I have tried reverting to my backups of xorg.conf, grub.cfg and /etc/default/grub and recompiling grub, nothing worked.
Everything was tested with both enabled and disabled internal GT755.
I tried to reinstall bumblebee-nvidia with enabled GT755, no difference.
IntelHD drivers are loaded at startup and appear to be correctly configured in all xorg related confs.
Calling startx causes the login-screen to flash for a moment, just to be instantly replased by an error-message:
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
waiting for X server to shut down "sni-qt/[NUMBER, 4 digits]" WARN [TIMESTAMP] void StatusNotifierItemFactory::connectToSnw() Invalid interface to SNW_SERVICE bluedevil-monolithic: Fatal IO error: client killed(EE) Server terminated successfully (0). Closing log file.
At this point I would be glad to get my display back. Ideally however, I want to be able to keep the second VGA in it's slot and still use IntelHD, since I will never require high VGA performance under fedora.
What I need now is a possibility to revert my system back to it's old state.
With any luck I can actually install all required drivers afterwards and would write a little VGA-guide for the Y510P.
Apparently, I broke the displaymanager (sddm) somewhere somehow.
A friend helped me analysing the problem, but we were unable to find the exact cause.
We fixed the problem by replacing sddm with kdm.
the steps are:
install kdm
sudo yum install kdm
disable sddm:
sudo systemct disable sddm
reboot

Chrome: Attaching nacl-gdb to packaged application loaded as an unpacked extension

I have built a simple NaCl application. For running the application I use technique 2 described in Nacl Developer's guide, which means that instead of running a local server I load my application as unpacked extension to chrome. The application runs fine so far.
Now I want to experiment with nacl-gdb and attach my application to it at startup.
In the NaCl Developer's guide there are only instructions on how to attach nacl-gdb on an application that is run with local server(technique 1). I made a search to the internet and I ended up with the following approach in order to attach nacl-gdb for an application that is being ran with technique 2:
I enabled "Native Client GDB-based debugging" flag of Chrome.
I started chrome from a terminal like this: ./chrome "--nacl-gdb=gnome-terminal --
/media/sdb1/leonidasbo/AncientRoot/nacl_sdk/pepper_27/toolchain/linux_x86_glibc/bin/x86_64-nacl-gdb"
When Chrome launched, I navigated to my application.
With this approach, Chrome automatically started nacl-gdb when I opened my application.
However nacl-gdb tried to attach but with no success. The output was the following:
*This GDB was configured as "--host=x86_64-unknown-linux-gnu --target=x86_64-nacl".
Reading symbols from /opt/google/chrome/nacl_irt_x86_64.nexe...(no debugging symbols found)...done.
Don't know how to attach. Try "help target".
(gdb)*
It seems that gdb cannot attach to my application. I tried executing "target exec /path/to/my.nexe", but nothing changed.
Am I missing something here? Is there any other way to debug applications loaded as unpacked extensions with nacl-gdb?
My OS is Ubuntu 12.04 and I am using pepper_27 of nacl_sdk. Chrome version is 27.0.1453.93.
Thanks
I assume you were using this guide, which I was using earlier as well. It is out of date. These are the real instructions. It seems that the way you attach the debugger has completely changed, and it is no longer possible to use --nacl-gdb (that is planned for removal). You must manually attach the debugger by following these steps.
The full guide is here, but I'll summarize:
Launch Chrome with chrome --enable-nacl --enable-nacl-debug --no-sandbox --disable-hang-monitor.
Run <NACL_SDK_ROOT>/toolchain/win_x86_newlib/bin/x86_64-nacl-gdb (with no arguments).
Enter these commands into the gdb prompt:
(gdb) nacl-manifest <path-to-your-.nmf-file>
(gdb) nacl-irt <CHROME-DIR>/nacl_irt_x86_64.nexe
(gdb) target remote localhost:4014
Now you can use gdb as normal. (If you just want to run the application until it crashes, start by typing continue.)

Tcpdump on openwrt

I'm looking for a tcpdump binary that runs on openwrt. The website only shows source code that must be built. Anybody point me to a location that contains a prebuild binary? Thanks.
I suggest to set up a working repository, i.e.:
https://downloads.openwrt.org/chaos_calmer/15.05-rc2/x86/generic/packages/base/
You can put the url on your OpenWRT system under /etc/opkg.conf.
Using opkg you do not have to deal with all the dependencies.
opkg update
opkg install tcpdump
If there is no internet connection on the Openwrt system, and there is no local repository deployed, the solution above works as well, but it is more painful and consumes more time.
You find binaries at
http://downloads.openwrt.org/snapshots/trunk/
but you have to use the right one for your hardware plattform
e.g for x86
http://downloads.openwrt.org/snapshots/trunk/x86/packages/tcpdump_4.2.1-1_x86.ipk
The prefered method is to use opkg to install the package