Restore GRUB2 MBR with Debian based live ISO

When Debian based live ISO is booted start terminal and type:

mount -t proc proc /mnt/sda5/proc
mount -t sysfs sys /mnt/sda5/sys
mount -o bind /dev /mnt/sda5/dev
chroot /mnt/sda5 /bin/bash

Then run:

grub-install /dev/sda

Reverse SSH tunnel shows connection to instead of IP

Imagine the situation where you have 2 hosts:

  1. server – with public IP accessible via Internet
  2. client – with access to Internet but behind firewall so it is not accessible via Internet

You want to access client via SSH over the Internet but you can not access it because it is behind firewall that does not allow connections to the host via public IP.

My idea was to use reverse SSH tunnel started on client side, so I will be able to access client via server IP.

On your client you need to start SSH connection with something like:


If this works, you could access your client directly from server by using since the reverse tunnel will listen only on localhost.

tcp 0 0* LISTEN

So your server is listening on localhost instead on SERVER_IP you ran on the client.

Chech your SSHd server configuration for example in file /etc/ssh/sshd_config following option should be enabled:

GatewayPorts yes

If it is not present you need to add it to your sshd_config and restart sshd.

tcp 0 0* LISTEN

You will be able to access your client port from any IP on server via port 9999 in this example.


Compile lcdproc hd44780 driver on Raspberry Pi running Debian Stretch

In order to get my 20×4 LCD display with cheap IIC/I2C/TWI/SPI Serial Interface Board running on Raspberry Pi I had to use patched file downloaded from NeighborGeek. You can check it out here

This worked fine on my RPi3 running Debian Jessie, but recently I have upgraded to Stretch and found out that his driver now is having issues. After running for longer period of time the screen would be full of garbage characters.

I thought I could repeat the steps, download source, patch the source, compile and use again file instead of the one provided by distribution.

First thing I did was to download latest source from GitHub:

cd lcdproc-master

Now I tried to apply the hd44780-i2c.c patch but it failed. Then I checked the hd44780-i2c.c file in the source I found out that patch is no longer needed just proper configuration in LCDd.conf.

In order to compile the latest driver from GitHub following steps are needed:

./configure --disable-libusb --disable-libusb-1-0 --enable-drivers=hd44780 --disable-libftdi

After you have compiled the driver, go to directory:

 cd /usr/lib/arm-linux-gnueabihf/lcdproc/

and backup existing file just in case something goes wrong:


Then copy the newly compiled driver in proper place:

cp /usr/local/src/lcdproc-master/server/drivers/ .

Edit LCDd.conf and add the following after hd44780 part:


You can download my newly compiled driver and LCDd.conf from this link  hd44780_debian_stretch.

I hope this has saved you some time and got your 20×4 LCD working with Debian Stretch.


I have moved my LCD display to Pine64 SBC and since this is different architecture I needed to re-compile it using the same steps as above.

You can dowload aarch64 version aarch64.