Friday, January 28, 2011

VirtualBox hard drive corruption

I'm running Ubuntu 10.04 on VirtualBox 3.2.8 (Win XP). I was doing a defrag, which wasn't very smart when I had the VM running I guess. Now some of the files are corrupted it would seem.

How can I find out what files have been corrupted and what I need to replace?

I can't trust Virtual Box to preserve my files, maybe I should change to something else?

Sometimes files are corrupted when Virtual Box shuts down also.

  • Could have introduced some race conditions... the Virtual OS could have been trying to write to sectors that were moved by the defrag operation.

    In this case you'll want to run tools like "fsck" and do some general google searching on methods for Linux/Unix file recovery. You should be able to at least find a free tool that will report the files that are bad, but may not be able to recover them as the underlying virtual disk is corrupt.

    As far as "not trusting VirtualBox"... I haven't run into this type of issue before; you may have some other issues creeping up (your physical disk may be going bad - probably want to run some scans at the WinXP level).

    Keyo : fsck says it will cause damage to the disk if I run it while /dev/sda1 is mounted. Can I somehow run it without booting?
    mxmader : you should be able to boot from the install media and boot Ubuntu off the CD image, then run fsck on your offlined OS instance.
    Keyo : I found `touch /forcefsck` or something like that forces it to run fsck at boot.
    From mxmader

0 comments:

Post a Comment