Capture Raspberry Pi kernel crashes

I’m experiencing kernel panics in a headless Raspberry Pi with Fedora 29 Server and need a way to capture what is happening.

First I tried to enable kdump, but this doesn’t seem possible. If someone has done it, I’d like to hear.

What I’m using now, is enabling netconsole to log all the kernel messages over the network to a rsyslog server. This is the config in the Pi:




options netconsole netconsole=4444@,20514@

From the netconsole documentation:


        +             if present, enable extended console support
        src-port      source for UDP packets (defaults to 6665)
        src-ip        source IP to use (interface address)
        dev           network interface (eth0)
        tgt-port      port for logging agent (6666)
        tgt-ip        IP address for logging agent
        tgt-macaddr   ethernet MAC address for logging agent (broadcast)

And in the rsyslog server:


$ModLoad imudp
$RuleSet remote

if $fromhost-ip=='' then /var/log/remote/pi-netconsole.log
& stop

$InputUDPServerBindRuleset remote
$UDPServerRun 20514

$RuleSet RSYSLOG_DefaultRuleset


        rotate 30
        maxage 31
                /usr/bin/systemctl kill -s HUP rsyslog.service >/dev/null 2>&1 || true
# firewall-cmd --add-port=20514/udp
# firewall-cmd --add-port=20514/udp --permanent

I’ve used this documentation:

EDIT 03/02/2019:

I just realized there is a netconsole-service package you can install and provides an easy configuration file and service unit:


# This is the configuration file for the netconsole service. By starting
# this service you allow a remote syslog daemon to record console output
# from this system.

# The local port number that the netconsole module will use

# The ethernet device to send console messages out of (only set this if it
# can't be automatically determined)
# DEV=

# The IP address of the remote syslog server to send messages to

# The listening port of the remote syslog daemon

# The MAC address of the remote syslog server (only set this if it can't
# be automatically determined)
# systemctl enable netconsole
# systemctl start netconsole

Set window title in tmux or screen to the hostname you are connecting by ssh

To set the window title in tmux or screen to the hostname you are connecting by ssh, add this to your ~/.bashrc:

settitle() {
    printf "\033k$1\033\\"

ssh() {
    local sshargs=("$@")
    local do_settitle=1
    tty -s || local do_settitle=0
    if [ "${TERM:0:6}" != "screen" ]; then
        local do_settitle=0
    if [ $do_settitle -eq 1 ]; then
        if [ "$1" == "-l" ]; then
            shift 2
       settitle "$*"
    command ssh "${sshargs[@]}"
    if [ $do_settitle -eq 1 ]; then
        settitle "bash"

Configure an instance of old versions of Java and Firefox

Everyday is harder to manage old hardware or access outdated intranet websites because the browser security is tighter with every release. Many appliances use unsigned Java applets or insecure ciphers and protocols.

My first solution to this problem was to have a Windows VM in my laptop with old versions of everything: Firefox, Java, Flash… but running the VM in my underpowered laptop was too slow and made the system sluggish.

Here I describe how to run an old Firefox instance with an old Java.

Continue reading Configure an instance of old versions of Java and Firefox

Internet connection sharing with NetworkManager

With this recipe we will create a wireless access point in our laptop to share our wired Internet connection. This is quite useful where you only have a wired Internet connection (e.g. my work place) for giving access to your phone.

This is done in Fedora 25 Workstation with NetworkManager.

Continue reading Internet connection sharing with NetworkManager

Monitor Salicru SPS SOHO+ UPS with NUT

I’ve successfully monitored a Salicru SPS SOHO+ UPS with NUT following these steps.

In this example I have two Fedora servers, a master where the UPS is connected by USB and a client which is also powered by this UPS but monitors its status by network. With the default configuration the clients will be powered down in an outage when the battery reaches critical levels.

Continue reading Monitor Salicru SPS SOHO+ UPS with NUT