BenV's notes

Tag: slackware

Slackware64 and Digikam

by on Feb.22, 2012, under Software

Last week we bought a new toy — a Canon EOS 600D (including a lens with about the same pricetag). So far I’m happy with it, it’s nice to play with a ‘real’ camera for a change. (our previous one is a simple Samsung TL205. Apples and oranges.) (continue reading…)

Leave a Comment :, , , more...

DRBD 8.4.1 compiling the kernel module

by on Feb.09, 2012, under Software

In an attempt to try out the latest DRBD version (8.4.1 atm) on a new Xen installation, I ran into some issues.
Initially I built the kernel with the included DRBD module, but I soon realized that this version was older than I wanted to play with (the included version was 8.3.11), so I grabbed the source and tried to build it myself. (continue reading…)

Leave a Comment :, , , , more...

Slackware, Wine and OpenCL (NVIDIA)

by on Jan.29, 2012, under Software

While updating wine-1.4-rc1 I thought it would be interesting to see if I could get their OpenCL stuff to work. The lack of information on how to do so is really annyoing, so here’s what I did to get it to compile. (continue reading…)

Leave a Comment :, , , , more...

Need Ventrilo/Teamspeak? Try Mumble!

by on Jun.29, 2011, under Software

Firelands!

Today the 4.2.0 aka Firelands patch was released for World of Warcraft.

First thing to notice: where did all my inventory space go? And why do I have tons of ingame mail? Well, they removed the keyring, making a bunch of keys obsolete (which they send you gold for in return through ingame mail), and the rest of them are stashed in your inventory.
Gee thanks assholes. Guess those keys are really a lot bigger than those 128 axes I carry in my backpacks.

Apparently this is needed to make room for the Dungeon Journal, which shows you the stuff you would normally check Wowwiki etc for, things like boss abilities and drop lists. Don’t know why that requires the key ring to go away, but leave that to Blizzard.
Of course with new content comes a new daily grind guide. Wonder how long I’ll manage to put up with that.
(continue reading…)

Leave a Comment :, , , , more...

PostgreSQL 9.0 on Slackware

by on Jun.14, 2011, under Morons, Software

Another reason to avoid MySQL

Today MySQL has managed to piss me off enough to get rid of it for something I was working on.
The case:
I just created a brand new database. In that database I want to store items, and those items should be linked to users.
So as a first stab I had this CREATE TABLE statement:

CREATE TABLE user (user_id SERIAL, username varchar(255) UNIQUE NOT NULL, password char(32) NOT NULL, PRIMARY KEY (user_id));
CREATE TABLE item (item_id SERIAL, name varchar(255) NOT NULL UNIQUE, user_id bigint unsigned REFERENCES user(user_id),PRIMARY KEY (item_id)) ENGINE = InnoDB;

Guess what MySQL said? Of course, it said “Sure thing dude!”. And to make sure you believe me, here’s the verbatim:

mysql> CREATE TABLE user (user_id SERIAL, username varchar(255) UNIQUE NOT NULL, password char(32) NOT NULL, PRIMARY KEY (user_id));
Query OK, 0 rows affected (0.36 sec)
mysql> show warnings;
Empty set (0.00 sec)
mysql> CREATE TABLE item (item_id SERIAL, name varchar(255) NOT NULL UNIQUE, user_id bigint unsigned REFERENCES user(user_id),PRIMARY KEY (item_id)) ENGINE = InnoDB;
Query OK, 0 rows affected (0.32 sec)
mysql> show warnings;
Empty set (0.00 sec)

Well guess what….
IT LIED!
Those references to the user table? What references? (continue reading…)

Leave a Comment :, , , more...

World IPv6 Day!

by on Jun.08, 2011, under Morons

Today is proclaimed World IPv6 Day, in order to motivate everyone to just fucking get it done already. And test if people have issues today of course 🙂
They’ve had years and years and still major ISPs haven’t even heard of IPv6 or simply can’t be arsed because there’s little demand for it. (Boohoo, “it costs money to upgrade our ancient equipment“)
So attention everyone: if you don’t have IPv6 right now, mail your ISP, bug their contact for(u)ms, and spam their phones. You want it! 🙂
If you’re hosting content and don’t have it: bug your provider about it as well. It’s saddening to see how few hosting providers today still don’t offer IPv6, even though it’s been out there for over a decade!

One of the reasons my home connection is with XS4All is that they deliver native IPv6 to the doorstep.
All machines at home automagically receive an IPv6 address from my modem and it just works ™. No hassles with tunnels or anything, simply turn it on and it works.

As for the “Why would I care?“. Because it’s fun to play with. Because it’s neat to have so many public addresses.
No more NAT and port forwarding to get your webserver reachable on the internet, but simply open up port 80 in your firewall and you’re done!
You’ll have so many addresses (assuming your ISP are not major dickheads that only hand out single IPs, but they won’t) that you can put an IPv6 address
on every device you have, for every program you have, for every pixel on your screen and still you’ll have tons to spare.

If you’re not sure if you have it, there’s this test to check, but I sure hope you know about the state of your connection without such tests 😉

In case your stupid provider is being the usual dumbdumbhead and won’t be bothered (and obviously you can’t switch because they have the local monopoly) you can get IPv6 connectivity for free through a tunneling broker by at least two parties that I know of. One of them is Hurricane Electric, the other Sixxs (although they can be dicks, so I’ll be a dick by not linking them ;))
It will give you the ability to tinker with IPv6, so give it a shot if you’re new to it. Did I mention it’s free? 🙂

But how do I configure IPv6 on my Slackware machine?
Well, if you do it properly and get it through your ISP natively your modem will take care of it. It’ll announce your prefix to your network and if you have your kernel set to autoconfigure it (which is default, as long as you’ve loaded the ipv6 module) it’ll get an address based on your mac address.
Adding addresses manually is just as easy as with ipv4:

# Example out of thin air
root@somewhere# modprobe ipv6 # if you hadn't done this yet ;)
root@somewhere# ip -6 addr add 2001:1234:3214:abcd::80/64 dev eth0
root@somewhere# ip -6 route add default via 2001:1234:3214::1 dev eth0

So go and check it out, it can be fun 🙂

Oh yeah, obviously my notes are available on IPv6. And it seems to be a lot faster than google at the moment 😉

ipv6 ready

Leave a Comment :, more...

Fighting with PNP4Nagios

by on Jun.07, 2011, under Software

So today I noticed my pretty Check MK graphs were broken. Trying to view a random Check_MK service’s PNPGraphs gave this error:

Warning: preg_match() [function.preg-match]: Compilation failed: unknown option bit(s) set at offset 0 in /usr/lib/kohana/system/core/utf8.php on line 30

Fatal error: PCRE has not been compiled with UTF-8 support. See PCRE Pattern Modifiers for more information. This application cannot be run without UTF-8 support. in /usr/lib/kohana/system/core/utf8.php on line 38

Of course this is after I had upgraded some Slackware packages in the daily upgrades (I still run Slackware Current on non production machines, keeps things interesting) including PHP and Perl, so I wasn’t really surprised.
I reinstalled RRDTool since the perl bindings were gone (and of course I once again had to fight it) and decided to upgrade PNP4Nagios while I was at it.
However, no dice. Searching for the error gave nothing, hence this post.

To be sure it wasn’t what they (google) claimed it would be, I checked for UTF-8 support in my libpcre:


benv@graphs$ pcretest -C
PCRE version 8.12 2011-01-15
Compiled with
UTF-8 support
Unicode properties support
Newline sequence is LF
\R matches all Unicode newlines
Internal link size = 2
POSIX malloc threshold = 10
Default match limit = 10000000
Default recursion depth limit = 10000000
Match recursion uses stack

Jup, UTF-8 support is there, along with Unicode stuff. Yay.

Next thing I noticed was that the new PHP version was complaining about extensions that wouldn’t load.
For instance dbase.so didn’t exist anymore, and some other junk failed as well. It’s possible that this error has been around for a while on that machine, but it was time to fix it!
Since my php.ini was from 2008 I decided to simply take the stock /etc/httpd/php.ini-production for now.
After that change php was again bitching about not being able to load extensions, but this times it were different ones.
Apparently they now have ‘libenchant‘ for spell checking, so that was one of the other failures.
To fix that problem use ‘slackpkg install enchant‘. (that’ll teach me to run the slackpkg install-new every once in a while :p)

Restarting Apache the hard way (not “apachectl restart” but /etc/rc.d/rc.httpd restart) helped for the PNP4Nagios error.
However, upgrading it introduced a new gimmick called:

Please check the documentation for information about the following error.

Undefined index: auth_enabled
file [line]:

application/models/auth.php [22]:

back

Right. Upgrading my Check_MK to 1.1.10p3 didn’t help.
However, checking the pnp4nagios config.php file made me aware that they added some options.
After merging in the new config.php options from their sample dir it finally worked again.
The new options I had to add when going from pnp4nagios version 0.6.7 to 0.6.13 were:

$conf['zgraph_width'] = "750";
$conf['zgraph_height'] = "450";
$conf['auth_enabled'] = FALSE;
# Adjust the next one to your configuration, it's probably different :)
$conf['livestatus_socket'] = "unix:/var/lib/nagios/rw/live";
$conf['allowed_for_all_services'] = "";
$conf['allowed_for_all_hosts'] = "";

Hooray, pretty graphs are back 🙂

LMSensor Fan1 speed graph

Pretty graphs!

1 Comment :, , , , , more...

Linux Software Raid-1 issue

by on Jan.29, 2011, under Software

It just took me about an hour to figure this one out, so here’s the story for the next time I run into it.
Steps taken:
* New machine
* 2 harddisks (Western Digital Greens, so used wdidle3 on them!)
* Boot Slackware64 installer from PXE/NFS
* cfdisk, create 2 identical partitions, make bootable, set type to FD, write, quit
* mdadm –create /dev/md0 –raid-level=1 –raid-devices=2 /dev/sda1 /dev/sdb2
* install slackware64, grub2 and some other junk
* reboot

Sounds good right?
Well, for some reason the array kept booting up with only 1 of 2 disks active.
No errors or warnings, just kept fucking up. /proc/mdstat looked like

# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4]
md0 : active raid1 sdb1[1]
39061952 blocks [1/2] [_U]

Adding /dev/sda1 back (mdadm /dev/md0 –add /dev/sda1) worked fine too, the array resync-ed without problems.

After about an hour of trying to recreate superblocks and that sort of stuff I found it:
The partition type of /dev/sda1 was set to 0x83 instead of 0xFD.
Thanks cfdisk, last time I used that piece of garbage. (I’m 100% certain I set them to 0xFD, but somehow it’s bugging for me lately in cfdisk).

Leave a Comment :, , , , more...

Why I hate lilo

by on Jan.11, 2011, under Software

Every time I install a machine with the latest Slackware, I’m amazed again at the installed boot manager – lilo.
Sure, lilo works. Most of the times. Even when you have a raid-1 boot device.
Unless you don’t have the latest version of lilo of course.

Today I tried to continue a Slackware64 (current) install of a machine that I installed a week ago.
It worked fine, was just about to install Xen when one of the disks started acting up.
Obviously SMART didn’t help for a bit
* Report – No errors!
* Short Self test – Your disk is fine!
* You want a long test that takes 4 hours? Your machine locks up before it completes, haha!
But when the disk kept failing every time when the md1 resync hit 36%, I yanked out the disk and sent it RMA.
Dmesg showed error like this:

[ 3362.784129] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[ 3362.784132] ata1.00: failed command: READ DMA EXT
[ 3362.784135] ata1.00: cmd 25/00:00:3f:60:f4/00:04:57:00:00/e0 tag 0 dma 524288 in
[ 3362.784135] res 40/00:00:02:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 3362.784136] ata1.00: status: { DRDY }
[ 3362.784139] ata1: hard resetting link
[ 3364.002049] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[ 3364.009142] ata1.00: configured for UDMA/33
[ 3364.009148] sd 0:0:0:0: [sda] Result: hostbyte=0x00 driverbyte=0x08
[ 3364.009150] sd 0:0:0:0: [sda] Sense Key : 0xb [current] [descriptor]
[ 3364.009152] Descriptor sense data with sense descriptors (in hex):
[ 3364.009153] 72 0b 00 00 00 00 00 0c 00 0a 80 00 00 00 00 00
[ 3364.009156] 00 00 00 01
[ 3364.009158] sd 0:0:0:0: [sda] ASC=0x0 ASCQ=0x0
[ 3364.009159] sd 0:0:0:0: [sda] CDB: cdb[0]=0x28: 28 00 57 f4 60 3f 00 04 00 00
[ 3364.009162] end_request: I/O error, dev sda, sector 1475633215
[ 3364.009174] ata1: EH complete

So today I figured I could continue installing with only half a raid-1 array.
But it didn’t boot (“Loading operating system…. *halt*).
I figured lilo must have been installed to the MBR of the disk that I yanked, so I booted from LAN and ran lilo.
Obviously lilo complained, because /dev/sda was only half the raid-1 array and disks were missing!
Fine. I changed my boot device to /dev/md0, hoping that lilo would get the hint.


# lilo
Warning: LBA32 addressing assumed
Fatal: Not all RAID-1 disks are active; use '-H' to install to active disks only
# lilo -H
Warning: LBA32 addressing assumed
Warning: Partial RAID-1 install on active disks only: booting is not failsafe

Warning: Faulty disk in RAID-1 array; boot with caution!!
Fatal: Unusual RAID bios device code: 0xFF

*sigh*
This is why I hate lilo. If it doesn’t work, it doesn’t work.
And it never tells you why. Or maybe it does, just like windows always tells you what’s wrong when you get a blue screen.

It’s probably this bug, but I don’t care. Always something.
Time to find the sources to grub.

Leave a Comment :, , , , more...

Monitoring your systems: Nagios and Check_MK

by on Sep.22, 2010, under Software

If you have one or more servers, you probably have a few things that you want to be up and running all the time. And when they aren’t working for some reason, you want to know about that as soon as possible and not 2 weeks later when you finally find out the hard way because your raid array has crashed completely.
Basically you want some kind of software that monitors the state of your services/servers. Well, most competent system administrators already have this up and running.
Nagios is capable of doing this. (continue reading…)

6 Comments :, , , , more...