2016-08-20

How to recover data from a non-booting laptop

Recently, my father gave me his very old laptop (bought second-hand in 2007) to try to recover some pictures.

Step 1. Access the hard drive

The laptop was not booting, and nothing indicated that the power supply was working. So I couldn't use the laptop itself, and I had to take its hard drive out.

First, I looked up a video on YouTube to see how to disassemble it enough for this. It was not too hard, just 1 screw for this particular laptop.

You can see at 0:43 in this particular video:


Cool.

Then, I find out that the connector is the old IDE kind, not the SATA ones which can be plugged into modern laptops:


I need some sort of adapter for it. Searching for adapters on Amazon can get you stuff like this which costs quite a lot (and I already have a SATA to USB adapter, so I didn't want one).
Looked some more and I found this nice box (which would also make the drive portable, so I could simply give it to my father).

I unplugged the laptop connector from the drive (it had some strange removable connector), and then I inserted the drive into the box's socket (carefully so I wouldn't bend the pins, and the missing hole is aligned with the missing pin).

It worked nicely, and I could see the file system on my computer :)

Step 2. Deleted file recovery

I searched for all jpg and jpeg files currently on the drive, and did not find the pictures my father was looking for (he mentioned specific images). So, I had to run some recovery tool on the empty space of the file system inside.


Warning! If you just deleted a picture and want to recover it, DON'T use the drive anymore! This is because your OS can now copy stuff over the deleted picture (which is now marked as empty space). If you copied files to fill your drive afterwards, then the picture will not be recoverable anymore.

Luckily my father didn't fill his hard drive, and the picture was still floating around in the empty space. I found it using the awesome open source program called PhotoRec.

This program can comb through the empty space of your hard disk, and check for signatures of files (it is explained on the website in more detail). Also, it can detect where the file ends, and then it saves a copy of it (on another hard disk, NOT the one you're trying to check the empty space of).

Here is a guide on how to use it.



If you think this software is useful, you should donate, since the author relies on donations for the program's development.

Hope this post was useful for you! Have a nice day.

2016-05-15

Computer prices


I wanted to buy a laptop, and since a laptop is priced relatively high compared to my salary, I have written a scraper for laptops on a Romanian website's seller: http://www.cel.ro/

I got the data for laptops once in February this year: each laptop's CPU model, GPU model, amount of RAM, HDD space, and SSD space.

I then looked up the CPU and GPU models on the wonderful sites, to get their performance scores:
https://www.cpubenchmark.net/cpu_list.php
http://www.videocardbenchmark.net/gpu_list.php

I then manually looked around and saw prices of (cheapest) components per performance. I got the following:
  • CPU: ~0.15 RON / performance unit
  • GPU: ~0.16 RON / performance unit
  • HDD: ~0.18 RON / GB
  • SSD: ~1.4 RON / GB
  • RAM: ~16 RON / GB
Then, I computed the theoretical value of the components of each computer by adding up these estimated costs of each component.

What insights did I get?
  1. People pay up to 44% more, comparing the most expensive with the cheapest brand.
    Manually checking a few, it seems Dell laptops have more warranty: 36 months instead of 24, typical of Asus. This translates to 50% increase in warranty, for just 44% increase in price. But after 3 years, you might consider a laptop quite outdated (see point 4).
    Here are some ratios (higher means more of the price goes to component performance):
    1. Asus: 36.3% (cheapest performance)
    2. Acer: 36.1%
    3. Lenovo: 33%
    4. Toshiba: 31.1%
    5. HP: 27.4%
    6. Dell: 25.2% (most expensive performance)
  2. Still, there's enormous in-brand variation. At time of writing, the cheapest computer (an Asus) has a ratio of 62.4%, and the most expensive computer (a Lenovo) has only 12.3% of its price going to component performance. As you can see, writing a scraper pays off.
  3. High-end laptops are more expensive, about exponentially.
  4. Between Feb 16th and May 15th, the performance per RON increased by 10.26456%, which translates to an annual deflation of 49.33%!
    This means that if you save money for one year, you'll be able to buy 49.33% more computing power.
    It also means that if you buy some computing power now, it will only be worth 67% one year later.
    It also means the difference in value between the 2yr and 3yr warranties is about 14.8% of the original price due to deflation, which is significantly less than what you pay for keeping the laptop alive that year (44% more).
I also scraped the price of desktop computers, but only today, so I don't have inflation data for those. However, I can compare their costs: buying a desktop gives you, on average, 24% benefit, which is slightly less than I expected. Here's the chart:
 

So, there you have it! If you want to use my scraper for buying a laptop yourself, it's available on GitHub. The code is not very pretty, but it contains instructions about running it.

EDIT: I later found out about the Import.IO service, which lets you click your way through creating a scraper! Check it out, I recommend it instead of my scraper (which is now obsolete, since the site changed anyway).