Page 1 of 1

Guidance to recover a .vdi file

Posted: 14 Nov 2013, 10:51
by theancientone
Hi there,

I would like to have some help with recovering a .vdi file. I deleded it by accident and would like it back because this is a data disk. Since I'm not really used to this kind of thing (normally I'm very careful) I need some help to understand this.

Let me give you some information about my system:
- OS: Linux Mint 15 (Olivia) Cinnamon
- 3 HDD's:
Disk 1: 500 Gb (EXT4) partition for OS and store other stuff in my /home directory.
Disk 2: 1 Tb partition (NTFS) for backup purposes (films, series, software, etc)
Disk 3: 1 Tb partition (EXT4) for storing VM's

The problem exists in Disk 3. I was using Virtualbox and wanted to switch to VMware Workstation 10. So after converting the disks needed for running in vmware (from .vdi to .vmdk) I did not need the disks from Virtualbox anymore. To save space I deleted them from Virtualbox. In a rush I also deleted the Virtual Machine where my data like documents and photo's are stored. This file was about 500 Gb (friends and family used it too) for storing data. The virtual machine was consisting of two disks, the OS disk and the data disk. The OS disk is saved and converted.

Can someone help me to recover or undelete the 500 Gb .vdi file?

I already had Photorec running and recovered a lot of files included three .vdi files. However, I do not know what to do now. How do I restore the 500 Gb file?

Kind regards,

The ancient one

Re: Guidance to recover a .vdi file

Posted: 15 Nov 2013, 11:31
by theancientone
Alright, I have like 180 files of .vdi files. Are those files fragments or just single file? If they are fragments, how do I recover them?

Re: Guidance to recover a .vdi file

Posted: 15 Nov 2013, 16:13
by theancientone
It seems that I found what I was looking for but there are some thing I would like to understand.

I found a .vdi file which physical size is 2,1 Mb, however, when I mount it in a virtual machine then it says that its virtual size is 500 Gb. It also says this:

Code: Select all

user@user-VirtualBox ~ $ sudo mount -t ext4 /dev/sda /media/vboxdisk
[sudo] password for ivdadmin: 
mount: wrong fs type, bad option, bad superblock on /dev/sda,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

user@user-VirtualBox ~ $ 
The command suggested:

Code: Select all

user@user-VirtualBox ~ $ dmesg | tail
[   15.851518] intel8x0: measured clock 232823 rejected
[   16.106073] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   16.106417] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   16.108623] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
[   16.108934] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   16.208091] intel8x0_measure_ac97_clock: measured 55892 usecs (13659 samples)
[   16.208094] intel8x0: measured clock 244382 rejected
[   16.208096] intel8x0: clocking to 48000
[   17.142418] vboxsf: Successfully loaded version 4.2.10_Ubuntu (interface 0x00010004)
[  195.357370] EXT4-fs (sda): VFS: Can't find ext4 filesystem
user@user-VirtualBox ~ $ 
The filesystem was EXT4. What do I do now? Is it fragmented? Do I run it again searching for more?

Re: Guidance to recover a .vdi file

Posted: 19 Nov 2013, 14:15
by theancientone
Can someone please answer me? How can I recover the files I need?

Re: Guidance to recover a .vdi file

Posted: 23 Nov 2013, 12:28
by cgrenier
PhotoRec create a new .vdi each time a VDI signature is seen. AFAIK you can't use mount to mount a vdi file, you need to attach the file as a virtual disk, start a VM with a working OS and mount the filesystem inside the VM. If the original file was fragmented, it will probably fail.

Re: Guidance to recover a .vdi file

Posted: 23 Nov 2013, 16:10
by theancientone
Thank you for replying! That is the thing, it was a 500Gb file, so the real question here is... Is there a pot of glue somewhere so that I can fix this?

I already knew about the .vdi files and mounting in a VM. I did find the .vdi in question but it seems that it is just about 2,1 Mb of size. When I mount it, it tells me that it's virtual size is 500 Gb. The remaining pieces are missing or so it seems.

Is it possible to recover this?

The file about 24 Gb filled of data.

Re: Guidance to recover a .vdi file

Posted: 30 Nov 2013, 09:59
by cgrenier
Disable all other file formats in [File Opt], start a recovery, maybe this time, you will get a larger file...

Re: Guidance to recover a .vdi file

Posted: 30 Nov 2013, 10:33
by theancientone
Hi,

Thanks for your reply. I already did this and it finds a lot of .vdi files which are no bigger then 3,2 Gb and the smallest is like 86 Kb or so. Also when trying to mount those volumes it says there are duplicate UUID's in play and cannot be mounted.

Re: Guidance to recover a .vdi file

Posted: 16 Dec 2013, 12:44
by theancientone
Hi!

Maybe I'm happy after all! It really depends on the answer of the question I have.

I found what like to be a ton of photo's which were stored in a .VDI file. Does photorec or testdisk read inside the .VDI file and recover any photo's or other files in it?

Re: Guidance to recover a .vdi file

Posted: 04 Jan 2014, 08:56
by cgrenier
The .vdi file contains compressed and/or unaligned and/or fragmented data files. It's why PhotoRec doesn't recover the jpg inside the the vdi file.