Tuesday, June 7, 2011

Rescuing data from my dead laptop

Unfortunatly, my laptop's sort of "died" yesterday. The usual procedure in such cases is to rescue your data, and then send the laptop to a service laboratory. However, rescuing the data was a bit harder than I expected it be... I'm using a dell laptop with windows 7 x64, and here are the steps I took:
  1. Create a Windows 7 system repair disc (using my brother's laptop)
  2. Boot the laptop from the repair disc
  3. Run Startup Repair - didn't help
  4. Run Windows Memory Diagnostic - which produced the lovely warning:
    Hardware problems were detected. To identify and repair these problems, you will need to contact the computer manufacturer.
  5. Complain about my crappy luck
  6. Re-boot the laptop, and in the boot options menu choose the Diagnostics tool
  7. After running the diagnostics, I got a more detailed error:
    Error Code 0123
    Msg: Error Code 2000-0123
    Msg: Memory - integrity test failed
  8. Googling that error shows that it will require reinstalling/replacing of my (RAM?) memory
So, that wasn't so bad. The problem is now, how to get the data out? Here is where things became tricky:
  1. Boot the laptop from the repair disc
  2. Connect a USB disk on key (8GB, FAT32 file-system)
  3. Open the command prompt supplied in the repair disc and start copying files
  4. After filling the Disc-On-Key each time, I emptied it on my brother's computer
And here it all goes wrong:
  1. Got an error of a file which is too large for the given file system. I had a 4.35 Gb file of a virtual machine hard disk (VDI file). The maximal file size for FAT32 file system is 4Gb-1b :P
  2. Format the Disc-On-Key, and choose an NTFS file system
  3. Copy the big file and continue happily :)
  4. Got another error - file is too big. Got this for a 9Gb file which represents the hard disk of another virtual-machine.
Now, we have a problem. The largest USB storage device I had is 8Gb, and in this minimal windows recovery environment I don't have any tool to split files!

After some thinking, I remembered that 7zip can create a split-zip, i.e. one zip that is split to several small chunks. Even better was the fact that 7zip has a command line portable version! So I quickly downloaded it, and went back to my dead laptop to try it. But, it didn't work... Apparently, in the repair disc, the files required to run 32 bit executables over 64 bit machines are simply not installed, and the command line version came only in 32 bit...

After scratching my head, I went back to browse my homework folder from the operating-systems folder. I remebered that we wrote a splifile utility in C, which uses only windows commands (for example, CreateFile instead of fopen). But, my version of Visual Studio is the Express edition, and it didn't have the 64 bit compiler...

So, I downloaded mingw64-w64 and went to compile my program. After some struggles with problems regarding unicode programs (solved here), and some other problems, I finally managed to get it compile. I went to back to my repair-disc boot, and it worked!

It took me several hours to solve all this, but I finally managed to do this. I don't have many complaints to microsoft or dell - the diagnostic tools were really easy to use and the repair disc booted without any problems. It's just too bad that the people at microsoft didn't think a split file utility is necessary when trying to rescue data... Overall, I began this procedure with great pesimisem, and I finished with a smile and no lost data :)

Regarding my GSoC - this will prevent me from working several days this week, since it's still the last week of the semester, so I still can't sit in front of my desktop computer. I'll make up for the lost time later somehow.

No comments:

Post a Comment