воскресенье, 5 сентября 2010 г.

Dark theme for Eclipse

I've created a dark theme for Eclipse, similar to darkblue theme I've been using for VIM. I've posted preferences that you can import into eclipse (I'm using Helios).

Before doing import, save you existing preferences in case this import mess up something and you wouldn't know how to fix it.

Go to: File -> Export -> General -> Preferences -> [next] -> [X] Export All and save file with *.epf extension, that way you can always go back to your original settings.

Click here to view source on pastebin.com (http://pastebin.com/xzwpPZD8)

Seagate FreeAgent clicks of death, how I fixed it

I've experienced an issue with 1Tb USB FreeAgent drive from Seagate, where I entire backups from 3 different laptops from last 6 years. Last week it started to make clicks of death for about 3-4 days and eventually died on me (e.g. clicking stopped and it was like dead completely, only seagate logo was turning on, but no more noises)

Symptoms:

  • not mountable in linux (mount /dev/sdb1 ./usbdrive just hangs)
  • not accessible in windows with windows freezing up when navigating to 'My Computer'
  • clicking/cracking noises from HD itself
  • SeaTools hangs for ~1 hour before even showing up list of available drives for tests

After searching online for possible solution, I've came across forum thread on Seagate's website about people experiencing similar issues. Also there I found a video on youtube where clicking sound was similar to mine. Many people reported that it is common for FA (FreeAgent) drives to die like that and that Seagate does not care whatsoever about their customers, especially if you happen to use "unsupported" OS, like Linux. As one fellow user writes:

... I call back about 5 minutes later and speak to a gentleman in the support department again. I give him my drives serial number and he pulls up the information and he, I am quoting this word for word, informs me; "Unfortunately Seagate does not support Linux. Our drives are to be used only on Windows XP, Windows Vista, Windows 7, and Apple Macintosh systems with OSX. By using your drive on Linux you have voided your warranty and Seagate cannot provide you with any free support. [click]" ...


That what happens after you talk to the dump customer support person who has no idea what 'clicking sound' you are talking about, tells you to restart windows and other random custom support bs, then routes you to different departments 3-4 times. Amazing! 


Anyways, after some research I basically figured out that there is few options: toss the drive, freeze it in the freezer for couple of hours, send it to recovery company (could cost anywhere from $250 to $2,500), try to recover with SeaTools for Windows


I've opted for last option. After downloading SeaTools and connecting my FA drive and trying to run any tests including advanced tests (by pressing F8) all of them had same results: FAIL or Test Unavailable. 


Things that I did to bring it back to life (still not sure which part fixed it actually)

  • Tried to run all tests (long, short, advanced from SeaTools) - all failed 
  • Tried to mount drive under linux with various options - not successful 
  • Disconnected/reconnected, rebooted w/o drive, connected after boot, tried all previous steps again - nothing worked.
Now possible things that actually brought it back to life:
  • when executing this: mount /dev/sdb1 ./usbdrive, mount command tries to mount the drive and just hanging there, I took the drive itself and started to shake it coutner/clock-wise until I could hear clicking/cracking noises again when I shook it. It was similar to "click-click-brrr-tsk-tsk-click-tsk-brr-tsk"
  • unblock, disconnected, repeat.
  • Then while same mount command was in progress I hit it with my hand on the sides, shook it again, hit it again, trying to get click-tsk-click to consistently come up. 
  • Killed mount command with kill -9 <pid>  and tried everything again for several times.
  • After doing it several times, it didn't help me at all and I've disconnected it from power and usb and left it on my desk for 2 days.
  • After turning it on after 2 days, click-tsk-tsk-click started immediately upon connecting USB wire to the computer, I thought that it's a good sign (well, better then no noises at all)
  • I've loaded up windows and my drive actually was recognized by windows as K: drive and it asked me to format it
  • I've loaded up SeaTools again and run all tests that are available: Short Generic, Long Generic, Self Test, SMART (this one is unavailable for external USB drives), Self Test/Self Fix. Surprisingly all of them passed, and drive was no longer making cracking/clicking noises! But drive was still not mountable or readable in windows or linux, and windows asked me to format it in order to access it (which obviously I don't want to do)
  • After booting to linux, mount command reported that I must specify a filesystem type and I thought: good, now I just need to restore FS sector and it possibly could work.
  • I've found a tool  online, it's called TestDisk that does just that among other cool things! After carefully reading guide and following step-by-step instructions I was able to rebuild the Master Boot Record and File Table Record (FTR) on that drive. 
  • Viola! I was able to mount my  drive under linux and access all the data on it. Everything was there, all 680Gb of crap! 
So while I'm unable to write step by step guide on how to bring it to life, I'm happy that all or some of those steps helped me bring my drive to life and retrieve important documents and pr0n that I've been downloading over the years ;))