Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Channels ▼
RSS

Embedded Systems

Drive Salvage


Ed is an EE, a PE, and author in Poughkeepssie, NY. Contact him at [email protected] with "Dr Dobb's" in the subject to avoid spam filters.


One of my professors observed that EEs, regardless of whether they specialize in microcircuits or power generation, inevitably have relatives who ask them to fix televisions, so we might as well get some practical knowledge to show we hadn't wasted the last four years. He then devoted a spring-semester week to explaining how to diagnose and fix typical TV problems, a pleasant change from the usual theoretical rigor.

With that lesson in mind, here are some handy hard-drive rescue techniques. I'll start with a motivational tale, show how to impress your friends, then demonstrate why this is more relevant to embedded systems work than you might think.

Simple Recovery

Although I run SuSE Linux on my desktop systems, I still maintain two Windows boxes. One, a triple-boot desktop, normally runs a Debian-based distro with the RTAI real-time kernel for my CNC milling machine. During tax season, it boots Windows XP for TurboTax and streams Internet radio into my basement shop with SuSE Linux.

One day, the CNC controller didn't start up correctly. Linux records nearly every event somewhere and it seemed several sectors had gone bad on that ancient 40-GB drive. Yes, three operating systems can fit in 40 GB.

A separate file server provides NFS and SAMBA shares for all our data files, so the desktop boxes don't store any vital data and all systems have access to the same files. Backup is fairly simple, with not much to save beyond /etc and /home. Reinstalling Windows and its programs, though, remains a chore.

Rather than fiddle with the details, I simply store image copies of the disk partitions on the file server and update them every now and then. Restoring a drive requires nothing more than recreating the partitions and copying the images. Although there are many Windows hard-drive utilities available, the Linux alternatives provide fine-grained control, plus they're both free as in beer and free as in speech.

Many of the instructions for full-drive restoration assume you'll restore the image to an identical drive, but that's applicable only when you buy drives in bulk. The last time I checked, no two drives in my heap were identical. I swapped in a slightly newer 80-GB drive and started the restoration process by booting SystemRescueCd.


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.