Windows XP – Repair the boot block

if your boot block got corrupted (virus, or installation which went wrong), you may want to try to repair it by using the Recovery Console of Windows XP.

To do so, boot on the Windows XP CD and when asked, choose to repair the Windows XP installation by pushing R.

This will lead you to the Recovery Console. You will be asked for the installation to repair (ex : 1: C:\Windows), and then to enter the administrator’s password.

Then you can try to do a fixmbr (which is equivalent to the old fdisk /mbr) or a bootblock which will install a new boot block.

Be sure to understand what you do ! You might as well spoil your last chance to recover your installation with those commands !

OpenBSD : Give money !!

not to me !! πŸ˜€

The OpenBSD project needs money to hold its events (such as hackaton, where developpers gather to implement features, or usual running costs).

If you think you don’t use OpenBSD, think again ! The project OpenSSH, which implements a free, and secure SSH implementation, comes from OpenBSD. It is widely used in many OSes and appliances …

We need OpenBSD !! Don’t hesitate to make a donation !

The original post
The OpenBSD project

The OpenSSH sister project

Websites with Catalyst

If you like Perl and you make dynamic websites with databases backends, Catalyst is definitely worth a look.

It is basically an MVC engine for websites. It lets you nicely separate your business logic, the display and the database backend.

It has extended plugins to deal with things like authentications, sessions, templates, RSS, and God knows what πŸ™‚

It can integrate Apache, and harness mod_cgi’s power for high-performance web applications.

It is a little bit tricky to get it right at the beginning, but there are nice tutorials.

Have a look ! πŸ™‚

Main website you’ll find everything there

Deploying Perl apps

I usually code my perl programs on a development machine, and then ty to make in run in the production environment.

I used to manage by myself the various needed packages and tried to have them installed on the production environment as needed.

And one day I had to make a script run on a machine where Perl itself was not even installed…

This has been a nightmare until recently, that is to say until I discovered the PAR module. PAR is closed to the Java JAR files.

Once you have the PAR package installed, you have a set of helper scripts installed as well. Having you script run somewhere else is then as simple as :

pp -o app (you might want to do pp -o app.exe if you’re on Windows)

This script will analyze the script, gather all the dependencies (“all” including the Perl binary, used modules and DLLs), and build a self extractible archive which will unpack and execute your script when run.

Simple ? πŸ™‚

Coding a Jabber Bot in Perl

I finally got it to work and it is not so difficult with the right packages (Net::XMPP) and parameters …

#! /usr/bin/perl

use strict;
use warnings;

use Net::XMPP;

# Config params #

my $hostName = '';
my $portNumber = 5222;
my $componentName = '';
my $userName = 'totosk1008';
my $passWord = 'totosk1008';
my $resource = 'NiceLittleBot';
my $tls = 0;
my $connectionType = 'tcpip';

my $debugLevel = 0;

# Create the client
my $bot = new Net::XMPP::Client(debuglevel => $debugLevel);

onconnect       => &connectedCB,       # gets called when connected
onauth          => &authedCB,          # when authenticated
ondisconnect    => &disconnectedCB,    # when disconnected

$bot->SetMessageCallBacks(                      # callback for messages
chat            => &messageCB,         # chat-type messages

$bot->Execute(                                          # entering the main loop
hostname        => $hostName,
port            => $portNumber,
tls                     => $tls,
username        => $userName,
password        => $passWord,
resource        => $resource,
register        => 0,
connectiontype  => $connectionType,

# Callbacks  #

sub messageCB {                 # call back implementing the echo
my $sid = shift;
my $msg = shift;

my $from = $msg->GetFrom;
my $to = $msg->GetTo;

my $name;
my $data;

print "From : ", $from, "\n",
"Subject : ", $msg->GetSubject, "\n",
$msg->GetBody, "\n";

$name = $msg->GetBody;

$data = $msg->GetBody;

print ">>$name<<\n";
print $data, "\n";

to              => $from,
from    => $to,
resource        => 'Gaim',
type    => $msg->GetType,
subject => $msg->GetSubject,
body    => $data,

sub connectedCB {
print "Connected\n";

sub authedCB {
print "Authed\n";

sub disconnectedCB {
print "Disconnected\n";

Add disk in an AIX machine

few useful commandes :

  • lsdev : allows you to list the hardware in your machine AIX knows about. For example
    lsdev -C | grep scsi

    will list all the SCSI interfaces of your machine

  • cfgmgr : lets you change the hardware settings. For example
    cfgmgr -l scsi0

    will rescan the scsi0 bus to find and configure any newly attached SCSI peripheral.


My name is Stιphane Kattoor.

I live in France near Paris.
I work as a Systems Engineer and I am a computer hobbyist.

My main interests are around open source, operating systems (mostly Unix but Windows as well), coding (mostly in Perl these days), home automation, and many other things …

This site is a placeholder for things I learn/discover during my work or hobbies and I consider (hopefully) worth sharing.

Till soon !


me <- proud ! ;-)

I finally finished it (though I expect to have to make some changes in the future …) :
Now I can setup my home automation events in MisterHouse throught my Mozilla Calendar ! The code has been submited and accepted for being integrated in MisterHouse and will be in the next release πŸ™‚
Code is here.