Sensors on Intel DQ67EP

On my previous board I was using the information from lm-sensors for Cacti and phpSysInfo, so after upgrading to a new system board it turned out lm-sensors did not work out of the box for my Intel motherboard DQ67EP. A sensors-detect gave me the following information:

Now follows a summary of the probes I have just done.

Driver `to-be-written':
* ISA bus, address 0x290
Chip `Nuvoton W83677HG-I Super IO Sensors' (confidence: 9)

Note: there is no driver for Nuvoton W83677HG-I Super IO Sensors yet.
Check http://www.lm-sensors.org/wiki/Devices for updates.

Doing some research it turned out I had to install a separate driver as kernel module on my Debian 6.0.6 (Squeeze) system. You can find the driver on this website.

[Read more...]

Downgrading Debian package

It is very rare upgrades of Debian stable break functionality. It happened recently with asterisk, so my PBX was out of service. Due to bug #688053 I had to rollback the asterisk packages to restore service. This is how I proceeded, by just installing the previous version from the local filesystem.

# dpkg -i /var/cache/apt/archives/asterisk_1%3a1.6.2.9-2+squeeze5_amd64.deb /var/cache/apt/archives/asterisk-config_1%3a1.6.2.9-2+squeeze5_all.deb /var/cache/apt/archives/asterisk-doc_1%3a1.6.2.9-2+squeeze5_all.deb dpkg: warning: downgrading asterisk from 1:1.6.2.9-2+squeeze7 to 1:1.6.2.9-2+squeeze5.
(Reading database ... 55833 files and directories currently installed.)
Preparing to replace asterisk 1:1.6.2.9-2+squeeze7 (using .../asterisk_1%3a1.6.2.9-2+squeeze5_amd64.deb) ...
Stopping Asterisk PBX: asterisk.
Unpacking replacement asterisk ...
dpkg: warning: downgrading asterisk-config from 1:1.6.2.9-2+squeeze7 to 1:1.6.2.9-2+squeeze5.
Preparing to replace asterisk-config 1:1.6.2.9-2+squeeze7 (using .../asterisk-config_1%3a1.6.2.9-2+squeeze5_all.deb) ...
Unpacking replacement asterisk-config ...
dpkg: warning: downgrading asterisk-doc from 1:1.6.2.9-2+squeeze7 to 1:1.6.2.9-2+squeeze5.
Preparing to replace asterisk-doc 1:1.6.2.9-2+squeeze7 (using .../asterisk-doc_1%3a1.6.2.9-2+squeeze5_all.deb) ...
Unpacking replacement asterisk-doc ...
Setting up asterisk-config (1:1.6.2.9-2+squeeze5) ...
Setting up asterisk-doc (1:1.6.2.9-2+squeeze5) ...
Setting up asterisk (1:1.6.2.9-2+squeeze5) ...
Starting Asterisk PBX: asterisk.
Processing triggers for man-db ...
#

Unattended icaclient installation

For a new project we need to build Linux workstations with Debian. One of the wishes is to have a Citrix Receiver installed, so we created a nice install script, but the EULA agreement is not very helpful in an unattended install.

echo "icaclient icaclient/accepteula boolean true" | debconf-set-selections
dpkg -i /tmp/icaclient_12.0.0_amd64.deb

This was found by doing the following:

cd /tmp
dpkg-deb -x icaclient_12.0.0_amd64.deb extract/
dpkg-deb -e icaclient_12.0.0_amd64.deb extract/DEBIAN

Have a look at the contents of the extract/DEBIAN/config file and you’ll find out.

It took me quite some time to figure this one out, so I thought let’s share.

Moving into the cloud

Last week I setup a server in a cloud based on Xen virtualization technology. After some hours research I decided to go for the Rackspace cloud. I chose the minimal setup to start with, which is a 256MB memory configuration that comes with 10GB disk space. As stated in the specs, the 256MB plan will get you 1/64 of the CPU allocation. Which is fine to start with for a standard LAMP setup.

For now they only offer a large variety of Linux distributions. I chose Debian 5.0 Lenny, because it makes migration easier as the site is running on Debian 5.0 already. The registration process and setup of the minimal Debian install went very smoothly. In under two hours I had successfully migrated a website. So for the setup part I am totally satisfied, let’s see how the availability part will develop.

Backup Lenny using TSM

The few steps below describe in short how to install Tivoli Storage Manager (TSM) on Debian 5 (Lenny) x64.

1. Download the latest 5.x TSM client

# wget ftp://ftp.wu-wien.ac.at/mirrors/tsm/maintenance/client/v5r5/Linux/LinuxX86/v552/5.5.2.0-TIV-TSMBAC-LinuxX86.tar

2. Install alien and dependencies

# apt-get install alien gawk libstdc++5

3. untar the TSM client software

# tar -xvf 5.5.2.0-TIV-TSMBAC-LinuxX86.tar
NOTICES.TXT
README_enu.htm
README_api_enu.htm
README_hsm_enu.htm
TIVsm-API.i386.rpm
TIVsm-API64.rpm
TIVsm-BA.i386.rpm
TIVsm-HSM.i386.rpm

4. Convert the RPM packages using alien

# alien -g TIVsm-API.i386.rpm
Warning: Skipping conversion of scripts in package TIVsm-API: postinst prerm
Warning: Use the --scripts parameter to include the scripts.
Directories TIVsm-API-5.5.2 and TIVsm-API-5.5.2.orig prepared.
# alien -g TIVsm-BA.i386.rpm
Warning: Skipping conversion of scripts in package TIVsm-BA: postinst prerm
Warning: Use the --scripts parameter to include the scripts.
Directories TIVsm-BA-5.5.2 and TIVsm-BA-5.5.2.orig prepared.

5. Adjust the control files

# mv TIVsm-API-5.5.2/debian TIVsm-API-5.5.2/DEBIAN
# mv TIVsm-BA-5.5.2/debian TIVsm-BA-5.5.2/DEBIAN
# vi TIVsm-API-5.5.2/DEBIAN/control
# vi TIVsm-BA-5.5.2/DEBIAN/control

The control file should like the following:

Source: tivsm-api
Section: non-free
Priority: extra
Maintainer: root <root@localhost>

Package: tivsm-api
Architecture: all
Depends: ${shlibs:Depends}
Description: IBM Tivoli Storage Manager API

6. Build the packages

# dpkg -b TIVsm-API-5.5.2
dpkg-deb: building package `tivsm-api' in `TIVsm-API-5.5.2.deb'.
# dpkg -b TIVsm-BA-5.5.2
dpkg-deb: building package `tivsm-ba' in `TIVsm-BA-5.5.2.deb'.

7. Install the packages

# dpkg -i TIVsm-API-5.5.2.deb
Selecting previously deselected package tivsm-api.
(Reading database ... 146642 files and directories currently installed.)
Unpacking tivsm-api (from TIVsm-API-5.5.2.deb) ...
Setting up tivsm-api (5.5.2) ...
# dpkg -i TIVsm-BA-5.5.2.deb
Selecting previously deselected package tivsm-ba.
(Reading database ... 146716 files and directories currently installed.)
Unpacking tivsm-ba (from TIVsm-BA-5.5.2.deb) ...
Setting up tivsm-ba (5.5.2) ...
#

8. Post install issues

# echo "/opt/tivoli/tsm/client/ba/bin" >> /etc/ld.so.conf
# ldconfig
# ln -s /opt/tivoli/tsm/client/lang/en_US /opt/tivoli/tsm/client/ba/bin/

And you’re done installing TSM. You’re now ready to proceed to the configuration. The TSM configuration files are located in /opt/tivoli/tsm/client/ba/bin. You can start by copying the sample files.

# cd /opt/tivoli/tsm/client/ba/bin
# cp dsm.opt.smp dsm.opt
# cp dsm.sys.smp dsm.sys

Have a look at the IBM docs for the configuration options.

Gallery2 and Lenny

During the upgrade from Etch to Lenny I was surprised that the Gallery2 package was not available for the current stable release of Debian. At first it was no problem, but the Gallery2 package of old stable Etch is to old for the most recent WPG2 plug-in for WordPress, so I had to upgrade Gallery2 using a upstream version as one of the package maintainers made clear:

“Gallery2 is not available in Lenny due to the large amount of differences between the previous version and 2.3-1 from unstable. The release team decided not to include Gallery2 in stable due to this disruptive change late in the release process. The gallery2 package from sid can be installed via pinning.”

I’ve documented the steps I took for upgrading Gallery2.

1. Create to following file if it not exists:

vi /etc/apt/preferences

2. Add the following lines:

Package: *
Pin: release a=stable
Pin-Priority: 600

Package: gallery2
Pin: release a=testing
Pin-Priority: 800

* If you are using testing Debian make sure testing is the bigger number.
* This file will install only from the highest pin but it will show you if the packages is available in testing or unstable.

3. Edit /etc/apt/sources.list and add the following lines:

# Testing (squeeze) for gallery2
deb http://ftp.us.debian.org/debian/ squeeze main contrib non-free
deb-src http://ftp.us.debian.org/debian/ squeeze main contrib non-free

4. Update the apt database and upgrade the gallery2 package:

# apt-get update
# apt-get upgrade -s

You’ll notice that the package will be kept back. Issue a dist-upgrade to install the upstream package.

# apt-get dist-upgrade

Restart apache and as soon as you visit the gallery2 site you’ll be asked to start the upgrade process, which went very smoothly.

Setup Firefly to serve iTunes

FireFly LogoThis guide will help you setup Firefly Media Server to serve iTunes. This server based program, previously known as “mt-daapd” shares your media collection to iTunes. DAAP stands for Digital Audio Access Protocol and is developed by Apple to share media across a local network.

I have done the installation on Debian Lenny, but Firefly (still called mt-daapd on the Debian repository!) is even available on Windows. In order to publish the firefly shared library on the network I have used Avahi, which is a free implementation of Zeroconf including mDNS/DNS-SD.

1. Install the needed packages including dependencies

# apt-get install mt-daapd avahi-daemon

2. Setup Avahi by creating /etc/avahi/services/mt-daapd.service

<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">

<service-group>

<name replace-wildcards="yes">%h</name>

<service>
<type>_daap._tcp</type>
<port>3689</port>
<txt-record>txtvers=1 iTShVersion=131073 Version=196610</txt-record>
</service>

<service>
<type>_rsp._tcp</type>
<port>3689</port>
<txt-record>txtvers=1 iTShVersion=131073 Version=196610</txt-record>
</service>

</service-group>

3. Restart the Avahi daemon

# /etc/init.d/avahi-daemon restart

4. Edit /etc/mt-daapd.conf. The following variables where important to me:

# $Id: mt-daapd.conf.templ 1660 2007-09-12 13:08:04Z rpedde $
#
# This is the mt-daapd config file.

<...>

#
# admin_pw (required)
#
# This is the password to the administrative pages
#

admin_pw = mt-daapd

<...>

#
# mp3_dir (required)
#
# Location of the mp3 files to share. Note that because the
# files are stored in the database by inode, these must be
# in the same physical filesystem.
#

mp3_dir = /path/to/music

#
# servername (required)
#
# This is both the name of the server as advertised
# via rendezvous, and the name of the database
# exported via DAAP. Also know as "What shows up in iTunes".
#

servername = Firefly %v on %h

<...>

5. Restart mt-daapd

# /etc/init.d/mt-daapd restart

The first time you start mt-daapd it will do a full scan to update the mt-daapd database. Watch the /var/log/daemon.log file to see when it’s ready.

May 4 09:54:25 sinners mt-daapd[16843]: Firefly Version svn-1696: Starting with debuglevel 2
May 4 09:54:25 sinners mt-daapd[16843]: Plugin loaded: daap/svn-1696
May 4 09:54:25 sinners mt-daapd[16843]: Plugin loaded: ssc-ffmpeg/svn-1696
May 4 09:54:25 sinners mt-daapd[16843]: Plugin loaded: rsp/svn-1696
May 4 09:54:25 sinners mt-daapd[16843]: Starting rendezvous daemon
May 4 09:54:25 sinners mt-daapd[16843]: Client running
May 4 09:54:25 sinners mt-daapd[16843]: Starting signal handler
May 4 09:54:25 sinners mt-daapd[16845]: Initializing database
May 4 09:54:25 sinners mt-daapd[16845]: Full reload...
May 4 09:54:25 sinners mt-daapd[16845]: Starting mp3 scan
May 4 09:54:27 sinners mt-daapd[16845]: Starting playlist scan
May 4 09:54:27 sinners mt-daapd[16845]: Updating playlists
May 4 09:54:27 sinners mt-daapd[16845]: Scanned 10 songs in 1 seconds
May 4 09:54:27 sinners mt-daapd[16845]: Starting web server from /usr/share/mt-daapd/admin-root on port 3689
May 4 09:54:27 sinners mt-daapd[16845]: Registering rendezvous names
May 4 09:54:27 sinners mt-daapd[16845]: Serving 10 songs. Startup complete in 2 seconds

Now you should be able to connect to the mt-daapd admin webinterface at http://yourservername:3689.

6. You’re done!
Fire up iTunes and you’ll see the just created Firefly library become available under Shared. You can also use this service with Rhythmbox Music Player, XMMS with the DAAP plugin, or any other DAAP compatible music player.


Ipurge

No, it’s not another Apple app, it’s an handy tool that comes with the Cyrus mailserver package to delete mail from IMAP mailboxes. I have setup two entries to get rid of unnecessary messages from the spam and trash folders for all users.
The following rules have been added to the EVENTS list on /etc/cyrus.conf.


# purge trash messages older than 2 weeks
purgetrash      cmd="/usr/sbin/ipurge -X -d 14 -f user.*.Trash" at=0600
# purge spam messages older than 4 weeks
purgetrash      cmd="/usr/sbin/ipurge -X -d 28 -f user.*.Spam" at=0630

It took me some time to figure out the correct matching pattern and at first I was a little bit scared to use the -f option. The man page for ipurge says "-f Force deletion of mail in all mailboxes." But you'll need it, without it won't work.

I like this way of cleaning up!