Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
add comment

migrated from serverfault.com Aug 14 '11 at 19:20

This question came from our site for professional system and network administrators.

1 Answer

up vote 1 down vote accepted

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).

share|improve this answer
    
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? –  Keyo Oct 7 '10 at 2:29
1  
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. –  mxmader Oct 7 '10 at 3:02
    
I found touch /forcefsck or something like that forces it to run fsck at boot. –  Keyo Oct 7 '10 at 5:25
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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