Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got a crying student in the hallway. It is submission date for an assignment paper, and his laptop died as it fell out of his backpack doing 30mph on the way in. The solid-state-disk seems ok, so were trying to recover the files by putting it into a mobile case and copy the files.

Right now, I need to figure out what the process is to get a virtual machine running (KVM or virtualbox) using the students solid-state-disks' winXP as his work is unfinished, and no-body here uses windows (we are all Ubuntu's).

Any hints on what to query (A), the process (B) or - if i'm really lucky - a script that does most of the works in one go (C) ?

share|improve this question
Can't you just copy the files and edit them in Ubuntu? – labarna May 4 '12 at 17:23
Sorry, the chap uses some windows formatted files which I can't open. That's why we need the Vbox or KVM – root-11 May 4 '12 at 17:28
Do you have the NTFS-3g tools available? You should be able to mount.ntfs -o ro /dev/sdb2 /mnt. Just guessing the sdb2, check cat /proc/partitions which partitions are available. – jippie May 4 '12 at 17:31
Hi Jippie, mounting is no problem. It is getting the windowsXP virtualised so the software he used to create the files can be used to access them. They're windows binaries. We can't open them, even though we can copy them to another disk (which we've done now). – root-11 May 4 '12 at 17:34
up vote 3 down vote accepted

Yeah, I used to do that all the time in class.

Note: Back up everything on the hard drive before you do this. You never know.

1 - Install VirtualBox.

2 - Connect and mount the Windows hard drive.

3 - Find out which device represents the Windows hard drive by running sudo fdisk -l.

4 - Run this command as root (replacing sdx with the appropriate identifer for the Windows disk).

VBoxManage internalcommands createrawvmdk -filename /root/windows.vmdk -rawdisk /dev/sdx

5 - Open VirtualBox from the command line as root.


6 - Add a new virtual machine to VirtualBox. Give it enough memory, set the appropriate OS, and for the hard disk, browse to the VMDK you created (found in /root/).

7 - Download Super Grub2 Disk's ISO. Add the ISO to the VM, as a virtual CD. This will allow you to boot to Windows without having to go to all sorts of trouble with a fake MBR.

8 - Boot the VM. Once inside Super Grub2 Disk's menu, select "Find any operating system".

9 - You should see the Windows installation in the list now. Select it using the arrow keys and press Enter.

10 - Windows should now boot.

share|improve this answer
Thanks for the steps. I got no error messages in the process, but I do not see the XP desktop when powering it up in step 7. Any ideas? – root-11 May 5 '12 at 14:21
Perhaps the boot loader didn't follow correctly? Try downloading this ISO. It's Super Grub Disk 2, and it allows you to boot into systems with bad boot loaders and invalid MBRs. Add the ISO to the VM, so that it shows up as a CD. Boot, and select "Find any operating system". This should find Windows. Select it and press Enter. Windows should now load. – SirCharlo May 5 '12 at 21:22
Thanks SirCharlo - it worked well! – root-11 May 8 '12 at 16:59
Great! I'll add the steps to my answer in case anyone needs it later. :) – SirCharlo May 8 '12 at 17:33

If you can still boot Windows off that drive you could try Systernals Disk2VHD which will create a VHD for you. But dd and vboxmanage seem to be the better solution.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.