Ok got the urge to play Riven but couldn't install it on a Windows 7 64bit system since it is an old 32bit game. No biggie I kind of suspected that so I decided to go Virtual. My Win7 system is the Home version and it does not have XP mode available so I settled on Oracle Virtual Box. I loaded Virtual Box and was just getting ready to break out the 32bit XP install disk when I decided to make the job harder than it needed to be.
Just a few months ago on the same PC I was running Fedora 16 on a 1TB disk that was dual partitioned for Linux EXT3/LVM2 and NTFS. Since then the system was rebuilt with a new Drive running Win7 64bit. I was also running Virtual Box on the Fedora 16 system and had a fully configured XP VM already setup and updated to that point in time. So instead of starting from scratch I decided to see if I could get that VM off the old Fedora system.
I put the old drive in one of those USB Drive docks and hooked it to my Win 7 system then tried to access it via a couple versions of Linux Live running on a Virtual Box vm but had no luck in mounting the partitions so I decided to use my full time Fedora 17 system to do the job.
On my Fedora 17 system I hooked up the USB drive had some problems seeing the new drive so I rebooted and all was well. To get to the files I needed to get into the lvm partition on the disk. So here are the steps based on LVM2 (LVM1 slightly different):
#pvscan with this command I could verify that I can see the old lvm and what name it had
In my case pvscan returned my target as vg_fedormedia on /dev/sde5
To import the volume group you need to export and import the group.
#umount /dev/blah/blah First it needs to be unmounted which mine was not.
#vgchange -an vg_fedormedia Marks the group as inactive
#vgexport vg_fedormedia Exports the group
#vgimport vg_fedormedia Imports the group
#vgchange -ay vg_fedormedia Activates the group
Now I was ready to mount the directory holding my XP VM
#mkdir /mnt/oldXP
#mount /dev/vg_fedormedia/lv_home /mnt/oldXP
Once mounted I could navigate to the target folder and there was my XP VM. Now I needed to copy the VM to removable media. Since the drive in the usb-dock drive was dual partitioned with NTFS I decided to copy the VM to the NTFS partition. Fedora had already mounted the NTFS partition so all I had to do was use Nautilus to copy from the mounted directory to the NTFS partition and I was done. Essentially what I did was copy the VM off the linux partition on the drive back to the NTFS partition on the same drive.
After that I unmounted the old home and deactivated the volume group
#umount /dev/vg_fedormedia/lv_home
# vgchange -an vg_fedormedia (not sure if that was necessary but did all the same.)
In all it took about 30-40 minutes to get the 7gig VM off the old drive and copied back to the NTFS partition and another 8 minutes or so to copy it to the Win 7 box. This still saved me the many hours it would take to build a new XP VM and download all the updates.
To import the XP VM into Virtual Box:
Start a new VM make sure it is set to Windows and XP give a name (must be different than the the VM you are importing or you get an error).
Set the RAM, 1024M in my case
Select use existing Hard Disk navigate to the folder where located select and create.
Done
No comments:
Post a Comment