Homepage
2005-03-26: Import real PC into VirtualPC for Mac
Kontakt / Contact
Das Problem

Ich besitze einen neuen Mac G5 mit Virtual PC sowie einen uralten Rechner mit Windows 95. Was läge näher, als einfach die Daten aus dem alten Computer in Virtual PC importieren?

Nur leider bietet Microsoft hier keinerlei Unterstützung. Es gibt wohl mutmaßlich einen Assistenten zum Übernehmen der Einstellungen, aber zumindest in der deutschen Version enthält die Hilfe hier nur einen Kreisverweis.

Einfaches Kopieren der Dateien des Quellrechners auf eine neue Virtual PC Partition hat nicht zu dem gewünschten Ergebnis geführt: Der virtuelle Rechner war einfach nicht zum booten zu bewegen. Ausserdem hat das trotz 100 MBit Netzwerk im wahrsten Sinne des Wortes ewig gedauert. Auch Suche im Internet hat mich nicht weitergebracht, weswegen ich jetzt meine Lösung hier veröffentliche.

 
The Situation

I own an Apple Macintosh G5 and Virtual PC as well as a legacy PC macine from the stone ages still running Windows 95. The obvious thing to do would be migrating the legacy machine into a virtual machine and dismantle the ancient hardware.

However, using tools that come alongside Virtual PC, this seems not possible. In the (german) online help files there is a reference to an assistant, but there only seem to be circular links.

A simple copy attempt was not successful, Virtual PC consistently refused to boot the copied machine. Also, even using 100 MBit LAN, this copy operation literally took ages. Also, searching the internet did not bring any solution to my problem, which is why I created this page.

Meine Lösung

Ich habe mit Hilfe von KNOPPIX die gesamte Partition kopieren können. Wahrscheinlich tut es auch jede andere Live-Linux Distribution, doch KNOPPIX war die erste mit der ich es versucht habe. Die Schritte waren im Einzelnen:

Zunächst habe ich auf dem virtuellen Rechner eine Festplatte mit ausreichender Größe erzeugt. Anschließend habe ich sowohl den virtuellen Rechner als auch den Quellrechner mit den Optionen knoppix noswap nofstab 2 in den Textmodus gebootet, sodass Linux hier nicht die vorhandene Festplatte automatisch mountet oder versucht, ein swap-file anzulegen.

Als nächsten Schritt habe ich mittels GNU parted beide Festplatten auf eine gleiche Anzahl Blöcke gebracht. Für den Quellrechner war hier zusätzlich eine Verkleinerung der Partition notwendig. In meinem speziellen Fall war das Kommando in parted resize 1 1 1996, aber das hängt vom Einzelfall ab.

Um Daten auszutauschen schalte ich in Mac OS X die Windows Sharing Option ein und erzeuge einen Mountpoint unter beiden PC Umgebungen:
mkdir /mnt/backup
mount.smbfs '//g5/thomas' /mnt/backup -o username='thomas%password'

Dann habe ich auf dem Quellrechner mit Hilfe von partimage ein Image der Partition erstellt und unter Virtual PC wiedereingespielt. Die entsprechenden Kommandos waren:
partimage -z1 save /dev/hda1 /mnt/backup/win95.partimg.gz
partimage restore /dev/hda1 /mnt/backup/win95.partimg.gz

Das war`s. Jetzt konnte Virtual PC die Platte des alten Rechners booten. Nun mussten nur noch die Hardwaretreiber angepasst werden.

 
My Solution

Using KNOPPIX I managed to clone the entire partition. Most likely any live linux distribution would have done the trick, but KNOPPIX was the first available to me. The individual steps were:

Initially, I created a virtual harddisk file of appropriate size in Virtual PC. Then, using the options knoppix noswap nofstab 2 I booted both, legacy and virtual PC into linux textmode without mounting the internal harddisks or creating swap partitions.

Using GNU parted both harddisks were made to corresponding sizes. This was neccessary to adjust the partition sizes, in my special case using the command resize 1 1 1996, but your parameters will differ.

To exchange data, I enabled windows file sharing in Mac OS X and mounted it in both environments using the following commend sequence:
mkdir /mnt/backup
mount.smbfs '//g5/thomas' /mnt/backup -o username='thomas%password'

Now comes the step of creating a complete image from the legacy PC. Towards that end I used partimage which was also utilised to re-create the contents of the harddisk inside Virtual PC. The commands I used were:
partimage -z1 save /dev/hda1 /mnt/backup/win95.partimg.gz
partimage restore /dev/hda1 /mnt/backup/win95.partimg.gz

That's it. Virtual PC now boots from the harddisk image into Windows 95, and all that's left to do is adjusting the hardware drivers that are used.

I claim no authorship of any Software mentioned on this page, and YES, vi is my favourite editor.
http://www.apple.com/de/macosx/
Mittwoch 22 Februar 2012