Hard Drive troubles and tips

A friend of mine came to me with the following issue. Her computer was slow and they took it to PC World.  All the technicians did was to reinstall Windows from the Recovery partition. No change in performance… Then my friend realised she was missing some important documents!… I told her to stop using it immediately and bring the machine to me.

The way hard drives work is as follows:

  • Whenever a file is saved, it is written on the hard drive, sometimes in multiple places (fragmentation). The file name, the folder name and the real location(s) of the file on the hard drive are writen in a ledger, which in windows is called MFT, or Master File Table (https://msdn.microsoft.com/en-us/library/windows/desktop/aa365230(v=vs.85).aspx).
  • Whenever a file gets deleted, its entry in the MFT is deleted, but the file still lives on the hard drive, until the operating system decides to save something over it.
  • Whenever a drive gets formated, the MFT gets deleted and replaced with a brand new ledger.
  • So, files can be rescued even when we think they are lost. Even files from websites we browsed or programs we installed and deleted stay on our hard drive for years. This is why forensic experts can recover data from hard drives even when internet history is cleared, even when the hard drive has been formatted. That’s why it’s not a good idea to sell your old laptop, if your hard drive contained sensitive info at some point of its life!

Here is what I did to save the files:

  • I removed the hard drive and used a USB HDD docking station to connect it to my Windows machine. I have an Inateck USB 3.0 station, highly recommended!
  • I then used PhotoRec (http://www.cgsecurity.org/wiki/PhotoRec)  to find all deleted files. PhotoRec is a fantastic piece of open source software from  Christophe Grenier, which  basically goes through the entire drive, literally bit by bit, it identifies files that can be rescued and saves them in a different location. PhotoRec works on all operating systems; I installed it on my Windows 10 machine. I used a separate external USB3 drive to save all these files.
  • This process took almost 10 hours to transfer 500K files from the original 1TB 2.5mm Samsung drive to the external drive. The files all appeared with code filenames, as the original names were lost with the original MFT.  Their file extensions were (mostly) in tact. The files were saved in folders that did not necessarily match the original folders where these files reside.
  • I passed the hard drive to  friend and suggested that she buys  Directory Lister Pro to help her go through all 500k files quickly.

And to speed up the computer:

  • I added 8GB of RAM, so now the machine has 12GB in total.
  • I upgraded the laptop from Windows8 to Windows10. Apparently the PC World technician thought it wass good enough to keep the machine on Windows 8 and he didn’t even install all the upgrades, not even the security ones…
  • I also suggested upgrading the HDD to an SSD, but the cost/size compromise was an issue.

So, the morals of the story:

  • Back up your files frequently and spend time to efficiently organise your precious files!
  • When you think you have deleted a file, think again! It’s probably still there!
  • If your computer is slow, your quick wins are RAM and SSD upgrades. Most old laptops and desktops can get a good performance boost for $50-200.
  • There are some great Open Source packages to help you save files. No ral need to invest nto the expensive prorietary solutions.

If you really want to destroy a hard drive, just take a screadriver and take the hard drive apart! 🙂

Wireless bell

We have a Friedland wireless bell. It’s the one of the Libra+ series.

It’s a great bell (D913), but the battery life on the doorbell (D930) is poor. The push button uses a CR2032 coin battery, which provides 3V, but it only lasts for a month. Changing battery every month is far from ideal and we have missed a few deliveries because of this.

Ideally, I would prefer to connect push button to a mains transformer but this is not an option. There is still a box behind our front door that used to contain an old mechanism with batteries. I decided to move the mechanism of the push button indoors, add bigger capacity AA batteries and add a cheap wired button outside.

The D913 push button is easy to dissasemble. At the bottom right corner of the board, a section with 5 pins is exposed. With a bit of help from a voltmeter, I found the following info about the pins.

To ring the bell, all we need to do is to short pins 2 and 4.


I added the header and moved the board in the modified old enclosure.

The only real cost is the new £2 wired push bell.

I hope these batteries give us at least a year of power before we have to change them! In terms of MAh, I think I’m in the right ballpark!

The D930 chime allows multiple pushbells to be used and it can respond with different sounds. This means that one could potentially use an additional Libra+ pushbell with an arduino or raspberry pi to alert the user when an event has occured. 

Quick note on the differences between the Libra and the Libra+: Libra operates on a different frequency (433MHz) from Libra+ (868MHz) and it uses dip switches to select a channel. Libra+ syncs by setting the chime to “listening mode” and pressing the push button.

Broken IKEA Expedit case fixed

I was given an old IKEA Expedit case, flat packed, that was missing screws and dowels. One of the edges was broken, while the piece was being dismantled.  

I thought I could use it as storage/temp work bench until I had the time to build something more permanent.

Fixing the broken piece was easy. Nothing a bit of glue could not mend. As this was going to stay in my workshop, I didn’t try to make it nice in any way.

Putting it together was also easy. I glued some of the dowels in place and found some IKEA screws that fit it perfectly, so I was up and running with minimal effort.

Reusing furniture makes sense. In general IKEA pieces don’t age well. Before throwing it away it makes sense to consider reusing it in a different room/function. If you have to throw it away, it’s always a good idea to salvage screws and other IKEA parts, for future projects. 


No Hacking?! Why not?

While on a business trip in Virginia, I saw this number plate:


I accept Richard Stallman’s definition ofhacking: “Playfully doing something difficult, whether useful or not, that is hacking.”

With this in mind, I’d ask the owner of this car: “why not?”

Web server on demmand

import sys, BaseHTTPServer
from SimpleHTTPServer import SimpleHTTPRequestHandler
protocol = "HTTP/1.0"
host = ""
port = 8888
server_address = (host, port)
HandlerClass.protocol_version = protocol
httpd = ServerClass(server_address, HandlerClass)
sa = httpd.socket.getsockname()
print "Serving HTTP on", sa[0], "port", sa[1], "..."

The above example serves all pages/files in the current directory, as long as the host:port combination is accessible.

Great if you want to quickly test javascript or send a document to your iphone!

Meet ESP-8266

And when we thought things couldn’t get smaller… Here is an amazing little board with plenty of i/o, wifi, micro-usb and on board antenna.

Almost same size as an SD card and can be programmed with the Arduino IDE we all know and love.


There is one thing this board needs. A new name. ESP-8266?! Come on!

LadyAda has a better name for it: Huzzah!