Skip to contentSkip to conversation

Custom floppy image not booting, hanging at ramdisk...

Qemu-devel Damien Mascord 3 participants 6 messages Apr 13, 2006 – Apr 26, 2006

lore
Share & tools
lore
#0 lore raw

Heya guys,

I am trying to create my own uclibc/busybox floppy bootdisk, and am running into an issue with the expansion of the RAMDISK... the CPU shoots up to 100% and even leaving it overnight, it never recovers from that situation.

I have tried it under qemu 0.7.2 and 0.8.0 in linux and windows, and all fail to boot the image, where as vmware (and/or native) boot the disk fine, and goes correctly to the "Please press Enter to activate this console".

I am using the command line:

qemu -fda floppy.img -boot a

And it loads up the kernel, no problem, reaching the ramdisk stage, and then it dies at the following:

RAMDISK: Compressed image found at block 680

If anyone wants a crack at this, the image can be found at http://tusker.sg/floppy.img

How would I go about debugging this issue?

Cheers in advance,

Damien

#1 lore raw

Hi again,

Sorry to top post, just wanted to know if anyone has had similar experiences to this?

If not, can someone help me debug the issue (bug?) with qemu here?

Quoted 36 lines · Damien Mascord

Heya guys,

I am trying to create my own uclibc/busybox floppy bootdisk, and am running into an issue with the expansion of the RAMDISK... the CPU shoots up to 100% and even leaving it overnight, it never recovers from that situation.

I have tried it under qemu 0.7.2 and 0.8.0 in linux and windows, and all fail to boot the image, where as vmware (and/or native) boot the disk fine, and goes correctly to the "Please press Enter to activate this console".

I am using the command line:

qemu -fda floppy.img -boot a

And it loads up the kernel, no problem, reaching the ramdisk stage, and then it dies at the following:

RAMDISK: Compressed image found at block 680

If anyone wants a crack at this, the image can be found at http://tusker.sg/floppy.img

How would I go about debugging this issue?

Cheers in advance,

Damien

_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel

#3 lore raw
In reply to Damien Mascord

just send your kernel .config for cross verification :)

Quoted 6 lines · Damien Mascord

Hi again,

Sorry to top post, just wanted to know if anyone has had similar experiences to this?

If not, can someone help me debug the issue (bug?) with qemu here?

#4 lore raw
Quoted 2 lines · Christian MICHON

just send your kernel .config for cross verification :)

Heya Christian,

I use the same kernel to boot from a hard-disk, and also from a CD-ROM, and both work correctly.

The following patch (against latest CVS) enables the floppy to boot correctly. This patch was suggested by Jani Monoses
(http://lists.nongnu.org/archive/html/qemu-devel/2004-08/msg00132.html).

Given that it works with this patch, I can't see how it could be a kernel config issue, no offence intended :)

Damien

Index: block.c
===================================================================
RCS file: /cvsroot/qemu/qemu/block.c,v
retrieving revision 1.26

block.c 26 Apr 2006 01:52:26 -0000 renamed from block.c 25 Apr 2006 22:36:06 -0000 1.26 +1 -1
diff -u -r1.26 block.c
@@ -729,7 +729,7 @@
 
     lseek(s->fd, sector_num * 512, SEEK_SET);
     ret = read(s->fd, buf, nb_sectors * 512);
-    if (ret != nb_sectors * 512)
+    if (ret == -1)
         return -1;
     return 0;
 }
Quoted 13 lines · Damien Mascord
Quoted 6 lines

Hi again,

Sorry to top post, just wanted to know if anyone has had similar experiences to this?

If not, can someone help me debug the issue (bug?) with qemu here?

_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel

#5 lore raw

none taken :)
it's just that myself last year I created small kernels which sometimes would freeze too at the expansion step, but then it was a kernel config issue.

I'll look at the patch though :)

Quoted 2 lines · Damien Mascord

Given that it works with this patch, I can't see how it could be a kernel config issue, no offence intended :)