Server Fault is a question and answer site for system and network administrators. 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

An Ubuntu LTS 10.04 vdi I was running crashed, and I'm unable to boot from it. I get stuck in initramfs.

I'm able to mount the image as a secondary device on a working Ubuntu LTS 10.04 image, after first repairing the volume with fsck.

Oddly, the data on the image is out of date! When I look at the vdi file on the host machine, it has an old modification time.

Strangely, I had rebooted this image in the past, and if changes weren't being written to the vdi file, I would have noticed it on reboot. I have also checked my other vdis to make sure they didn't contain the data instead, but no luck.

Where could all of that data been written to? Any place other than the vdi? I don't understand how it could have just disappeared like that, nor do I understand the modification time on the vdi file, unless VirtualBox was actually writing the data to a location other than the vdi!

share|improve this question

closed as off topic by MDMarra, sysadmin1138 Aug 14 '11 at 19:19

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

Also something to note-- I do see a snapshot vdi that is very large with a newer modification time, and is 6.53 GB. I'm thinking I should look there, but am doubtful it will have what I'm looking for. I did not take that snapshot myself AFAIK. – Simian May 5 '11 at 23:47
up vote 1 down vote accepted

Did the host crash? It could be that VirtualBox wrote the data and it ended in the disk cache of the host which then crashed and lost it.

Do you have any snapshots? If so, the main disk image won't have been written to, only the snapshot disk files.

You could try SysInternals Processmon or equivalent to see which files it is writing to if you aren't sure.

Lastly, on VMWare ESX, you can set a disk to not keep changes, but they aren't lost if the guest OS does a soft reset, only if the virtual machine is powered off. Perhaps that's similar on VirtualBox?

share|improve this answer
Wow, that was a nightmare. It looks like the data was in the snapshot file! Here's something very peculiar. The snapshot file disappeared, or changed location after I mounted it and restarted the working image. Luckily, I backed up all my data beforehand, and I'm still able to mount the image. Sadly, I am not able to boot from it. All of this happened on VirtualBox OSX. I have had other data problems with it in the not so distant past with both Fedora and Ubuntu, but none as severe as this. I would NEVER recommend using Virtualbox on OSX after this experience. – Simian May 6 '11 at 0:18

Did you take a snapshot of that VDI? VirtualBox writes data to a separate snapshot file so that it can revert to the previous state (by simply discarding everything in said snapshot file and reading the VDI directly, as you are now). It's kind of like Windows' System Restore, except that it actually works!

I believe the command-line tools will allow you to "discard" that snapshot -- that is, to write the snapshot data to the VDI so that you have an up-to-date VDI that you can use in a different VM, but you would no longer have that snapshot. Unfortunately, I don't know off the top of my head what that command/sequence of commands would be, but hopefully this'll get you pointed in the right direction.

share|improve this answer

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