Yohann Martineau, blog

Posts tagged debian

asterisk 11 listen on port 5060

2013-07-23 15:53:47

I was struggling with a recent asterisk version compiled from source to make it listen on port 5060...

Configure script gave no error, but it was not enough to consider asterisk as operational: openssl-dev or ssl-dev and uuid-dev packages must be installed to build a full-featured asterisk. Asterisk must then be reconfigured, built, etc.

The odd trick was that asterisk keeps building correctly even if ssl or uuid library is not available. Then you start it and it just doesn't listen on sip port (5060) or complains about the lack of an rtp engine...

Well, it seems that openssl dependency is mentioned in README, but uuid does not seem to be...

Permanent link
telecom, linux, debian, english


maven eclipse:eclipse maven-eclipse-plugin 2.9 NullPointerException

2012-10-04 00:16:13

If you have difficulties to generate eclipse project files (.project and .classpath) from a maven project on a debian based OS, this article is for you.

While running mvn eclipse:eclipse in my peers project, I was stuck with this issue:

[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.872s
[INFO] Finished at: Wed Oct 03 23:39:07 CEST 2012
[INFO] Final Memory: 10M/104M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-eclipse-plugin:2.9:eclipse (default-cli) on project peers-doc: Execution default-cli of goal org.apache.maven.plugins:maven-eclipse-plugin:2.9:eclipse failed. NullPointerException -> [Help 1]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

Actually, apparently, maven automatically seeks jvm instances on a debian host (in /usr/lib/jvm) and tries to extract MANIFEST.MF file from jre/lib/rt.jar file in each jvm folder.

It should be verified, but apparently, as soon as it finds an rt.jar file without manifest, it fails with this annoying NullPointerException.

I found that my system had 4 different JVMs:

  • java-1.5.0-gcj-4.4
  • java-6-openjdk
  • java-6-sun-
  • jdk1.7.0_07 (installed manually)
I found that the only installed jvm with no manifest in jre/lib/rt.jar was java-1.5.0-gcj-4.4, Thus, I removed jvm java-1.5.0-gcj-4.4 (debian package gcj-4.4-base) and it solved my issue.

Hope this helps someone...

Permanent link
java, debian, development, english


Boot coreboot, FILO and a tiny debian

2012-04-29 19:27:38

I'm playing with open source bios software coreboot. To boot this opensource bios, I use qemu. I was bored of this default SEAbios prompt at virtual machine boot. So I decided to customize a bit my way to boot.

Actually, coreboot is just a piece of code that initialize hardware, it does not make a choice amongst bootable devices to start system. This task is performed by a payload. Actually, it's a payload for coreboot, but it's not the last payload we'll meet. Coreboot supports several payloads: SEAbios, FILO, custom linux, etc. Here, I will show how to install a FILO payload for coreboot and boot a tiny debian from this payload.

FILO is a bootloader that can read files on a local file system and use an image on a local file system to load an OS. So, after starting qemu, the boot sequence is: coreboot => FILO => tiny debian.

The first step is to retrieve coreboot and FILO. Actually, FILO has a dependency on libpayload, which is a library inside coreboot source code. So the compilation order will be: libpayload, FILO and coreboot.

Let's first create a root folder:

mkdir coreboot
In this directory, download coreboot source code:
cd coreboot
svn co svn://coreboot.org/coreboot/trunk coreboot-svn
We download FILO in coreboot-svn/payloads as it seems to be simpler to compile from here.
cd coreboot-svn/payloads
svn co https://svn.coreboot.org/filo/trunk/filo

Now, configure, build and install libpayload:

cd libpayload
make defconfig
make DESTDIR=../filo/build install
Now come back in filo folder and configure filo:
cd ../filo
make menuconfig
Use default options. You will see two make menuconfig interfaces, keep default options for both. You can now compile FILO:

Configure coreboot:

make menuconfig
Enter payload menu, choose "Add a payload", An ELF executable payload. Select your filo binary file (filo.elf) in "Payload path and filename"

Compile coreboot, compilation instructions can be found in bottom links:


My qemu version is a locally compiled one, not the latest one, but any reasonably recent qemu version should work.

Create tiny debian:

~/programs/qemu-0.14.1-local/bin/qemu-img create -f raw disk.img 2G
/sbin/mkfs.ext2 -F disk.img
# mkdir /mnt/rootfs
# mount -o loop disk.img /mnt/rootfs/
# mkdir /mnt/rootfs/boot
# cp /boot/vmlinuz-2.6.32-5-686 /mnt/rootfs/boot/vmlinuz
# cp /boot/initrd.img-2.6.32-5-686 /mnt/rootfs/boot/initrd
# apt-get install debootstrap
# debootstrap --arch i386 squeeze /mnt/rootfs/ http://ftp.debian.org/debian/
# umount /mnt/rootfs/
this listing:
  1. creates a qemu empty disk,
  2. format this disk to ext2 file system,
  3. as root, mount qemu disk locally,
  4. copy linux kernel and its temporary file system from real debian install to this new tiny boot file system,
  5. install debootstrap (first time only, of course), this tool creates tiny debian images using debian version in parameter. It will load packages from internet, you may have to be patient for this one,
  6. unmount cleanly this new file system.

start qemu:

~/programs/qemu-0.14.1-local/bin/qemu -bios coreboot-svn/build/coreboot.rom -hda disk.img -nographic

To start debian, in FILO, use:

root (hd0)
kernel /boot/vmlinuz root=/dev/sda initrd=/boot/initrd console=ttyS0
you may have to type Enter twice to see all feedback. Debian automatically renames /dev/hda to /dev/sda, this is the reason why we provide this root.

Once booted, you can see a debian root prompt!

Links, sources

Permanent link
linux, embedded systems, debian, english


Debian squeeze on dell vostro 1720

2011-05-12 20:20:34

Really disappointed by latest ubuntu version (11.04), I recently decided to go back to good old debian. I'm using windows/linux dual boot on my computer. Nevertheless, it needed a few tricks... as usual.

Wifi network configuration

Debian installer was looking for b43/ucode15.fw and b43-open/ucode15.fw at network step, but I didn't find a way to provide those files on a USB stick. So I installed with my ethernet wired connection. Then I installed package firmware-b43-lpphy-installer as suggested by debian wiki. My chipset is a BCM4312 LP-PHY (PCI-ID 14E4:4315).

But it was not enough, I had to modify b43 linux kernel module configuration with the following steps:

modprobe -r b43
echo options b43 pio=1 qos=0 >> /etc/modprobe.d/local.conf
modprobe b43

Hard-drive configuration

I want my hard-drive automatically mounted after boot-up, so I modified /etc/fstab and added the following line:

/dev/sda5 /media/data ntfs-3g defaults,user,exec,uid=1000,gid=100,umask=0022 0 0

Anonymous user with no password

In addition to my standard private account, I want another anonymous account with no password, here is the way to do it in debian.

  1. create user anonymous using Users and groups panel,
  2. create group (addgroup) nopasswdlogin
  3. add a rule in pam configuration file pointing to this group :

    auth required pam_env.so readenv=1 envfile=/etc/default/locale
    auth sufficient pam_succeed_if.so user ingroup nopasswdlogin

  4. check "log in without password" in anonymous user panel

Retrieve windows 7 boot entry

After debian squeeze installation, the new Grub2 installed removed my windows entry, to retrieve it I had to install os-probe package.

Rhythmbox radio stations

I also discovered that rhythmbox radio stations and all music tracks were stored in ~/.local/share/rhythmbox/rhythmdb.xml. Very useful to backup and restore all your custom radio stations.

Permanent link
linux, debian, english


Ecouter des extraits sur le site de la FNAC sous debian

2009-03-31 22:01:34
Date originale : 10 décembre 2007

Comme le titre de cet article le laisse supposer, ce n'est pas immédiat sous debian de lire des extraits musicaux d'albums sur le site de la fnac. Cela dit, à coeur vaillant rien d'impossible, il est donc possible de lire ces flux mutlimedia d'une façon (un peu) détournée.

Prenons un exemple, je vais sur l'album de Peter Cincotti : East of Angel Town. Je clique sur Goodbye Philadelphia, et je choisis ouvrir, avec un éditeur de texte, gedit fera très bien l'affaire. Là, je vois que ce fichier contient simplement une URI :

Première observation, je ne connais pas le préfixe de cette URI, en revanche l'extension du fichier ne semble pas totalement inconnue : .ra extension des fichiers Real Player. Après une petite recherche sur google, j'apprends que ce protocole est le nouveau nom du protocole PNA, dont j'ignore la signification. En investigant légèrement plus je découvre que ce protocole est assez proche du RTSP, intéressant... Autre point intéressant à noter, le port part défaut de ce protocole est le port 7070.

Je décide donc de tenter ma chance avec mplayer, car bien que mplayer ne supporte ce procole PNM, il supporte le procole RTSP. Je lance donc la commande suivante dans mon terminal préféré :

mplayer rtsp://multimedia.fnac.com:7070/audio/3/9/7/0093624991793A02.ra
et là, ô surprise, après un léger temps de mise en mémoire tampon, la lecture du début de la chanson commence !

Le "hasard" faisant plutôt bien les choses, si vous voulez écouter plusieurs chansons, elles sont dans l'ordre, la prochaine chanson, Be Careful, peut s'écouter avec l'URI suivante :


Permanent link
protocol, multimedia, linux, internet, debian, français


Outil de traduction

2009-03-31 21:59:55
Date originale : 10 février 2007


Après avoir repris le logiciel babytrans de Frédéric Jolliton, permettant de taduire des mots anglais vers différentes langues sous linux, j'ai effectué quelques modifications pour le rendre plus facilement utilisable, et l'ai mis en ligne ici. Les instructions d'installations sont présentes dans le fichier YOHANN.README de cette archive.
Cet outil est basé sur d'anciens dictionnaires du célèbre outil de traduction babylon. Ces anciens dictionnaires sont mis à disposition (ou plutôt laissés à disposition), par l'université de grenoble. Il est ainsi possible de traduire des mots anglais vers de nombreuses langues : le français, l'allemand, le hollandais, l'italien, le portugais et l'espagnol. Il serait également possible de traduire de l'anglais vers l'hébreux et le japonais. Mais des modifications supplémentaires seraient à réaliser. Il faudrait installer les polices nécessaires dans QT pour pouvoir afficher les caractères correctement.

Cet outil est très pratique, car il peut traduire automatiquement lors de la selection de texte. Ainsi, très peu d'opérations sont nécessaires afin d'obtenir la traduction d'un mot recherché.

Permanent link
debian, français