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!

5 comments:

  1. This leads to the unavoidable question: why not create brand new and very shining partition that will host your Ubuntu files safely out of the reach of evil Windows and its NTFS?

    ReplyDelete
  2. That is correct, and it probably was the right thing to do. But now I just don't want to start dealing with reinstalling everything...

    ReplyDelete
  3. Quite an adventure you had. Very amusing and enlightening.

    ReplyDelete
  4. And hopefully it would help :)

    ReplyDelete
  5. you can write a script to install all your progs with one double click ... ORRRR you can install windows with/under ubuntu ....

    ReplyDelete