Hi,
I've got a FAT32 boot sector driver which works fine on real hardware but not on QEMU. The driver loads sectors correctly on real hardware but not when I use QEMU.
This bootsector is installed on a usb stick with a sector size of 512 bytes and a capacity of 4GB. Does QEMU use larger sector sizes for images greater than the size of a floppy? How can I get QEMU to see the usb stick as a great big floppy?
To get the usb stick to boot on real hardware I get the BIOS to boot from a USB FDD device.
I use the following commands for qemu:
qemu /dev/sdb
qemu usb.img
qemu -drive file=usb.img if=floppy index=0
TIA
Setting QEMU Disk Geometry
Setting QEMU Disk Geometry
H Technology Solutions - Business Operating System Specialists
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
Re: Setting QEMU Disk Geometry
That's ridiculous, you're telling QEMU you have a 4GB floppy disk.. which do not exist, set that to 'ide'.jasonc122 wrote:Hi,
I've got a FAT32 boot sector driver which works fine on real hardware but not on QEMU. The driver loads sectors correctly on real hardware but not when I use QEMU.
This bootsector is installed on a usb stick with a sector size of 512 bytes and a capacity of 4GB. Does QEMU use larger sector sizes for images greater than the size of a floppy? How can I get QEMU to see the usb stick as a great big floppy?
To get the usb stick to boot on real hardware I get the BIOS to boot from a USB FDD device.
I use the following commands for qemu:
qemu /dev/sdb
qemu usb.img
qemu -drive file=usb.img if=floppy index=0
TIA
On a system with USB boot capability, the BIOS/chipset does some trickery.. and pretends to be a floppy when manipulated using BIOS interrupts, but it is not actually on the floppy controller.
What you should be doing is treating the USB device as a hardrive, installing a complete MBR along with a partition record spanning the entire medium, along with a filesystem.
You can tell QEMU CHS geometry using the cyls/heads/secs arguments to -drive, or by using -hdachs in older versions.. it can automatically guess those.
Re: Setting QEMU Disk Geometry
Thanks.
I used the cyls/heads/secs arguments to set disk geometry and still no luck. Until such times as QEMU performs some trickery by supporting USB FDD, I'll be using the el torito format to boot my OS.
Thanks again.
I used the cyls/heads/secs arguments to set disk geometry and still no luck. Until such times as QEMU performs some trickery by supporting USB FDD, I'll be using the el torito format to boot my OS.
Thanks again.
H Technology Solutions - Business Operating System Specialists