PhotoBox Fragment One

PhotoBox Fragment One


The PhotoBox project grew from an idea that I should store an active copy of my digital photos in a small and easy to access box while traveling. This blogg is the basis of my documentation, should I feel like remembering what was done to get the PhotoBox working.
I’ve posted this publicly for anyone who might want to produce something similar, even if it’s just one of the topics: I certainly spent a lot of time searching on different implementations. I’ve tried to list all commands as-used in my set-up, however mistakes do happen and I’m happy to correct them should any be found.
Various initial options were considered, including a kick-starter project: that is essentially what I created; unfortunately it was not funded. I have listed options below [as with everything I write, what I chose fitted my purpose and may not be the best option for you].


    1. External USB storage drive. This works well for a back-up, and I’m still using an external for ‘static’ back-up. There is a manual process involved and also some tasks that you will need to ‘remember’ to do. For this option, you will require a laptop to act as an intermediate. As I don’t want to always carry a laptop, this option was not practical for me.
  • Cloud Dropbox/OneDrive/GoogleDrive (similar). They all work equally well for both external archiving and syncing between computers. BUT, and this is a big one if traveling, they all required an internet connection.
  • Bigger disk in laptop: although, it doesn’t give easily shareable photos and is not a back-up. (I did this as well),
  • Buy a NAS/Cloud system. This seems like a nice idea, but it’s expensive: a simple Synology (without disks) is two times the price at the start of project.
  • Create my own NAS/Cloud server that I can transport with me. The downside here (and I knew this at the start), is that it takes a longer time to get working (or working correctly) and occasionally needs some ‘tinkering’. On the plus side, such a system an be a lot more versatile.
  • Don’t bother. (should always be considered an option). I’ve had computers break before and lost photos, this is not an option this time.

The CubieTruck

CubieTruck MainboardThere are many nice little PC-boards on offer that can be used for this sort of project. Initially, a colleague put me onto the CubieTruck (CubieBoard III). There are a few useful features which are particularly handy for this project:
  • Has a SATA port and can power a 2.5″ disk.
  • Has build-in wireless and wired networking & bluetooth (there is also an IR port should you desire one)
  • Has inbuilt battery capability (you just need to buy a battery)
  • SD-Card slot (allows you to run an OS from a card giving you the ability to fix mistakes)
  • Available with a rather nice little box with enough room for everything used in my project.

OS & Networking

Fragment One will include what has been configured for the OS and Networking. This is the place to start, after which there are many options.

Getting the OS installed & updated

The initial setup has used the on-board NAND storage and the Lubuntu Server (v13) image form the Cubie site (instructions on site). I later changed my mind and converted the initial install to a SDcard and deployed a desktop Ubuntu image (I like to have VNC available for remote-desktop configuration).
Note: when initially using LiveSuite and a 2013 MacBook Pro, I found that the image would fail (possibly due to the USB3 ports). Using a 2010 MBP (with USB2) it seemed to work.
There are two options once the OS is installed.
  1. Connect a Keyboard and TV/Monitor (and a Mouse if you are using a desktop OS)
  2. Connect the Ethernet to a network, find the IP address (thankfully my wifi-router lists the IPs on it’s main page) and SSH into the box. The default username for the chosen image was ‘linaro’ (and the password is also ‘linaro’)
Once you have logged in, the first thing you need to do, is change the password for you user
$ passwd

The second thing that you want to do, is get any updates to the OS. Part of the reason for this is that most of the installation later is using Ubuntu’s `apt-get`, and making sure it works now will help.
I found that the initial sources list is out-dated and you will want to update to the following (May 2015).

Edit the file “/etc/apt/sources.list” and replace/update with the following:

deb raring main universe restricted multiverse
deb-src raring main universe restricted multiverse
deb raring-security main universe restricted multiverse
deb-src raring-security main universe restricted multiverse

deb raring-updates main universe restricted multiverse
deb-src raring-updates main universe restricted multiverse

deb raring-backports main restricted universe multiverse
deb-src raring-backports main restricted universe multiverse

deb raring-proposed main restricted universe multiverse
deb-src raring-proposed main restricted universe multiverse

Now (assuming you have internet access from the machine, for me this mean a network cable to the router for initial setup), update initial repo’s, install a program called ‘screen’ (this lets you run commands and connect/reconnect, if needed, everything later is run under screen, although I do not specifically mention it).

$ sudo apt-get update
$ sudo apt-get install screen
$ screen 
$ apt-get dist-upgrade
$ apt-get autoremove
$ exit

(to exit screen while running, use ‘control’+a then ‘control’+d, to re-enter screen use `screen -x`)

It’s probably a good idea to set a hostname for the machine so that you don’t need to remembers it’s IP-address, edit the file “/etc/hostname”


Connecting the wifi

(these instructions are taken from various sites, this is what I used in the end)
Test config
$ sudo -s
$ apt-get install iw
$ apt-get install wpasupplicant
$ modprobe bcmdhd
$ ifconfig -a
$ iwlist wlan0 scan
# list of wi-fi network will appear
$ wpa_passphrase <wifi network name> >> /etc/wpa.conf
# blank line should appear, this is where the passphrase for the wifi goes

Edit then network file “/etc/network/interfaces” and add the following at the bottom of the file:

$ auto wlan0
$ iface wlan0 inet dhcp
$ wpa-conf /etc/wpa.conf

Bring up the network interface:

$ ifconfig wlan0 down
$ ifconfig wlan0 up

If this is now working, you can set the wi-fi module to load into the kernel at boot.

Edit the file “/etc/modules” and add the following to the bottom of the list:

All done (for this Fragment). The OS is installed and both networking is operational. Next step is configuring a the CubieTruck as a WiFi access-point.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s