Lubuntu

WiFi Access Point Bridge with Raspberry Pi 3 – ETH to WLAN

A Raspberry Pi WiFi Extender is a cheap and power efficient way of increasing the total range of your WiFi Network. In my case I needed to extend a WiFi coverage within the same LAN (bridge mode from Ethernet to WiFi).

I have found a working shortcut 😎 to create an access point following a GitHub project so I didn’t need to follow instructions from raspberrypi.org page – Using the Raspberry Pi as an access point to share an internet connection (bridge).

Upgrade Ubuntu 12.10 (Linaro 13.04) to Ubuntu 13.10 (Linaro 14.01) and later to Ubuntu 14.04 LTS

I wanted to keep my existing configuration and programs on my Cubieboard2 with Linaro Lubuntu, but at the same I wanted to upgrade the packages since the Lubuntu 12.10 is quite outdated. This post describes my steps to upgrade my Cubieboard2 to the newer version, which can be done in 3 steps:

  1. Update repository list to old-releases derivatives
  2. Upgrade Ubuntu 12.10 (Linaro 13.04) to Ubuntu 13.10 (Linaro 14.01)
  3. Ubuntu 13.10 (Linaro 14.01) to Ubuntu 14.04  LTS version (long time support)

Kippo honeypot on Cubieboard Ubuntu

Kippo is an SSH honeypot written in Python. Kippo is used to log brute force attacks and the entire shell interaction performed by an attacker so I have installed it on my cubieboard2 Lubuntu version. According to wiki a honeypot is a trap set to detect, deflect, or, in some manner, counteract attempts at unauthorized use of information systems.

So lets start to install and test my first honeypot.

Ubuntu – data stored in RAM filesystem – TMPFS

In my Cubieboard2 I use Lubuntu. Since I have connected barometer and arduino to my cubieboard, I read data from that devices and store it to cubieboard2 filesystem. Since NAND memory is not quite suitable for such frequent changes because of wear-out of the memory cells over time, I’ve created temp space in RAM memory. Cubieboard2 has 1GB DDR memory so there is some space for it.


I will use TMPFS and not older RAM disks – ramfs. Tmpfs is supported by the Linux kernel from version 2.4 and up. On reboot, everything in tmpfs will be lost. The memory used by tmpfs grows and shrinks to accommodate the files it contains and can be swapped out to swap space.
To get more comprehensive info regarding those filesystems read this post or this post.

Mount SATA drive in Cubieboard with Lubuntu

The main advantage of cubieboard is it’s SATA connector. I have old HDD from notebook, so I wanted to use it as a media server.

This post has 3 parts related to HDD connected to Cubieboard2 with lubuntu:

  • Mounting HDD
  • Backup NAND
  • Spin down HDD


There are many ways to see all disks and partitions but my favorite command is lsblk:

sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL
NAME        FSTYPE   SIZE MOUNTPOINT LABEL
sda                149.1G
nand                 3.7G
|-nanda     vfat      64M            Volumn
`-nandb     ext4     3.6G /
mmcblk0              241M
`-mmcblk0p1 vfat     241M            SSD

or also fdisk:

Apache+PHP on Cubieboard with Lubuntu

I executed the following steps to install apache with PHP on my cubieboard2 with lubuntu.

Lets start with installation that will take about 25MB:

sudo apt-get install apache2
sudo apt-get install php5
sudo /etc/init.d/apache2 restart

Put your IP address to the browser (or localhost) and you see that Apache was installed correctly.

Your www content is stored in /var/www.

The whole www folder is owned by root. So for easier access I changed owner to my user named linaro

Cubieboard2 – Lubuntu – Enabling Print Screen

When I installed Lubuntu on my new Cubieboard2, the print screen was not working.
When I hit the “Print Screen” button I got this message:

I’ve fixed it by installing the scrot application:

sudo apt-get install scrot

If you hit “Print Screen” or “Alt+Print Screen” you will see a new file *_scrot.png in you home directory.

 

Enable UART on Cubieboard with Lubuntu

I wanted to connect my cubieboard with lubuntu to my arduino via serial communication. For that I had to enable a UART and connect pins to my arduino (only RX/TX is needed). I have arduino mini 3.3V on which I have attached some sensors (outside temperature).
By this command you can check if the port is enabled:

stty -F /dev/ttyS0 -a

In fresh installation of lubuntu the ttyS0 is configured and used by kernel and ttyS1 is not enabled. You will get this message for ttyS1:

Lubuntu ssh: Read from socket failed – solved

SSH to my fresh lubuntu on cubieboard2 was not working. I tried it also from the lubuntu itself with the error:

$ ssh localhost
Read from socket failed: Connection reset by peer

I went through many google search results. But I could not find any appropriate solution. Finally did what I should as the first step. Uninstall and install the ssh.

This page helped me to try uninstall with complete removal (also the configuration files). It should work with the command

Cubieboard2 – Lubuntu installation

I wanted to install Lubuntu on my new Cubieboard2 so I decided to go for this v1.06 Lubuntu 12.10 image. You have option to have NAND or SD card and I’ve decided to go for NAND because the system performance should be faster than SD.
UPDATE: Download the Lubuntu 14.04 image for Cubieboard2. I found this image on Marcos Costales blog

I followed this video www.youtube.com/watch?v=TeULfhdX1CY and installed PhonexSuite, downloaded image and upgraded cubieboard2. Thanks for it, it saved a lot of time..