Fixing a locked-up Seagate 7200.11 Series hard drive

June 1st, 2010

I just wanted to share my thanks for a fellow Canadian by the name of Carter who has posted a helpful article on fixing Seagate 7200.11 Series Hard Drives. I had one of these drives myself which went belly-up. I was about to ship the drive off to Seagate for a warranty replacement and lose any un-backed-up data on it, when I came across his tutorial. It saved me dozens hours of recreating existing work.

If you've bought a Seagate drive sometime between November 2008 and say, now, take a peek and see what series the drive is. If it's a 7200.11, head over to Seagate and perform a firmware update STAT! The bug that causes these drives to be unreadable is fairly random, and affects the drive on power-on - in other words, if you have the right drive series, and the right firmware, your PC is basically a time-bomb of fail.

Thanks again, Carter!

 
 

Linux ’service’ command

April 30th, 2010

It seems some Distributions of Linux don't include the 'service' command. Unfortunately, many great Tutorials assume this command is available, and use it for things like stopping and starting Apache, etc.

Luckily, it's a pretty simple script, and something you can easily create yourself. I use the nano text editor here, but feel free to replace 'nano -w' with 'vi' or whatever your preferred text editor is.

# nano -w /usr/sbin/service

In your Text Editor, enter this text:

#!/bin/sh
set -e
/etc/init.d/$1 $2 $3

Save the file, and then...

# chmod 755 /usr/sbin/service

This makes service an executable file.

Now you'll be able to do things like:

service httpd restart
service mysqld stop

easily!

 
 

MySQL Root Password Reset (Linux)

April 28th, 2010

I ran into a case earlier today where I was setting up a LAMP (Linux, Apache, MySQL, PHP) Server whcih already had most of these components pre-installed.  However, no one was really sure what the MySQL Root User password was - and there clearly was one, as attempts to connect without it failed.

The obvious answer was to reset the Root user password - the method of doing so was less obvious.

First, you need to stop the running mysqld daemon.  First try:

# /etc/init.d/mysqld stop

If that doesn't work for any reason, try this sequence:
Read the rest of this entry »

 
 

PHP: Removing Duplicates in an Array

April 8th, 2010

One thing I keep forgetting is that PHP has a built-in function for removing duplicate items from an array; I usually find myself about halfway through writing such a function when the lightbulb goes off.

$original = array ('pie', 'cake', 'cookies', 'cake');
$clean = array_unique($original);

The $clean array above would contain one less reference to cake than the $original array.

 
 

Rebooting this Blog…

March 9th, 2010

2009 was an eventful year - so eventful, in fact, that I practically *forgot* I even had this blog.  I posted once in January, and that was that.

2010 *will* be an eventful year - I've bought a new home with my best friend, fallen in love with an amazing girl, grown my business by leaps and bounds, and have a whole series of new challenges ahead - and it only makes sense to reboot this blog and start documenting said adventures!

I'll likely create a new layout for this blog to mark the occasion, but that's certainly not a priority so don't get your hopes up.

And for everyone who's wondering - I haven't forgotten about CoHLCD, and I've finally located my backup of the last functional source code.  I *hope* to have a v2.0 release in the next month, though my current workload might cause problems there.

 

Musings on Coding, Gaming, and Life in General
Loading...