Starting up Raspbian....

Log into the Banana Pro (BP) using, for example, PuTTY from a PC after connecting your BP via ethernet to your network. 
The basic, pre-set, root user name/password  is bananapi/bananapi.

If using a larger SD card (4GB +), first alter partition sizes otherwise you WILL run out of space..

sudo fdisk /dev/mmcblk0
  then type p to list the partition table
  Take note of the start position of Linux partition as this must be typed in later (ususally 122880)
  next type d to delete a partition
  choose partition 2 (and then repeat for 3 - if there is one of these)

  type n to create a new partition
  This new partition needs to be a primary partition so type p.
  Next enter 2 when prompted for a partition number

 You will now be prompted for the first sector for the new partition.
 Enter the start number from the earlier step (the Linux partition)

 Next you will be prompted for the last sector you can just hit Enter
 to accept the default which will utilize the remaining disk space.

 Type w to save the changes you have made.

 Next reboot :- sudo reboot

 Log back in and type:- sudo resize2fs /dev/mmcblk0p2
 Next reboot again:- sudo reboot

 Log back in and check partition sizes:- df -h

1) Update and upgrade....
  sudo apt-get update
  sudo apt-get upgrade 
repeat if not all upgrades completed OK

2) change system so boots into terminal screen and not GIS... This needs to be done to be able to do in 5) below...
 sudo update-rc.d -f lightdm remove

(to undo if you want to later....  sudo update-rc.d -f lightdm defaults)

3) Change default user password (password must be changed and then login as
   root so default user name can be changed....

 exec sudo -s (changes to root user - on first change)
 sudo reboot

4) To change refault time zone from Etc/UTC to London

 run (under root)....
  dpkg-reconfigure tzdata

5) change default user name (reboot & login as root - new password).... (NEED to do (2) above for this to work) 

    usermod -l yourname -d /home/yourname -m bananapi
    sudo reboot
    sudo adduser yourname

Log in as root to make yourname a sudoer - with no password needed for sudo .......
   sudo visudo

 Add line to file:
      # User privilege specification
      root  ALL=(ALL:ALL) ALL
      yourname   ALL = NOPASSWD: ALL

 sudo userdel -r bananapi

6) Change yourname's password - login as yourname and default bananapi passwd (bananapi)

 and enter old and new passwords (latter twice)


7) change pi's hostname in two files....
      sudo nano /etc/hosts
      sudo nano /etc/hostname
 change as required, e.g. (bpi -> yourname-pi)


8) Change from DHCP to static IP addresses for ethernet and wifi

 Activate wireless - ap6210......
  sudo nano /etc/modules
  Add line... ap6210
  sudo reboot

  sudo nano /etc/network/interfaces
It should read.....
(select your own addresses for etho and wlan0, this example use and

auto lo
auto wlan0

iface lo inet loopback
iface eth0 inet static

allow-hotplug wlan0
iface wlan0 inet static

wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp


    sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
It should read.....


        ssid="your SSID name"
        psk="your wireless password"


9) Install SAMBA (for file sharing)....
   sudo apt-get install samba samba-common-bin
   sudo nano /etc/samba/smb.conf
and change the two entries below....

   wins support = yes  (and delete # at beginning of line)

scroll down to section SHARE DEFINITIONS and add at the top of section....
    comment= yourname BananaPro Home
     only guest=yes
     create mask=0777
    directory mask=0777

10) BOOT onto SATA

 sudo fdisk /dev/sda

You need to delete all existing partitions on the disk
Type d to delete partitions

You may have multiple partitions, start with partition 1, input 1 and press Enter

Continue for the remaining partitions
     Press d then enter
     Enter 2, then press Enter
Until they are all gone

Write the partition table changes  w

Go back into the partition manager
sudo fdisk /dev/sda

Create a new partition n
Choose a primary partition p
Enter Partition number 1
Accept the default start sector, press Enter
Accept default end sector, press Enter
Write the changes to the partition table  w

Back at the terminal prompt, format the disk to ext4 and mount it as /dev/sda1
 sudo mke2fs -t ext4 -L rootfs /dev/sda1

 sudo mkdir /tmp/sata
 sudo mount /dev/sda1 /tmp/sata
 sudo rsync -arx --progress / /tmp/sata
 sudo nano /boot/uEnv.txt
  Do not create any line breaks, in the first line find this snippet
   change it to root=/dev/sda1
   (Make screen wide as it does not show if narrow)

 sudo reboot

Now see if the hard drive is being used  df -h
and it should look like....

Filesystem      Size  Used Avail Use% Mounted on
rootfs          118G  1.2G  111G   2% /
/dev/root       118G  1.2G  111G   2% /
devtmpfs        486M     0  486M   0% /dev
tmpfs            98M  256K   97M   1% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           195M     0  195M   0% /run/shm


.htaccess does not work out of the box. Ownership of theses files need to be owned by the user that Apache runs as (root in this case).To correct that do the following:
chown root:root .htaccess

chown root:root 404.html

Change default Apache configuration. To correct this:
 nano /etc/apache2/sites-enabled/000-default

Change lines :
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all

      Options Indexes FollowSymLinks MultiViews
      AllowOverride All
      Order allow,deny
      allow from all

  /etc/apache2/mods-available/rewrite.load needs to be enabled:
  CD /etc/apache2/mods-available/
  a2enmod rewrite
Then restart Apache:
   sudo service apache2 restart

Password protected directories......................

.htaccess and .htpasswd files must be uploaded and owned by root
the .htaccess file is uploaded into the directory you wish to protect
.htpasswd file is localed somewhere very safe, e.g.  /usr/local/.htpasswd

Content (format) of .htpasswd.... (you need a username:password). 
Use a password generator such as here
You can add multiple lines for multiple users.

.htaccess file....
     AuthType Basic
     AuthName "Password Protected Area"
     AuthUserFile /usr/local/.htpasswd
     Require valid-user