• This is a political forum that is non-biased/non-partisan and treats every person's position on topics equally. This debate forum is not aligned to any political party. In today's politics, many ideas are split between and even within all the political parties. Often we find ourselves agreeing on one platform but some topics break our mold. We are here to discuss them in a civil political debate. If this is your first visit to our political forums, be sure to check out the RULES. Registering for debate politics is necessary before posting. Register today to participate - it's free!

Recovering a Corrupted Linux VM (Oracle Virtual Box .vdi file)

<alt>doxygen

"I want MY WALL!"
DP Veteran
Joined
Dec 3, 2016
Messages
8,932
Reaction score
4,192
Location
Floriduh
Gender
Male
Political Leaning
Other
My machine crashed while I had it open. Yes, I forgot to flag that directory for backups, so I don't have one that's recent enough to be useful. I do have all of my source, but it was an old, unsupported distro and some of the toolchains would be really hard to recreate. The makefiles weren't in the same directories as the code, so I don't have those :<

Anyone know a way to do this? Web searches haven't produced anything that is applicable and non-destructive.

TIA
 
My machine crashed while I had it open. Yes, I forgot to flag that directory for backups, so I don't have one that's recent enough to be useful. I do have all of my source, but it was an old, unsupported distro and some of the toolchains would be really hard to recreate. The makefiles weren't in the same directories as the code, so I don't have those :<

Anyone know a way to do this? Web searches haven't produced anything that is applicable and non-destructive.

TIA
I did a quick pass, and there's a few possibilities, maybe you've seen these. I'd only point these things at a copy of the file, though.

https://gallery.technet.microsoft.com/How-to-recover-corrupt-VDI-5eda71c9

An alleged a repair tool from Microsoft. Only tested on Windows OS, but it does mention the EXTX filesystem, which is common on linux.

https://forums.virtualbox.org/viewtopic.php?f=6&t=45192

Claims to have repaired a .vdi by manually repairing the preheader.

Another option to consider is that likely the interesting data is fine and just the VM/OS portion is corrupted, so you could try mounting this drive as a non-system drive on another VM, though that would only let you recover files.
 
I did a quick pass, and there's a few possibilities, maybe you've seen these. I'd only point these things at a copy of the file, though.

https://gallery.technet.microsoft.com/How-to-recover-corrupt-VDI-5eda71c9

An alleged a repair tool from Microsoft. Only tested on Windows OS, but it does mention the EXTX filesystem, which is common on linux.

https://forums.virtualbox.org/viewtopic.php?f=6&t=45192

Claims to have repaired a .vdi by manually repairing the preheader.

Another option to consider is that likely the interesting data is fine and just the VM/OS portion is corrupted, so you could try mounting this drive as a non-system drive on another VM, though that would only let you recover files.

Already tried the highlighted, but I'll try the other things.

My bad for not having an up-to-date backup, but the lock up was caused by a tool sysadmin wanted everyone to be running.

Thanks!
 
My machine crashed while I had it open. Yes, I forgot to flag that directory for backups, so I don't have one that's recent enough to be useful. I do have all of my source, but it was an old, unsupported distro and some of the toolchains would be really hard to recreate. The makefiles weren't in the same directories as the code, so I don't have those :<

Anyone know a way to do this? Web searches haven't produced anything that is applicable and non-destructive.

TIA

tl;dr: No, but as an extended statement:

Not using a Virtual machine and instead running dual boot is a more optimal solution and will prevent this from happening. If you have to use a VM, I suggest backing up to a server on a regular basis, at least if this is business-related usage. In terms of what you do now that your GNU/Linux VM is corrupted, it honestly depends on whether or not you have a program that can parse the Oracle file, but I've not used Oracle VB in years and I've never tried to do this before nor do I see much from Google. It also depends if you encrypted your home folder, which is now a standard option on my GNU/Linux distros. If you did, you're probably screwed, but since it sounds like you're on an older Linux distro that may not be an issue.

As a last ditched effort, I would say you should really check to see if that software is really gone. GNU and Linux communities tend to keep a real backlog of previous versions of their software, so unless you're using your own software (in which case you absolutely should have created your own backups, with Git + DropBox/OneDrive/external hard drive) you should be able to recover the free software you were using, but it may take some time to put it together. I know that's not what you want to hear, probably, but I would think a tool for parsing Oracle VB's would be well known and easily findable if they existed.

Not being able to stick in a bootable USB and peruse physical HDD of a corrupted OS/hardware is kind of a problem here, lol, because this is my go-to solution for recovering files from a corrupted OS or hardware.
 
Last edited:
tl;dr: No, but as an extended statement:

Not using a Virtual machine and instead running dual boot is a more optimal solution and will prevent this from happening. If you have to use a VM, I suggest backing up to a server on a regular basis, at least if this is business-related usage. In terms of what you do now that your GNU/Linux VM is corrupted, it honestly depends on whether or not you have a program that can parse the Oracle file, but I've not used Oracle VB in years and I've never tried to do this before nor do I see much from Google. It also depends if you encrypted your home folder, which is now a standard option on my GNU/Linux distros. If you did, you're probably screwed, but since it sounds like you're on an older Linux distro that may not be an issue.

As a last ditched effort, I would say you should really check to see if that software is really gone. GNU and Linux communities tend to keep a real backlog of previous versions of their software, so unless you're using your own software (in which case you absolutely should have created your own backups, with Git + DropBox/OneDrive/external hard drive) you should be able to recover the free software you were using, but it may take some time to put it together. I know that's not what you want to hear, probably, but I would think a tool for parsing Oracle VB's would be well known and easily findable if they existed.

Not being able to stick in a bootable USB and peruse physical HDD of a corrupted OS/hardware is kind of a problem here, lol, because this is my go-to solution for recovering files from a corrupted OS or hardware.

Thanks for the reply.

The VM's run under Windows, and I have several. It was just the one VM that was open when the Windows machine crashed that's messed up. I've got a few ideas to work with now.

Thanks.
 
EDIT: Sorry, missed your reply above. I thought I'd organize my thoughts a bit better, so here:


I recognize that this is particularly unhelpful after the fact and I'm probably preaching to the choir, but if you're writing code that you need to use again, and for a business/organization:

1.) Document your dependencies (i.e. just a simple "dependencies.txt" or ".odt") and the version of them that is consistent with your toolchain. I also like to document my toolchain, so it's not dependent upon IDE or Makefiles, and can be reconstructed.

2.) Use version control (e.g. a Git or SVN repository) that saves this "dependencies.txt" alongside your source code and any other critical documentation with your source code.

3.) Multiply back-up this Git repository on either a local server (that means at least two HDD's in RAID with appropriate security), or use enterprise-class cloud services like GitHub Pro/DropBox Pro/OneDrive Pro. For personal projects, use GitHub for open source, or for closed-source you can use your personal iCloud/DropBox/OneDrive/your favorite semi-secure, free cloud storage system to host a Git repository (or SVN equivalent). If you're really using something niche, I would suggest saving the installation .exe/.sh programs/IDE/whatever there, too.​


Trust me from a few years doing IT work on the side that these --especially number (3) which holds for all mission-critical data for your company/organization-- are not optional. So for instance, that includes back ups of any VM you're using. Obviously you cannot help what the practices of the people who were there before you, but it's definitely worth staying organized and making sure any details surrounding legacy technology is kept track of. Although that's sometimes easier said than done.
 
Back
Top Bottom