Finding disk geometry

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
AUsername
Member
Member
Posts: 54
Joined: Sun Feb 01, 2009 9:07 pm

Finding disk geometry

Post by AUsername »

Hello there I have a *.vhd (generated by Windows) that I'm trying to use in Boch but I don't know how to find the geometry.

The VHD is exactly 134218240 bytes large.

The following values is what I gave Bochs:
Cyl: 260
Heads: 16
SPT: 63

Boch complains that these values are incorrect. However I do not know how to find disk geometry properly, I got this values by using bximage to create a 128MB image (but the size is off by 0.03MB of the Window's image)

So my question is how do I find disk geometry properly?
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Finding disk geometry

Post by Combuster »

RTFM - Bochs doesn't support VirtualPC images as of yet.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Re: Finding disk geometry

Post by pcmattman »

(but the size is off by 0.03MB of the Window's image)
VHD images have metadata as well as the actual binary data. You need to use something like qemu-img to convert from the VHD file to a flat binary IMG file.
Post Reply