Recreating z25_persistent-net.rules file manually on debian

If from some reason you need to recreate networking udev z25 rules file you would use the following cammed to achieve that:
/lib/udev/write_net_rules all_interfaces
this will recreate a z25_persistent-net.rules and include all interfaces.

invalid byte sequence for encoding “UTF8″: 0×8b – storing binary data

This error message took me lots of effort and time to solve it. The problem is that before storing binary data strings in the postgresql database the binary strings need to be escaped before storing them. There is on the google available subroutine for per which is doing this job. It is called escape_bytea. Anyway [...]

Create and install linux debian package for missing perl module with dh-make-perl

Sometimes you encounter situation when you need a perl module to support your program but perl module is not available from standard linux repositories. Installing perl module from source code is not always good idea so what would be the best is to create package for a particular module using dh-make-perl command. In my case [...]

Get list of the installed packages from debian distributions for documentation

When documenting my server installation I needed to have a list of packages installed on my server. dpkg –get-selections is great help but it returns values/packages each on separate line including “installed” keyword. This command returns list of installed packages in the single block separated with single space:
dpkg –get-selections | awk ‘{ print $1; }’| [...]

Linux Debian-Ubuntu/KDE-Howto Print to a PDF file from firefox using cups-pdf

Here is a small howto print to a PDF file using KDE and firefox. First we need to install cups PDF support:
apt-get install cups-pdf
Then navigate you with mouse to:
KDE -> Control Center -> Select Peripherals -> Printers
From here we need to add new printer click on:
ADD -> Add Printer/Class ( do not select Add [...]

Convert virtual machine from vmware.vmdk to virtualbox.vdi

Easiest way to convert virtual machine from vmware.vmdk to virtualbox.vdi is to use these two tools: qemu and vditool
Navigate to you vmware machine which you would like to convert. Then run following command:
qemu-img convert -f vmdk vmware.vmdk -O raw virtualbox.bin
then you need to download vditool from:
http://www.virtualbox.org/download/testcase/vditool
make vditool executable:

chmod +x vditool
Use vditool to convert virtual images:
./vditool [...]

vditool: error while loading shared libraries: libstdc++.so.5

I have recently run into a problem when I was trying to convert vmware virtual machine to virtualbox using vditool. Apparently having the latest software is not always good idea. vditool is complaining that it is missing libstdc++.so.5 library. I have only installed libstdc++.so.6 which is there by default. libstdc++.so.5 belongs to gcc-3.3-base compiler.
Here is [...]

virtualbox.org – The following signatures couldn’t be verified because the public key is not available

This is for those who are trying to install virtualbox via debian apt-get tool and are having this error message on the screen:
Reading package lists… Done
W: GPG error: http://www.virtualbox.org etch Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 390EC3FF927CCC73
W: You may want to run apt-get update to correct [...]

Invalid command ‘PerlHandler’ – PerlHandler ModPerl::Registry

Apache complains on the restart:
/etc/init.d/apache2 restart
Forcing reload of web server (apache2)…Syntax error on line 48 of /etc/apache2/sites-enabled/000-default:
Invalid command ‘PerlHandler’, perhaps misspelled or defined by a module not included in the server configuration
failed!
Have a look what perlhandler it is in apache config file. In this case apache was missing : ModPerl::Registry .
Solution to this is to [...]

Debian apache problem – [error] Can’t locate Apache/DBI.pm in @INC

Debian Apache will not start and it complains in log file:
[error] Can’t load Perl module Apache::DBI for server exiting…
This is because it can not find perl module which apache will use to connect DBI database. Solution for this is to install package:
libapache-dbi-perl – Connect apache server to database via perl’s DBI
apt-get install libapache-dbi-perl