Friday, 25 September 2009

Fantec MM-HDRL and Linux

Just bought myself a Fantec MM-HDRL. It's a well designed, compact piece of hardware that is badly let down by the accompanying firmware, and is a particular disappointment to this long time linux user for reasons both idealogical and practical.

Without going into too much extraneous detail, I shall just say that the interface is butt-ugly and somewhat slow to read folders of one's own media, but simple and intuitive enough to get by without recourse to the manual. RTFM? Only if strictly necessary.

My first issue with the device, albeit one of which I was already aware before making the purchase, was that it supports only two types of file system for the media partition, NTFS and FAT32, both of which have their limitations for me. FAT is obviously well out of date, what with its file size and name length limitations, and NTFS support under Linux isn't all that it could be, particularly the issues that occur when the partition is not shut down cleanly and there is no Windows machine with which to run a repair. As I said, this was something I knew when I made the purchase, but it was slightly galling to find out as I did later that the root filesystem of the firmware was trusty old ext3, along with the usual tools mkfs.ext3 and fsck.ext3. It seems, then, rather churlish to utilise the filesystem of choice for many linuxers and indeed the choice of the programmers of the MM-HDRL, but not include this as an option for the media partition. I did reformat as ext3, in the hope that it would just work, albeit without any official support, but the media browser was unable to see anything on the partition after that, so I had to revert to FAT.

Secondly, I was somewhat gobsmacked to find that the box is accessible on the network, via telnet, for users root, nobody, and guest, all without a password. Once in, setting said passwords, or indeed trying to tighten up security in any way is futile as the firmware is of course read-only. It does mean however that restricting access to the box on your local network is all but futile.

It turns out that there are a group of hackers working on ways to unload the firmware into a directory so things like root passwords and ssh can be added. The only problem is that the source for this is unavailble as far as I can see, requires windows, and the downloads are apparently recognized by several antivirus softwares as containing a virus. In spite of the protestations of the developers that this is a result of false positives, it does mean that you have to take their word for it against your AV program - hmmmm. And that's assuming you actually have a copy of Windows which in my case is a negative. Not for me, thank you. That stuff is all here, but, at the time of writing, a post asking for the sources, and the developer declining to publish them (which may have changed), is unavailable.

All in all, it's not a terrible piece of equipment but there are many little niggling issues that could be put right. In fact, it probably wouldn't hurt the owners of the device to open source it themselves and see if they can build up a community of hackers working on improving it.

Tuesday, 30 June 2009

Fuck Toshiba

A colleague of mine brought me his borked personal laptop the other day. I was to determine that the hard drive had failed, causing a fair amount of data loss, but otherwise all seemed ok with the rest of the laptop. On the face of it, simple enough - replace the 2.5 inch SATA drive and reinstall Vista. Ha! I hadn't counted on corportate shitbags Toshiba, from whom I will never knowingly purchase another component.

The lappy came without any Vista disks, just a self restoring program on a separate partition of the hard disk drive, which of course was failing due to the disk corruption. At this stage I phoned Toshiba to see if I could get a replacement Vista disk from them. I ended up dealing with some strategically shaved chimp who told me that, as the customer hadn't taken any backups, we would need to purchase a restore disk for 30 squids. Well, that did it. Off to the Pirate Bay to get something that my colleague had actually paid for and had a license for already. (And via about 30 rootkit scanner sites too for post-install)!

My thoughts on this are threefold. Firstly, fuck Toshiba (and any other vendors who do pull this kind of underhand shit). The person to whom the laptop belongs is a little clueless, but this is just taking the piss. Secondly, always check before you purchase a Windows machine that you are getting a full Windows install disk in case you have to replace your hard drive. Otherwise you are going to end up paying another £30 odd for something you already thought you owned. And finally, at least there are alternatives and thank Cliff* I haven't had to use Windows in my personal or professional life for some years now.

* ref, The Young Ones

Thursday, 21 May 2009

MS-DOS Codepage 850 to ISO 8859-14

Different character sets, don't you love 'em. Today I had to deal with some exported text that was DOS encoded (Codepage 850 to be precise), that was needed in ISO 8859-14 encoding. Luckily, this sort of thing is pretty straightforward in Linux.

On the command line, glibc provides a fantastic converter called iconv. Invoking it is as simple as this:

iconv --from-code=CP850 --to-code=ISO-8859-14 \
original_file > converted file

In my case, I need to incorporate this into a python script. Luckily, python makes this very simple without having to resort to third party tools. Once you've read in your text, encode it into unicode and further encode it into your desired charset.

converted_text = unicode(original_txt, \

Wednesday, 6 May 2009 Proper / Title Case

Today I had to convert thousands of lines of text in OpenOffice Calc to title/proper case. I could have scripted it, but it felt like OpenOffice *should* have this sort of functionality built it. Under the Format->Change Case menu options, there are Uppercase/Lowercase options, but no title/proper case.

I found a couple of old macros that purportedly did the job - they didn't work and I really didn't fancy fucking about with VBScript or whatever the hell it is. In my case, the simplest way to do this was to create a neighbouring column and enter =PROPER(A1) with A1 being the neighbouring cell. Copy this simple formula down the rest of the column, copy the values and paste-special the strings. Simples!

I'm sure there are more elegant ways to do this but I had a deadline and I didn't really fancy any extra legwork, just to get the values converted. Hopefully this will save someone some time dicking about with macros that don't work and other such irritants.

Sunday, 12 April 2009

swaks, an SMTP transaction tester

I'm indebted to Debian Administration for alerting me to a tool which would have saved me a huge amount of time if I'd known of its existence earlier, namely swaks, an SMTP transaction tester. Ever get sick to death of typing and retyping an SMTP conversation into a malfunctioning mail server? Then swaks is for you, it takes all the boring, repetitive SMTP conversations out of the equation by automating it for you and displaying the results to the command line. Hooray!

Man page here.

Tuesday, 17 March 2009

Bilbo Blogger

Hmmm.. praps this new-fangled, KDE4 blogging app Bilbo Blogger is what I need to get me out of my blogging torpor. Seems to wrestle with links somewhat, but it's early days.

Build instructions here.