Bembel-B Blog

2007/05/09

Hddtemp with SATA Support on Ubuntu 7.04 and Debian

I switched my home PC from Fedora Core 5 to Ubuntu 7.04 Feisty Fawn on Sunday, which went quite smoothly and satisfying. Aside, the currently available hddtemp package (0.3-beta15-33) of Ubuntu 7.04 is not capable of reading temperatures of SATA drives. I found that bug report, after fiddeling with the configuration files and init scripts.

Ubuntu Logo

To get my temperatures with hddtemp I added my drive to /etc/hddtemp.db determing the needed values with sudo smartctl -d ata -a /dev/sda (see man hddtemp).

root@p512o:/etc# diff hddtemp.db.orig hddtemp.db
130a131
> "ST3250823AS"                         194  C  "Seagate Barracuda 7200.8 250GB SATA"

I also had to rebuild the deb package with the Debian unstable hddtemp_0.3-beta15-36 sources as follows.
You can download the i386 package, but beware: I’m a noob and didn’t change anything of the package (like mentioning that I built it for Ubuntu), which might be necessary.

Prepare build environment:

mkdir -p ~/debbuild/hddtemp
pushd $_
dget -x http://ftp.debian.org/debian/pool/main/h/hddtemp/hddtemp_0.3-beta15-36.dsc
cd hddtemp-0.3-beta15/

Build (without signing because of seahorse-agent problems) and install:

debuild -rfakeroot -uc -us
sudo dpkg -i ../hddtemp_0.3-beta15-36_i386.deb
popd

The hddtemp daemon was restarted with the installation. Test daemon output:

netcat localhost 7634
|/dev/sda|ST3250823AS|43|C|

Maybe I could just have installed the binary Debian package or just wait for the Ubuntu package to be updated. But as I’m new to the Debian world, having mainly used Red Hat style Linux until now, I see this as an exercise. Mixing apt repositories for Ubuntu with Debian ones is not recommended as far as I understand.

Here’s some related information I’ve bookmarked about deb packages:

ChangeLog

[070513 Add logo]
[070523 Download link for i386 deb package]
[2009-04-26: Fix box.net links.]

Advertisements

Blog at WordPress.com.