Skip to navigation

Set up Linux

Download a Linux image

Several versions of Linux have been ported to the Banana Pi.  Two of the most commonly used are Raspbian and Lubuntu.  Raspbian is a simple version of Linux originally developed for the Banana Pi.  

Lubuntu is a compact version of Ubuntu designed for running on lower spec hardware than a typical PC.  The procedure for setting up either version of Linux is the same.  

Linux disk images can be downloaded from Lemaker's web site.  The files are in the .tgz (tar and gzip) file format, so if you're using a Windows computer to prepare the card, you'll need to install 7 Zip in order to unpack the archive.  If you're using a Linux PC, you can just use the archive manager supplied with your distribution.

Once you have extracted the .img file from the .tgz archive, you need to burn it to your SD card.

Prepare an SD card

The minimum size needed for the Raspbian and Lubuntu images is 4GB.  It's recommended that you use class 10 SD cards for better performance.  I'm using an 8GB SanDisk Ultra SDHC card. 

If you already have an existing Linux distribution installed on your SD card (for example, if you've been using your SD card with a Raspberry Pi), it is recommended that you wipe existing paritions using GParted.  You don't need to create a new partition, just delete the old ones.  The necessary partitions will be created when the image is burnt to the card.

Burn the image using a Linux PC

Insert your SD card into your PC's SD slot (or use an adapter).  On my PC, the  SD card shows up as /dev/sde.  It's important to correctly determine which device in /dev represents your SD card.  If you write the image to the wrong one, you may corrupt your PC's hard disk.  If your PC automatically mounts the card you should unmount it.

The dd command is used to write an image to the SD card.  This command writes the Raspbian image to the card:

su -c ‘dd bs=4M if=./Raspbian_For_BananaPi_v2_0.img of=/dev/sde’

...and this command writes the Lubuntu image:

su -c ‘dd bs=4M if=./Lubuntu_1404_For_BananaPi_v3_0.img of=/dev/sde’

Set up the Banana Pi

I'm using a USB Wifi dongle to connect my Banana Pi to my home network, and I also plan to use a mouse and keyboard with my Pi.  Since it only has two USB sockets, I've connected a USB hub to my Pi and plugged in the mouse, keyboard and wifi dongle to the hub.  I'm using a powered hub so that the USB devices don't draw power from the Banana Pi.  I connected the Banana Pi to a monitor using an HDMI cable with a DVI adapter.

Set up a Banana Pi

Image courtesy of Lemaker.

Connect the power cable last.  After a few seconds you should see boot messages scrolling up the screen.  If you have installed the Lubuntu image, you'll be prompted for a password. Enter bananapi.  

Set up networking

If there is an ethernet cable attached to your Pi when it boots up, an IP address will be allocated by DHCP.

If you're not using ethernet and you have a USB wifi dongle attached to your Pi via a USB hub, you will need to enter a security key.  You can get the security key by looking at the settings in your home router.  

In Raspbian you need to double click on the wifi icon on the desktop.  A window will appear with a Scan button.  Click on the scan button, and wait for your wifi access point to be listed. Double click on your access point and enter the security key in the window that pops up.

In Lubuntu, there's a networking icon in the bottom right hand corner of the screen.  Clicking on this will display a menu with various networking options.  Available access points should be listed in this menu (if not, look for a search option).  Click on the access point, and enter the security key when prompted.

Install updates

Use these commands to download the latest patches and updates:

sudo apt-get update
sudo apt-get upgrade

The first time you do this, it will take a long time to install all the available updates.  You should update your Banana Pi regularly to make sure you get security patches.  You should also update your Banana Pi before you install new software.

Use this command to shutdown your Pi:

sudo halt

or this command to reboot it:

sudo reboot

See also: Banana Pi quick start

Share this page:

comments powered by Disqus