Monday, November 17, 2008

{standard input}:1184: Error: suffix or operands invalid for `mov'


Last weekend I p2v-ized a Gentoo GNU/Linux (kernel 2.4.25) and imported it in XenServer 4.1. When I started the VM it was OK but the driver of the virtual network-cards was missing. I could not compile only the driver since that version of module-init-tools was failing to load the modules (I have not figured the reason why out yet).

In practice I was in need to compile the driver statically inside the kernel, but while creating bzImage I got the following:
CHK include/linux/version.h
make[1]: `arch/i386/kernel/asm-offsets.s' is up to date.
CHK include/linux/compile.h
CC arch/i386/kernel/process.o
{standard input}: Assembler messages:
{standard input}:790: Error: suffix or operands invalid for `mov'
{standard input}:791: Error: suffix or operands invalid for `mov'
{standard input}:995: Error: suffix or operands invalid for `mov'
{standard input}:996: Error: suffix or operands invalid for `mov'
{standard input}:1068: Error: suffix or operands invalid for `mov'
{standard input}:1069: Error: suffix or operands invalid for `mov'
{standard input}:1162: Error: suffix or operands invalid for `mov'
{standard input}:1163: Error: suffix or operands invalid for `mov'
{standard input}:1172: Error: suffix or operands invalid for `mov'
{standard input}:1184: Error: suffix or operands invalid for `mov'
make[1]: *** [arch/i386/kernel/process.o] Error 1
make: *** [arch/i386/kernel] Error 2
Fortunatly on kerneltrap I found an article concerning this issue. The errors are due to the fact that the new i386/x86_64 assemblers no longer accept a certain set of instructions (read the article for more details). A patch (one for 2.4 and one for 2.6) that prevents the generation of such obsolete asm has been released. It worked like a charm for me and hope this gonna help you!

Getting pissed!!!


It's been a while since my last post. In the meanwhile Italian politicians have released a bill in an attempt to stop Iltalian bloggers, actually the worst threat to their power. If you are curious and wanna know more details about this bill, just click on the sideways image.

Am definitly getting pissed of this people... they have been spoiling our country for decades and now it's time to move on and rebuild Italian politics at all.

Thursday, October 23, 2008

Misinformation on LinuxDay 2008


Here in Italy every year in autumn the so called LinuxDay occurs. The LUGs of many towns autonomously organize such event in order to promote and diffuse the Penguin (and the opensource software).

Here what makes me laugh... the "Presidente della Repubblica" Giorgio Napolitano has been invited to the LinuxDay in Rome, but he turned down. It should be better to tell that the "Segretario Generale della Presidenza" refused the invitation. Well, this morning on a online IT magazine I have read that Giorgio Napolitano stated: "my heart is with you". Please take a look at the letter (here again the link - it's in Italian) and tell me where the geek Giorgio Napolitano would have stated that.

Ah ah, it seems that here in Italy we have not kicked the habit to produce soap-opera instead of trustworthy news yet.

PS: on the square am about to sigh (not to laugh).

Wednesday, October 22, 2008

Debian/Lenny slogan poll


A few days ago debianart.org opened a poll for choosing the slogan to associate the incoming Debian/Lenny release with.

Among all possible slogans the one I prefer is "we build it the right way" since it renders the idea of an O.S. that has been built by someone and this someone is assuring its quality. In fact IMHO one thing has held the spread of opensource software so far (fortunatly nowadays something seems to be changing!) is the common idea that it is developed by amateurish uncoordinated geeks. More in general the common idea is that "a software is free means it's unreliable and hence not convenient" and that "is better relying upon closed solutions despite their purchase money". What do you think about?

PS: I've said above that Debian/Lenny is incoming... at least we hope! Don't you know my way of thinking about?

Tuesday, October 21, 2008

Stop software patents in Europe!



There are many reason for signing this petition against software patents. The following points quotes and summarize what explained on the petition website:
  • Software authors are already protected by copyright law
  • Patents on software favour litigation in detriment of innovation
  • In the USA there are billions of dollars in litigation over software patents each year... this mistake needs to be avoided in Europe.
PS: am glad to see Italy at the moment is the country with the most signatures. :-)

Friday, October 10, 2008

Poll: the best virtualization software?


As expected most of you chose Vmware as their favourite virtualization technology. However it's nice to see the second placing of Xen naked.

Personally I agree with your votes: vmware is still in the forefront. I definitly prefer to have full control on what I have to manage, so my choice fell to Xen (naked).

Thursday, October 9, 2008

Urchin 6: parsing Apache logs in ISPconfig format



We were about to decide for purchasing or not Urchin 6, so I needed to figure out how to make Urchin 6 parse and process Apache logs in ISPconfig format.

First, on the machine running ISPconfig I have added cookie informations to the combined_ispconfig log format in /etc/apache2/apache2.conf:
LogFormat "%v||||%b||||%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{Cookie}i\"" combined_ispconfig
Second, on the machine running Urchin 6 have defined the following log format (our installation path is /opt/urchin):
# cat /opt/urchin/lib/reporting/logformats/ispconfig.lf
PrimaryPositions: "0,0,12,19,5,3,6,10,11,15,13,14"
SecondaryPositions: -
PrimaryKey: -
SecondaryKey: -
PrimaryContent: HIT
SecondaryContent: -
CommentKey: -
FieldSeparator1: \s
FieldSeparator2: |
QuotesEscapeSep: YES
BracketsEscapeSep: YES
MergeSuccessiveSep: YES
CleanWhiteSpace: NO
StatusRequired: YES
CustomDateFormat: "%m/%d/%y"
CustomTimeFormat: "%H:%M:%S"
TimeZoneOffset: 0
Last, in Urchin 6 administration panel when configuring new log sources remeber to choose the just-defined ispconfig format.

Monday, October 6, 2008

Strange problems after Deboostrap


This afternoon have wasted a couple of hours like a fucking dumb never. I needed to deboostrap a new Debian/Lenny as a domU in Xen. I used xen-tools and all went OK. In ten minutes I was in a bash, glad and happy.

A few seconds later I experienced the following while using bash completion:
# ls /e-bash: /dev/fd/62: No such file or directory
-bash: /dev/fd/60: No such file or directory
-bash: /dev/fd/58: No such file or directory
-bash: /dev/fd/56: No such file or directory
What is more man and less (man uses less as a pager!) was unexpectedly closing after dispalying the first page. Instead of open my eyes and figured out the problem I preferred googling like a donkey... the result was I did not got nowhere!

The cause? Udev was missing! I installed it and have been insulting myself for a while.

Thursday, October 2, 2008

A basic script for handling ACLs of your Cisco Catalyst


Last time I wrote a line in Perl has been while working for my Master Thesis three years ago (nostalgia!). Today have decided to dust off those neurons. :-)

I find pretty handy to keep the ACLs of our Cisco Catalyst 3560 in separate files, so as be able to edit them without connecting to the device and finally update them on the switch by using a perl script like this:

#! /usr/bin/perl -w
# Note: in Debian/Ubuntu you need libnet-telnet-perl package
# to be installed on your system.

use Net::Telnet;
use File::Basename;

my $host = '1.1.1.1';
my $hostname = 'Switch';
my $username = 'ciscouser';
my $passwd = 'ciscopasswd';
my $enable = 'enablesecret';
my $aclname = $ARGV[0];
my $filepath = dirname($0)."/".$aclname;
my $logfile = '/tmp/acl-update.log';

sub Usage {
print "Usage: " . basename($0) . " \n";
exit 1;
}

if ( scalar @ARGV != 1)
{
print "Wrong number of arguments!\n";
&Usage();
}

if ( ! -e $filepath )
{
print "File " . $filepath . " does not exist\n";
&Usage();
}

open(ACL, $filepath) || die("Could not open file $aclname!");
@file = <ACL>;

$session = Net::Telnet->new(Timeout => 05,
Prompt => '/$hostname(\(config.*\))?[#>] *$/',
Dump_Log => '$logfile');
$session->open($host);
$session->login($username, $passwd);

$session->cmd("en\n$enable");
$session->cmd("conf t");
$session->cmd("no ip access-list extended $aclname");
$session->cmd("ip access-list extended $aclname");
foreach $line (@file)
{
chomp($line);
$session->cmd($line);
}
$session->cmd("exit");
$session->cmd("exit");
@output = $session->cmd("sh access-list $aclname");
print @output;
$session->cmd("exit");

Monday, September 29, 2008

A common mistake

When in Debian/Ubuntu we want init not to control the start/stop of daemon, but directly handle it or through the use of other software (ex. heartbeat), there are many ways to accomplish that. I have observed In many howto's the following way is used (here am using xen control daemon as an example):
# update-rc.d -f xend remove
Removing any system startup links for /etc/init.d/xend ...
/etc/rc0.d/K21xend
/etc/rc1.d/K21xend
/etc/rc2.d/S20xend
/etc/rc3.d/S20xend
/etc/rc4.d/S20xend
/etc/rc5.d/S20xend
/etc/rc6.d/K21xend
Conceptually removing the sym-links in each runlevel is correct, unfortunatly if the package the daemon belongs to gets updated those sym-links are re-created and need to be manually removed again. For this reason I find more appropriate to set the daemon to be killed in each runlevel:

# update-rc.d -f xend remove
Removing any system startup links for /etc/init.d/xend ...
/etc/rc0.d/K21xend
/etc/rc1.d/K21xend
/etc/rc2.d/S20xend
/etc/rc3.d/S20xend
/etc/rc4.d/S20xend
/etc/rc5.d/S20xend
/etc/rc6.d/K21xend


# update-rc.d xend stop 21 0 1 2 3 4 5 6 .
Adding system startup for /etc/init.d/xend ...
/etc/rc0.d/K21xend -> ../init.d/xend
/etc/rc1.d/K21xend -> ../init.d/xend
/etc/rc6.d/K21xend -> ../init.d/xend
/etc/rc2.d/K21xend -> ../init.d/xend
/etc/rc3.d/K21xend -> ../init.d/xend
/etc/rc4.d/K21xend -> ../init.d/xend
/etc/rc5.d/K21xend -> ../init.d/xend