Raspberry Pi

I own five Raspberry Pis, currently used for various purposes:

  • A media centre, running the excellent RaspBMC distribution
  • A headless server, sharing my printer and hard drives on my network, as well as providing a way to control the Arduino that controls my 433MHz remote control sockets and acting as a BTSync and CrashPlan server
  • Two "desktop" systems - each plugged into a monitor on my desk, and sharing the keyboard and mouse over the network so I can use them as if they were a single machine
  • A remote server, hosted in the Netherlands, able to provide all kinds of services (and available externally in case my home internet goes down)

Setting Up A Shared XBMC Library

Although I only have a single device running XBMC, I've set up a shared library mainly so that I can reinstall RaspBMC (or switch to OpenElec, etc) whenever I want without having to worry about the library.  Another benefit is that I can run the shared library using MySQL (stored on a USB Hard Drive) on a BeagleBone Black - with a more powerful CPU, and directly connected to my media!

Server-side setup

This is on a BeagleBone Black running Debian...

Install MySQL: [...]

Sharing Files Using NFS (Linux's Network File System)

This guide shows you how to quickly and easily set up a network share using NFS on Linux.  The share won't be secured in any way, so only use it on a local network - don't share the files with the internet (unless you really want to!)  [For more in-depth instructions, this is quite a good guide]

Server

Firstly install the NFS server:

sudo apt-get install rpcbind nfs-kernel-server [...]

Mounting a USB Hard Drive on Linux

If you are using a GUI such as KDE or Gnome, USB Hard Drives will usually be mounted automatically - available to be used without any effort.

Unfortunately this isn't generally the case on headless (server) systems.

However it is easy to instruct the system to mount a drive manually, or to edit /etc/fstab so that it will be mounted when your computer boots up... [...]

Reclaiming Reserved Space in Linux

By default, when formatting a partition as ext2/3/4, Linux will reserve around 5% of the space for use by the root user.  This is mainly to avoid non-root users filling up the filesystem, as well as helping to reduce fragmentation.

On external drives, this is less important - especially if the content on those drives is pretty static (e.g. a backup drive) - so we can reclaim the reserved space and gain quite a bit of extra storage (over 185GB on a 4TB drive!)... [...]

Sorting the Swap Space on a Raspberry Pi

By default the Raspberry Pi uses a 100MB swap file on the SD card.  I have a 512MB Pi, and I've never actually seen the swap being used... but if it is, it will be horrifically slow and have some impact on the life of the card.  So, since I have hard drives plugged in (I have a 4-drive JBOD USB enclosure) I decided to move the swap.  (Most of the following commands need to be run as root or using sudo). [...]

Installing "unrar" on a Raspberry Pi

A basic version of "unrar" can be installed simply with:

apt-get install unrar-free

However this is unable to handle the RAR v3.0 format (which most .rar files probably use).  For this we must use "unrar-nonfree", which isn't in Raspbian's repositories. Not to worry, it can be installed easily enough using the APT system... [...]

Pages

Subscribe to RSS - Raspberry Pi