2

2 drives:

150gb - Linux Mint (not encrypted)

300gb - Windows Vista 64-bit (truecrypt with preboot authentication)

I need to repair my windows install (freezes trying to load a system dll, spinrite gives the drive a clean bill of health, so its just a corrupted system file.) Running repair off the windows install dvd wont work because it can't see my windows partition (due to truecrypt).

Here's what i've done:

  • Boot into linux partition, install virtualbox and truecrypt gui
  • Use truecrypt GUI to mount the windows drive (it is now mounted under /media/truecrypt1, and I can see all of my files, great! I can at least save the redownload time of installing my steam games if I have to reinstall)
  • I created a virtualmachine and attached the host DVD drive to it so it can boot the windows installation dvd.

I want to be able to have the virtualmachine repair the windows install that is currently mounted under /media/truecrypt1. How do I create a passthrough vmdk so that I can mount it in the virtualmachine so that the windows repair tool will be able to see the windows install.

SOLUTION (thanks to tapped-out):

  • create vmdk passthrough so that virtualbox can use the truecrypt drive: VBoxManage internalcommands createrawvmdk -filename ./passthrough.vmdk -rawdisk /dev/mapper/truecrypt1

  • Run virtualbox as root: sudo virtualbox

  • Add the passthrough.vmdk to your virtualmachine's drives

  • Boot the virtualmachine from the windows install dvd, click Repair computer

  • It will NOT find the drive to repair, but if you click Load Drivers it will allow you to browse your windows install. Don't load any drivers, just click Next. There will be an option to allow you to open a command prompt.

  • cd /D c:\ and then chkdsk /f /r

Dont know if it will fix my corrupt dll, but mission accomplished: mounted a pre-boot authenticated truecrypt drive under a virtualmachine so I could run checkdisk on it.

1 Answer 1

0

From a terminal, you will want to run this command:

VBoxManage internalcommands createrawvmdk -filename ./passthrough.vmdk -rawdisk /media/truecrypt1 -register

You can then mount this in a VM as normal.

EDIT: the register parameter has apparently been deprecated, and you need to use the block device, not the mounted partition:

VBoxManage internalcommands createrawvmdk -filename ./passthrough.vmdk -rawdisk /dev/mapper/truecrypt1

7
  • invalid parameter -register
    – TheBigS
    Apr 15, 2012 at 13:09
  • sudo VBoxManage internalcommands createrawvmdk -filename ./passthrough.vmdk -rawdisk /media/truecrypt1 VBoxManage: error: File '/media/truecrypt1' is no block device VBoxManage: error: The raw disk vmdk file was not created
    – TheBigS
    Apr 15, 2012 at 13:10
  • oh, I see. /media/truecrypt1 isn't a blockdevice, it's the partition. what happens if you run VBoxManage internalcommands createrawvmdk -filename ./passthrough.vmdk -rawdisk /dev/mapper/truecrypt1?
    – nc4pk
    Apr 15, 2012 at 13:22
  • That works! at least it created the vmdk, but now I get this error when trying to use it Result Code: NS_ERROR_FAILURE (0x80004005) Component: Medium Interface: IMedium {53f9cc0c-e0fd-40a5-a404-a7a5272082cd} Callee: IVirtualBox {c28be65f-1a8f-43b4-81f1-eb60cb516e66}
    – TheBigS
    Apr 15, 2012 at 13:25
  • seems like a common problem on linux, according to this. what happens if you run sudo /etc/init.d/vboxdrv setup?
    – nc4pk
    Apr 15, 2012 at 13:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .