Raspberry reinstall

Exactly two months ago, on 23 August I posted about munin not creating html pages and that I had to reinstall libxrender1, because the file libXrender.so.1.3.0 was corrupt, but I have not checked the root cause. Well, I should have gone deeper into it, because it turned out that the flash drive was about to break down. So at the end I had to reinstall the whole system. It was not a big deal, but here is how I did it for future reference:

I did a normal install on an SD Card. Then I took a new flash drive, created a single ext4 partition, and read out the DOS disklabel (it has a DOS disklabel, not a GPT) with fdisk -l. The installation creates two partitions on the SD Card, a boot and a root, so I just copied the content of root over to the flashdrive. One last thing to make the system use the flashdrive as root partition is to update /cmdline.txt on the boot partition:

// DOS Disklabel of the flash drive: 0xabcd1234
// Partition number of the root partion on the flash drive: 01
// this needs to be added to the root= parameter
console=serial0,115200 console=tty1 root=PARTUUID=abcd1234-01 rootfstype=ext4 fsck.repair=yes rootwait

During the installation I chose minimal, I also enabled ssh, set the password, and the IP address is assigned via DHCP, so after these steps, I had the basic working setup. I just needed a few more things to have my monitoring stuff with munin. Luckily the old flash drive was not completely broken, so I could save munin configuration (/etc/munin) my custom scripts and plugins (/usr/local/bin and /usr/local/lib/munin) as well as the RRDtool database files (/var/lib/munin), so I copied them onto the new root filesystem before installing munin.

To get munin up and running, I just needed to install lighttpd and munin, and as I read the heating system data via the ModBus protocol, also a small tool called mbpoll. Furthermore, lighttpd needed two lines in the config:

alias.url += ("/munin-static" => "/etc/munin/static" )
alias.url += ("/munin"        => "/var/cache/munin/www/" )

Also for convenience I also installed vim and mc. That’s it.

Munin stopped creating html pages and graphs

Last night munin stopped updating the graphs around 2:30 am. A quick check showed that the rrd files are being updated, meaning the data collection was ok. Also looking at the html and png files one could see that they were not changed since 2:30 am. Actually, this is a lesser problem, as the data was still being collected. Honestly, I hate gaps in the graphs. 😀

I tried to generate the files manually and I got the following response:

# su - munin --shell=/bin/bash -c "/usr/share/munin/munin-graph --debug"
Can't load '/usr/lib/arm-linux-gnueabihf/perl5/5.32/auto/RRDs/RRDs.so' for module RRDs: /lib/arm-linux-gnueabihf/libXrender.so.1: unsupported version 0 of Verneed record at /usr/lib/arm-linux-gnueabihf/perl-base/DynaLoader.pm line 187.
 at /usr/share/perl5/Munin/Master/GraphOld.pm line 46.
Compilation failed in require at /usr/share/perl5/Munin/Master/GraphOld.pm line 46.
BEGIN failed--compilation aborted at /usr/share/perl5/Munin/Master/GraphOld.pm line 46.
Compilation failed in require at /usr/share/munin/munin-graph line 49.
BEGIN failed--compilation aborted at /usr/share/munin/munin-graph line 49.

So I have checked libXrender.so.1, it is a symlink to libXrender.so.1.3.0:

# file /lib/arm-linux-gnueabihf/libXrender.so.1.3.0
/lib/arm-linux-gnueabihf/libXrender.so.1.3.0: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, missing section headers

# dpkg -S libXrender.so.1.3.0
libxrender1:armhf: /usr/lib/arm-linux-gnueabihf/libXrender.so.1.3.0

# apt-get install --reinstall libxrender1
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 26 not upgraded.
Need to get 29.9 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://mirror.as43289.net/raspbian/raspbian bullseye/main armhf libxrender1 armhf 1:0.9.10-1 [29.9 kB]
Fetched 29.9 kB in 2s (16.1 kB/s)
(Reading database … 115977 files and directories currently installed.)
Preparing to unpack …/libxrender1_1%3a0.9.10-1_armhf.deb …
Unpacking libxrender1:armhf (1:0.9.10-1) over (1:0.9.10-1) …
Setting up libxrender1:armhf (1:0.9.10-1) …
Processing triggers for libc-bin (2.31-13+rpt2+rpi1+deb11u5) …
Segmentation fault

The message “missing section headers” sounds strange, also the Segmentation fault at the end, so some more investigation might be needed. However, after reinstall the .so looks better:

# file /lib/arm-linux-gnueabihf/libXrender.so.1.3.0
/lib/arm-linux-gnueabihf/libXrender.so.1.3.0: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=24fb04ae1904cc7b7d4f2407d0e62bdedcf7af46, stripped

Unfortunately I have not saved the old libXrender.so.1.3.0 so I cannot check the difference. I wonder what happened to it. Nevertheless munin works again.

Yealink vs. Entega MediaNet

My impression is that in Germany the standard router brand is FritzBox! These routers have also analogue phone sockets, so analogue phones can still be used even if Deutsche Telecom upgraded all lines to IP phone (SIP). I wanted to use my own router, which has no analogue phone connectors. So we bought an IP phone: the Yealink T41. It took some time to make it work, e.g. in the first step I set up SIP client on the PC, to see if, what and how it works, and then tried to set up the same on the phone.

But it works now, so here are the settings for future reference.

Account settings:

  • Label: the local phone number (without prefix)
  • Display Name: empty
  • Register Name: full phone number starting with the land prefix: 49606…
  • Username: the same as the Register Name
  • Password: the one provided by Entega MediaNet
  • Server Host: voip.entega-medianet.de Port: 5060
  • Transport: UDP

Network settings:

  • To be on the safe side IPv4 only
  • DHCP
  • NAT: everything is disabled (Manual NAT, ICE, STUN, TURN)

However, as it is a private network behind the router, on the router I also had to change a setting:

  • SIP ALG (application level gateway): enabled

Drupal up and running

I have installed drupal as a new engine for my homepage. There are still some issues to configure, but I have not much time at the moment.