1.1 Before Anything Else
Raspi-config
The config tool is quite handy and some of the next sections use it. You might want to read up ahead and see what parts of it are used in this guide, so you can do them all at once while your at it anyway.
To start it, type sudo raspi-config
.
Using the tool, choose the right locale and choose the right keyboard configuration. By default the RPi is set to en_GB, which means your key mapping will be weird (although you might not perceive it as such when you're a Briton).
Partition size
Check if full SD-card is being used
Note: this seems to happen automatically with recent versions of Raspbian, so you can probably skip this section about partition sizes. Doesn't hurt to check though!
Depending on the way of installation your Pi might be using a partition of only 2Gb, regardless of the size of the SD card, so check that because fixing partitions is risky and you don't want have set up too many things before you fuck it up.
sudo df -h
If the rootfs
partition is smaller than the card size, you might want to resize.
Warning: screwing with partitions may lead to permanent data loss! I'm not reliable for any of it! Ha!
Expanding the partition size, the easy way
I hope this works for you. For a fresh install, it should. Somehow, after using the Pi for a few weeks, it didn't work for me:
sudo raspi-config
It calls up a nice menu where the first option is 'Expand Filesystem'. Use it. If it fails, continue with this part...
Updating the system
Next, make sure your system is up-to-date. I'm assuming your Pi is connected to the internet. If it's not, and you're going to connect it using WiFi, read the wifi section first.
To update the package list:
sudo apt-get update
Then upgrade the system (note: this'll take a while)
sudo apt-get dist-upgrade
This'll update the entire system, install kernel updates, etc. If you just want to update installed packages to their newest versions, use apt-get upgrade
instead.
There's one more command to update the firmware of the Pi itself. Just do this once, you won't have to run this very often.
sudo rpi-update
If this gives an error that looks like cp: cannot stat //lib/modules/yadda yadda
, then sudo mkdir that directory and try again (source). Otherwise, if all went well and an update was installed, it tells you to reboot. Type sudo reboot
to reboot.