Hard drive recovery, the hard way.

by Mark Zaugg 18. September 2008 01:03

Here's a surprise. 

I'm a professional System Administrator.  My standard joke here goes, "Because I get paid for it, not because I'm any good at what I do." 

I have long and hard declared my own ineptitude along the way.  Yes, I forward spam.  Yes, I have the coding skills of a 1970's monkey strung out on polyester.  Yes, Virginia, even I can fail to count to three starting from zero. 

But all in all, you take the battle scars and you learn from them.  It's more than just not repeating the same mistakes all over again, it's also about being wise enough to foresee mistakes before they happen and avert them. 

If you have to choose patch or no patch, take patch.  Just don't patch your production server FIRST if you don't have to.  When you're buying a new computer, the first question ALWAYS needs to be, "What are you planning to use this for?"  I have four computers I use almost daily, and each is good at something and lousy at another. 

A couple years ago, my external hard drive failed.  It was a 250 GB drive formatted with FAT so I could haul it between all my various systems and plug it in.  I'm proud to say, I lost absolutely NOTHING of consequence because it was only my backup drive.

Well, except for those photos of the kids I only stored on the backup drive because I never bothered burning them to CD when I had the chance.

Number one rule of paranoia, never, EVER consider possibly not having a backup of your important files, and never EVER consider not having a spare backup in case the first one goes bad and never EVER consider not testing your backup once you've made it.  That's one rule.  Did you back up your files lately?  BACK THEM UP!  NOW!  DON'T WAIT!

Well, what keeps me running in the professional class is my ability to recover after spectacularly failing.  Sometimes it's trial and error.  Sometimes it's using a great deal of searching the web.  Almost always it's trying to find someone else's experience and following their solution.

I first hit the web.  There are hundreds of programs out there for data recovery.  A few dozen that look sorta promising.  Most are costing around $100, give or take.  Not a lot that look appealing.  For me, it's a real pisser to go through the effort of downloading a trial version which may or may not let me look at my lost files, then go through the effort of paying to hopefully recover the files I may or may not get.  I'm wary of the Symantec's of the world (where good software goes to die) that have this massive promo department but the software itself just isn't very good.  Sure, any of these *may* recover my files, but that's a lot of time, effort, trust and "if's" to wind my way through.

On the other hand, I trust anything licenced under the GPL.  Not because I can read the code and figure out what it does, but someone could.  (Not that anyone necessarily does, either, by the way.  Don't hang yourself with blind trust.  It's a paranoia thing.)

FAT-32 isn't an overly complicated file system, and magically losing the whole drive usually means the entire drive wasn't magically lost.  Think of it like a book with the Table of Contents ripped out.  The data's still there, you just have to go through it page by page to figure out where stuff is.  It just takes a while to piece it all together and you can re-create the Table of Contents later.

My drive likely had the File Allocation Table (that's the "FAT" in "FAT") or the Master Boot Record ripped away.  Sure, I had pictures that I'd rather not lose on there, but it wasn't life or death if I couldn't get them back.  Well worthy of taking a shot at it on my own.  Remember - I am a professional.

Well, I managed to dig up TestDisk from CGSecurity and figured I'd give it a shot.  Downloaded it to my good hard drive, scanned the bad hard drive and let it walk me through the recovery process.  For the record, the first pass found nothing, the second "deeper" pass found the backup FAT and restored using it.  Easy!  Fun!  A little bit convoluted if you don't know what you're doing.  But it worked fine - I got my photos back.

I didn't have to pay a dime, but I did.  They suggested 25 Euros, I donated 10 instead.  I doubt I'll hear harsh words over it, and I'll donate another 10 the next time I use TestDisk.

I recommend letting a professional try to recover your data rather than doing it yourself if you have the choice.  But sometimes the choice isn't easy to make.  Take your time reading the options, and feel free to put your trust in the program.  Christophe Grenier is also a professional and I justifiably put my trust in his abilities.  It's good to have smart friends.  That I've never met.

----

Zarquil Zonar's guide to what to do when your hard drive fails:

1.  Turn off your computer.  The more you write to the hard drive, the higher the risk that you'll overwrite a file you need.
2.  Don't panic.
3.  Remove the failed hard drive and put it into a working computer as a secondary drive.  Beware the gotchas:  Is it an IDE (older) drive or a SATA drive?  If IDE, do you have it as master, slave or cable select?  If you're not sure, disconnect your DVD/CD drive and plug the hard drive on a cable of it's own.
4.  Boot from your good drive, be patient.  I have seen a chdisk actually repair a failed drive when the computer booted.  It's not likely, but it happens.
5.  If your system finds the other drive but does not recognize the formatting, don't panic.  And don't format it.
6.  Download TestDisk or your favourite rescue program.  (Ideally, this happened before you put in the other drive.)  One of the reasons I like TestDisk is that you don't have to install it - just unzip it and run.
7.  Scan the bad drive.  Follow instructions carefully.  Usually the program will guide you with default settings so you only have to hit enter.  But be alert, and pay attention to the warnings.
8.  Don't panic.  Odds are you either recovered your drive or it's unrecoverable.

Remember, a good backup regime means never having to recover a failed drive.

I'm all about the attention to detale.

by Mark Zaugg 4. September 2008 00:08

And this, kids, is why we have to pay attention. 

SPAM, how I love thee.  I'm sure if you've ever used the interweb you've probably got one or two of your own along the way.  One of my tasks is to cut back on the SPAM that gets through to the rest of the staff, but in the meanwhile to try to minimize the number of false positives.  Fair enough, it is what we've brought upon ourselves with the underpinnings of email.  Spammers take advantage of how email was designed to work.  Our email system was put together years ago when most people on the net trusted each other - often because they actually knew each other as they met through conferences and collaborations, using email to work together from distant locations. 

I don't know the network admin downstairs, let alone the guy managing Shaw's network or AT&T's network or Reinhardt College's network.  Well, not personally, anyways. 

So you gotta think I'm pretty familiar with all the SPAM tricks and can spot them a mile away, right? 

*sigh* 

I get an email allegedly from Delta Airlines to a former employee.  Wanting to be nice and helpful I happily forward it back to him.  It's confirmation of a ticket, ferghod'ssake, so it's got to be important and get sent to him pronto, right?  I even laughed at the utter stupidity of Delta Airlines to include a PASSWORD in PLAIN TEXT in an email - that's just stupid kids, never, ever, EVER send a password in an email.  It's flat out idiotic.  People watch for stuff like that.

The truth:  It really was spam.  I got completely utterly sucked in by half-paying attention and trying to be helpful without cognitively processing the email.  Well, I certainly feel stupid after the fact.

If nothing else, it emphasizes the point that security is a process.  There is no one single thing you can do to be safe.  There are a whole lot of things you need to do to reduce the risk, but there are no guarantees.

Outlook Express and it's big brother Outlook has proven itself to be a massively huge security hole in the past and continues to have my scorn as my single most hated application.  I hate a lot of programs.  It takes a lot to make #1 on my list.  Not everyone can get off Outlook, but I certainly recommend you try to get off it entirely.  Is Windows Mail (the replacement that comes with Vista) any better?  I don't know, I have so little trust from past history I refuse to touch it.  Fool me once, shame on you...

If you have a safer email program, there's no guarantee you're not going to blow it and mistake spam for a real message.  It happened to me, and I'm a professional.  Think about your system settings next.  Are you hiding the file extensions on Windows?  It remains the dumbest default setting I can think of in Windows.  You need to be able to see what the real file name is ALWAYS.  Go to Windows Explorer (Windows-E for the short cut), go to Tools --> Folder Options, then the View tab and uncheck "Hide extensions for known file types" in the Advanced options.  I don't care if you barely understand that sentence, if you run Windows you should be doing everything you can to find that setting and change it.  You're not going to have evil.jpg.exe sneaking onto your computer to do damage when you see it's an executable file pretending to be a picture.

Okay, so you've dumped Outhouse, you've changed your settings to be more secure, and you're still dumb enough to open that lousy email.  I laughed once I saw it, because it wasn't going to run on the Mac no matter what.  Woo-hoo, I am mighty and invulnerable on my shiny aluminum shield of impregnability!

Nope.  Sooner or later there's going to be a script written that's going to target OS X and punch through in a meaningful way.  Eventually there's going to be some program that runs in the background on Linux.  There already are, but for design decisions it's more difficult to run rampage across your entire computer in OS X and Linux.  Any computer professional that is honest with his or herself sees the benefit of not running as administrator (as found in Linux, OS X and Vista) and they also know that running as a limited user is not a panacea.

So it's hopeless and we should all turn off our computers and get off the net.  Perhaps not a bad idea, but a little cynical even for me.

It's an arms race out there and we all have to take our own responsibility for our computers.  Patch according to best practises.  Try to limit your risk.  Think when you open your email.  Never buy anything that came unsolicited into your inbox.

You'd think it would be obvious.  But if it was, the profit motivation for spam would have dried up years ago and we'd severely cut back our attack vectors.

No one is safe.  No one is immune.  The onus is on us all.  We all have to take charge and fix this.

For the love of the BoFH...

by Mark Zaugg 7. April 2008 20:53

Won't someone please teach me to be THIS wonderfully evil?

Brought to you by the letters X and O

by Mark Zaugg 3. April 2008 01:13

I have an affliction.

I am a geek. A nerd. One of those social dysfuntionals that loves freshly printed circuits more than the soft caress of life itself. Once I spoke with a recruiter who was supposed to be helping me fill out a list of my interests. She said something to the effect of, "You don't want people to think that after you go around at work for 8 hours that you go home and do more of the same." I'm a System Administrator / Network Administrator / Database Administrator. It's a little bit systemic, don't you think? There's a section of my brain that doesn't turn off, I'm always trying to improve myself and do my work more efficiently. 

Even worse: It's FUN! I still get a kick from sitting around learning how to do something new, installing a program for the first time, optimizing a computer, configuring a webserver, discovering a new piece of hardware, or some such. It's accomplishment in getting something new done. It's a great feeling knowing that I'll be able to use it someday in my job to great advantage.

My financial guidance counsellor has been making a lot of hay with my story. I made a plan and we've stuck to it through some divots and some road blocks, and at the other side I'm working in the IT field and I'm proud of the consulting business I've managed to slowly build. Without the work I put in to repairing, optimizing and restoring other people's computers I would never have had the confidence or show my ability to administrate on a professional basis. The plan was important, and actively working towards my goals has been the only way this could have happened.

So, let me mention another little plan that's going on. Nicholas Negroponte had a vision to put low-cost, quality built computers into the hands of children in the developing world so they could achieve a higher standard of education. Not everyone will be a geek like me - nor ought they. But I believe that everyone deserves a chance to find their talents and discover just how good they can become with the right tools, a little helpful encouragement, and a whole lot of drive to follow through with the dreams they conjure.

The result of Negroponte's vision was One Laptop Per Child and the XO laptop. Last year they had a program called "Give 1, Get 1." If you bought TWO XO laptops, they sent one to somewhere in the developing world and they sent one to you. I waffled for a while over it, but finally decided it was a very worthy idea I could get behind. The program is now ended, but I have hopes they will revive it again.

Last Friday I received my XO laptop. I was tickled green to get it. Like so many other parents who got involved in the program, I planned to share this computer with my kids and let them have at it to see how useful it was to them. They've been complete pros with it, messing about hither and thon, teaching me things I hadn't figured out on my own yet. I'll primarily use it as an eBook reader on the bus. Already I've found a ton of books via Project Gutenburg that I'm looking forward to reading. The kids can pretty much do whatever they want on here and all the power in the world to them.

But there is one aspect that's missing to me in this: This isn't meant to be a cheap laptop, it isn't meant to be just-another-charitable-donation, it isn't meant to be a toy to be neglected by the kids. I want to turn MY little corner of Negroponte's vision into my own little educational venture. Hopefully I'll be able to leverage this into learning Python and improving my programming skills. Or - dare to dream - actually write some fun and educational game that gets used by some kid half a world a way.

This computer is something special. It's comprised of hardware, software, and ideals.

---

Postscript:  Clearly the XO is not perfect.  It didn't send line returns correctly so I had one long run-on post until I logged on this morning and fixed it.  I didn't have the ability to embed links.  And I got as far as the first paragraph before I plugged in a USB keyboard so I could actually type at speed.  But as a learning tool, I'm more than impressed.

Computerized translators - NOW.

by Mark Zaugg 21. November 2007 00:58

As the world knows by now, there was a very unfortunate death at the Vancouver airport involving a Polish immigrant to Canada who was tasered. 

The details are abundant enough I don't think I have the stomach to go through it. 

I'm a dog's breakfast as far as my heritage goes - a cur of Europe and proud to call myself Canadian.  I'm happy to welcome anyone to this country who is willing to be proud of both their own heritage and the citizenship of Canada equally, and who is willing to make this country and the world a better place.  The Polish side of me runs strong in my veins and it's very hard to not get upset and deeply bothered by the entire affair.

My first response of anger was to defiantly learn Polish.  My vocabulary would have the following conversation available:

Yes.  "Tak."
Good.  "Dobry."
This is my nose.  "To jest mój nos."

Probably none of which would help should I encounter a similar situation some time down the road.  I need to at least learn, "This is my nose.  Would you like to punch it?" 

"Tak."

Okay, maybe the whole "learning Polish and saving the world one airport at a time" isn't going to work for me.  Screw that - there is one thing I DO know and I know computers well.

On my Mac, built right in, is the Dashboard application.  It's one of my favourite things about the Mac - and now Vista - with the various Widgets you can plug in.

One of my favourite widgets is a translator.  Built right in.  Nothing to buy, it just needs to get turned on.  I'll even plug that it's put out by Systran.  They've also the people behind Babelfish now, it seems.

No, it does not have an English to Polish translator.  There's no lack of them you can find with a simple search on Google.

Computers are cheap.  PDA's are powerful.  And there lies one solution to the problem.

It is unacceptable any longer to have international customs without a computer available for use of all passengers for immediate access to translation.  Translation may not be very good, but it only has to be adequate to avoid the same sad affair.  Mr. Dziekanski threw a damned computer - why did it not have translation available to him?

Translating computer in EVERY airport near the passenger side of customs.  NOW.  Not next year.  Not after the inquiry.  Now.

Firewall them off.  Don't give access to anything other than the translation software.  But make them available right away.  Period.

I could have saved a life with my laptop.  There's no excuse not to have fixed computers with limited access available for travellors who don't speak English or French.

Colossus loses code-cracking race!

by Mark Zaugg 18. November 2007 00:14

Oh my ghod!  This is horrible! 

Run for the hills, we're all in grave danger. 

The newfangled machine called Colossus - surely to rise up and be master of us all before our deaths at it's iron grip - has turned out to be less than the saviour we expected it to become.  Indeed, it's 2000 and more valves once heralded as humanity's best hope for peace has resulted in actually being dim-witted and slow. 

It turns out that we may now be ruled over by faster, stronger overloads which contain tubes, transistors, or perhaps even printed circuit boards. 

Be terribly afraid for your souls, and abide the tidings from the BBC.

Actually, take a moment to think that a programmable machine from 1944 was even in the running in a competition to break code against modern computers.  Honey, can I build a recreation of my own and keep it in the basement?

HoneyjQuery15204227989085484296_1309243277563

Colossally cool..

by Mark Zaugg 17. November 2007 00:02

I just don't have words for how insanely awesomely cool this is.

Just read it from the BBC, ja?  Colossus Cracks Codes Once More.

I, for one, welcome our Leopard overlords.

by Mark Zaugg 27. October 2007 02:20

So I'm feeling like death warmed over.  I'm stressed up, I'm overtired  It hasn't been a great week.

I go pick up the kids and we go out to dinner.  A fantastic dinner, Happy Hill Restaurant is
one of those wonderful gems for good Chinese food in Calgary.

Afterwords, well, we were really close to Westworld Computers.  It's almost like I planned it or something.  I drove by, and there were about a dozen hearty souls lined up ahead of time.  They weren't selling Leopard, the newest version of OS X, until after 6:00 pm.  We just happened to get out of dinner at about 6:30.  Funny how the timing worked out.  It worked out fine - not enough of a line that I had to stand around hacking a lung out with a kid on each arm.

Popped in, it was all hands on deck in there.  Ryan, Nathan, Mike, all the folks I spoke with back when I was considering seriously picking up a MacBook.  Quite the crowd in there throwing a launch party, but my timing was perfect.  They'd sold out of the Family Packs by the time I'd got there, but that was no issue for me since I only needed a single.

Easy.  I grab my copy, get out, pick up the lung I drop on the sidewalk and we head home together.

Now, I'm used to the pain of upgrading.  I've had data loss, in fact I've lost entire hard drives.  I've had drivers fail.  I've had multiple drivers install, none of which worked quite properly.  I'm used to upgrades not going smoothly.

Before I even tried to upgrade, I actually went to Apple's webpage and watched their guided tour of Leopard.  Now, of anything, the biggest thrill for me was to get multiple desktops like I have with my Linux systems.  Apple calls it Spaces and I'm giddy as a school girl to have it on my Mac.  While watching the tour, I was pretty excited about their Mail program as well - I'm eternally sending myself email, and I never use address books because they're always a pain to populate and use.  I learned there's some real potential to outright change how I work on my computer.

Okay, time to take on the pain.  According to the tour, all I have to do is put in the DVD, reboot, and follow instructions.  Yeah, I've heard that story before.

I put in the DVD, click Install, my MacBook reboots and the upgrade process begins.  I picked English, ran through a couple click throughs, and it asked me where I wanted to install Leopard.

Sadly, it asked to an empty window of choices.  "Great, here we go again," I thought to myself.

The good news, in the installer I get diagnostics.  I bring up the hard drive through the diagnostic tool and - hey, my hard drive hasn't gone missing there.  I back out of it and take another stab.  Nope, no hard drive the second time through.  Bring up the diagnostic again to see if I can check the hard drive with an fsck or something.  Didn't really find anything, backed out a second time and *pling* the hard drive is there.

After that, it's all anti-climactic.  It checked the DVD, all was fine.  It took about an hour to install.  All went along perfectly.

No data loss.  No driver issues - although that's hardly a surprise with how tightly Apple controls it's hardware.  It kept my programs, my settings, everything came back as MY Mac as I left it, only with the new features.

Spaces alone made it worthwhile buying Leopard for me.  And I keep a very tidy desktop - if there are any icons there at all it annoys me - so having Stacks and keeping the clutter from accumulating on the desktop is a major deal for me.  Apple seems to have answered most of my big annoyances I've had in OS X.  Okay, except I still hate iChat.  Adium isn't bad, but how much longer for Trillian Astra, guys?  And that desktop background - ick, it was the first thing to go.

I obviously haven't been involved in the beta testing, and I even after a couple of months of having my MacBook I'm far from an expert at the ins and outs of the OS.  The compelling reasons for me to upgrade on opening day have played out exceptionally well for me.  I considered holding off on a MacBook until after Leopard came out.  I'm glad I got my Mac early, and I'm very glad to have got Leopard on Release Day.  Smoothest upgrade I've ever done and it came out perfectly.  Well done, Apple!

I want me a mentor...

by Mark Zaugg 29. September 2007 01:57

A friend-of-a-friend has a very interesting observation.  He says he's got an awful lot more people interested in both being mentored as well as having his input as an architectural design consultant / overseer / adviser. 

I need more practice with code.  Simply said, I need more projects to get a better understanding of what I'm doing.  I'm getting tired of spending an hour to solve a problem that could have been done in five minutes. 

The problem is that somehow you have to get over that hump.  A mentor is a great way of getting you past the speed bump. 


Let me mix in the notion of John advising with architectural design.  Some code slinger gets all hopped up on the coolness at his fingertips and forgets the foundation he has to build upon.  It's hard to not get distracted by the shiny and to go back to the basics as I was taught.  The art of architecture is to blend the coolness with a solid foundation and bring the best of both worlds together.

Me?  I'm a back-to-the-basics guy.  For better or for worse, OO is something a ghost says at Halloween.  Let me at the tables and I'll build my own SQL by hand.  Forget any system-generated crap code.  It takes longer, but it's solid and reliable, right?

No.  Wrong, sometimes you need the quick and dirty fix.  Or the generated code that keeps track of all the damned flags you need set these days.

"Balance in all things."  It's my life's mantra.


A great architect will find the balance.  A great architect has the experience to find which parts fit, what tools are applicable, which foundations must be developed.  Performance, extensibility, scalabiity and maintainability have to be considered at the start of development as well as at the end of development with final testing.

Should I become a great in my field, I have a narrow band to learn than a general coder.  But I clearly must learn, and by learning I must experience, practice and develop.

The demand for good architects doesn't happen by chance.  One good architect can save countless hours of time and significant amounts of money.  One good architect improves the skills of all those with which he works.  To be mentored by a great architect is a sure path to becoming another great architect.

I've got a ragtag band of skills.  I have solid belief in the underlying principles.  I've got a lot of really good friends who know a lot more than I ever will.  This can only lead to becoming better at what I do.


These are the people who matter...

by Mark Zaugg 15. September 2007 01:52

A double-shot today. 

One of the other regulars at VarLinux posted a story of what he did on vacation.  It makes me feel inadequate and inspired to do more.

Please read it, I'll let it stand on it's own without comment but with my highest recommendation.

Welcome

Change is the only constant.

Welcome to the semi-exciting new look, same crappy blogger.

All comments are still moderated, I'll approve everything that isn't spam or offensive.  Agreement with His Dorkasaurus is not necessary.

What has changed is that I don't have 1000 junk accounts clogging up the system that I have to go through one by one.  Yes, you too can set up an account and no longer need to wait for me to notice you posted.  Completely optional.

As always:  Have fun, be respectful.

Calendar

<<  November 2018  >>
MonTueWedThuFriSatSun
2930311234
567891011
12131415161718
19202122232425
262728293012
3456789

View posts in large calendar