Friday 13 September 2013

[computers] New cloop kernel module on the way?

Klaus Knopper, the current maintainer (in the linux realm) of the famous cloop kernel module, has written up a patch file on lists.debian.org but has yet to release a new version with the patch incorporated against kernel >=3.9. 

For those of you who don't know what cloop is, it means compressed loop. Wikipedia has a good entry on what cloop is. cloop is heavily used on live linux distributions/installation mediums.

Anyhow, I thought I may as well blog this up before a new version of cloop is released. As I'm running Archlinux (one of several linux "toppings/flavours/distributions/etc" and to me, one of the three challenging distributions before LFS (Linux From Scratch, essentially a cookbook not a distribution) I have put forward my contribution to Archlinux. I've also managed to hit two birds with one stone as well. 

According to relevant mails from lists.debian.org someone wanted to have up to 32 /dev/cloop*. That has also been achieved in my contribution (have a look at the one making one of the largest comments), that is me :). Unfortunately (probably to the author of that email), the "kill-two-birds-with-one-stone" patch is already out. It was a really easy hack if you asked me.

I'm pretty sure I'm not the first to write up a blog about it (and brag of course). Arch/Gentoo/Slackware hackers will find my cloop contribution easy to implement. 

Happy Hacking!


... oh right I forget that quote maybe registered/trademarked/etc.  Bite me :p

Imation Apollo 320GB 2.5" portable hard drive woes.

I initially received this portable hard drive as a gift. It works quite nice for a good two to three or so years before it started acting up... which happened just recently.

The portable hard disk was hardly ever used, and because I needed it to be also compatible with Windows and support 4GB single file sizes. The filesystem was NTFS. Nothing wrong with that until it started playing up. 

I first thought it was an issue with probably the USB cable or the USB socket itself. After many attempts to try different cables, different ways to power on the portable hard disk (sometimes the internal hard disk would not spin up). The solution then worked fine. 

Soon after, another problem also cropped up, being pretty savvy on linux. I've found out from dmesg and lsusb information. The portable hard disk would appear as USB1.1 device or not appear at all. Now I thought to myself why would a USB2.0 capable device appear as USB1.1 or fail to appear when plugged into the same old USB2.0 capable socket? The issue persisted as when I do my usual data migration the speeds speak for themselves. Ironically, when I plug a flash drive into that same USB2.0 socket (on my computer of course) the device would be set as USB2.0 and not 1.1. The same socket that I plugged the Imation Apollo portable hard drive as!

The whole case didn't make much sense, at the time I could have used smartctl (part of smartmontools, which is used to display S.M.A.R.T. information on the hard disk) but I believed the hard drive was not at fault. I then sourced another 2.5" external hard disk enclosure. Now some skeptics may think the hard drive inside the case would not be 2.5", I have opened the case once before and confirmed that it is actually 2.5" considering it's overall physical size.

Amazingly, swapping the 2.5" external hard disk enclosure did the trick for me, now with the same old hard disk it's listed as USB2.0 device. I've started doing some background research into the information on the Imation's PCB. There wasn't much apart from the main controller being Prolific PL-2571 chip as opposed to Jmicron JM20337 chip (obviously there are other variables to consider such as different crystal, external EEPROM, etc). One notable thing to note here is that when you plug the Imation's PCB into the computer, it will not tell the computer information about the controller itself. Though notably that was somewhat noted within the EEPROM flash list.

As I curiously googled the information on troubleshooting the said Prolific chip, I've found very few results (namely three). In one case the same chip was used in probably an external burner. Another case which seems to be broken in two, the post probably went unanswered and Google Translate describes similar symptoms to mine. The last case was an old blog post detailing the issue (similar but not the exact same), albeit the blog post is very detailed in dismantling the standard enclosure. For those looking to swap hard drives and/or place the hard drive into another enclosure I'd recommend the final link.

For those curious ones:
1) The internal hard drive in (what was my) Imation Apollo enclosure it is a Toshiba MK series hard drive. 
2) When my 2.5" was not getting detected, I could hear the hard drive spinning down whenever I plug the main USB head in (remember, most 2.5" portable hard drive enclosure the companies usually chuck in a two headed male USB A plug, one for power if needed). The hard drive would spin up and remain spinning if I plug the USB "power" plug into one of those 1 AMP charger adapters (most phone/handheld device chargers usually have USB sockets instead of a fully sealed "one-piece" device). Not that I would recommend anyone to try powering 2.5" portable hard drives from charger/adapters but it maybe handy for those curious.
3) Last but not least, I am now using Channel+ PATA/SATA-to-USB2 2.5" enclosure. Yes, the enclosure looks ugly compared to Imation's case but to me its both functional and practical.

Another new leaf?

In been about as much as four years, I've migrated onto my third blog host. For those that may have read my previous blogs and/or have been following. By now you probably would be wondering if third time is a lucky charm, I guess only time will tell.

Progressively over time I have lost some blog entries from yesteryears and/or how I laid out the information, etc. During all these migrations I've also lost interest in writing blogs in general. For now this blog entry will just focus on a possibility in re-igniting those old blog posts.

Stay tuned in this blog space if you have been following, someday I'll pick up the pace and putting up old blog entries.