Skip to contentSkip to conversation

qemu problem (you might be my last resort)

Qemu-devel Robin Pfeifer 4 participants 10 messages Mar 20, 2005 – Mar 25, 2005

lore
Share & tools
lore
#0 lore raw

I have changed my subscription address as no post of this thread made it through the damn spam guard of my provider's. Maybe I shouldn't have used 'last resort' in the topic line...

Anyway:

Jim C. Brown wrote:

Quoted 5 lines · Robin Pfeifer
Quoted 5 lines · Robin Pfeifer
Quoted 4 lines

When I start qemu with the following command:

qemu -cdrom /dev/cdrom -boot d -snapshot -m 256

Quoted 8 lines
Quoted 4 lines
Quoted 4 lines

with any bootable CD in the drive, I only get a qemu window with the tile 'qemu stopped'. I cannot get into the monitor by pressing ctrl + alt + 2 or do anything else except ctrl + c in the terminal where I started qemu to cancel it.

Out of curiosity, does it work if you use an iso image instead of /dev/cdrom?

No, it doesn't, the same error appears.

Quoted 3 lines

If you "-boot a" from a floppy disk image, will that work or does it have the same error? (You can download a FreeDOS boot disk if u don't have a way to get a bootable floppy disk image).

That's very strange, booting from a floppy works.

Quoted 9 lines
Quoted 5 lines
Quoted 5 lines

The command used to work perfectly with various versions of qemu, but now doesn't anymore. I've tried CVS versions after 0.6.1 stopped working, but to no avail.

Does using older versions of qemu work? (Sorry if I'm asking questions > that you have already answered but I don't remember the original email).

I haven't tried older versions than 0.6.1, but that used to work before I tried -m 350. Then I upgraded my RAM, tried the new parameter, and that was it. I also tried removing the RAM again, in case there was something wrong with it, but that didn't change anything.

Quoted 16 lines
Quoted 8 lines
Quoted 6 lines

At first only my user ID had the problem, and root worked - but then I tried the -m 350 parameter with root, too, (not thinking, at the time, that it could be the cause of the problem) and since then, root hasn't been able to use qemu anymore either.

if u add a new user, can that user use qemu (provided you don't try

"-m 350") ?

No, I tried that yesterday, but a new user gets the same error. Root used not to get it when the user already did, but after using -m 350 with root, it no longer worked for root either.

This is the most confusing thing of all.

Quoted 2 lines · Stefan Kisdaroczi

Did you try to set "-L" ?
-L path // set the directory for the BIOS and VGA BIOS

No, I didn't try that. This parameter isn't in the qemu manpage, is it? What am I supposed to use as directory?

Robin

#1 lore raw
Quoted 4 lines · Robin Pfeifer

I have changed my subscription address as no post of this thread made it through the damn spam guard of my provider's. Maybe I shouldn't have used 'last resort' in the topic line...

Same here. Lucky for me, I am the one who set up and manages the anti-spam software.

Quoted 9 lines

Anyway:

Quoted 2 lines · Jim C. Brown

Out of curiosity, does it work if you use an iso image instead of /dev/cdrom?

No, it doesn't, the same error appears.

Quoted 8 lines
Quoted 1 line

If you "-boot a" from a floppy disk image, will that work or does it

have the

Quoted 1 line

same error? (You can download a FreeDOS boot disk if u don't have a

way to

Quoted 1 line

get a bootable floppy disk image).

That's very strange, booting from a floppy works.

You mean u get the new X window titled "QEMU", which shows the guest OS booting, and once the booting is done the guest OS is actually usuable (at least as usuable as it would be if it was botted on a real computer)?

Here are a few more tests to try out:

If you boot from a hard disk, no floppy or cdrom image given, does it work?

If you boot from a hard disk, cdrom iso image given, does it work? If it does work, can you see the cdrom from the guest?

If you boot from a hard disk, /dev/cdrom given, does it work? If it does work, can you see the cdrom from the guest?

If you boot from a floppy, cdrom iso image given, does it work? If it does work, can you see the cdrom from the guest?

If you boot from a floppy, /dev/cdrom given, does it work? If it does work, can you see the cdrom from the guest?

I'm trying to see if this problem is caused by trying to access the cdrom, or if it only comes up when you try to boot from it. (BTW how many different cdroms/cdrom images have you tested?)

Quoted 11 lines
Quoted 2 lines · Stefan Kisdaroczi

Did you try to set "-L" ?
-L path // set the directory for the BIOS and VGA BIOS

No, I didn't try that. This parameter isn't in the qemu manpage, is it? What am I supposed to use as directory?

Robin

-L is used to set the path for the BIOS. This directory is the one that contains the following files:

bios.bin ppc_rom.bin vgabios.bin
linux_boot.bin vgabios-cirrus.bin

E.g. if you installed to /usr/local prefix, the BIOS files are probably in /usr/local/share/qemu.

Since booting from a floppy works, I do not think that this is a BIOS related problem (unless you are using an old bios.bin file or somehow your bios.bin file got slightly corrupted by mistake).

Signature · 2 lines
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.
#2 lore raw
Quoted 9 lines · Jim C. Brown
Quoted 7 lines · Robin Pfeifer
Quoted 2 lines

Out of curiosity, does it work if you use an iso image instead of /dev/cdrom?

No, it doesn't, the same error appears.

Quoted 1 line

If you "-boot a" from a floppy disk image, will that work or does it

have the

Quoted 1 line

same error? (You can download a FreeDOS boot disk if u don't have a

Quoted 8 lines
Quoted 4 lines

way to

Quoted 1 line

get a bootable floppy disk image).

That's very strange, booting from a floppy works.

You mean u get the new X window titled "QEMU", which shows the guest OS booting, and once the booting is done the guest OS is actually usuable (at least as usuable as it would be if it was botted on a real computer)?

Not quite. The first disk I tried was a very old DOS 6.0 I still have lying around (I haven't got that many boot floppies anymore), and it didn't quite finish booting - but I thought, maybe the disk is broken. But I have also tried a Linux-based floppy which I have used as a boot disk previously, and downloaded bootE and tried that, too - I'm finding the kernel simply stops booting after a while. It does boot normally during a real boot process.

But that still goes much farther than booting a cdrom image, as I actually get to see the BIOS being set up and the kernel being started. With a cdrom or image of such I immediately get a blank screen.

Quoted 3 lines

Here are a few more tests to try out:

If you boot from a hard disk, no floppy or cdrom image given, does it work?

Hm, would that be something like 'qemu -hda /dev/hda1 -snapshot -m 256'? That gives me the same error as booting from a cdrom. hda1 should be a Win2000 system. When I enter a disk which is present but not bootable (for instance sda1, where my Linux system is located, which I boot from a floppy), the BIOS does appear until the obvious error message turns up that there is no system on the disk. The qemu window remains responsive and can be closed - the crashed window I get when trying to boot something bootable cannot be closed except with xkill or Ctrl + c in the terminal from which I started it.

It appears that qemu becomes weird when it encounters a boot block - though that doesn't explain why it does boot floppies at least up to a point.

That makes the remaining tests obsolete, I suppose...

Quoted 9 lines

If you boot from a hard disk, cdrom iso image given, does it work? If it does work, can you see the cdrom from the guest?

If you boot from a hard disk, /dev/cdrom given, does it work? If it does work, can you see the cdrom from the guest?

If you boot from a floppy, cdrom iso image given, does it work? If it does work, can you see the cdrom from the guest?

Quoted 6 lines

If you boot from a floppy, /dev/cdrom given, does it work? If it does work, can you see the cdrom from the guest?

I'm trying to see if this problem is caused by trying to access the cdrom, or if it only comes up when you try to boot from it. (BTW how many different cdroms/cdrom images have you tested?)

I have tested a couple of live CDs, Knoppix, Kanotix, RescueCD, Insert, SuSE... all of which boot correctly the normal way. the Knoppix and Insert CDs I actually booted a couple of times successfully with qemu, too, before qemu began to fail me.

Quoted 15 lines
Quoted 8 lines
Quoted 2 lines · Stefan Kisdaroczi

Did you try to set "-L" ?
-L path // set the directory for the BIOS and VGA BIOS

No, I didn't try that. This parameter isn't in the qemu manpage, is it? What am I supposed to use as directory?

Robin

-L is used to set the path for the BIOS. This directory is the one that contains the following files:

bios.bin ppc_rom.bin vgabios.bin
linux_boot.bin vgabios-cirrus.bin

Quoted 7 lines

E.g. if you installed to /usr/local prefix, the BIOS files are probably in /usr/local/share/qemu.

Since booting from a floppy works, I do not think that this is a BIOS related problem (unless you are using an old bios.bin file or somehow your bios.bin file got slightly corrupted by mistake).

If they got corrupted, they should have been replaced by now. I deleted all files and directories with 'qemu' in the name and installed qemu fresh during my attempts to get rid of the error. And the floppies at least boot past the BIOS, too.

Robin

#3 lore raw
Quoted 5 lines · Robin Pfeifer
Quoted 4 lines

You mean u get the new X window titled "QEMU", which shows the guest OS booting,
and once the booting is done the guest OS is actually usuable (at least as usuable as it would be if it was botted on a real computer)?

Quoted 7 lines

Not quite. The first disk I tried was a very old DOS 6.0 I still have lying around (I haven't got that many boot floppies anymore), and it didn't quite finish booting - but I thought, maybe the disk is broken. But I have also tried a Linux-based floppy which I have used as a boot disk previously, and downloaded bootE and tried that, too - I'm finding the kernel simply stops booting after a while. It does boot normally during a real boot process.

Ok, so where does it stop booting? At what point does it freeze?

Quoted 11 lines

But that still goes much farther than booting a cdrom image, as I actually get to see the BIOS being set up and the kernel being started. With a cdrom or image of such I immediately get a blank screen.

Quoted 3 lines

Here are a few more tests to try out:

If you boot from a hard disk, no floppy or cdrom image given, does it work?

Hm, would that be something like 'qemu -hda /dev/hda1 -snapshot -m 256'?

Probably more like 'qemu -hda /dev/hdb -snapshot -m 256' (/dev/hda1 wouldnt work unless you have a partition table on it _or_ you set it up so that the OS can boot off of a raw hard disk w/o a partition table (afaik this isnt even possible w/ win2k). If you have no idea what I just said, just take my word that /dev/hda1 wouldn't work).

Quoted 9 lines

That gives me the same error as booting from a cdrom. hda1 should be a Win2000 system. When I enter a disk which is present but not bootable (for instance sda1, where my Linux system is located, which I boot from a floppy), the BIOS does appear until the obvious error message turns up that there is no system on the disk. The qemu window remains responsive and can be closed - the crashed window I get when trying to boot something bootable cannot be closed except with xkill or Ctrl + c in the terminal from which I started it.

Of course if you did use /dev/hda1 then you should have gotten 'not bootable' error too. I'd recommend downloading the freedos 10Meg disk image, or maybe the dlxlinux disk image that comes with bochs, and see if those hard disk images boot.

Quoted 4 lines

It appears that qemu becomes weird when it encounters a boot block - though that doesn't explain why it does boot floppies at least up to a point.

3 ways a cdrom can be made to look bootable:

1) a part of the cdrom looks like a floppy disk, and the bios uses this to boot

2) a part of the cdrom looks like a tiny hard disd, and the bios uses this

3) the bios loads the boot program directly from the cdrom w/o any emulation

1) is the most common, and odds are good that your bootable cdroms use the floppy disk method. (The reason this is done is for backwards compatibility I guess.) So my guess is that it isn't the boot sector, but IDE (if I had to guess).

Perhaps the boot disks freeze up at the point that they try to access the cdrom? Or at least detect it?

Quoted 10 lines
Quoted 4 lines

I'm trying to see if this problem is caused by trying to access the cdrom, or if it only comes up when you try to boot from it. (BTW how many different
cdroms/cdrom images have you tested?)

I have tested a couple of live CDs, Knoppix, Kanotix, RescueCD, Insert, SuSE... all of which boot correctly the normal way. the Knoppix and Insert CDs I actually booted a couple of times successfully with qemu, too, before qemu began to fail me.

These all real CDs, or have you tested images as well?

Signature · 2 lines
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.
#4 lore raw
Quoted 7 lines · Jim C. Brown
Quoted 4 lines · Robin Pfeifer
Quoted 3 lines

You mean u get the new X window titled "QEMU", which shows the guest OS booting, and once the booting is done the guest OS is actually usuable (at least as usuable as it would be if it was botted on a real computer)?

Not quite. The first disk I tried was a very old DOS 6.0 I still have lying around (I haven't got that many boot floppies anymore), and it didn't quite finish booting - but I thought, maybe the disk is broken. But I have also tried a Linux-based floppy which I have used as a boot disk previously, and downloaded bootE and tried that, too - I'm finding the kernel simply stops booting after a while. It does boot normally during a real boot process.

Ok, so where does it stop booting? At what point does it freeze?

The BootE floppy stops while the display says 'Loading' with a row of dots. But when the emulation window is started, it always displays 'qemu stopped' for a short moment, after which the 'stopped' disappears and the BIOS messages appear in the window. This short moment is what the other attempts do not get over. The floppy emulation passes that.

Quoted 4 lines
Quoted 4 lines

But that still goes much farther than booting a cdrom image, as I actually get to see the BIOS being set up and the kernel being started. With a cdrom or image of such I immediately get a blank screen.

Quoted 2 lines

Here are a few more tests to try out:

Quoted 9 lines
Quoted 2 lines
Quoted 1 line

If you boot from a hard disk, no floppy or cdrom image given, does it work?

Hm, would that be something like 'qemu -hda /dev/hda1 -snapshot -m 256'?

Probably more like 'qemu -hda /dev/hdb -snapshot -m 256' (/dev/hda1 wouldnt work unless you have a partition table on it _or_ you set it up so that the OS can boot off of a raw hard disk w/o a partition table (afaik this isnt even possible w/ win2k). If you have no idea what I just said, just take my word that /dev/hda1 wouldn't work).

/dev/hdb doesn't work, I have no second IDE harddisk - I've got one IDE and one SCSI harddisk. /dev/hda results in the 'qemu stopped' error, hdb of course in a 'could not open hard disk image'.

Quoted 4 lines

Of course if you did use /dev/hda1 then you should have gotten 'not bootable' error too. I'd recommend downloading the freedos 10Meg disk image, or maybe the dlxlinux disk image that comes with bochs, and see if those hard disk images boot.

I have downloaded the Freedos image and started it with

qemu -hda /path/to/freedos.img -snapshot

Same error: qemu stopped.

Quoted 19 lines
Quoted 2 lines

It appears that qemu becomes weird when it encounters a boot block - though that doesn't explain why it does boot floppies at least up to a point.

3 ways a cdrom can be made to look bootable:

1) a part of the cdrom looks like a floppy disk, and the bios uses this to boot

2) a part of the cdrom looks like a tiny hard disd, and the bios uses this

3) the bios loads the boot program directly from the cdrom w/o any emulation

1) is the most common, and odds are good that your bootable cdroms use the floppy disk method. (The reason this is done is for backwards compatibility I guess.) So my guess is that it isn't the boot sector, but IDE (if I had to guess).

Perhaps the boot disks freeze up at the point that they try to access the cdrom? Or at least detect it?

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

I'm trying to see if this problem is caused by trying to access the cdrom, or if it only comes up when you try to boot from it. (BTW how many different cdroms/cdrom images have you tested?)

I have tested a couple of live CDs, Knoppix, Kanotix, RescueCD, Insert, SuSE... all of which boot correctly the normal way. the Knoppix and Insert CDs I actually booted a couple of times successfully with qemu, too, before qemu began to fail me.

These all real CDs, or have you tested images as well?

I have tried images of Insert and Knoppix, and all of the above as CDs.

Robin

#5 lore raw
Quoted 8 lines · Robin Pfeifer
Quoted 8 lines
Quoted 7 lines

Not quite. The first disk I tried was a very old DOS 6.0 I still have lying around (I haven't got that many boot floppies anymore), and it didn't quite finish booting - but I thought, maybe the disk is broken. But I have also tried a Linux-based floppy which I have used as a boot disk previously, and downloaded bootE and tried that, too - I'm finding the kernel simply stops booting after a while. It does boot normally during a real boot process.

Quoted 8 lines
Quoted 1 line

Ok, so where does it stop booting? At what point does it freeze?

The BootE floppy stops while the display says 'Loading' with a row of dots. But when the emulation window is started, it always displays 'qemu stopped' for a short moment, after which the 'stopped' disappears and the BIOS messages appear in the window. This short moment is what the other attempts do not get over. The floppy emulation passes that.

I assume Linux boot floppy stops at the same point?

Quoted 10 lines

/dev/hdb doesn't work, I have no second IDE harddisk - I've got one IDE and one SCSI harddisk. /dev/hda results in the 'qemu stopped' error, hdb of course in a 'could not open hard disk image'.

I have downloaded the Freedos image and started it with

qemu -hda /path/to/freedos.img -snapshot

Same error: qemu stopped.

I can't reproduce this error. Using latest CVS, 'qemu -m 350' works perfectly fine for me. In fact it works fine for qemu 0.5.5 as well.
Only difference is that I use kerenl 2.4.26 and I have the rtc set to 100hz instead of 1024hz. I also have never installed or used kqemu.

Can you run gdb on it and figure out where in the code it freezes?

Signature · 2 lines
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.
#6 lore raw
Quoted 7 lines · Jim C. Brown
Quoted 4 lines · Robin Pfeifer
Quoted 2 lines
Quoted 1 line

Not quite. The first disk I tried was a very old DOS 6.0 I still have lying around (I haven't got that many boot floppies anymore), and it didn't quite finish booting - but I thought, maybe the disk is broken. But I have also tried a Linux-based floppy which I have used as a boot disk previously, and downloaded bootE and tried that, too - I'm finding the kernel simply stops booting after a while. It does boot normally during a real boot process.

Ok, so where does it stop booting? At what point does it freeze?

The BootE floppy stops while the display says 'Loading' with a row of dots. But when the emulation window is started, it always displays 'qemu stopped' for a short moment, after which the 'stopped' disappears and the BIOS messages appear in the window. This short moment is what the other attempts do not get over. The floppy emulation passes that.

I assume Linux boot floppy stops at the same point?

More or less. It doesn't say 'Loading' but 'vmlinuz', but it stops after a number of dots.

I have just deleted all qemu files again and installed the current dad-answers snapshot version, first with kqemu, which still doesn't work, then without. The problem persists. However, I'm not sure qemu actually freezes, as I've thought of looking at it with 'top' - qemu is taking up better than 90% of CPU while running, so it seems to be doing something. I just can't find out what...

Quoted 9 lines
Quoted 8 lines

/dev/hdb doesn't work, I have no second IDE harddisk - I've got one IDE and one SCSI harddisk. /dev/hda results in the 'qemu stopped' error, hdb of course in a 'could not open hard disk image'.

I have downloaded the Freedos image and started it with

qemu -hda /path/to/freedos.img -snapshot

Same error: qemu stopped.

Quoted 7 lines

I can't reproduce this error. Using latest CVS, 'qemu -m 350' works perfectly fine for me. In fact it works fine for qemu 0.5.5 as well.
Only difference is that I use kerenl 2.4.26 and I have the rtc set to 100hz instead of 1024hz. I also have never installed or used kqemu.

Can you run gdb on it and figure out where in the code it freezes?

I have just tried that, but I don't know the first thing about gdb. I have started qemu with -S to make it stop soon enough, then had gdb attach to its process number - that results in qemu not responding to anything anymore. Same if I use -s to have qemu wait for gdb. I have no idea how to tell gdb to start qemu as a parameter, it does not work with including qemu's parameters in '' or "". I think it would perhaps be best if you just told me what to do, I'm just a little user out of his depth... :)

I think I'll let qemu run overnight to see whether it might not actually be doing something after all...

Robin

#7 lore raw

Re: [Qemu-devel] qemu crashes at boot start

In reply to Jim C. Brown

This has been discussed as 'qemu problem (you might be my last resort)', but the new topic line is probably a little more informative. I'd like to subsume the error once more, maybe someone has an idea who ignored the less-informative previous title.

I am trying to boot live CDs or the freedos.img as available on the qemu homepage. It used to work perfectly a couple of months ago, and back then I aliassed the command

livecd='qemu -cdrom /dev/cdrom -boot d -snapshot'

When I added more RAM about a month ago, I added '-m 350' to this command. After that, qemu wouldn't work anymore, not even when I left out the -m parameter. Instead, qemu now immediately stops (the window displaying 'qemu stopped' in its title) and cannot be closed with anything other than ctrl+c in the console from which it was started. Not even the BIOS messages turn up. Using the parameter -S I can stop the emulation before the crash and get into the monitor, but as soon as I enter c in order to continue the window freezes. Meanwhile I have also tried gdb as described in the documentation, but as soon as I enter c there, same thing: qemu window freezes.

If I use a wrong parameter so that booting fails, the BIOS messages do appear up to the obvious point where booting cannot commence. So:

qemu -cdrom /path/to/freedos.img

boots until ' FATAL: Could not read the boot disk'

Same goes for any attempts to boot a live CD with -hda /dev/cdrom

But if I use -cdrom for /dev/cdrom or -hda for the freedos.img, I get the freeze. Apparently qemu crashes on my system as soon as it finds something it should be able to boot.

I have tried various dad-answers snapshots and now I have 0.6.1 again. I have deleted all files with qemu int heir names between installations. I have deleted the content of /tmp and even temporarily moved both /tmp and /var somewhere else in order to check whether there might be a temporary file blocking the process, but nothing changed anything. Qemu is no longer working for me.

I'm grateful for any suggestions you might have.

Robin

#8 lore raw

Re: [Qemu-devel] qemu crashes at boot start

Quoted 4 lines · Robin Pfeifer

This has been discussed as 'qemu problem (you might be my last resort)', but the new topic line is probably a little more informative. I'd like to subsume the error once more, maybe someone has an idea who ignored the less-informative previous title.

What OS are you running as your host?

<snip>

Signature · 3 lines
Antony T Curtis, BSc.                   UNIX, Linux, *BSD, Networking
[email protected]            C++, J2EE, Perl, MySQL, Apache
                                        IT Consultancy.
#9 lore raw

Re: [Qemu-devel] qemu crashes at boot start

SuSE Linux 9.1 with kernel 2.6.5-7.147.

Robin

Quoted 7 lines · Antony T Curtis
Quoted 1 line · Robin Pfeifer

This has been discussed as 'qemu problem (you might be my last resort)', but the new topic line is probably a little more informative. I'd like to subsume the error once more, maybe someone has an idea who ignored the less-informative previous title.

What OS are you running as your host?

<snip>