Windows XP Guest and Clonezilla

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Alaskaman66
Posts: 5
Joined: 9. Aug 2020, 05:37

Windows XP Guest and Clonezilla

Post by Alaskaman66 »

Host: Windows 10 Professional x64 Ver. 1909 build 10.0.18362.778
VirtualBox: version 6.1.1 r138449
Guest: An old dual boot machine with Windows XP Home Edition 32 bit svc pk 3 version 2002 and Linux Mandrake 10. This old computer had an AMD Athlon processor on a MS-6330 Microstar motherboard; 256 MB RAM.

The old computer died, but I was able to read the 60GB IDE hard drive with an external docking station. I cloned the hard drive to an external 5TB storage drive for archive purposes, then built a Windows 32 bit virtual machine in VBox. I was able to use Clonezilla (again) to clone the image into the virtual machine. However, when I try to start the Windows XP VM, the boot selection screen appears, but then things go wrong: If I choose to boot into Linux, the process starts, then hangs on a "kernal panic" If I boot into the Windows side, I get the "Windows did not shut down normally" screen, and any choice (safe mode, safe mode with networking, safe mode with cmd prompt, normal start) takes me back to the boot selection screen. However, I do see something flash by about Windows, but it's too fast to read.
I don't care about the Linux partition, but the Windows side has information worth saving.
I have done this process successfully with a Windows 8 laptop, so I know it works.
I have included both the VBox log and the Hardening log.
Attachments
Jason's XP Machine-2022-05-18-20-57-22 Hardening.zip
(29.94 KiB) Downloaded 11 times
Jason's XP Machine-2022-05-18-20-57-21.zip
(22.75 KiB) Downloaded 14 times
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Windows XP Guest and Clonezilla

Post by scottgus1 »

There are no hardening errors (exit code 0) and the Virtualbox 'hardware' appears to be working OK.

XP can be a hard OS to migrate, as the concept of moving an installed Windows OS to a new computer wasn't a big thing back then.

How to migrate existing Windows installations to VirtualBox has some tips to migrate XP, some of which you might not be able to do because they require XP to be runnable before the migration but the old computer is dead.
Alaskaman66 wrote:I do see something flash by about Windows, but it's too fast to read.
This is probably the XP BSOD-then-auto-reboot, it's probably error 7B about a strange hard disk controller, about which you'd run the MergeIDE registry change on the running XP first before attempting the migration. And you can't do this because you can't run the old PC to boot XP.

I tried to mount a non-booted XP registry hive on another running Windows to see if I could apply MergeIDE to it, but I couldn't get the registry changes to stick. You might try web-searching mounting and editing a non-booted Windows OS's registry, then apply MergeIDE.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Windows XP Guest and Clonezilla

Post by mpack »

scottgus1 wrote: I tried to mount a non-booted XP registry hive on another running Windows to see if I could apply MergeIDE to it, but I couldn't get the registry changes to stick.
We've had people take that route before, so I believe is it supposed to work. Total guess, but it may be necessary to use an older version of regedit though, e.g. use another VM running a fresh install of XP. And, you would need admin rights in the new XP of course (I believe the registry hive will be marked as a system file even on a secondary drive).
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Windows XP Guest and Clonezilla

Post by scottgus1 »

Interesting concept, Mpack! I was using a Windows 10 PC to try the regedit mod. I still have the old drive, will try for time to try it again in an XP VM.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Windows XP Guest and Clonezilla

Post by mpack »

If the only problem was that you can't write back changes, I'd suggest you first try disabling the system attribute. Note that this attribute can't be toggled in explorer, you can only do it using the attrib command in a terminal window, i.e. "attrib -s <filename>". I would restore the s attribute when you're done.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Windows XP Guest and Clonezilla

Post by scottgus1 »

Well, I tried P2Ving the offlined XP disk contents and was successful in getting the XP OS to boot. It had been BSODing the typical 7B stop error for the wrong disk controller. I attached the XP disk to another working XP VM for this test.

I looked at the attributes for the hive file, and it wasn't marked as a system file. I did try making a new key and found later that the key was correctly made and existed in the OS. I also mounted the XP VHD in the host Windows 10 OS and was able to make a new key and find it there inside the VM. So Windows 10 Regedit will edit XP registry hives.

Looking through the MergeIDE batch file I found that four files were required in XP's Windows\System32\Drivers folder. Three were present, one I needed to extract using the command in the batch file. (The batch file itself is tuned to running on a booted and running XP, it would not work correctly to run it against the offline XP on the secondary disk. Some cmd-fu was needed to piece together the correct 'extract' command to point at the offline XP's Drivers folder.)

Then I mounted the offline XP's registry file and compared the required keys against the MergeIDE registry patch file. I found that the data seemed to be there already (The offline XP appeared to be at SP3, which may have had an influence.)

So I tried merely booting the XP disk in its own VM after only adding the missing file, without applying the registry changes. And it booted just fine! It required activating, which I did not bother with. But it did boot!

MergeIDE has two parts: checking for the correct files and editing the registry. To make these work on an XP disk from a computer that will no longer boot, the keys and file locations have to be manually edited to match the drive letter & path of the XP disk and the chosen registry path for the mounted hive file. But once everything is tuned correctly, MergeIDE should work. And in my case all XP needed was a single missing file (the "Intelide.sys" file, to be exact).
Alaskaman66
Posts: 5
Joined: 9. Aug 2020, 05:37

Re: Windows XP Guest and Clonezilla

Post by Alaskaman66 »

To Scottgus1 and Mpack: I have read the referenced VirtualBox document on migrating existing Windows Installations.
As I mentioned, I have the old hard drive and can get my new Windows 10 box to recognize it in the Chinese docking station as drive G: Then I am able to open a cmd prompt (as administrator), change the drive letter to "G:" and when I run dir, I see all the folders & files from this old computer (they also show up in file explorer.) I can then run regedit, but I believe I am looking at the hive registry for my Windows 10 operating system. However, both the Windows XP OS and its associated hive registry MUST actually reside on this old hard drive. I am reading up on editing non-booted Windows registry and using MergeID. If I can edit the old XP registry, then I can go back, re-clone and try to boot the modified OS into a new VBox XP 32 bit virtual machine. If the registry modification process works, but it still won't boot, then I can go back and make the other suggested changes and repeat the whole cloning process. Eventually, something should work.
I may have some questions on exactly which keys MergeID changes. BTW, is there any simple way to examine raw registry key values and modify them without using regedit?
Thanks...
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Windows XP Guest and Clonezilla

Post by scottgus1 »

Alaskaman66 wrote:is there any simple way to examine raw registry key values and modify them without using regedit?
Anything is technically possible, it's all just 1's and 0's. But such is not likely to work unless done through Regedit.

In my experiment above, I found that Windows 10's Regedit can edit XP's registry files. I also found that at least for the XP I had, the registry edits were not needed. YMMV.

I would not edit the existing physical disk's registry. Use Microsoft Sysinternals' Disk2VHD to make a VHD (not VHDx) clone of the whole existing disk. Then mount the VHD to your host Windows 10 and check the cloned VHD's XP OS for the 4 driver files that the MergeIDE.bat batch file wants to extract. You might find that one or more are missing. (Methinks a tutorial on MergeIDE-'ing an offline XP might be needed, there's some nuances...) (Using Disk2VHD, mounting a VHD, and finding/extracting the possible missing driver files are all web-searchable.)

If you find the files are present or can get them present, unmount the VHD from 10, and try booting the VHD in Virtualbox per the rest of the Migrating tutorial. It could be possible that the XP will boot without requiring the MergeIDE registry edits. Activation will quite likely be necessary. The online option doesn't work anymore, as MS has taken the server down. Try the phone-in service. You'll likely need the product key from the old computer's label.

If you do get the VHD to boot, you should clone it to VDI using Mpack's CloneVDI and use the VDI instead. VHD has a data-killing design flaw.
Post Reply