Debian Sarge and Cacti

As my network at home has got busier, I�ve been finding weird things are going on and so have needed to implement a degree of monitoring on my network (if only to keep tabs on where all my hard drive space is going), I looked at a number of possibilities but have settled on SNMP monitoring via �Cacti�, running on a Debian 3.1 �Sarge� linux server�

As my network at home has got busier, I�ve been finding weird things are going on and so have needed to implement a degree of monitoring on my network (if only to keep tabs on where all my hard drive space is going), I looked at a number of possibilities but have settled on SNMP monitoring via �Cacti�, running on a Debian 3.1 �Sarge� linux server�
Continue reading “Debian Sarge and Cacti”

Where’s *my* honey monkey?

Not to be confused with the well known “squadron of flying butt-monkeys” (who seem to be the ones enlisted to attempt to deliver anything important and requiring both timelyness and robust creation), Microsoft are deploying web-bots they’ve named ‘Honey monkeys’ to attempt to discover and interpret new attack vectors against their operating systems.

Microsoft are using “Honey Monkeys” to see if they can catch any previously undiscovered attack vectors (assumably against their operating systems).
Now that would be an interesting project to work on as I’ve seen a number of machines where I work get compromised simply by visiting sites which look innocent enough. I sure like to know how you’d programatically emulate the social engineering which seems to be all the rage “Warning – your computer may be running slow, click here to fix” … yeah – right!

The Power of Contactability

Wow – The very same day as I create a link to let people email me, I get some feedback on one of my HOWTO documents, all the way from Kansas!

Yesterday I set myself up a GMail account for this blog so that, just incase someone *does* read it (or I guess, more to the point, the articles linked to from it) they can contact me and give me some feedback.
I’ve come in this morning to an email message all the way from Kansas State University College of Architecture Planning and Design where Brent O’Connor has fed back on my Debian Sarge HOWTO, letting me know that to reload my Sarge Server without rebooting I just need to run “/etc/init.d/inetd reload” (given that I’d posted �Reboot the server (or figure out how to reload the affected configuration files – and let me know)� in my original document).

So wow, huge thanks for Brent from Kansas for paying attention to the man behind the curtain and letting me know that tip, I’ve since updated the page to reflect his advice.

For those of you without contact addresses on your websites, get one up there! You’ll see that I’ve used a GMail account as it’s pretty much disposable in terms of being able to change it at anytime should SPAM levels get too high, and of course I’ve also munged the address to try and upset the spambots ability to harvest the address in the first place (I guess the munging also serves as a kind of intelligence test for people contacting me too! 🙂 ). It’s kind of rewarding to realise that other people are reading your site and can discuss what you’ve written (should they choose to), so this isn’t really just a resource for Rob when I forget stuff any longer I guess – yippee!

Setting up Sarge

I’m finding more and more need for a large amount of ‘always on’ storage to be available on my home network and, the recent release of Debian 3.1 (Sarge) has enticed me to repurpose a box I had around the house and get it up and running…

Debian GNU/Linux 3.1 (a.k.a. sarge) was released on 6th of June, 2005. The new release includes a bunch of major changes to it’s predecessor Debian GNU/Linux 3.0 (a.k.a. woody). You can check out the press release, review the release notes, or simply click yourself off to the Debian website to read more about it.

Now, while an official installation manual exists, and Google will help you find thousands of people who may be able to answer more technical questions, this page (or pages – depending on how much I end up caring about the documentation) will record my installation experience on my soon to be main server for the house. It’s mainly for my future reference, but you may find it useful too! I have based the instructions on the experience after booting to a CD burnt with the debian-31r0a-i386-netinst.iso file.

This section is a little unnecessary as the Debian 3.1 install is actually pretty good at finding everything, but – for the sake of completeness – my hardware configuration for this server is as follows:

Case: Enermax FS-710B Yes it’s big, but the case was unutilised from a previous MythTV backend server project. This machine will also be running a number of hard drives and cooling is key 🙂
PSU: Enermax 550W EG651P-VE Again
big – 550W (peak 650W) is more than the average system needs, but these
are quiet units and I’m expecting to have a large amount of disk in
this unit at the end of all this. – [Review]
Motherboard: ASUSTeK A7V333-RAID

(VIA KT333 Chipset)

It’s an old board and monitoring the environmental sensors on it doesn’t appear to be too easy – if you have this board AND can direct me to an easy to follow howto to get monitoring working under Debian Sarge, please drop and email to rob [dot] inskeep [at] gmail [dot] com (with the obvious changes to unmung my address :))

I’ve found this link around running Debian on this board – I’ll need to have a bit more of a play and see if it can clarify any of the issues I’ve been having…

CPU: AMD Athlon 2100+
RAM: Generic 512MB PC2700 DDR
Hard Drives: 40GB Maxtor

120GB Western Digital

200GB Seagate

Apollo UATA133 2MB Cache (6E040L0)



Optical: LG DVD ROM It may seem like overkill to put a DVD ROM into a server and I’d agree – but as the distros get bigger it’s making more sense – it also allows me to convince myself (and the accountant wife) that a DVD/RW + CD R/W drive would be a good investment for one of the LAN PCs
Video Card: Power Color CM64P I found this card in my box of bits that all us IT types tend to accumulate, I can’t find a manual or anything useful to describe the card so – google may be your best bet here.
Sound Card: Onboard (C-Media CM8738) Not planning to use this
NIC: PCI 3Com 3C905B Will probably add/replace with a Gig card at some stage

Initial boot from the Network Installation CD

1.0 Choose Language
2.0 Choose Region
New Zealand
3.0 Choose Keymap
American English

4.0 Detection Phase

5.0 Configure the Network
5.1 Enter Hostname
[Enter a name for your machine]
5.2 Domain Name
[Selected Default]

6.0 Partition Disks
I have 3 Disks in this system:
40GB Maxtor (6E040L0)
120 GB Western Digital (WD1200BB-00DW)
200GB Seagate (ST3200822A)
Since there is nothing I want on the box I’m happy to have the install wipe out everything.
6.1 Partitioning Method
6.1.1 Erase entire disk: IDE1 Master (hda)
6.1.2 All files in one partition
This created 2 partitions,
#1    primary    39.5GB    ext3    /
#5    logical      1.6GB     swap   swap
I don’t plan to setup the other 2 disks yet as I want to span them into a very large drive which I can add more space to later – that will take a bit of learning I imagine so for now we just:
6.2 Finish partitioning and write changes to disk
Answer yes to confirm writing the partition tables.

7.0 Write partitions / Installing Debian base system

8.0 Install GRUB boot loader
8.1 Install GRUB as default boot loader

9.0 Completing Installation
9.1 Remove the CD from the drive

First boot after initial CD Configuration

10.0 Debian Configuration

11.0 Time Zone Configuration
11.1 Clock is NOT set to GMT
11.2 Pacific/Auckland
11.3 Root password
11.4 Users Full Name
11.5 Username
11.6 User Password

12.0 APT configuration
12.1 Chose edit by hand
Enter the sources as listed further down in this section – some may not resolve at this point so commenting them out with a # at the start of the line will allow you to continue through the installation.

13.0 Software Selection
Note: I would not choose to install applications during the initial setup as, until this guide is complete and I can understand everything which is happening, I want to be able to install all the packages I need via the apt-get method. To do this, it pays to use local sources where it makes sense see below for my sources list which can be copy/pasted into

13.1 Unpacks a bunch of files

13.2 Configuring Exim v4 (exim4-config)
13.2.1 Local delivery only; not on a network
13.2.2 Plan to configure things later to grab mail from various POP sources and deliver locally to allow for spam/virus blocking at the network level.
13.2.3 Root & postmaster mail recipient [default user]
13.3 Debian configuration complete
13.5.1 Note that we can run this again via base-config program. OK
13.4 Tries to start X & fails
13.6.1 Disables X Server until X can be configured correctly
13.5 Login Prompt

That’s it – the system is setup, now obviously there is some tidy up to do – but at least the system is running. Now, while we still have a local keyboard and monitor plugged in, we need to set the system to use a static IP address so we can find it later once it’s running headless (without a local keyboard/mouse/display).
You may find it easier to finish off via a SSH connection, first off we need to know the IP address that DHCP has assigned to this machine.

You are interested in the value of inet addr: for the eth0 card as this is the IP for the machine (and you’ll need to use it to connect your SSH client remotely.

Once you’re remotely connected, you can carry on to the next step, or go it alone and install any packages you so desire. The only package I needed at this point was vim, a text editor.

  1. As the root/su user, do an apt-get update and an apt-get upgrade first, to ensure you have the latest packages and package list.
  2. Use the command apt-get install vim to install the vim text editor
  3. Edit your /etc/apt/sources.list to restore the lines we commented out during the installation.
    vim /etc/apt/sources.list
    Your file should look something like this:

    deb stable main
    deb stable main
    deb stable main contrib non-free
    # The non-US source listed below is not loving me at the moment – I need to find
    # another non-US apt source.
    #deb stable/non-US main contrib non-free

    deb stable/updates main contrib non-free

  4. Do another apt-get update to test your sources and ensure you have the latest package lists.
  5. Once all your sources are working, do a apt-get upgrade to update your system with the latest packages

Setting a Static IP address
To set a static IP address, you will need to edit the /etc/network/interfaces file:
vim /etc/network/interfaces
Change the line:
iface eth0 inet dhcp

iface eth0 inet static
address [ a_valid_IP_address ] (e.g.
netmask [ your_netmask ] (e.g.
network [ your_network ] (e.g.
broadcast [ your_network ] (e.g.
gateway [ your_gateway ] (e.g.

and save/exit the file (<esc> :wq <enter>)

To apply this configuration type:
/etc/init.d/networking restart
or reboot the system with shutdown -r now

Creating a Spanned Disk using LVM
So, the theroy is like this: I have a couple of largish hard drives (okay, as large as I could afford – and had lying around) and had previously spanned these within Windows XP to store a buttload of files and stuff. Since this server we’re building is going to be up all (most?) of the the time, it goes to reason that the large disk should sit here rather than on a windows box which goes up and down like a whitehouse intern.
On with the section…

  1. Start with unpartitioned disks
  2. Install LVM packages
    apt-get install lvm-common lvm2
  3. Initialize the disk(s) (or partition(s)) for use by LVM
    pvcreate /dev/[ device_name ]

    e.g. pvcreate -ff /dev/hdc
    e.g. pvcreate -ff /dev/hdd
    The -ff option forces an initialisation

  4. Create a Volume Group vgcreate [ volume_group_name ] [ device_to_include ] [ device_to_include ]

    e.g. vgcreate volume_group /dev/hdc /dev/hdd

  5. Create a Logical Volume
    lvcreate -l [ the_size ] [ y o u r _ v o l u m e _ g r o u p ]

    e.g. lvcreate -l 76313 volume_group

    To determine [ the_size ] you can run the command vgdisplay [ volume_group_name ] and take the ‘Total PE’ value (or fraction of). See below for an example of this on my system.

  6. Make the File System
    mkfs -t ext3 /dev/[ your_volume_group ]/[ y o u r _ v o l u m e _ g r o u p ]

    mkfs -t ext3 /dev/volume_group/LargeDiskVolume

  7. Mount the Drive
    mount /dev/[ Volume_Group_Name ]/[ Logical_Volume_Name ] /mnt

    mount /dev/volume_group/LargeDiskVolume /mnt

  8. Check the Mount

    Filesystem 1K-blocks Used Available Use% Mounted on
    /dev/hda1 xxxxxx xxxxxx xxxxxx xx% /
    tmpfs xxxxxx xxxxxx xxxxxx xx% /dev/shm
    /dev/mapper/large_disk_volume-LargeDiskVolume 307673208 32828 292011480 1% /mnt
  9. Set the mount to load at boot
    vim /etc/fstab
    Add the line:
    /dev/disk_span/lvol0 /mnt       ext3    defaults        0       0

    Save the file
    Test with mount -a

Right – the mount appears, it’s all done! The next step is to install Samba and create a share that windows machines can see and write to.

Displaying the Volume Group Information
vgdisplay volume_group

— Volume group —
VG Name volume_group
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 2
VG Access read/write
VG Status resizable
Cur LV 1
Open LV 0
Max PV 0
Cur PV 2
Act PV 2
VG Size 298.10 GB
PE Size 4.00 MB
Total PE 76313
Alloc PE / Size 76313 / 298.10 GB
Free PE / Size 0 / 0
VG UUID 78S1Dh-W6xW-iX1r-nTCQ-egEB-FKan-uRrT0a

Displaying the Logical Volume Information

— Logical volume —
LV Name /dev/volume_group/LargeDiskVolume
VG Name volume_group
LV UUID 8CrfT4-L2Np-2dEe-R8Xw-hYYn-x2m5-8zebZn
LV Write Access read/write
LV Status available
# open 0
LV Size 298.10 GB
Current LE 76313
Segments 2
Allocation inherit
Read ahead sectors 0
Block device 254:0

Reference: LVM HowTo

Backing up your Installation

If you’re following through this in the order that it’s written, it’d probably a good time to take a snapshot of your raw system before we go installing anything (clever) which might cause problems further down the track. This is a good idea as it give you a clean build of your system after all the initial setup has completed – and saves the setup bandwidth should you need to start again 🙂
I’ve chosen dd as the tool to create the backup as it’s reletivly well documented so googling will pretty much sort out most issues you’re likely to run into (very important when you’re talking about your digital assets!). The ddcommand will do a bit for bit backup of a Hard Disk. I’m using this to give myself an image that I can always come back to as I try changing and installing new ‘stuff’ on my system (given my tendency to haphazardly experiment as I go).

Backing up:

  1. Create a directory to store the backup
    mkdir /[device to store the backup on]/[backup directory name]

    e.g. mkdir /mnt/backup

  2. Copy the HDD to an image file
    dd if=/dev/[hard drive name] of=/mnt/[backup directory name]/[backup name].iso bs=65535

    e.g. # dd if=/dev/hda of=/mnt/backup/mydisk.iso bs=65535

    BE ROOT FOR THIS! Actually I don’t know for sure, but it stands to reason that if you don’t have the access of root, then you won’t be able to back up files owned by root.

  3. Be patient. THIS WILL TAKE QUITE AWHILE (You are after all copying an entire disk) when it completes, you will see something similar to the following (just with numbers not xxxs 😉 )xxxxxx+1 records in
    xxxxxx+1 records out
    xxxxxxxxxxx bytes transferred in xxx.xxxxxxx seconds (xxxxxxxx bytes/sec)
  4. Compress the Image
    If you have a large amount of free space on the disk you were copying, compressing it will shrink it’s size.
    gzip /[device to store the backup on]/[backup directory name]/[backup name].iso

    e.g. gzip =/mnt/backup/mydisk.iso

    Again, this will take a fair while to complete so I’d recommend taking the dd and the gzip command lines and pasting them to the command line together so your system runs them one after the other – you could of course automate this with a script and run it via cron too. As an indication, I was able to turn my 41,110,142,976 byte .iso into a 32,757,683,474 byte .gz file – that’s about a 20% space saving!

Getting it back (Restore [for the benefit of searchbots]):

  1. From some kind of command line (you could use a Knoppix CD or similar CD based distro) you need to run:
    dd if=/[device the backup is stored on]/[backup directory name]/[backup name].iso
    of=/dev/hda bs=65535

    e.g. dd if=/mnt/restore/mydisk.iso of=/dev/hda bs=65535

  2. Reboot
    shutdown -r now
    Note – I haven’t tried a restore at the time of writing this, so I’d recommend testing your backup before you need it.

Creating a Network Share with Samba

So, by this point you should have a machine setup on your network and you may even have a spanned disk with a heap of space which you can make available to your other network machines.
I’m going to use Samba to create the shared drive and control its access so that my Windows machines can also make use of the space.

  1. Install the Samba packages
    apt-get install samba smbfs smbclient

    How do you want to run Samba: [daemons]
    Create samba password database, /var/lib/samba/passdb.tdb? [Yes]

  2. Add a Linux user for linking to the Samba share

    Enter a username to add: [Share Username]
    Adding user ‘[Share Username]‘…
    Adding new group ‘[Share Username]‘ (1001).
    Adding new user ‘[Share Username]‘ (1001) with group ‘[Share Username]‘.
    Creating home directory ‘/home/[Share Username]
    Copying files from `/etc/skel’
    Enter new UNIX password:
    Retype new UNIX password:
    passwd: password updated successfully
    Changing the user information for [Share Username]
    Enter the new value, or press ENTER for the default

    Full Name []: [Share Username]
    Room Number []:
    Work Phone []:
    Home Phone []:
    Other []:
    Is the information correct? [y/N] [y]

  3. Add users to the Samba server
    smbpasswd -a [Share Username]

    New SMB password:
    Retype new SMB password:
    Added user [Share Username]

  4. Create a directory to share
    I’m assuming that your LVM is already mounted, if not check the LVM section for the correct syntax
    mkdir /mnt/[Share Directory Name]

    e.g. mkdir /mnt/MediaStore

  5. Allow others to reand and write to the directory
    chmod 777 /mnt/[Share Directory Name]

    e.g. chmod 777 /mnt/MediaStore

At this point, you need to decide if you’re GUI or CLI, for me a Graphical User Interface is quicker and suits my impatient nature quite nicely, others may wish to do all their config from the Command Line Interface – either choice is fine, but for the sake of swift sharing, and given that this server will sit on the inside of my network, I’ve chosen to use a package called SWAT (Samba Web Administration Tool) to help me setup my Samba shares

  1. Install the SWAT package
    apt-get install swat
    As the package configures, you will receive a warning that your smb.conf file is about to get overwritten. Choose [Ok]
  2. Enable SWAT by allowing the service
    vim /etc/inetd.conf
    Find and uncomment the line:

    #<off># swat            stream  tcp     nowait.400      root    /usr/sbin/tcpd  /usr/sbin/swat

    The line should now read:

    swat            stream  tcp     nowait.400      root    /usr/sbin/tcpd  /usr/sbin/swat

    Save the file

  3. Enable SWAT by allowing the port
    vim /etc/services
    Add the line:

    swat 901/tcp

    Save the file

  4. Reboot the server (or figure out how to reload the affected configuration files – and let me know)
    To REBOOT use shutdown -r now
    To RELOAD without a full reboot, use /etc/init.d/inetd reload

Right, now you should be able to point a browser on your LAN to

http://[Server Hostname or IP Address]:901/

You should be presented with an authentication dialogue (which you’ll need to use your root credentials for – don’t worry, you can setup other users once you’re in)

  1. Click the shares link
  2. Create a Share by entering your [Sharename] and clicking the ‘Create Share’ button
  3. In the ‘Base Options’ section, enter the path that you created above ‘/mnt/[Share Directory Name]’
  4. In the ‘Security Options’ section, add the users you want to have access to the relevant list (valid users, read list, write list) e.g. I will have a user who can read and write from my windows machines, but the media devices which also connect to this share will be write only. In the ‘hosts allow’ line, you may want to add you whole network with

    or just specific IP addresses

  5. Click ‘Commit Changes’ when done setting options

Reference:There is a pretty good article over on Linux Questions on SAMBA, click here to view

Monitoring the box

This section covers a number of aspects of monitoring which I feel are necessary, but then – I do have a soft spot for numbers and graphs!


This is a great tool used to graph pretty much anything, seriously! One of the features I like the best about it is how the databases it creates never get any bigger than they are when you create them. I’ve decided to store all my databases in /var/lib/rrd/ since a number of others out there seem to use this location and it just makes using other peoples scripts a lot easier.

  1. Install the RRDTool package
    apt-get update && apt-get install rrdtool

Read the documentation on the web for how it all works – it’s explained better there than I can do in this guide.

Hard Disk Drives

SmartMon tools is a package which allows you to interrogate your SMART enabled hard drives for problems. There is a pretty good article over at the Linux Journal here which details the what’s and how’s of the package.

To monitor the hard drive(s) on this system I followed these steps:

  1. Edit /etc/apt/sources.list to add the location of the SmartMon tools package
    vim /etc/apt/sources.list
  2. Add the lines:

    # Location of SmartMon Monitoring Package
    deb smartmontools/

  3. Update your sources and install the package
    apt-get update && apt-get install smartmontools
  4. smartd was disabled and to enable I needed to edit /etc/default/smartmontools
    vim /etc/default/smartmontools
  5. Uncomment the smartd line
  6. Start smartd
  7. Check your disks
    /usr/sbin/smartctl -a [disk name]

    e.g. /usr/sbin/smartctlsmartctl -a /dev/had

    I got output which looks like this:

smartctl version 5.32 Copyright (C) 2002-4 Bruce Allen
Home page is

Device Model: Maxtor 6E040L0
Serial Number: xxxxxxxx
Firmware Version: xxxxxxxx
Device is: In smartctl database [for details use: -P show]
ATA Version is: 7
ATA Standard is: ATA/ATAPI-7 T13 1532D revision 0
Local Time is: xxx xxx xx xx:xx:xx xxxx xxxx
SMART support is: Available – device has SMART capability.
SMART support is: Enabled


SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status: (0x82) Offline data collection activity
was completed without error.
Auto Offline Data Collection: Enabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: (1021) seconds.
Offline data collection
capabilities: (0x5b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
Offline surface scan supported.
Self-test supported.
No Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
No General Purpose Logging support.
Short self-test routine
recommended polling time: ( 2) minutes.
Extended self-test routine
recommended polling time: ( 17) minutes.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
3 Spin_Up_Time 0x0027 220 219 063 Pre-fail Always – 8211
4 Start_Stop_Count 0x0032 253 253 000 Old_age Always – 1110
5 Reallocated_Sector_Ct 0x0033 253 253 063 Pre-fail Always – 0
6 Read_Channel_Margin 0x0001 253 253 100 Pre-fail Offline – 0
7 Seek_Error_Rate 0x000a 252 252 000 Old_age Always – 1
8 Seek_Time_Performance 0x0027 250 234 187 Pre-fail Always – 64735
9 Power_On_Minutes 0x0032 232 232 000 Old_age Always – 983h+23m
10 Spin_Retry_Count 0x002b 253 252 157 Pre-fail Always – 0
11 Calibration_Retry_Count 0x002b 253 252 223 Pre-fail Always – 0
12 Power_Cycle_Count 0x0032 252 252 000 Old_age Always – 403
192 Power-Off_Retract_Count 0x0032 253 253 000 Old_age Always – 359
193 Load_Cycle_Count 0x0032 253 253 000 Old_age Always – 1698
194 Temperature_Celsius 0x0032 253 253 000 Old_age Always – 37
195 Hardware_ECC_Recovered 0x000a 253 252 000 Old_age Always – 1136
196 Reallocated_Event_Count 0x0008 253 253 000 Old_age Offline – 0
197 Current_Pending_Sector 0x0008 253 253 000 Old_age Offline – 0
198 Offline_Uncorrectable 0x0008 253 253 000 Old_age Offline – 0
199 UDMA_CRC_Error_Count 0x0008 199 199 000 Old_age Offline – 0
200 Multi_Zone_Error_Rate 0x000a 253 252 000 Old_age Always – 0
201 Soft_Read_Error_Rate 0x000a 253 252 000 Old_age Always – 3
202 TA_Increase_Count 0x000a 253 252 000 Old_age Always – 0
203 Run_Out_Cancel 0x000b 253 252 180 Pre-fail Always – 0
204 Shock_Count_Write_Opern 0x000a 253 252 000 Old_age Always – 0
205 Shock_Rate_Write_Opern 0x000a 253 252 000 Old_age Always – 0
207 Spin_High_Current 0x002a 253 252 000 Old_age Always – 0
208 Spin_Buzz 0x002a 253 252 000 Old_age Always – 0
209 Offline_Seek_Performnce 0x0024 184 184 000 Old_age Offline – 0
99 Unknown_Attribute 0x0004 253 253 000 Old_age Offline – 0
100 Unknown_Attribute 0x0004 253 253 000 Old_age Offline – 0
101 Unknown_Attribute 0x0004 253 253 000 Old_age Offline – 0

SMART Error Log Version: 1
ATA Error Count: 1
CR = Command Register [HEX]
FR = Features Register [HEX]
SC = Sector Count Register [HEX]
SN = Sector Number Register [HEX]
CL = Cylinder Low Register [HEX]
CH = Cylinder High Register [HEX]
DH = Device/Head Register [HEX]
DC = Device Command Register [HEX]
ER = Error register [HEX]
ST = Status register [HEX]
Powered_Up_Time is measured from power on, and printed as
DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,
SS=sec, and sss=millisec. It “wraps” after 49.710 days.

Error 1 occurred at disk power-on lifetime: 0 hours (0 days + 0 hours)
When the command that caused the error occurred, the device was in an unknown state.

After command completion occurred, registers were:
— — — — — — —
04 51 50 40 97 03 00 Error: ABRT

Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
— — — — — — — — —————- ——————–
ef fe 00 00 00 00 00 00 00:03:20.976 SET FEATURES [Reserved for CFA]
ec 00 01 01 00 00 00 00 00:03:20.944 IDENTIFY DEVICE
c1 00 00 00 00 00 00 00 00:03:20.944 [VENDOR SPECIFIC]
c0 00 01 01 ff ff 00 00 00:03:20.928 CFA ERASE SECTORS [VS IF NO CFA]
c1 00 ff 01 ff ff 00 00 00:03:20.928 [VENDOR SPECIFIC]

SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Extended offline Completed without error 00% 4348 –

SMART Selective self-test log data structure revision number 1
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

Loads of info huh? You can obviously pull out what is of interest to you from here.

My Media Center Setup

I’m currently running a Silverstone ST-LC10B (with the iMon VFD software in conjunction with FrontView for MCE it’s sweet!)

Full specs are:

Mods I’ll probably make are:

  • I’m tempted to dremmel out the fan grills at the back over the twin 60mm fans as they’ve got a bit of turbulence noise coming from them.
  • I’d like to mount the HDD in a housing to eliminate vibration as it’s the noisiest thing in the system.
  • I’d like to crack open my MCE remote and drop the sensor into the front of the VFD for WAF (Wife Approval Factor) reasons alone (less clutter / visible wires = less complaints)

The case itself is kinda large, but it’s good for airflow and the ability to select from a wider range of cards and cooling product – and I like having a VFD

Aaaargh – the pain… THE PAIN!

I’m moving servers after many years and the transition hasn’t been a comfortable experience…

Change is good, unless your pants are loose – in which case, change can weigh things down and cause a lot of embarrassment.

After a number of years, I’ve moved my sites off my server at home to a server hosted elsewhere – it’s gone from an aging NT Server 4 box running Apache 1.3.14 (which has been remarkable stable despite what you may think) to a Debian box running the 2.42 kernel and Apache 1.3.33 which is a heap faster, but nonetheless, it’s not co-operating with my efforts to get things running smoothly.

Case in point – Server Side Includes, the httpd.conf file is setup as per what a zillion sites tell me it should look like and yet the files are not being included, this leave bits of my site like the renovations and wedding pages without navigation menus – which sucks. It’s probably something amazingly obvious but with the way things are at home and work I’m just too busy to get to the bottom of it. If anyone has suggestions, I’m open to giving them a try…

For those who feel like snooping, you can check out the uptime for via this handy wee site from Netcraft, while it doesn’t give you the historical stuff due to a lack of support by NT4 to provide such useful things as uptime.

HOWTO: Upgrading the Firmware on your Nokia M1122 / MW1122

It’s a frightening prospect, knowingly starting a process which you KNOW could result in you losing you beloved connection to the Internet – but when you’ve got an old, old Nokia MW1122 which needs a firmware update, it’s just one of those things which needs to be done. After all, if it all goes pear-shaped, you may just be able to get away with getting a nicer, newer modem and separating out your Wireless Access point

And so it came to pass that I decided it was high time to update my firmware and I have a few of the guys at work who are waiting on the results of my attempt before doing the same to theirs – hence this HOWTO of sorts.

I have a Nokia MW1122 which I use for both my DSL access and, with a C110 card, to provide my wireless network. I’m doing some of the standard pinholing things to let ‘stuff’ through to my network and, as my home network grows in complexity, I’m finding the modem is limiting my ability to provide the kind of control I’m now needing. I’ve also heard (and can now confirm) that the latest firmware exposes more of the modem/routers functionality for your networking pleasure… hence this update 🙂

In the beginning:
Now, being a cautious lad, I took screen shots of all of the pertinent pages of the web interface. This meant that if I lost my settings for whatever reason, I could just re-enter all my pinholes and rules and stuff from the hard copy.

Prior to the update, the modem was running:
SW appl. Version: Gx1x2210.R09

Getting the files, and a few clues:
I did a bunch of googling before I started on this, as did a colleague from work, who was flicking me through links via IM in support of the ‘Rob the Guinea Pig’ theory.
The Internet is an interesting place, and – with a couple of cross checks, you can sort the wheat from the chaff and, applying this process, I gathered enough information to do my upgrade. The interesting thing is, it appears that New Zealand is one of the few places in the world with any degree of Nokia Nokia M1122 / MW1122 modem market penetration (mainly due to Telecom picking them up on the cheap and providing them as pretty much the only option for DSL modems for the first few years of ‘broadband’ in New Zealand.
In terms of places to hunt for info, I would recommend the Waikato Linux Users Group site, paying close attention to their WiKi and also the New Zealand ADSL mailing list
Now I *do* have all the pertinent files and stuff archived in case they disappear into the ether, but make an effort to grab the ones from the WLUG site as the documentation there is probably going to stay a lot more upto date than this page will.

Getting Ready:
If you have the same experience as I did, you will need:

  • The latest firmware file [ Gx1x2230.R04 ]
  • A stable network connection
  • A Telnet Client
  • A TFTP server
  • The ‘Admin’ password to your modem
  • Some good Karma

There are a few TFTP servers available for no cost (with a bit of googling) the WLUG site also has one amongst its files – I ended up using one from
PuTTy is a great client which I use for SSH, Telnet and generally frightening my network, you can use whatever Telnet client spins your wheels – I just figured you may appreciate a recommendation 😉

The fun trick for young players will be finding the admin password to your modem. Now you can buy some non-Telecom modems so if you’re doing this upgrade I’ll assume you do in fact own the modem and it’s not an ex-rental/Telecom owned unit. If it is then you will need to do some digging to get the admin password – it is out there, but I can’t help you by telling you what it is – sorry.

Make sure you’re all configured and ready to go, next up we’re going to do the update

Updating the Firmware:

  • Start your TFTP server running and pointed to a directory containing the firmware file [ Gx1x2230.R04 was the latest at the time of writing ]
  • Start your Telnet client and point it to the Nokia M[W]1122, you will be prompted for your username and password. It is important that you use an ADMINISTRATIVE login (‘admin’ or ‘Telecom’ are defaults for the Nokia, but in saying that, I’ve also read that the username is moot if the admin password is presented – I didn’t bother confirming this so YMMV) as a non-admin login will be unable to run the ‘copy’ command which is coming up next.

login-id: admin
password: *********

MW1122>copy tftp:/[THE IP ADDRESS OF YOUR TFTP SERVER]/Gx1x2230.R04 image.exe

  • The file will start copying down to your modem at this point – it takes a while (5 minutes for me via my 802.11b connection) then you will see

blocks received 1778
transfer status SUCCESSFUL

Congratulations, you’re over the hard stuff – at this point, it is safe to take one last look at your internet connection, cross everything that will cross, say a prayer and then do a FULL restart from the web interface of your modem.

If all went well, your surfing away happily and your Nokia will now read:
SW appl. version: Gx1x2230.R04

You’re on your own from here on out – good luck, give things a few minutes and then try accessing the internet


Ahh… The Helpful Internet

Years and years (and years) ago, I bought a CodeAlarm 2000.This was pretty much the flashest car alarm you could get in New Zealand at the time and it even allowed keyless entry via remote door locking/unlocking (a feature that I know have difficulty living without).
Imagine my horror then, when I learned that CodeAlarm were no longer in business and, now that my second remote case had snapped, there was no one in New Zealand who could get a new plastic case to replace the broken ones.

Of course, this resulted in a quick googling, and – in a very short space of time, I’d turned up a couple of sites who could help.
Not only did I find a company who would sell me new cases(though at US$10 each it’s probably a bit steep – it is just a plastic case after all), but I also found a site which told me (since I’ve ‘misplaced’ my owners manual) how to re-programthe remote which has had a recent battery replacement. I’ve decided toreplicate these instructions below to help keep this info archived.

CodeAlarm Remote Programming Instructions

Remote Transmitter Programming:

In order to enter Learn Routine, the Valet/ Program button must be plugged into the blue port (Look for a small push button located under the drivers dash or kick panel).

  1. Open a door.
  2. Turn the ignition on to the RUN/ACC position (or you may also start car).
  3. Within 15 seconds press and release the momentary push button to select the channel you wish to program. (e.g. press and release once for channel 1 (arm/disarm channel).
  4. Press and hold the Valet/Program push button once more. You should get a confirmation chirp/horn-honk.
  5. If you do not get a chirp/horn-honk the alarm may have a jumper inthe alarm that has the programming feature turned OFF (disabled).
  6. Once the alarm chirps/horn-honks keep holding the momentary button.
  7. Press the button on the transmitter that you would like to control the selected receiver channel. A chirp/horn-honk will confirm that the code has been learned. If programming more than one transmitter repeat this step for each. (Note: Old transmitter codes will be dropped only if programming 4 new transmitters).
  8. Once the code(s) are learned, the momentary push button can be released.

Learn Routine will be exited if:

  • Ignition is turned off
  • Door is closed
  • Program push button is pressed too many times
  • More than 15 seconds elapses between steps
  • One long chirp/horn-honk indicates that Learn Routine has been exited.

So there you have it, Google saves the day (again) – and now I’m off to discover if I could simply replace my remotes with the Rhino UHF Learning Remote which Dick Smith sells (Cat#L5440) for NZ$49.60