Windowx XP Embedded Raw disk and stopcode 0x0000007b, as mass storage boot

Discussions about using Windows guests in VirtualBox.
Post Reply
lbsl
Posts: 2
Joined: 19. Aug 2015, 16:04

Windowx XP Embedded Raw disk and stopcode 0x0000007b, as mass storage boot

Post by lbsl »

For the last two day's i have been wrestling getting a physical disk connected to Virtual Box in order to boot a Windows XP Embedded primary partition. (You don't want to know what kind of relic AT MPCB hardware i still have to put myself up with anno 2017)
I got the infamous stopcode 0x0000007b error all over it.

Besides the fact i might help out others with this solution, the second reason of posting is -> i might need this solution again one day and might forget where i stored it -> google used to be my friend so far, so will use this archive to my advantage.

I have searched several different forums of course starting here but also Stack overflow. Eventually i managed to solve the issue by figuring several different answers and a solution that i stumbled upon inside Hiren's bootCD.

There are two major issues that can occur when you assign a physical IDE disk to a virtual appliance:
-One of them is the write access to the disk (I at least experienced this in Windows 10 host, but this might as well be a fact for Windows 8 and 7 and i expect this is an issue for a lot of people who simply connects a physical disk to a Virtualbox vmdk in Windows 7 and higher)
-Second issue is the fact that the main driver is set to load from an IDE driver while in fact it requires loading the Mass storage driver to continue booting.

The write access to disk was an issue resulted in the partitions visible but not assigned any logical letter nor accessible inside the LiveCD environment (Hiren's bootCD / Windows XP Repair console).
Putting the disk offline in the disk manager was no solution.

The (reasonably dated) answer to this question i found in this topic from Korkman:
"VM on RAW disk on Windows 7 host"
Korkman wrote:Success!

In summary:

To gain full hard drive access in a VBox guest on Win7 host

0. close all open programs or documents on any partition on the disk to pass-through
1. run DISKPART (command line utility)*
2. select hard drive carefully using SELECT DISK. disk numbering starts at zero. you can roughly verify your selection with LIST PARTITION if you know what your partitions should look like or LIST DISK to see disk sizes.
3. offline the disk using OFFLINE DISK. all volumes will disappear from windows explorer.
4. ATTRIBUTES DISK CLEAR READONLY
5. verify with ATTRIBUTES DISK
6. create VMDK file as shown in several howtos on the web
7. enjoy

As always with the dumb numeric representation of physical disks in windows: keep an eye on the ordering of your disks, especially removables, before booting the wrong one.

*administrative rights required for operating vbox and utilities but not for desktop
The major documents point out 0x7b means inaccessible boot device due to an incorrect loaded driver.
I had my IDE harddrive connected to an IDE to USB adapter, however the controller represents itself as a mass storage device.
After fixing the read-only issue, i could finally access all the physical drive's partitions in Hiren's BootCD.

Do note, create a backup of your drive before performing this action: you might be able to boot the drive on VirtualBox but you might no longer be able to boot it back on the original device it was hooked on!

The version i have contains a tool inside the HBCD programs'menu underneath the subsection "Registry" called "Fix harddisk controller (fix_hdc.cmd)"

You get three options after starting that up, first one you need to set is the TargetRoot (T) point it towards the drive:\windows folder of your physical drive's windows location
Then hit the (M) for update mass storage drivers.

Then attempt to reboot from your primary partition and see how far you get...

Anybody who can add some extra light on this or has an alternative option to the Hiren's bootCD solution is welcome to offer. In my situation there was no way of firing up the physical drive in the VirtualBox guest than just fixing it with a liveCD first.
MontyMan
Posts: 29
Joined: 30. Jan 2019, 22:08
Primary OS: Linux other
VBox Version: OSE Debian
Guest OSses: Windows 10, Windows XP SP3, Haiku
Location: Houston, Texas USA

Re: Windowx XP Embedded Raw disk and stopcode 0x0000007b, as mass storage boot

Post by MontyMan »

This STOP code, INACCESSIBLE_BOOT_DEVICE, also stymies attempts to perform P2V on an XP computer, to bring it from "on the metal" into VirtualBox. This article https://www.virtualbox.org/wiki/Migrate_Windows, describes the check Windows makes during startup, to verify that it is being started on the same boot controller with which it was originally created, and fatally stops if the check fails. The article also provides a resource for setting the Windows registry so as to disable this check, so the transformed disk image can be used to boot a VM; there's no effect when running the legacy system, with the registry changes in place.

One note about the MergeIDE utility: the batch file needs to have a PAUSE command added at each of the two exit points, to give the user a chance to read the success or failure message. This message is in German; a picture can be taken of it if those two PAUSE commands are added, and if the user doesn't speak German it can be translated.

Once the Windows registry is fixed, the Disk2VHD program can be used to create the VHDX image(s) (no need to tick the box for making the image ready for virtual use under Windows host, if you're using VirtualBox on a Linux host computer) and the VHDX file(s) can be converted to VDI for use in your new XP VirtualBox guest machine! Recommend creating your first snapshot as soon as the new system is stable and working and Microsoft re-activation is completed; otherwise those hours could be wasted.
Post Reply