Question

I attempted to migrate an old Win XP Compaq desktop to VirtualBox (4.2.12) under Ubuntu (12.04.1) by following https://www.virtualbox.org/wiki/Migrate_Windows

After the createfromraw step, I created the virtual machine, and tried to boot. Immediately on boot, this message is displayed:

A disk read error occurred
Press Ctrl Alt Del to restart

I have tried to use FIXBMR and FIXBOOT from the recovery console, which seemed to make it worse (a few characters on the screen are corrupted, and the same error message appears).

How can I get this VM to boot?

Was it helpful?

Solution

I solved this, and thought i would share my solution:

By comparing sectors to a working VM, I found that the following change was needed:

Sector 63 offset 0x1A was 0xF0, and this byte needed to be changed to 0xFF.

To do this:

  1. Attach the non booting drive image as a second drive on a working VM
  2. Boot the working VM, and install a low level sector editor (Google!)
  3. Run this editor, and look at sector 63 on the non-working drive image. Note that depending on how you select the disk, this is either sector 0, or sector 63 It the same physical sector on the disk
  4. Confirm the byte 0xF0 is at offset 0x1A (26), and change it to 0xFF and write the sector
  5. Shutdown the VM, and then in settings, detach the drive image from step 1
  6. The disk image was healed - to a degree. It can now boot in recovery console mode
  7. NOTE: DO NOT run fixboot or fixmbr
  8. Now boot the VM off a System CD (Win XP in my case), and do a install repair
  9. Install any service packs or system updates
  10. The VM now booted - an (almost) exact replica of my old WInXP PC!

I know it seems strange, but this worked for me.

For interest, how did I find this out? I created a fresh install over a copy of the bad VM disk image, and then when it was working I took hex dumps of the MBR and boot sector. I compared these to the bad VM, and worked through the differences one by one, until I found this magic byte. To verify, I did the whole process again, from the original image, and also again verified that fixmbr and fixboot made the problem worse, and were not necessary for the fix.

Hopefully this will save you some time if you face the same issue.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top