OK. I’m running OpenSuse 12.2 KDE dual booted with Windows XP on a Lenovo T61 laptop. I’ve installed Virtual Box from the Oracle repository, and Virtual Box starts.
I also used Disk2vhd to create a Windows XP vhd.
When I create a guest with it, instead of opening Windows, it starts a terminal and I get the single line GRUB _ and nothing else happens.
Did I do something wrong when I created the vhd? How can I fix this?
Whatever you did, you’re not starting Windows (grub is the Linux bootloader, would not be seen booting Windows). And, you are starting Linux of some kind…
No way to know what you did wrong unless you describe how you created your VM in excruciating detail.
Yes, I understand that. I went to Disk2vhd, ran the Disk2VHD.exe program under Windows XP. There were no settings except for where to put the vhd file.
I suspect it’s getting something from Grub because the computer I ran Disk2vhd on is a dual boot (Win XP and Open Suse). I suppose I could find a different computer with Win XP on it, but without a dual boot setup to try to create another vhd.
To create a file with Windows XP from a fully patched version i already have on a laptop that’s dual booted with Win XP and OpenSuse 12.2. How else would you do this?
>VHD is a format that is native to Hyper-V, Microsoft’s visualization technology
>
>You’re going to have to describe exactly what is your setup.
>
>What is your
Host OS - OpenSuse 12.2
Guest OS - Win XP
What disk format are you using for your guest(s) - ext4
I think you hit the solution: taking the XP from a Win only machine would exclude the option that you convert a partition to VHD with GRUB code on it. Would be interesting to see the thing “mounted”, my bet is there is XP on it, yet with GRUB remains.
OK,
Now I think I see what you’re trying to do.
You’re converting a WinXP that originally is your dual-boot, which means that Disk2VHD dutifully tried to include the Grub chain loader, that’s why you’re seeing grub on bootup, but of course now grub’s configuration is no longer valid.
Recommend (untested)
Make a copy of your file unless you don’t mind running another P2V conversion.
Mount your disk file in a loop device
You can do the following only on a system that supports the filesystem and diskfile types, assume you have Virtualbox installed for VHD support (<127GB) and ntfs support (recent kernel).
First map the internal partitions of your diskfile. You will be later mounting individual partitons in the diskfile to do surgery
kpartx -av diskfile.vhd
Save that information somewhere so you don’t have to run it again. Or, just open a new console for further work.
Mount each mapped device described in the kpartx result and inspect the contents, looking for the partition that contains the grub files, eg
# mount /dev/mapper/loop0p1 /mnt/
# ls /mnt/
From there, I won’t describe the specific steps, but you should be able to point parted at this loop device, list the partitions so you can get a partition ID, then delete that partition using that ID.
Then umount (unmount) the loop device and build your VM pointing to your modified diskfile.
With any luck, the right partition should be automatically recognized as bootable, otherwise mount again and run something like fdisk /mbr(?) marking the boot partition.
Converting to VHD is probably OK but whenever possible I recommend converting to a diskfile format native to the virtualization being used for best performance and full feature support.
And no, I doubt that your problem has to do with the XP instance doing the conversion running as a dual-boot, I do believe your source XP(the XP being converted) is a multi-boot where grub is the first bootloader, then pointing to your XP.
I think what I’ll do is to wipe the drive in this laptop, and reinstall XP, by itself. Then I’ll run Disk2vhd, and create a vhd file. I’ll copy it to a USB Drive. Then I’ll install OpenSuse 12.2 or 12.3 by itself and a new VirtualBox, and then add the vhd file. That should work.
Thanks for your suggestions and your assistance. I appreciate them very much.