This is part one of a series showing how to get a Raspberry Pi working as a great little unified downloader-appliance. The aim is to get a system that will provide an easy way of monitoring a collection of TV series for new or old episodes using Sick Beard, grab new movies using Couch Potato, and download them all seamlessly using SABnzbd. The end-result will be a completely web-based easy-to-use appliance!
This won’t be for the uninitiated though. A level of knowledge of both basic networking, and working with linux will be required. If you can’t connect to the Pi using PuTTY, or change directories in a Linux CLI, you might need some help elsewhere first.
In this short initial part, we’ll just be getting Pi installed and up to date…
Getting RaspberryPi going
First, some pre-requisites to download:
- The RaspberryPi ‘Raspbian Wheezy’ Debian image
- MiniTool Partition Wizard Home Edition
- Roadkil’s DiskImage 1.6
- PuTTY SSH client
Preparing the SD Card
I have a Windows laptop with a built-in SD-card reader, so that made things a bit simpler.
First I used MiniTool, which allowed me to delete all existing partitions from the SD card and rebuilt the MBR. That resolved an issue whereby the next step was failing with an “unwritable” error.
Next I used DiskImage to copy the Raspbian image to the SD card. (You can also use this tool to backup the SD card whenever you like).
I’m going to do everything remotely using PuTTY to connect over SSH, but you can continue with a keyboard directly attached too. Means you can’t copy’n'paste anything though!
Normally you would change the password when prompted to by ‘raspi-config’, but I’m going to assume we’re doing everything over an SSH connection, and maybe even scripted, so with as little GUI intervention as possible.
First, change the password for the user ‘pi’. You might end up making it accessible over the internet (accidentally or on purpose) and the default password would kind of leave things a bit open:
sudo passwd pi
Some Basic Maintenance
First, let’s remove all the graphical packages that we’re not going to be needing, which we’ll really need if we’re on a dinky little 2Gb sdcard. After this, there should be over 500Mb free space.
sudo apt-get -y purge gnome-icon-theme gnome-themes-standard lxappearance \ lxde-common lxinput lxpanel lxpolkit lxrandr lxsession-edit lxshortcut lxtask \ lxterminal scratch xserver-common sudo apt-get -y autoremove sudo apt-get -y autoclean
Next, make sure Raspbian is up to date (select ’No’ to replace any files):
sudo apt-get update sudo apt-get -y upgrade
To update the firmware we’ll use rpi-update, and for that we need Git. So grab that next:
sudo apt-get -y install git
Next, get rpi-update, and then run it:
git clone git://github.com/Hexxeh/rpi-update.git Cloning into 'rpi-update'... remote: Counting objects: 91, done. remote: Compressing objects: 100% (73/73), done. remote: Total 91 (delta 30), reused 78 (delta 17) Receiving objects: 100% (91/91), 13.44 KiB, done. Resolving deltas: 100% (30/30), done.
cd rpi-update sudo ./rpi-update Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS Performing self-update Autodetecting memory split Using ARM/GPU memory split of 192MB/64MB We're running for the first time Setting up firmware (this will take a few minutes) Using HardFP libraries If no errors appeared, your firmware was successfully setup A reboot is needed to activate the new firmware
The last thing we need to do is expand the space to fill the SD card, so fire up the configuration tool again, and select “expand_rootfs”:
And when it’s done, accept the offer to reboot.
After the reboot, the system will be all up to date and ready for whatever you want to use it for.