Jun 2008

Thu, 19 Jun 2008

How to fix "A disk read error occurred" when using a Windows XP image in Virtualbox

If you encounter the error "A disk read error occured" when trying
to boot Windows XP off a raw disk image using Virtualbox (either directly by using
the write-through support or indirectly by booting a 1:1 copy) most
probably the BIOS of the original system reported an odd drive geometry
(C/H/S - Cylinders/Heads/Sectors).

To fix this boot the _physical_ system,
go to the grub command line, type 'c' to invoke the command prompt and then execute the command 'geometry (hd0)'. Write down the cylinders, heads and
sectors values reported. Back in your host system, open the .vmdk file using a normal text editor, scroll down to the end of the file and adjust the following lines

ddb.geometry.biosCylinders="1023"
ddb.geometry.biosHeads="240"
ddb.geometry.biosSectors="63"
.
(1023/240/63 are the values reported by the Lenovo X300 Notebook BIOS).

Now try to boot Windows in the virtualized environment. In my case it
worked right on the first try. There may also be a Windows tool to get
the original drive geometry.

The short explanation is, that the boot loader from Windows seems to have
hard coded values for the drive geometry <

posted at 20:35 | path: /unix | permanent link to this entry

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.