8
1
I have a virtual machine containing Windows XP SP3.
When I resized the VHD file (and the embedded partition), and tried booting, I got:
A disk read error occurred
Press Ctrl + Alt + Del to restart
Some notes:
FixBoot
andFixMBR
don't help.ChkDsk
doesn't help.The partition is indeed active.
The partition starts at sector 63 (it also did so before the problem) of cylinder 1, head 1, and is marked as type 0x07 (NTFS)
My host OS reads the VHD and the partition completely fine
I'm interested in knowing the cause rather than the fix. So "re-format the disk", "reinstall Windows", etc. aren't valid solutions.
It's a virtual machine after all... I have nothing to lose, so I don't care about fixing it.
I just want to know what's causing this problem, in case I run into it again on a physical machine (which I have done before).
More info:
I made a sample VHD file illustrating (almost) the same problem which you can download here.
To reproduce the problem:
Download the file (it's highly compressed, be careful!), and try booting it in VirtualBox (or some other VM). Notice that you'll be told "Error loading operating system". (While the error is different, it's the same issue.)
Now try mounting the VHD in Windows's Disk Management, and running
BootSect.exe /NT60 X: /MBR
, whereX:
is the drive letter of the mounted volume. (The location of the tool is likely to beC:\boot\bootsect.exe
, but if it's not there on your system, then you'll need to find it somewhere else...) Now un-mount it, and try booting. The boot should now proceed correctly. (Although it won't find Hal.dll, at least you know it's working.)Now do the same thing as the last step, but use
/NT52
instead of/NT60
. You will now be greeted with the first error -- indicating that the Windows XP loader doesn't like the disk.
So my question is: Why?
@Moab: What you said makes no sense. :( I resized it on my host system, and even if I had done it on my guest system, it's not like the software would be behaving differently... – user541686 – 2012-03-31T22:22:20.597
@Moab: Are you assuming it's dynamically sized? Because it's definitely a fixed-size drive... and like I said, it's fine in my host OS, so it's not like it's unreadable or something. – user541686 – 2012-04-01T00:26:29.560
I would have assumed that resizing the disk would have modified the some vital information in the disk that the OS uses to work out the partition it needs to boot from, but as you've tried the main tools to repair that kind of thing it may be something in the OS itself. When does the error occur? Is it immediately after the VM starts up or can you get to the Boot Menu screen where you select safe mode or normal boot? – Mokubai – 2012-04-15T19:31:31.000
Another thing to try would be to create a new (larger) vhd and within the VM use Clonezilla to copy the old partition to it and see what it does then. – Mokubai – 2012-04-15T19:33:16.980