Hacker News new | past | comments | ask | show | jobs | submit login
Recover HD Using a Magnet (unipi.it)
270 points by lrizzo on Jan 2, 2020 | hide | past | favorite | 85 comments



My anecdote:

Around 1993 I had a Commodore Amiga with an A590 external hard drive. A big enclosure that could be connected to the expansion port on the left of an Amiga 500, containing a very precious 20MB hard disk.

One day, it stopped working. I tried everything but I couldn’t get it to work. A friend offered to take a look at it so I put it in my backpack and took the train to my friend. When connected to his A500, the drive worked lime a charm.

When I drove back home in the train I wondered what would be the matter with my A500 since it apparently made my A590 hard drive fail.

However, once I got home and reconnected the drive, it worked. No problem whatsoever.

Until two days later. It failed. You know what’s going to happen, right? Took it to my friend, it worked, took it back and it worked for two more days.

Turns out that disconnecting it, putting it in my bag, walking it around for a while worked just as well.

Turns out that disconnecting it, dropping it from 5cm / 2 inches and reconnecting it, worked just as well.

Which was what I did for the next four years or so. Whenever it stopped working, I disconnected it, dropped it and reconnected it.

Always loved the look on the face of people who witnessed me starting up my Amiga.


FWIW the failure mode (which was also common in drives for the SPARCStation at the time) was called "stiction." That occurred when the drive parked the heads, after power down, into the landing zone on the platter.

At Sun we took apart a number of failed drives (which could also be recovered sometimes by giving them a sharp twist) and hunted for the root cause. The answer was that over some time the drive heads became smoother and the surface of the landing zone also became smoother. When the tiny edges of the head had been removed by this process, the surface of the head was pretty much optically smooth (very little variation) and when it landed in a part of the landing zone that was similarly smooth the surfaces would push out the air between them and become stuck just by air pressure and surface friction (stiction). The drive would not spin up until the head had lifted off the surface. The firmware issue was that head lift off was checked for so quickly that the power up of the spindle was aborted before anything happened (this was to prevent damage to the head by dragging it along the platter's landing zone). By jostling the drive you could manually cause the platters to rotate and if you found a spot that wasn't completely smooth (or if you managed to have the heads move out of the landing zone) the surface would be rough enough that the head wasn't being held down and it could lift off again.

Seagate gave us a firmware fix which basically waited longer for the heads to lift off allowing the spindle motor to move the platter a bit before giving up. Quantum (the other disk supplier) beefed up the retract solenoid and gave us firmware that would try 'regular' retract and then 'heavy' retract before giving up. For a pretty long time I had a Seagate drive that had been disassembled to the point of exposing the heads and platters so that the effect could be demonstrated to skeptical engineers.


An IBM tech told me how they sometimes resuscitated drives that wouldn't come up after power cycling. They would spin the drive on the floor for a few seconds and then quickly hooked it back up before the platters stopped moving.


see also: gage block wringing


Enjoyed your story, thank you!


Might as well share mine: one day the magic smoke[0] left a lot of components on my PC, including the HD with no backups. I saw the board was replacable, so that's what I did: bought an identical disk on eBay, some torx screwdrivers, transplated the good board to the dead disk, and it worked perfectly fine.

[0] http://www.catb.org/jargon/html/M/magic-smoke.html


I've heard tell that some data recovery companies have a stable of the controller cards from popular drive models. If swapping the card works, you get your data cheap. Beyond that it gets spendy.


Only for the record until soome 15 years ago, exchanging boards was easy, later disk PCB's contrain some "adaptive" data into a (soldered) EPROM (or Flash/whatever, anyway a memory chip), so now you have to de-solder the chip from the old board and re-solfer it on the new one.

There are dedicated hardwares+softwares (as an example the "PC-3000") that are capable of re-programming the chip on the new board with data extracted from the chip on the old board or to re-program them anew, but they are very pricey and only data recovery companies can afford them and the connected training/resources.

So:

1) simple card swapping won't work on any disk manufactured since (roughly) 2005 (possibly even earlier)

2) card swapping can still be made BUT you need to "migrate" the chip from the old board, it is usually an 8-pin SMD so it is doable at home, but not exactly easy-peasy if you are not familiar and experienced in dde-soldering and soldering


Nearly all drive failures today are either control electronics or bearings.

Control electronics can be replaced. Bearings can be overcome with a higher motor drive current.

Some drives have crypto keys stored in flash - those are harder to fix.


You were lucky that it was only the magic smoke that escaped, and not the pixie dust on the platters.

https://www.google.com/search?q=hard+drive+pixie+dust


The manual (or some kind of leaflet with it) of the MFM 10 megabyte drive of an IBM XT even mentioned, that the drive could seize up if the bolts were too tightly or unevenly tightened. Sure enough, I had to adjust them one fine day.


"sticktion" was an issue with some early Mac drives.


In 1989, I did an internship with Imprimis, which was later sold to Seagate.

I worked in the Manufacturing Engineering group, and specifically with the Engineers behind the “Wren” line of hard drives. IIRC, up to the Wren V, they had problems with the lubricant sometimes overheating and leaking out of the spindle onto the platters. When the hard drive spun down, the heads would be glued to the media by the lubricant, thus resulting in stiction.

They developed a “thermalwriter“ test process for the drives to put them through heat conditions way beyond what they might experience in the field, and then developed lubricants that could withstand the heat. They were very proud of this process. But there were still lots of old drives out there.

One of the things the clean room would sometimes do is take hard drives from important clients and try to recover them. I saw a lot of nasty failures, many of which were a result of inappropriate techniques being applied to try to temporarily free the heads.

There was a lot of FUD at the time on what would later be called “The Internet”, so one of my first contributions to the community was to take the knowledge of the engineers at the company and developed a FAQ that I posted to the various USENET newsgroups, on the right — and wrong — ways to try to address this issue in the field.

Sometimes I wonder if that FAQ ever survived.


This reminds me of my first pc, an Amstrad with a whooping 20Mb drive and 5.25 diskette bay. I had so much software on that machine, 20 megabites seemed more than enough at the time. I was a kid at the time and was getting all kinda of shareware games and eventually a virus completely distroyed the harddrive. Some expert did a low level formatting that took overnight and some but to no avail, the virus’s damage couldn’t be undone.

Fun fact: that amstard pc had a pair of AA batteries to keep the cmos powered up and they fit right on top of the box, right where the monitor fit snugly.


I have fixed a ton of drives, in general. Board replacements, swapping platters, head swaps, etc. Some takeaways: I started doing this under tupperware, and that worked. I built a "cleanroom" out of a new sandblasting cabinet, and that worked better. Later i built a laminar flow bench out of a cheap kobalt tool-box and some plexiglass, and that was better still.

Swapping the control boards works on some makes (wd), make certain it is exactly the same model and revision. exactly. "close enough" never worked for me, not even once.

By far just a slight "spin" by hand along the axis of travel of the disk, a quick gentile flicking motion, works to unfreeze the spindles of most stuck drives.

Some drives responded to a gentle heating of the spindle bearing with the hot air.

Use dd_rescue.

"Spinrite" is complete horse-shit, don't listen to anyone saying otherwise.

Most drives people brought in were just corruptions, photorec and it's associated programs (testdisk) are also invaluable..


Do you (or anyone else) have ideas for what to do with

- a MyBook that isn't recognized anymore?

I've figured out there's probably some encryption in the casing because when I disassemble it and connect it directly it shows up as unformatted or something.

- an ssd which seems even more dead.

Personally I've gotten back erased data (photorec) and data from at least 2 other disks (tilting the disk or freezing the disk), but these two have me stumped which is sad since they broke shortly after each other and one were supposed to be the backup ;-)


The drive itself is likely good - it's probably a software/config error with the casing. A drive recovery company will probably be able to recover it cheaply, or third party recovery software on the bare drive.


Ok, thanks!

Would you happen to know why they'd transform the data instead of just writing through?

Oh: and I also added detail about another drive to my question. I didn't think anyone would answer that fast :-)


Normally they shift all your data a few hundred megabytes later in the drive so they can use the area at the start to store their "drivers" (ie. The software they encourage you to install on your PC to offer backups, encryption, cloud storage, antivirus, and other crapware of dubious value). Sometimes the casing firmware emulates a CD-ROM device and offers this data because the OS will autorun software from a CD. Then when the software is installed, it switches to hard disk mode to present your actual data.

The external drives which offer 'encryption' nearly all do it through software on the host PC and sometimes the drives built in encryption (did you know all modern hard drives can encrypt data before writing it to the platters? - nobody uses it because you can't tell if the drive really is encrypting your data or just pretending to).


> Normally they shift all your data a few hundred megabytes later in the drive so they can use the area at the start to store their "drivers"

So, if I'm really lucky I can use testdisk to find the partitions and just mount it read only from there without involving a recovery company?


Yep. As soon as you find the sector number of the start of your data, you can use "losetup --offset xxxxx" to use it like a regular disk again. I think there are even SCSI commands you could send to permanently shift the start of the disk. Or you could just dd all your data back to where it ought to be.


I read a bit more and it seems some models has encryption mode (by default using an empty string for a password it seems.) There exist at least two projects to get data from those MyBooks so I'll try those if the simple version doesn't work.


Have you tried recovering the partition data with testdisk? It may just have lost the formatting. SSD's are generally accepted as impossible to recover, in my experience..


My story:

In 1996 or 97, a friend brought me his Compaq Deskpro, the SCSI HDD had stopped working. No sound at all, dead. Tried everything, checked voltages, reconnected cables trying to clear any oxidation. Wouldn't spin at all. Well, called it a night.

Next day, decided to take it out of the chassis for a last test, connected outside. Not only it spun, it worked fine!!! WTH????

Well, into the chassis it went. Nothing. Dead. Whaa..??? Outside again, it worked. In the chassis, dead. Outside, worked. Scratched my head... With it working outside, just tried to place it on top of the chassis. It spun down and stopped. Took it away, it spun up. Got it close again to the chassis, it spun down again... Scratched my head again... Gave up, left it disconnected outside for the day.

Next day tried it again and this time it worked outside of and in the chassis... My thoughts? The chassis was magnetized or something...

Worked for a couple more years.


Perhaps a defect in a cable or connector such as a broken wire or a dry solder joint? These often cause problems that mysteriously appear or disappear as the cable is moved and the changing forces on the defect make and break the connection.


Nope, I tried everything, twisted the cables, etc. I even changed from power connector to another and changed SCSI cable. Outside it worked, inside didn't. Working perfectly outside, as soon it got close to the metal of the chassis it spun down, and as it got away from the metal it spun up.


Don't use dd -- use ddrescue (reads all "working" sectors before retrying broken ones).


Does this mean it puts less strain on a potentially broken disk in an attempt to maximize how much can be rescued before it fails?


yep; it's quite clever about how it deals with broken sectors too; starts jumping over them in increasingly large amounts, and goes back later (in multi-pass) to get the missing bits.


Yes.

There is also a related technique used for RAID rebuilding - SCT Error Recovery Control [0] (Western Digital's name is Time-Limited Error Recovery). The main idea is to limit the maximum time allowed during a hard drive's attempt to recover from a read/write error. Without such a limitation, when the hard drive encounters a failure, it may try rereading and remapping a bad sector and becomes temporarily unresponsive, making the RAID controller to believe that the entire hard drive has failed, and potentially put more strain on the existing disk in an unnecessary full rebuild.

[0] https://en.wikipedia.org/wiki/Error_recovery_control


Agreed. ddrescue is great, I used it to rescue a disk with bad sectors.


If you Google for the word "sticktion" or "stiction" you'll find other remedies. Like putting it in a ziplock bag and freezing it, or (youch) purposefully dropping it.

All approaches to release a head that's stuck to a platter.


I've fixed this problem a few times (on different drives) by giving the drive a not so gentle thwack with a hammer. The trick is to hit it on the long side, which tends to dislodge the stuck heads/arm. If you hit it on the top or bottom, you're likely to break something, and hits on the short side aren't likely to achieve anything at all.


Many jobs ago we had an outage caused by 2 drive failures in a Raid 5 system, that was resolved by banging the drives on the ground a couple of times before putting them back in.

If I still worked with physical servers I'd be carrying around a rubber mallet to apply "percussive maintenance"


I've used this method after the fridge/freezer method failed. It seems less likely to cause data loss than using a magnet to move the head as in the article.


How did the data not get destroyed by the magnet?


It's changing magnetic fields that wipe HDDs. Such as powerful electromagnets.

In a clean (enough) room, they could have opened the drive, and just poked the actuator arm.

Decades ago, I had a HDD that wouldn't spin up unless I nudged the platter with a pencil erasor. Very near the center, of course. There was a hole in the case, in just the right place, with Al tape over it.


Doesn't even have to be a very clean room... I played around with an old 1 gig drive years ago. My friends and I opened up the case so we could watch the drive doing it's thing. We did a fresh os install and watched as it formatted the disk and copied files. The head was remarkably strong, and would move so fast it looked like it was in 2 places at once while copying files. It was fun to stick a screwdriver between the 2 ghostly write arms, and have the screwdriver almost knocked from your hand, while the drive went on like nothing had happened. It ran for weeks before it died.

I've also stuck a 3 1/4" floppy disk to a huge 2"x2"x5" neodimium magnet with no ill effects. The drive was able to read it fine afterwards with the same md5 hash of the contents.


I'd say it needs to be pretty clean. Back in the day it was a thing to remove the hard-drive cover and replace it with plexiglass. Once densities got to around 100 GB (don't remember the specifics but somewhere around 100 */2) it turned out that noone was successful with even momentarily open the drive chassi without ruining some part of the platter due to dust.


My first HDD has a 540MB drive, I ran DOS. Eventually I upgraded to newer computers, and I opened the old drive, and put in on the wall on display. It stood there for at least a decade, possible 15 years, before I moved to a different country. Before leaving, I decided to connect the old drive to a computer, just for kicks.

Remarkably, I could read data off it. Not much, file i/o mostly ended up in failure, but I could at least see the file structure. I did not expect this.


That's very cool. Maybe I'll try it, just for lulz.

> I've also stuck a 3 1/4" floppy disk to a huge 2"x2"x5" neodimium magnet with no ill effects. The drive was able to read it fine afterwards with the same md5 hash of the contents.

Right.

But thinking of EvanAnderson's anecdote, maybe a permanent magnet near a spinning platter is a changing magnetic field, from the perspective of the platter surface.

Still, with the platter inside a steel case, you'd need a very strong permanent magnet, held very close.


That's pretty cool. I had a few old drives and on purpose took them apart. So far I was not able to duplicate what you were able to do (this was last month). I had an idea that it might work in some way. Glad that you can confirm it did at least when you tried.


If you videoed any of that, I'd love to watch it on youtube (or somewhere).


There are actually very powerful permanent magnets inside of every spinning hard drive already, so clearly there's more to destroying data than just having a magnet nearby.

https://www.kjmagnetics.com/blog.asp?p=hard-drive-destructio... has a writeup about trying and failing to wipe a drive with extremely powerful magnets.


There are degaussing devices that look like microwave ovens, and for all I know, that might be largely how they operate.

But outside of those, no magnet that you can hold in your hand will demagnetize a modern hard drive at any distance outside of the case, because there are magnets inside the case that are stronger than you can hold in your hands, and they’re used to move the head/arm assembly at mind-blowing speeds — and accuracy.

I have some old Imprimis Wren VII hard drive magnets still on my dad’s fridge, from the time when I did an internship there in 1989. I won’t say that you can’t remove them from the fridge, but they are stuck on there extremely well, and there are a number of people who had been injured by having their hand or fingers caught between those magnets and a ferrous metal object — like a fridge.

And that was 1989. The magnets they use now are much stronger.

Now, if you happened to put a hard drive inside an MRI machine, that would do the job. But then you’re also talking about a machine that could suck up a vacuum cleaner from across the room and turn it into a lethal projectile. A proper degausser will be a lot weaker than an MRI machine.


You know what is sad about a small business (kjmagnetics.com) that you linked to? They are exactly what will be killed off by Amazon. The small and knowledgeable specialty store very similar as I am sure many of us remembered happened to 'Stereo Stores' once the big boxes stores came along (or hardware stores). Nothing new about this of course just that with Amazon it's greatly accelerated.


Amazon is 8 years older than K&J Magnetics...but sure


What does that have to do with the point that I am making? Did I make say it started before Amazon?


Yeah, this technique should really only be used if, and only if, you need the drive itself to be fixed and no longer care about the contents of the drive (e.g. if it was in a RAID 1 and manually cleared afterwards).


the whole magnet and hard drives thing is a really old hoax. with normal household magnets or even strong neodym magnets nothing will happen to your data but if you have a really strong industrial electro magnet at hand you can wipe a drive with it...

here is an old national geographics video on the topic https://www.youtube.com/watch?v=U8LWTe5CqQg


Here's my anecdote:

In 2006, while sitting at my desk playing a video on the Travelstar 40GB PATA drive in my Thinkpad T22, I held a single neodymium magnet (harvested from an old hard disk drive) about 6 inches from the left side of the unit (where the ~disk was located). The video froze, Windows XP blue-screened, and the hard disk drive started emitting a ~10Khz whine. I jerked my hand away from the PC immediately when the whine started

BIOS would no longer detect the disk on that machine, or any other I tried it on (on both USB-to-PATA and honest-to-goodness motherboard PATA controllers). The drive spun up but made a repeated ticking sound (I assume seeking back and forth looking for servo tracks).

I sent the drive to Kroll Ontrack (because, stupidly, I had billing data that wasn't backed-up on the drive). The report I received back indicated that 80% of the drive's sectors were unreadable.

As an aside: The data I was looking for was ASCII text and Kroll Ontrack was completely unhelpful in just sending me a bitstream image of the drive so I could grovel thru looking for data I needed. Being plain ASCII, their "file carving" tools didn't locate any of the data. (They sent me a "preview" of the data they'd located, and while it got lots of Microsoft Office-format files, it didn't have any ASCII text files). I offered them a 3x multiple of the rate they asked for file-level recovery to simply send me the bitstream image of the disk that they'd already made. They wouldn't do it, and wouldn't even let me pay to talk to somebody who understood what I was asking for. I ended up taking a major loss on the billing data I destroyed. I'll never recommend them to anybody.

I won't ever play with neodymium magnets around spinning rust media again either. I also had a major failure of my discipline re: backup at that time, too. The cobbler's children always go barefoot-- I was being too cavalier with my backup strategy (or lack thereof) and not treating my own data like I would a Customer's.


> the hard disk drive started emitting a ~10Khz whine

This sounds like the head crashed and physically scraped the platter.


Sounds like a coincidence.


It does sound that way but, boy, it was eerily timed if it was.


I'd bet on related, but not what you thought. If I had to guess, I'd put my money on the magnet pulling some tiny metal bits into the control board and shorting it.

But one thing is for sure. OnTrack are dicks. Can confirm.


Magnetic field falls off with inverse cube of distance once you're past the approximate size of the magnet. Not to mention that the drive itself is in a ferrous enclosure that provides a lot of shielding... the magnetic field you applied at 6 inches is approximately nothing.


I will definitely concede that I may have the 6" measurement wrong. Heck-- I may have actually put my hand right on the PC.

I stack running hard disk drives, all of which have large neodymium magnets inside them, in close proximity all the time with no ill effects. It makes no sense.


Isn't it inverse square?


No. Magnetic fields fall off as 1/d when d is small compared to the size of the magnet, progressing to 1/d^3 when d is large compared to the magnet. (E.g. weird edge case-- it's inversely proportional to distance from an infinitely long wire).

Electromagnetic radiation from point sources falls off as 1/d^2.


Thanks a lot, both of you, learned something!


No, it’s a dipole moment instead of a monopole like electric charge. It goes as 1/r^3 in the far field.


Interesting one of the first 'tales' I read about was some person in (I think) Sweden who took his drives home in his car with heated seats. And when they needed to use them they wouldn't work. The point was 'you have to test backups'. Now that I am thinking of it possible this was even with tapes not hard drives.

By the way with that video I am also thinking maybe it wasn't the magnet that scrambled the drive but some other force that was applied as a result of the effect of the magnet on chips or the laptop. [1]

[1] I don't think that was what happened but the test does not isolate the drive from any other possible impact is my point.


It has to be an electromagnet. I remember doing this experiment with floppy disks and magnets for a middle school science fair. Normal magnets don't do a thing, but electromagnets can change data.


View page source. What a beauty ️️.


Came here to post exactly the same. You CAN write human readable html!


Really? He doesn't close the <p> tags.


That's only a problem for XHTML. HTML5 implicitly closes the previous <p> tag when you open the next one; thus, a <p> inside a <p> is an implicit </p><p>, if you will.


Why does VS Code auto add the closing <p> tag when you open them then? It doesn’t do it for, say, <img>. Bug?


Feature. <p> tags can function as containers for text and other elements, and VS Code can't distinguish between <p>, with the special handling, and <div>, without it.

Okay, to be fair, that does sound like a bug.


Didn't know that. Thanks :)


That’s optional in HTML5


Clever! I'm stuck on a problem right now as well, I'm trying to boot an old server (Supermicro, dual CPU) to verify something and for the life of me I can't figure out what is wrong with it. It doesn't do anything when you power it up, even the power led on the board doesn't light up. Forcing the powersupply to 'on' does light up the LED but the system still won't boot. Already put a fresh 3V cell in it, stripped it down to the bare minimum, all jumpers in default positions, no go. And it worked perfectly fine the last time it was shut down. Highly frustrating these gremlins.


Oh, did any caps blow? There were some counterfeit ones going around some time ago...


That's a good one, did not think to check that, I'll go over all the caps on the MB.


Check your IDE cables


SCSI system, already pulled the controller out and disconnected the backplane. Really weird this one. But thank you for the suggestion. In fact, that's the whole reason I want to boot it, the drives are a hardware raid which is hard to port to a machine where the controller won't fit.


The strangest HDD failure I ever dealt with was a Toshiba notebook drive where the centre bearing had become shot. The notebook would not boot and the HDD sounded like a coffee grinder.

By moving the notebook in the air and trying different positions the noise changed. I was able to get the machine to eventually boot by holding the notebook in my hands at an angle and spinning myself on the spot. At the time I guess the gyroscopic forces were enough to get the bearing to sit right and the HDD to be able to spin properly. Doing so caused the drive to work long enough to get the most important files off it.

Definitely the strangest thing I’ve ever done to “fix” a piece of computing equipment.


I have successfully used the freezer trick a few times to recover a hard drive. It did work in those instances and I documented it here:

https://battlepenguin.com/tech/freezing-a-hard-drive/

If you can, leave the hard drive in the freezer while you access it. Only works for old spinny hard drives of course.


I had numerous HDs fail with the clicky noise when powered up. I was never able to recover any of them. Is it possible nowadays to fix these without replacing the drive controller? I remember this clicky problem forever destroyed my trust in harddrives. Are hard drives any better these days??


instead of magnet, what i used to do with ticking / corrupted drives was write full of 0, then write full of 1, then full of 0, repeat a few times. it takes frigging agents, but it kind of gets out all of the bumps in the magnetic material and smoothens it out again. fixed many broken drives doing that. ticking is often the read head getting dumped too much due to magnetic substance on the disk being piled up too much giving too much of a push to it. then the ticking will cause similar piles to form and get worse and worse.


Alternative explanation: some sectors are unreadable due to checksum errors (caused by improper powerdown). Repeated read requests sounds like ticking because the head will be seeked every time.

Writing all 1's or 0's to the drive causes those sectors to either be rewritten or reallocated.

The fact it's 1's and 0's wouldn't have an impact anyway - all drives use data whitening techniques anyway.


Those $1.5 apparently came from a leprechaun, there is no other explanation :).


This a fantastic webpage.


Simple and straight to the point ... although some navigation would be helpful to see, you know, the rest of the website.


TBF from the ~luigi part of the url you can tell that it's probably one of those "web sites" allotted to each user on a university server or something similar, eg. go to http://info.iet.unipi.it/~luigi/ for his homepage.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: