Recovering VirtualBox Image after deleting /etc/share/

I'm working on a Linux mint virtualbox image hosted on Windows 10 where I accidentally deleted the /etc/share directory and subdirectories.

Now my Image can't boot and I have sensitive data that I want to recover.

How can I do so?


Solution 1:

OK.. ok.. the problem you are going to have here is that the file system is probably ext4 (or similar) and even if you can open the VDI from windows, you probably won't be able to see the files.

There are windows drivers for some linux file systems but this is the PAINFUL way to solve this (IMHO).

I myself would:

  1. Make a new Linux VM with a new VDI (or use an existing VirtualBox Linux image).
  2. Add your existing VDI to the settings (as another HDD) for the VM in step 1.
  3. After booting the new VM, mount your partition/volume from the VDI in step two into the folder of your choice. To figure out your disk ID, try this.
  4. Copy off the files you need.
  5. Collect Underpants
  6. ?
  7. Profit