The installation of UBUNTU and the system settings
using the example of the Banana-PI
(Translated into English by: DL8CQ)
The Banana-PI is a powerful microcomputer. From the manufacturer you get the pure board without operating system. The following describes how the operating system is installed to make the Banana-PI a HAM computer that is able to run our WSPR software (and of course other ham radio software as well).
Installation of Ubuntu with all necessary packages:
These steps have to be done:
once that is done you can run WSPR. If there are any questions about these steps, read through the following detailed description.
UBUNTU install on SD card:
This work is done on the PC and you need an SD card reader.
Download the image of Lubuntu from the manufacturer's website. You go to the website lemaker.org, continue to Resources and downloads and select there "Lubuntu for Banana PI". The download is described on the page. After successfully loading the image file you should have a file called Lubuntu_For_BananaPi_V3.1.1.tgz on the hard drive (or a newer version).
Unzip this file to get the finished image file Lubuntu_For_BananaPi_V3.1.1. How to unzip it depends on whether you use Windows or Linux. With Linux this is done with the console command: tar xzf Lubuntu_For_BananaPi_V3.1.1.tgz. With Windows you can use the zip-program you are used to or you have to choose a suitable program (e.g. 7-zip).
This image file is copied to the SD card. Using Windows you can do this with Win32DiskImager. With Linux you use command dd. This is the Linux procedure:
a. Insert SD card into the reader
b. Linux will mount the SD card automatically; open it in File Explorer to check and close it.
For next steps open a console:
c. with the df command list the partitions and look for the partition of the 16GB SD card, in the following I use / dev / sdx (where x may be different for everybody).
d. Change to the directory where the image file is stored and enter: dd bs=4M if=imagefilename of=/dev/sdx. Attention: if you replace x with the wrong letter, the hard disk can be deleted! Therefore, check beforehand several times!
e. wait. until the write operation completed
f. Before removing the SD card the following command MUST be entered: umount /dev/sdx
g. Remove SD card
Banana PI boot-up and preparations:
Insert the prepared SD card in the BananaPI, connect all the parts described above, turn on the screen and insert the 5V power supply.
The operating system boots up and shows a login screen.
Login Name: Lemaker
The graphical interface of Lubuntu starts now.
All other actions we execute in the console. Therefore, open a console with the shortcut Alt-Ctrl-T.
In the following, I assume you have basic knowledge in using a console, e.g. how to edit a file, etc. I can not document every single keystroke here.
Install German keyboard:
We enter the console using the shortcut Ctrl-Alt-F1 (get back to the graphical interface with Alt-Ctrl-F7 )
We now log in as user root and enter the password bananapi.
For German users: As long as the US keyboard is installed you will find the dash on the ß key. In addition, Z and Y are swapped.
We enter the following commands:
apt-get install console-data
(Afterwards called at any time using dpkg-reconfigure console-data)
When prompted to choose: select keyboard from full list.
Then you go down the list to: pc / quertz / German / standard / latin1 no dead keys
now the keyboard needs to be activated with: dpkg-reconfigure keyboard-configuration
Keyboard layout: Classmate PC
Country of Origin: German
Keyboard Layout: German
Compose Key: no
Activate the keyboard layout with: udevadm trigger --subsystem-match=input --action=change
Now the board needs to be rebooted using the command: reboot.
If the keyboard layout is acting strangely and jumps back to US, then try to follow http://www.ikt-blog.de/banana-pi-lubuntu-tastaturlayout-permantent-auf-de-umstellen-per-konsole/
Setting the time zone:
The user bananapi has no rights to work in the original condition as superuser, which is a hindrance. To change this:
edit the file: /etc/sudoers
add the following line:
bananapi ALL=(ALL: ALL) ALL
(A line for the root user is already there, you just add the new).
From now on, we do not need to log in as root, but can work with sudo, as usual with Ubuntu, or we activate the permanent superuser with sudo su, which is more convenient for the installation work.
Enlarge partition on SD card:
Even if the SD card has physically 8 or 16 GB, the installed image only uses 4GB. Therefore, it must be enlarged.
The current size can be checked with: df -h
In the line /dev/root is Size: 3.4GB. Of course, this is not enough for us, we have a 16GB SD card. To extend the partition to the entire size, we enter:
a. fdisk /dev/mmcblk0
b. Show partitions: p (Enter)
c. delete partition 2: d (Enter) 2 (Enter)
d. create new partition: n (Enter) p (Enter) 2 (Enter)
(Start sector: exact same number as before displayed at p! Final sector: use given setting)
e. save partition table: w (Enter)
f. reboot: reboot
g. After the reboot, you should enter: resize2fs /dev/mmcblk0p2
h. Reboot again and you're done, the full capacity of the SD card is available now; check with: df -h.
Install Lubuntu packages:
First, we make a complete system update. In the console (accessed by pressing Alt-Ctrl-F1), we no longer need root. Now we can properly login with user: bananapi and password: bananapi.
To work as superuser (saves typing sudo again and again) we enter: sudo su Password: bananapi
CAUTION: if you get an error message, please fix this error IMMEDIATELY and NOT just go on in these procedures. If you get an error message and just continue, the entire system may get confused and you have to start from scratch! For this reason, it is worth the effort to take backups from the SD card on the PC between important steps. So one must not start from scratch in case of an emergency but can go on with the last backup.
For the complete update just enter the following lines one by one. This will take some time, so don't do this if you are in a hurry:
apt-get install gedit
apt-get install build-essential
apt-get build-dep libsndfile
apt-get install libsndfile-dev
apt-get install libfftw3-dev
apt-get install curl
The system is now ready for takeoff. A good time for a backup of the SD card!
Packages for the WSPR GUI:
The following setup is required only if you want to run WSPR with the graphical interface of the U02-WSPR receiver, which is of course recommended, since only then you can get the full joy of WSPR.
apt-get install mono-complete
Currently (as of October 2014) is the mono version 3.2 installed, to check you can use the command: mono -V.
This version, however, is faulty and needs to be updated to 3.10. If Version 3.10 is installed by default, you don't need to execute the following steps and are finished with the preparations.
The following procedure is very simple, but requires a lot of time, you should allow a few hours, you need not, of course, sitting next to it.
For further work we will be in your home directory: cd /home/bananapi.
For all following steps, we are logged in as bananapi user. Therefore I write, if necessary, the sudo in front of the commands.
sudo apt-get install git
git clone git: //github.com/mono/mono.git
Now you can go drink a cup of coffee, or even more, because the above download process takes quite a long time. Once the download is finished you enter:
./autogen.sh --prefix=/usr/local (also that one lasts long)
make (and that one takes even longer, several hours)
should the process after a long time stop with an error message (error), then you MUST MUST
enter make again. Normally it works, if you are not getting disconnected from the internet.
Only if 'make' finishes without errors you may continue:
sudo make install (sudo is obligatory!!!!)
Now reboot with sudo reboot, and your system is now set up.