Wednesday, March 23, 2011

Disappearing Files

Something happened to me today that I must share, so that if it happens to you, you would know of a possible solution.

My PC is mainly a Windows PC. However, I do have Ubuntu installed via Wubi, which means that the entire Ubuntu partition is located in my Windows partition as an image file.

Today, that image file disappeared. A 20GB file just went off the face of the proverbial planet.

You can probably imagine how disturbing it was to me. Not that I was bound to lose any information, since I have my backups. However, in order for me to be able to work on my main project, I would need to reinstall Ubuntu, reinstall all the dependencies, and sacrifice a goat. Well, maybe not to reinstall ALL the dependencies, but quite a lot of them. This isn't a hard thing to do, only time consuming.

So I started digging around the internet, and sure enough, I wasn't the first one to have been Houdinied by his Ubuntu image file. I'll spare you the non-relevant solutions, though.

Finally, I have found a perfectly reasonable explanation for the disappearance: Aliens! But before I began acting on that, I have found another possibility: NTFS failure. Yes, it seems that files may disappear if, for some unknown reason, the file system became corrupt. No surprise there, it just never happened to me before.

So the solution was fairly simple:
  1. Run chkdsk on the drive: chkdsk /f c: (or any other letter)
  2. Find system-protected hidden folder named c:\found.000
  3. Pray to the flying spaghetti monster that your files are there.
  4. Move files back to whence they came.
  5. Pray again that the files themselves aren't corrupt.
  6. Rejoice! Sacrifice something, FSM earned it!
So there it is. It doesn't happen very often, but if you lose some files, don't lose your head, just chkdsk it!