Wanna see this logo while booting your 2.6 kernel? Click here!

23.12.2004 12:33

Matrox Millenium P750 and Linux


Today is a great day. I finally have full dualhead support for my Matrox Millenium P750 [EN] on my desktop at work. Matrox [EN] released a new beta driver after a full year of nearly no support for the linux community.
This driver works fine, you are also able to switch back to console from X Server without producing a kernel panic :)

Maybe next year, when I get my third TFT display, I'll try to set up triplehead...

22.12.2004 11:44

QLA2300 FC HBA Driver and Linux Kernel 2.6.9


Yesterday, I tried to upgrade one of my servers from Linux Kernel 2.4.26 to Kernel 2.6.9. The server has two Qlogic QLA2310F FC HBA PCI adapters [EN] plugged in that are connected to two EMC CLARiiON CX600 [EN] SANs.
One has two opportunities to manage the appropriated LUNs:
  • Establish a software raid to mirror the duplicated LUNs manually
  • Let the FC HBAs manage failover situations and MPIO (multipath I/O)

Of course, using the second way is much more beautiful but that requires specific driver support for MPIO. With 2.4.26, there's no Qlogic FC support at all shipped with the kernel. So I had to use the qlogic driver that is certified for use with EMC SANs. 2.6.9 has qlogic support builtin, but since 2.6.1, the MPIO and Failover support was silently removed and also other changes have been made to this driver, concerning timeouts etc.

Rebooting the machine lead up to having no disks at all. Building the qla2xxx driver as kernel module resolved that problem if you're willing to load the module two times. With the new driver, it takes longer to set up the FC loop and therefore the initalization of the HBAs fail. Reloading the driver fixes the problem. But then I ran into the next problem. The FC Adapters showed me all LUNs associated to my WWNs instead of displaying only half the devices (you know, MPIO). So I googled quite a while to find out, that the MPIO support has been removed. On the Qlogic website I mentioned above are also not supported drivers available for download, e.g. from IBM, Hitachi, EMC,... I gave the IBM driver a try (v8.00.00 [TGZ]), because it has support for driver-side MPIO. Extracting the tar.gz-ball and replacing the qla2xxx Directory in my kernel source tree ended up in many compiler-errors. Naivley as I am, I tried to fix the errors with the help of $MY_FAVOURITE_VIM^H^H^HEDITOR. That seemed to work, but then other compiler- errors showed up and so I stopped coding due to lack of time.

So what to do now? Numerous of incomplete non-working drivers on my hard disk and also numerous of users who wanted to continue working...
Being in total forlornness, I ftp'ed to download.qlogic.com and tried a recursive file search (ls */*qla2xxx*) that finally saved my day (or night, whatever...). In a directory not accessible from the webpage I found the 8.00.01 version [TGZ] of the driver which worked flawlessly, even with MPIO.

tuxx@vi-edv003:~$ ftp download.qlogic.com
[...]
ftp> cd drivers
250 CWD command successful.
ftp> ls */*qla2xxx*
200 PORT command successful.
150 Opening ASCII mode data connection for file list.
-rwxrwxrwx   1 webmaster cod       1016041 Nov 11 23:51 24092/qla2xxx-v8.00.00-dist.tgz
-rwxrwxrwx   1 webmaster cod       1016041 Nov 12 22:30 24132/qla2xxx-v8.00.00-dist.tgz
-rwxrwxrwx   1 webmaster cod       1016041 Dec 13 22:19 24911/qla2xxx-v8.00.00-dist.tgz
-rwxrwxrwx   1 webmaster cod       1057279 Dec 14 19:23 24998/qla2xxx-v8.00.01-dist.tgz
-rwxrwxrwx   1 webmaster cod       1057279 Dec 14 19:28 25000/qla2xxx-v8.00.01-dist.tgz
226 Transfer complete.
ftp>


If for any reason this driver will be removed from their site and you - the reader - are not able to find it anymore, I'll keep it in cool place ;)

10.12.2004 14:07

ICP RAID Controller Status ERROR - mission impossible?


Today is one of these days, you don't want to wake up in the morning. Well, I had to, because one of my servers wasn't booting anymore (LI was the only thing, that LILO [EN] was able to tell me).

The raid controller of this system is an ICP GDT8546RZ [DE] and so I called ICP Technical Support where a very nice man helped me out there by removing all raid components from the raid array and creating a single disk with one physical drive. "LI" was still the only thing I got, but nice to see that all my data seems to be still alive.

After quick investigation, I found out, that this problem should be resolved in a few minutes. SHOULD!. Reinstalling LILO would do the trick, but - how to reinstall LILO on systems, that are far away from standard configuration? I'm using SGI's XFS [EN] as filesystem on this server, so I'd need an XFS BootCD. Blade's Woody XFS Netinst [EN] would do, but it has no gdth (ICP Raid Controller) support onboard. I tried to find a suitable gdth.o module for the 2.4.20-bf2.4-xfs kernel on this CD. After all gdth.o modules (found via Google) produced either a kernel hang while insmodded or required tons of symbols my kernel didn't export, I tried to build my own 2.4.20-bf2.4-xfs kernel on my notebook. Needless to say, on days like today, you really need a floppy drive in your notebook and guess what? I don't have one.

The next two or three hours I spent with getting this system to boot with XFS and gdth support. I failed. While searching my notebooks filesystem for useful software to solve this problem, I stumbled accross the KANOTIX Bug-Hunter 10 [DE] iso image. "Well, let's give it a try.", I thought. Just for you to imagine my current situation: It's 12:00am, you should be on vacation, you're working for about 4 hours on the same problem and you're not a damn little step ahead.

Nice surprise, KANOTIX Bughunter 10 has XFS and gdth support included. mount, chroot, lilo, exit, umount, reboot. The system is now running again, for about two hours (stable) and currently the data is being stored on tape (you know, on days like this, it's good to have additional backups). After that, I'll make a ghost image and try to re-establish the RAID1 host drive. And after everything is done, I'll have a nice cold beer in a near pub and make my way back home to my family.

Note to myself: Use grub instead.

06.12.2004 10:47

Automatic NTLM Authentication using Perl


Since Friday I tried to automatically parse the output of Microsofts Certification Services via HTTP because I need to forward the generated challenge password to my automated certificate enrollment procedure. Looking back, it was a little bit tricky after all. I had to consider several things that I want to summarize in this article. Maybe it can be useful to anyone.

First of all, you have to install libwww-perl [DEB] and the Authen::NTLM [EN] Perl Module from CPAN. For the latest version of this module consult the CPAN-shell (perl -e shell -MCPAN 'install Authen::NTLM').

The Output of microsoft's certification service is encoded as UTF-16LE, so you have to decode it. I don't know, if it's encoded everywhere the same, so be sure to check which encoding you get with your browser.
#!/usr/bin/perl
#
# Automatically retreive the challenge password for automatic certificate
# enrollment with a microsoft certification authority
#
# by Alexander Griesser <perl@tuxx-home.at>
# 2004-12-06

use LWP::UserAgent;
use HTTP::Request::Common;
use Encode qw/decode/;

my $url = 'http://yourserver/certsrv/mscep/mscep.dll';

# Set up the ntlm client and then the base64 encoded ntlm handshake message
#  Note that "keep_alive" is required here
my $ua = new LWP::UserAgent(keep_alive=>1);

# Set credentials here (leave "realm" param blank)
$ua->credentials('server_ip:80', '', 'domain\username', 'password');

$request = GET $url;
$response = $ua->request($request);

if ($response->is_success)
{
  # The output is encoded as UTF-16LE, so we have to decode it
  # first before use
  $out = decode("UCS-2LE", $response->{_content});
  $out =~ s/.*challenge password is ([^ ]+).*/$1/g;
  print "The challenge password is: $out \n";
}

03.12.2004 09:16

Debian's autofs - or why is it always me??


After a few hours trying to get autofs [EN] 4.1.3-4 (Debian testing) to automagically unmount expired mountpoints, I took consulting the Debian BTS [EN] into consideration. Downgrading to 3.9.99-4.0.0pre10-1 really helped, so it was not my fault which relieves me. Now my autofs is working as it should.

Memo to myself: Always check BTS first before wasting precious time.

01.12.2004 16:00

Linux playing faxserver


Today I struggled quite a few hours with getting g3tolj to print incoming faxes properly. 99% of all faxes were printed perfectly, but there's another 1% of faxes that occupied two printed pages instead of one. So, as you could guess, this post is for everyone, who has the same problem.
RES=$(basename $FAX | sed 's/.\(.\).*/\1/')

if [ "$RES" = "n" ]; then
  STRETCH="-aspect 2.0"
else
  STRETCH=""
fi

g3tolj $STRETCH $FAX | lp -d $PRINTER

While trying to understand the G3-Format by reading tons of regarding documents on the web, I stumbled across this information, that mgetty already sorts out such faxes for me by renaming them to fn instead of ff... Well, it works now and that's important.

01.12.2004 08:32

The birth of my weblog


In a world, where everybody has a weblog, I need one too. And because of everyone having his/her weblog written in English, I also need to do this. Exciting... Let's see, maybe it's going to be fun.