VirtualBox

Ticket #2251 (new defect)

Opened 6 years ago

Last modified 12 months ago

cannot specify disk geometry

Reported by: hramrach Owned by:
Priority: major Component: other
Version: VirtualBox 2.0.2 Keywords:
Cc: Guest type: other
Host type: Mac OS X

Description

I do not see any option for setting disk geometry of disk images.

Since some OSes calculate the disk geometry based on disk size or read it from the data stored on the disk rather than querying the bios they can get to a disk geometry different from the one VirtualBox calculates.

This does, of course, cause the OSes to fail unless the geometry is configurable in bios to match what the OS thinks.

Change History

comment:1 Changed 6 years ago by A20_user

In the *.vdi files, there is only physical geometry stored (look for file format description in the FAQ / forums). In the *.vmdk files, there can be physical and logical (for LBA) information be stored. Just use a good text or hex editor to have a look into the first KByte of the file. If there is only physical info, then VirtualBox (at least V2.0.0) stores logical info on first usage. The logical values may be edited manually. They are really used by VirtualBox for translation. This is my experience with V2.0.0. Hope this helps.

comment:2 Changed 6 years ago by hramrach

Sure hex editing the image or the boot sector data or the boot sector code would work around the problem. But this does not solve the deficiency in Virtualbox which does not allow specifying the geometry.

This breaks for example some windows imaging software.

Also while it's possible to use VMDK files with virtualbox it's not possible to create them (except with a hex editor).

I will try to look at the vdi format description.

Thanks

comment:3 Changed 6 years ago by hramrach

Apparently VirtualBox completely ignores geometry specified in either VDI or VMDK file.

Looking at the log it also calculates a virtual geometry of 1024/255/63 which is never used anywhere.

Linux sees the 16383/16/63 geometry regardless of the geometry specified in the disk file.

Dos application sees 2610/255/63 geometry.

comment:4 Changed 4 years ago by g_ml2000

I'd like to second - it really would be very useful (and probably easy to implement) if it was possible to override the disk geometry. Particularly, the fact that the disk geometry reported by the BIOS (always 255 heads) is not consistent with the geometry used otherwise (16 heads) causes problems that can be very hard to work around ...

comment:5 Changed 12 months ago by mihi42

Would have been useful for restoring the XP image of my old ThinkPad R60 into a VirtualBox virtual machine, as that device used 240 heads and VirtualBox insisted in using 255 which rendered the VM unbootable (only spit some colourful characters on the text console instead of loading ntldr).

Some VBoxManage option would have been fine for me, no GUI needed, but to avoid ruining the weekend for the next poor guy who runs into this, I post my workaround:

It helped to patch the boot sector as described in  http://blog.clemens.endorphin.org/2007/12/removing-chs-based-access-from-windows_3170.html to get my VM working in VirtualBox (numerous fixboot and fixmbr did not fix it despite their name).

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use