Operating systems compare

Five tips for restoring an unbootable hard drive

When you're dealing with a system that won't boot, you need to fall back on some diagnostic skills and recovery strategies. Jack Wallen shares his field-tested approach.

Have you ever tried to restart a machine only to find it won't boot? For whatever reason, you get a warning message informing you that disaster might well have struck... and you're staring in the face of what could be a very bad day. Well, don't panic yet. There are a few tricks you can try that may get that machine booted. All is not lost until you know, with 100 percent certainty, that the drive will not boot -- and even then, you can possibly recover your data. Here are some tips that can help you to get that drive booted and your machine recovered.

1: Boot from a restore disk

With many operating systems, restore disks can be created and used to deal with such disasters. The problem with this usually arises because the user hasn't made a restore disk. I always tell users that one of the first things they should do when they get a new computer or install a fresh operating system is create a restore disk and then put it somewhere safe. That disk can really save your hide -- especially in cases such as an unbootable drive. Now, every operating system approaches the restore disk differently. For example, some Linux distributions, such as Ubuntu 11.04, let you use the Live disk as a restore disk. So even if you didn't create a restore disk, you can just download the same release that's installed on the machine and use that as your restore.

2: Use the install disk

If you didn't create a recovery disk in Windows, but you have the full installation disk, you'll be okay. Those disks include recovery tools that can be accessed by pressing R at the Welcome To Setup screen. The tools let you fix boot problems, restore the hard drive from image, diagnose memory, and perform system restore. Note: The system restore typically can work only if the system restore partition is intact.

3: Get to know BartPE

There are tools... and then there is BartPE. BartPE is a huge challenge to build. But once you have it, you have a serious tool for fixing serious problems. Bart PE creates a complete, preinstalled Win32 environment on your hard drive that allows you to use many of the tools available for repair. You to run check disk on your drive, which could easily solve your problem.

4: Rebuild the MBR

In many instances, the problem is a corrupt master boot record (MBR). If that's the case, the MBR needs to be rebuilt. This process will vary, depending upon the operating system you use. With Windows 7, the necessary tool is Bootrec.exe, which can be found in the Windows Recovery Environment. If the operating system uses Grub 2 and the boot loader was lost after a Windows installation (with the intent to dual-boot), there is a tool called Grub4dos, which can certainly be a lifesaver. If no Windows environment is on the machine, grab that Live CD and you'll have all the tools you need to rebuild your Grub boot loader. The specific tool you want is grub-install, and to rebuild the grub menu, update-grub.

5: Remove the drive

If all else fails, pull out the drive from the machine, attach it to a machine known to run, and see if the drive can be seen at all. It is possible that the reason the drive will not boot is due to physical damage. If the drive can be seen but not accessed, most likely the partition table has gone corrupt. But if the drive can't even be seen, especially using a Linux machine to view it, the drive might well be physically damaged. If the drive can be seen and accessed, the problem is probably the MBR. I would highly recommend that at this point, you copy your data over to another drive -- just in case.

What has saved you?

There are plenty of ways to recover that unbootable drive, but the techniques above have always brought me the most luck. What about you? If you've found a more reliable or efficient way to recover a drive that refuses to boot, share it with your fellow TechRepublic readers.

Additional resources

About

Jack Wallen is an award-winning writer for TechRepublic and Linux.com. He’s an avid promoter of open source and the voice of The Android Expert. For more news about Jack Wallen, visit his website getjackd.net.

54 comments
tlsystems
tlsystems

I have gotten bad drives to work a couple of different ways. Both were older drive with "stiction" problems, which I don't believe is too much of a problem anymore. On one drive all it took was a good whack with the handle of a screwdriver. The second drive I actually took the cover off and freed up the heads. In both cases I was able to get the drive to work long enough to either get a drive image or recover the data I needed. Needless to say, both drives were toast, but I did use the second drive as a mirror in my office.

Tink!
Tink!

Restore disks were ever a necessity in the older versions of Windows. I have done the whole "yank the bad drive and attach to working drive" thing when my daughter's HD was about to die. Saved the data - yay!

Awahili Guni
Awahili Guni

There is one option is running in Administrator mode if you are able; is running sfc/scannow under command prompt in Windows System Repair Oprtions. It works. In regards to BIOS - there are several alternatives in this work-around via the back-door mode; but there carries a risk there ... especially if it wasn't a User issue and it was based on a Trojan, Virus, et al - one would need to can the problem first or otherwise it will just carry over to wherever you just managed to get back on. That is an issue. I would strongly recommend to download the Malwarebytes (making sure the program is mbam-setup(dot)exe) as they have mirror sites which can lead to confusions. (www.filehippo.com is the best source to direct you to the RIGHT one sans the mirrored sites FYI.) It is true there have been cases and issues where all in all, have result complete failure no matter how one painted that canvas; it ended up resulting a complete mess. If this were the case; stop to think - how or what happened just before it all began in the first place? If you can recollect, then you may very well can work that one out using the Windows Recovery Command Options and work via the command prompts (to each OS, it all varies - Linux, Unix, Win, Servers, et al) is the keypoint here. The whole aspect here which I like to do is run a diagnostic check in BIOS and reading it for a lot of info there - in some cases it will repair and in others it won't which would leave it to you but at least it may or may not give you the "heads up" on exactly why the OS is not booting up from anything (Disc / Disk to Network). NOTE: This includes all failures from back-ups including EXHDD too, not just flash (pockets), floppies, et al ... Just some of my humble thoughts and ideas here...

bobp
bobp

I can't count the number of times a Linux boot disk has allowed me to fix or adjust something than Windows wouldn't give me access to. These include resetting the boot.ini delay from a few seconds or less to a reasonable amount of time to choose safe boot, to getting access to - and deleting - some malware file that a Windows utility could find, but not delete. Sometimes Linux can read files on a disk that is too trashed for even a Windows boot CD like Hirens or UBCD to read. Of course Linux allows backing up the contents of disk with a damaged Windows system - without omitting or hiding any files.

dav532000
dav532000

I keep all my files on a portable HDD, as it is not used anywere as much as a internal HDD, then you should be fine for quite a while.But I also like UBCD.

petremure
petremure

Another benefit of Bootit NG: when all is lost and reformat/reinstall is the only way, I use it to make first an image of the system partition, to extract later those inevitably "important" files that were on the Desktop or My Documents at the time disaster struck.

itsfixed_sydney
itsfixed_sydney

Has anybody out there had much success with this? I had a guy come out for computer repairs and he swore by it. I've never used it and it looked really old...

jgking
jgking

I have had great success restoring MBRs (as well as fussing with partitions) using BootIT in stand alone mode. The beauty of this powerful and elegant tool is that on a bootable Linux (or DOS) CD or DVD one can access SCSI and SATA drives as well as IDE/ATA drives. I've even had success making a mirrored SCSI drive bootable. Recently I used it to make bootable a new disk on which I had restored a system image. For me it's an inexpensive but indispensable tool

cwarner7_11
cwarner7_11

I have, on several occasions, salvaged unbootable discs simply by booting from a LiveCD (typically any Ubuntu flavor, although I have on occasion used other distros), copied the critical data from the damaged hard drive, then reformated the drive and reloaded the operating system of choice. I have also been able to use this technique to remove some viruses, although that can be a bit more involved than just simply reformating and reloading the operating system. I do not remember a single case when I was called upon to rescue a physically failed disc- that is, one that I could not read from a Linux system...

phregs
phregs

I tend to follow Brainstorm's process, Testdisk is an absolute gem to have on hand and of course also ddrescure/gddrescue. You can download it from http://www.cgsecurity.org/wiki/TestDisk, One thing of note to Windows users, Testdisk is available for Windows as well as Linux so if you prefer a Windows version then by all means go for it.

Gisabun
Gisabun

Aside from Ultimate Boot CD there is also Hiren's Boot CD. For this with TechNet Plus [and MSDN?] and software assurrance subscriptions from Microsoft, there is also MDOP [recently updated BTW].. MOst of these [and above] assumes there isn't any physical damage [i.e. tick of death, etc.]

Alzie
Alzie

I've used Puppy a few times, boot to CD and been able to access the offending drive that way. Network is available, but I usually just save all needed files to a usb thumb drive.

g01d4
g01d4

Has worked more than once when the (XP) drive wouldn't boot. When recovery didn't work an IT coworker told me to simply reinstall over the non booting installation. I was pleasantly surprised that not only did it work (at least twice) but all the installed programs still ran perfectly.

globaljohn
globaljohn

I have placed the un-bootable drive out in the Texas summer sun for about 30 minutes. Then returning inside, re-installing into offending laptop, and it would then boot again.

TyDavis22
TyDavis22

A friend of mine uses a usb tool that attaches to the drive serial or sata and can see if the drive is working or not, I also like using UBCD and when all else fails call the vendor for restore discs.

Ninja1507
Ninja1507

5 is the one that saves me the most when working with other people's computers. That's why an external hard drive and a Fedora 15 Live disk became part of my basic tool kit. It lets me save their user related stuff (usually with the exception of settings) and save it over so I can just wipe and reinstall.

Andrew Happ
Andrew Happ

I have succeeded in bringing back to life a drive that presented as totally dead. I was fortunate enough to have an identical drive (right down to revision no). I transferred the controller board from the good drive to the suspect drive and it came back. But beware that you might fry the good controller in this process. Obviously this approach is only relevant if the controller has failed, which is probably quite rare.

l_e_cox
l_e_cox

I have seen so many hard disks go down and never come back! If the disk still runs, making it a secondary drive in a working (but not critically important) system has sometimes worked for me to recover data. But this became less workable as more people in the office switched to NTFS computers. I did not know many people who suffered a disk failure and walked away with a clean and up-to-date copy of all their data. So on my system I back up the data that's most important to me using synch software so the backed up files all appear in a single matching file system. Even if the OS is just slightly corrupted, inability to boot usually means the disk is close to the end of its lifetime. So if you can get back in with any of the above techniques consider yourself lucky.

jakes_51
jakes_51

I'm a bit surprised there's no mention of the UBCD. I had to use Ultimate Boot CD for Win very recently. Still in the process of copying old files over. In my situation I wasn't able to restore everything the way it was, but it was still a great help. It has a lot of good tools rolled up into one disc to burn. Pretty much a lifesaver depending on the situation. Based on the BartPE.

Brainstorms
Brainstorms

Jack, I'm surprised that you didn't mention 'testdisk' in item 5... I've had partition tables become corrupted, get accidentally deleted, etc. and 'testdisk' has been able to reconstruct them. It's a valuable tool, and is available in the Ubuntu repositories (and probably those of most other Linix distros). If you have a (suspected) bad disk, I suggest either adding a known good drive to the system alongside the bad disk, or move the disk to a system with a known good drive. Then either boot Linux or boot a Linux Live CD on the system. Install 'testdisk', 'ddrescue', and/or 'gddrescue', which will allow you to recover partitions and perform wholesale data recovery by copying from the bad disk to a good disk. ('ddrescue' does things like automating re-tries to recover what's recoverable.) Of course, one should never try to recover data in-place by writing to a suspected bad disk -- attempt only to read the data from it, and write to a known good drive for further recovery efforts. If there's a chance you may not have internet connectivity when you need to perform recovery, then download these additional Linux packages to a recovery thumb drive and keep that with your Live CD. After booting the Live CD, you can install them (along with 'mdadm', 'lvm2', other HDD drivers, etc.) even if you have no network. Then there's my favorite protection against disks corrupting and dying: RAID-1 arrays. It's trivially easy to recover an unbootable drive when you have a clone of the drive in the same case. I've had disks go belly-up in a running system that caused me no more hassle than a trip to the store to buy a new drive to swap out for the defective one. After installation and a quick partitioning, the RAID array heals itself in the background while system continues to run normally -- no need to fuss with rolling in a backup. (And yes, you still need to keep backups...) Disks are cheap, most systems have provision for multiple hard drives, Linux can implement RAID remarkably easily. Just don't waste your time and money trying to build RAID-5 arrays. RAID-5 is an obsolete solution (for expensive hard drives; they don't exist any longer!) -- and with the same MBR installed on each disk, a RAID-1 array can boot from any disk in the array.

a.portman
a.portman

The easiest is to get a USB enclosure and attach it to a working computer. But, I love BartPE. I have copies on both USB and CDs. The one thing is you may have very few chances of saving the data so have everything you need before you start. A USB drive to copy to, your BartPE CD and knowing what you want to save. Copy what you need and then throw out the hard drive.

agilebrainz
agilebrainz

Boot to Knoppix run off a CD, copy needed files to external drive. Its been a long time since the freezer trick worked for me.

Charles Bundy
Charles Bundy

I've seen users disable the hard drive in BIOS with the resultant no boot media found... Also seen boot order craziness that masquerades as a locked up, non-booting system. I don't question why they were in the BIOS, just noting I've seen it! :)

SElizDav
SElizDav

I have used Ultimate Boot CD for Windows to diagnose and move data from unbootable hard drives. Sadly they have not developed a Windows 7 caopatible version as yet :(

david
david

If it won't boot but doesn't have the click.click,click of loose heads try SPINRITE from grc.com. It recovers and remaps all recoverable data from bad sectors and remaps them. It's also worth running in maintenance mode if you have really strange errors or need to be sure your disk is OK.

DOSlover
DOSlover

I have configured a bootable DOS CD with a host of rather nice and powerful disk tools. Sadly the move to SATA drives is making it less functional as the drivers for SATA are not exactly being written for DOS. Otherwise Linux live CDs are an absolute God send, Knoppix being a very useful distribution.

tomuky2k
tomuky2k

In the past when a hard drive has failed, I have wrapped it in a few very very well sealed freezer bags and stuck it in the freezer for 4 or so hours. Removed the drive from the freezer and connected it to another working pc to give me a few minutes of vital time to move data from the drive. I have then repeated this step a few times to get all the information required. Didn't think it would work when I tried it, but it did and saved some family photos.

miphix
miphix

@Awahili Guni I have obtained an issue with virus's. The virus or hacker had eliminated not only my hard drive from the boot sequence and it's visibility. But, also my DVDROM from boot sequence and visibility. Give me a google search to begin my quest humble sir.

t.rohner
t.rohner

This worked for (me) a customer back in the days of Novell 3.12 on a "striped" drive.(something like Raid0) He should have backed it up on a tape on a Macintosh, but the backup seemed to have failed for 6 months or so. (The Mac side wasn't my part...) He had some really vital data on those drives. I checked with Ontrack and their projection was in the 20k$ region... I ordered another one of the SCSI drives, which were already a little outdated, but my supplier still had one of them. It worked to get all the data off the two drives and i copied it on two new (single) drives for security reasons. Alltough i thought this "striping" was a nice method to enlarge storage space, i never used it anymore. I bought hardware Raid controllers from then on... Spinrite is also a must-have in the toolbox, it helped me many times.

PassingWind
PassingWind

With a multi-purchase policy for my mid-size network of token ring :-( user machines, I too had working identical drives after a lightning episode, along with a load of more predictable damage, took out some disk controller boards. I had the advantage of knowing how the disks had been damaged, and that the mechanics and magnetics were probably OK - so replaced all of the (only) affected model, using the good boards to liberate the data from the dead ones.

stainlessiron
stainlessiron

How does one determine which HDD in RAID-1 is defective, and needs replacing?

Shadeburst
Shadeburst

a.portman You can toss a modern drive but with a Seagate ST4096 80Mb drive weighing a couple of kilograms you had to be careful where you threw it!!! For years I used one as a doorstop.

TheShawnThomas
TheShawnThomas

freezer trick used to work 2 out of 3 times but lately I would say it is more like 1 out of 5. I'm guessing changes to newer drives changed the way the heads were warping. Le sigh...

kenmo151
kenmo151

I password the bios on all machines I build/repair - A enduser has no business in the bios ! So far I haven't had any complaints ?

Gisabun
Gisabun

Whicxh is why in a corporate envirionment you protect the BIOS. In any environment [corporate or not] you remove the opening splash screen [optionally protect the BIOS].

TheShawnThomas
TheShawnThomas

SpinRite is real good at doing what it does but sometimes it under thinks and remaps so many sectors that it takes up all the available remaps and then SMART considers the drive dead giving you one more thing to combat.

leo8888
leo8888

Not too long ago I had to attempt to salvage data from a failing drive for a client who had no recent backups (that's a whole other story). I have used the freezer method in the past with good success on some drives. This time I couldn't keep the drive cold for long enough to make a backup image of it. I put it back in the freezer but this time inside a watertight plastic bag leaving the connection end exposed at the top. Then placed that inside a small container and filled it with water. After it froze into a solid block of ice I was able to squeeze enough time out of it to complete the image.

CharlieSpencer
CharlieSpencer

One important note to the freezer method. Be sure to include a couple of those desiccant pouches in the bag with the drive. These will absorb any moisture that may condense as the temperature drops, and keep that moisture from freezing inside the drive!

TheShawnThomas
TheShawnThomas

While the freezer trick can be useful, I want to point out to those not fully in the know, that it is for getting around minor physical damage (warping from age, overheating, etc) so it should be used after step 5 above does not work. As well, if your data is so important that you would be willing to take it to a professional recovery service and spend $700+ then you may not want to do the freezer trick as it could damage your data further. But if you don't have the money (like me) then it can be a good last ditch effort!

bob
bob

I've got an addendum to this method. We'd always used this one in the past to great success but we had one stubborn drive that still wouldn't work and I came up with an additional idea. When the drive comes out of the freezer leave it in the freezer bag, only opening the end enough to hook up the cables from the computer. Then take a small ice pack - one of the gel type so there's no water risk - and set it on top of the drive. It will help the drive maintain that freezer temperature and give you more time to copy the files.

Brainstorms
Brainstorms

If you suspect you have a problem, you can run 'cat /proc/mdstat' in a terminal at any time; it will give you a list of all your arrays, their disks, and their status. A bad disk will cause it to show a RAID-1 array as having only one active disk (or show as having one fewer if you have more than one extra 'mirror' drive). There's a better method than ad hoc status checks, however! 'mdadm' can email failure notices. I install 'ssmtp', which is a very lightweight mail server that takes the place of 'sendmail' or 'postfix'. It's drop-dead easy to configure, and it can send mail to my Gmail account directly via Google's SMTP server. Then, if/when there's a problem with any of the RAID-1 arrays in the system, I get an email (causing my smartphone to beep at me; I have Gmail on Android) telling me which system, which array, which disk is bad. (There's also a test mode for 'mdadm' to test-fire an email to you to verify that everything's working end-to-end.) The other thing I do is configure my systems to allow them to boot up even if any of the RAID-1 arrays is missing a disk (for example, after a power outage that exceeds my UPS battery time; they're configured to reboot when power is restored). I want to the servers to boot regardless, and send me an email so that I know; I then get a replacement disk when I can and minimize overall down-time.

j.wesley
j.wesley

also had huge, rare-earth magnets in them. It was difficult to remove the magnets without breaking them but if you got a whole one out, you had a scary strong magnet about the size of a domino. I imagine current drives have little teeny tiny magnets that aren't worth the effort.

SKDTech
SKDTech

Never know when you may need to crush some zombie skulls.

loosedrag
loosedrag

As I understand it from the very non-IT guy who first told me to try it (and it worked), the reason it works is: the spindle begins to wear out after while and the platter no longer spins within tolerance range. Freezing hardens the small bit of lubricant in the spindle which can keep the platter spinning straight on its axis for a little while, at least until spinning rewarms the lubricant and it begins to get sloppy again. Makes sense to me. But it didn't work on my latest crash either.

J-R-Doe
J-R-Doe

Do you think that unilaterally passwording the bios on machines that you build/repair brings you back business ?? or makes happy customers ?? or ....??

PassingWind
PassingWind

... make a note of the key sequence to get back in!

SKDTech
SKDTech

That is the first I have ever heard of that happening. I suspect any drive defective enough to cause SpinRite to do that would be trouble no matter what tools or tricks you used to attempt recovery. I have recovered several drives using SpinRite and so far it has never failed me excepting drives which are physically defective. No software is going to help if the motors or heads are the problem.

bboyd
bboyd

may do more harm than good, you can micro wave them back to usable if the are gypsum (generally whitish media), If they are glass bead type they should have a color change agent on them to indicate moisture retention, blue is generally good, red is bad. In a pinch microwave a pouch of gypsum powder, say wall board (drywall), and make sure none gets in the drive vent ports. A note I'd add to your comments Palmetto, dessication before cooling, in sealed pouches.

boomchuck1
boomchuck1

I used this successfully on a drive once, but sandwiched it between the 2 gel bags and got it to stay alive for an hour or so. Was able to get everything off of it that way. How bizarre, especially since the real old drives, like back to MFM, had warnings about using them at real low temperatures.

jred
jred

Than setting up the PC next to the freezer & running cables out the door, which I've tried. Actually, now that I think about it, I wonder if the magnetic door strips closing on the cable affected the data transfer...

leo8888
leo8888

My filing cabinet at work and fridge at home are covered with magnets I removed from dead drives over the years. It's amazing how strong those little suckers are!

kenmo151
kenmo151

Funniest thing I ever heard !