-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Dan Foley
committed
Apr 5, 2015
1 parent
125b6bb
commit db4786c
Showing
8 changed files
with
668 additions
and
23 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Contributing | ||
|
||
This was originally a *very targeted repo* -- how to use Windows XP + VirtualBox + Ghost to virtualize XP. | ||
I'm totally happy with the community evovling it beyond that, if it wishes. | ||
|
||
Also, my word is certainly not a Gold Standard. | ||
If there's corrections or additions to be made, kindly let me know. | ||
PRs from a fork are preferred, vs. Issues. | ||
|
||
Please excuse that these documents are written very much from my perspective. | ||
It was originally a blog post, and evolved into more of a Guide To What You Might Bump Into. | ||
It might read better as a boring, dry reference guide. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,184 @@ | ||
# Example: The Inspiron | ||
|
||
This was an old Dell that wasn't a Dell anymore. | ||
In its later life, it has become an OEM box running a standard install of XP SP2 which booted from a custom partition. | ||
*Brilliant,* I say -- a lovely [parasitic relationship](http://www.iflscience.com/plants-and-animals/parasites-turn-their-hosts-zombies). | ||
Yes, this are the crazy tricks we used to play in the old days. | ||
|
||
Due to this trickery, it's safest to *exactly match* the original partitioning -- | ||
[much like](Techniques.md#initial-vm-setup) the CPU and RAM allocations. | ||
|
||
|
||
## Partitions | ||
|
||
The original hardware partitions were as follows | ||
|
||
``` | ||
| Partition | Type | Boot | Start Cyl | Head | Sector | End Cyl | Head | Sector | Sectors Before | Total Sectors | | ||
| 1 | DE | 00 | 0 | 1 | 1 | 6 | 254 | 63 | 63 | 112392 | | ||
| 2 | 07 | 80 | 7 | 2 | 60 | 1023 | 109 | 13 | 112640 | 20971520 | | ||
| 3 | 0F | 00 | 1023 | 0 | 1 | 1023 | 254 | 63 | 21093345 | 467170200 | | ||
``` | ||
|
||
1. A hidden **Dell OEM partition** -- very small (55MB in this case, vs. the minimum 8MB) † | ||
2. `H:` **the Brain Transplant** -- a bootable Primary partition with XP, and no data | ||
3. `C:` **Storage** -- a Data-only Extended partition with one Logical drive | ||
|
||
> † It is possible that I could have done away with the OEM partition entirely, | ||
> but once I'd figured out a way to make it work as-was, I kept it. | ||
The best strategy here was to create *one huge VMDK*. | ||
The partitions were re-constructed using [diskpart](Techniques.md#diskpart) from the [Ghost](Tools.md#ghost) disk. | ||
|
||
**First**, emulate the Dell OEM partition. | ||
|
||
``` | ||
select disk 0 | ||
create partition extended size=55 | ||
``` | ||
|
||
While `diskpart` was still running, launch [Partition Table Operations](Techniques.md#norton-support-utilities) | ||
and change the first partition's type to 'DE'. | ||
The 'Set Type' list describes this as a "Dell Corporation diagnostic partition". | ||
|
||
Make this change *right now*, because otherwise `diskpart` will eventually complain that "The maximum number of partitions has already been reached". | ||
One Primary and one Extended partition [is your limit](Techniques.md#primary-extended-and-logical) -- | ||
and this edit makes the first partition an "OEM" which doesn't count towards that maximum. | ||
|
||
**Then**, inform `diskpart` of those saved changes | ||
|
||
``` | ||
rescan | ||
``` | ||
|
||
**Finally**, allocate the rest of the partitions. | ||
|
||
``` | ||
create partition primary size=10240 | ||
create partition extended | ||
create partition logical | ||
select partition 2 | ||
active | ||
assign letter=H | ||
select partition 3 | ||
assign letter=C | ||
``` | ||
|
||
The third partition doesn't specify a 'size', so it consumes all available space. | ||
|
||
**The results are** | ||
|
||
``` | ||
list partition | ||
Partition ### Type Size Offset | ||
------------- ---------------- ------- ------- | ||
Partition 1 OEM 55 MB 32 KB | ||
Partition 2 Primary 10 GB 56 MB | ||
Partition 0 Extended 130 GB 10 GB | ||
Partition 3 Logical 130 GB 10 GB | ||
list volume | ||
Volume ### Ltr Label Fs Type Size Status Info | ||
---------- --- ----------- ----- ---------- ------- --------- -------- | ||
Volume 0 H RECOVERY RAW Partition 10 GB Healthy | ||
Volume 1 C RAW Partition 130 GB Healthy | ||
Volume 2 RAW Partition 55 MB Healthy Hidden | ||
``` | ||
|
||
Schweet. | ||
|
||
## Restore with Ghost | ||
|
||
Both the boot and Data-only volumes were backed up as their own set of V2Is. | ||
Simply [restore each volume](Techniques.md#restoring-with-ghost) to its respective partition. | ||
|
||
After restoration, check the VOLUMEs using [diskpart](Techniques.md#diskpart) | ||
|
||
``` | ||
select disk 0 | ||
list volumes | ||
Volume ### Ltr Label Fs Type Size Status Info | ||
---------- --- ----------- ----- ---------- ------- --------- -------- | ||
Volume 1 H RECOVERY NTFS Partition 10 GB Healthy System | ||
Volume 2 C NTFS Partition 223 GB Healthy Boot | ||
``` | ||
|
||
Looks about right. | ||
|
||
But there was still *one more issue* ... | ||
|
||
## Repair Detection | ||
|
||
Before the XP install can be [repaired](Techniques.md#xp-repair-installation), | ||
the Setup process must detect the installation and *believe that it it can repair it*. | ||
Trust me, when you can't get it to detect your installation, it can feel like a pretty arbitrary belief system. | ||
|
||
Some common issues are | ||
|
||
- The "version of Windows on your computer is newer than the version on the CD" [scenario](http://support.microsoft.com/en-us/kb/898594). | ||
|
||
This shouldn't be a problem if your Setup disk contains the SP2 release of XP. | ||
|
||
- The "OEM installation (but not an OEM CD)" [scenario](http://superuser.com/questions/35290/xp-cd-doesnt-offer-repair-option). | ||
|
||
If you're virtualizing an old OEM workstation, such as Dell or Compaq, | ||
the vendor may have had a custom version of XP built for their own nefarious needs. | ||
You'll need to repair using the *OEM version* of the Setup disk. | ||
Hopefully it's in an envelope somewhere -- or you could [fake one](http://www.geekstogo.com/forum/topic/296146-no-repair-option-when-repairing-windows-xp/). | ||
I've heard rumour that some vendors were kind enough to bake in an XP program that could burn just such a disk for you. | ||
For the Inspiron, the XP license key was printed on a silver sticker stuck to the computer case. | ||
|
||
Plus stranger scenarios -- perhanps indistinguishable from conspiracy theories -- such as | ||
|
||
- ["corrupt or missing registry hives"](http://forums.techguy.org/windows-xp/1030320-windows-xp-install-repair-option.html), or | ||
- ["executing PnP (Plug and Play) and ACPI routines"](http://www.geekstogo.com/forum/topic/296146-no-repair-option-when-repairing-windows-xp/). | ||
|
||
Ultimately, if you can't get the Repair Installation process to work, | ||
check out Microsoft's [thorough article](http://support.microsoft.com/en-us/kb/978788) on re-installing XP from scratch, | ||
including some manual backup steps that could serve as your fallback option. | ||
|
||
Fortunately, *none of those* were the issue in this case ... | ||
|
||
## Confirm the Boot Disk | ||
|
||
In order to repair the version of XP that the old hardware had been booting into, | ||
the active partiton's [`boot.ini` file](Techniques.md#bootini) must reference actually it. | ||
Somehow, even after [restoration](#restore-with-ghost) of up-to-date V2I files, that didn't happen. | ||
|
||
Everything finally worked once I had | ||
|
||
- Established the **active partition** using [diskpart](Techniques.md#diskpart) | ||
|
||
``` | ||
select disk 0 | ||
select partition 2 | ||
active | ||
``` | ||
|
||
Which we already did [above](#partitions). | ||
|
||
- Referenced the bootable XP installation within the **boot.ini file** | ||
|
||
Your restored Windows XP install will already have a [`boot.ini` file](Techniques.md#bootini). | ||
Use the **Edit boot.ini** tool to ensure that it points at the active disk + partition combination. | ||
You may want to set aside a backup copy. | ||
|
||
In a typical installation, XP is installed on the boot parition, | ||
so `boot.ini` references the active disk + partition indexes as you used in `diskpart`, | ||
In this case, that would be 'multi(0)disk(0)rdisk(0)partition(2)\Windows'. | ||
And in fact, that's why my restored `boot.ini` contained. | ||
|
||
However, in inspecting the original computer, the *actual* configuration was to run Windows XP off of the *Data partition*. | ||
In my case, that was 'multi(0)disk(0)rdisk(0)partition(3)\WINDOWS', capitalization and all. | ||
``` | ||
[boot loader] | ||
timeout=1 | ||
default=multi(0)disk(0)rdisk(0)partition(3)\WINDOWS | ||
[operating systems] | ||
multi(0)disk(0)rdisk(0)partition(3)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect | ||
``` | ||
|
||
The XP Setup disk can now detect it for a [Repair Installation](Techniques.md#xp-recovery-installation) process. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Example: Simple Basic | ||
|
||
My simplest restoration was a workstation had three volumes partitioned on a single physical disk. | ||
When virtualizing it, I chose to create a separate [VMDK](Tools.md#virtual-disks) for each volume. | ||
I could also have created one massive [partitioned](Techniques.md#partitioning) VMDK file. | ||
|
||
The [initial VM](Techniques.md#initial-vm-setup) should have an identical CPU and RAM allocation as the hardware. | ||
|
||
Then all you need to do is | ||
|
||
1. [Restore each volume](Techniques.md#restoring-with-ghost) using Ghost | ||
2. [Repair your installation](Techniques.md#xp-repair-installation) of Windows XP, | ||
since most of your device drivers are invalid. | ||
|
||
And yeah, it's *that simple*. | ||
|
||
Until you read deeper into the hyperlinks, of course ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,13 @@ | ||
This is free and unencumbered software released into the public domain. | ||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | ||
Version 2, December 2004 | ||
|
||
Anyone is free to copy, modify, publish, use, compile, sell, or | ||
distribute this software, either in source code form or as a compiled | ||
binary, for any purpose, commercial or non-commercial, and by any | ||
means. | ||
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> | ||
|
||
In jurisdictions that recognize copyright laws, the author or authors | ||
of this software dedicate any and all copyright interest in the | ||
software to the public domain. We make this dedication for the benefit | ||
of the public at large and to the detriment of our heirs and | ||
successors. We intend this dedication to be an overt act of | ||
relinquishment in perpetuity of all present and future rights to this | ||
software under copyright law. | ||
Everyone is permitted to copy and distribute verbatim or modified | ||
copies of this license document, and changing it is allowed as long | ||
as the name is changed. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
OTHER DEALINGS IN THE SOFTWARE. | ||
|
||
For more information, please refer to <http://unlicense.org> | ||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | ||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION | ||
|
||
0. You just DO WHAT THE FUCK YOU WANT TO. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,49 @@ | ||
# virtualizing-windows-xp | ||
A trieste on my experiences virtualizing Windows XP | ||
# Virtualizing Windows XP | ||
|
||
A trieste on my experiences virtualizing Windows XP to create long-term homes for old workstations. | ||
|
||
> *WARNING: laughably old dustware will be discussed here* | ||
--- | ||
|
||
In the past, I've taken on the task of virtualizing several ancient Windows XP boxes. | ||
The OS has been [end-of-lifed](http://www.microsoft.com/en-us/windows/enterprise/end-of-support.aspx), | ||
but in its time, XP captured the imagination of *millions* -- | ||
and it still runs all the apps I care about, on the rare occasions that I need them. | ||
And all the backups in the world can't save you when your hardware bites the dust. | ||
|
||
This repo outlines some [Tools](Tools.md) & [Techniques](Techniques.md) for the virtualization process, in case it's of help to others. | ||
It's also a compendium of **truly useful** online resources. | ||
It could have been a blog post, but I find my learnings will be best served by tons of hyperlinking. | ||
|
||
I provide two examples: | ||
|
||
- A [Simple Basic](Example-Simple.md) one. | ||
- [The Inspiron](Example-Inspiron.md) - a more complex example with an OEM partition and a Brain Transplant. | ||
|
||
Please feel free to [contribute to this repo](CONTRIBUTING.md). | ||
|
||
|
||
|
||
<!-- | ||
[VirtualBox](Tools.md#virtualbox) | ||
[Windows XP](Tools.md#windows-xp) | ||
[Virtual Disks](Tools.md#virtual-disks) | ||
[VMDK](Tools.md#virtual-disks) | ||
[XP Helper](Tools.md#xp-helper) | ||
[Ghost](Tools.md#ghost) | ||
[Recover My Computer](Tools.md#ghost) | ||
[Initial VM Setup](Techniques.md#initial-vm-setup) | ||
[Partitioning](Techniques.md#partitioning) | ||
[diskpart](Techniques.md#diskpart) | ||
[`boot.ini` file](Techniques.md#bootini) | ||
[Norton Support Utilities](Techniques.md#norton-support-utilities) | ||
[Partition Table Operations](Techniques.md#norton-support-utilities) | ||
[Edit boot.ini](Techniques.md#norton-support-utilities) | ||
[Disk Management](Techniques.md#disk-management) | ||
[Recovery Console](Techniques.md#xp-recovery-console) | ||
[Repair Installation](Techniques.md#xp-repair-installation) | ||
[Restoring with Ghost](Techniques.md#restoring-with-ghost) | ||
[Windows Updates](Techniques.md#windows-updates) | ||
--> |
Oops, something went wrong.