Archive for August, 2006

Rescuing Files From a Corrupted NTFS Partition

Friday, August 18th, 2006

Yesterday a friend called and told me that one of his machines had faced a harddrive failure. The disk in question was an IBM Deskstar, ironically referred to as the IBM “Deathstar”. Windows couldn’t do much about it so he brought it to me so I could have a look at it.

Linux has excellent NTFS-support these days so the first thing to do was to try a simple mount, that however, resulted in I/O Errors and several warnings. To locate the exact failure point of the harddrive I started making a raw copy of the partition (the disk had one big 40GiB partition on it) using dd. After 35GiB the I/O Errors were once again present.

None of the Live-CDs I had collected throughout the years had utilities for actually checking or fixing NTFS file system problems, so I stumbled upon the Trinity Rescue Kit in my search for such a thing. The small ISO-image (about 85MiB) contains two different anti-virus utilities and a collection of NTFS file system tools (and a lot more), and was therefore suitable for my needs.

(more…)

Making The Google Custom Search Bar XHTML Compliant

Sunday, August 6th, 2006

Google has offered a customized search bar for webmasters to add to their page for quite some time now. But like many other things from Google the code they give you is old deprecated HTML, this is very likely to cause trouble for newer sites that are trying to make their documents XHTML compliant.

If you take a close look at the code Google gave me when I wanted to add my own custom search bar (use your browser’s “Show Source”-feature) you’ll notice many deprecated techniques like: tags are written with CAPS, not appropriate ending of tags, style information embedded into the tags, etc.

It isn’t very hard to fix it and make it XHTML compliant, but if you would like the solution right away you can check out how I solved it (”Show Source” again). And it now validates as XHTML 1.0 Transitional.

Note: Of course you should change the values to match your URL!

Wordpress Atom 1.0 Support Revisited

Saturday, August 5th, 2006

Something that has bothered me ever since I started using Wordpress is that this awesome piece of blogging software does not support the newer version(s) of the Atom syndication format. Currently version 0.3 is being used, a version that most feed validators have chose to declare as deprecated these days.

Apperantly “whump is looking for volunteers to work on Atom support for wordpress.” according to the Wordcamp 2006 Wiki.

There has been a fix for this however, but there were some flaws I found while trying it out:

  • It used the ISO 8601 time format which PHP 4 does not support using the ‘c’ key to the date function (the_time(’c'); doesn’t work)
  • The self link (the link pointing back at the feed) was set to wp-atom.php, it should be http://blogURL/feed/atom

After resolving the above issues everything works flawless and the feed is valid Atom 1.0.

Since the author of the fix did not seem to have picked a license for the fix and I don’t dare assuming it falls under the same license as Wordpress I will only publish the patch that made it all work for me. Download the fix and patch the file wp-atom.php using the patch command (UNIX).

If enough people would try this out and gave feedback to the author of the fix or me (preferably him, I did nothing) we wouldn’t be far from our small goal regarding good Atom 1.0 support in Wordpress.

Time To Put Pressure On The Hardware Vendors

Saturday, August 5th, 2006

Recently, a fellow Linux-user started a small campaign targeting at getting a re-fund for his unused copy of Windows XP on his OEM computer. Of course this was not possible since he had agreed to the terms when he bought the machine and powered it on, and therefore could not hope to get his money back.

This resulted in a big discussion on whether you can buy a PC without getting Windows pre-installed at all. At least Acer did not seem to allow this, pointing out that selling PCs without an operating system violates against certain laws, but they could not give their customers an alternative either.

(more…)