I’ve just got my hands on a Raspberry Pi 2, to go along with my A model. After having a lot of problems running RaspBMC, Kodi and OSMC as a media centre, I’ve decided to upgrade to the Pi 2 and run Plex, making use of the htpcguides. First I installed Minibian. This is a very minimal version of Raspbian. It doesn’t even come with nano! I didn’t install the wireless firmware, as I have chosen to plug my Pi into my router. I also didn’t install a GUI for Minibian; I’ll only be interacting with the Pi through ssh sessions, using it completely headless.
On my first attempt, I tried to run
apt-get upgrade && apt-get update
before the step
apt-get install nano sudo rpi-update raspi-config usbutils dosfstools -y
This, unfortunately, lead to
raspberrypi-bootloader_1.20150923-1_armhf.deb failing to be upgraded, which prevented apt-get from installing anything, and meant that a reboot lead to Minibian not being loaded. A quick re-flash of the SD card, and a proper following of the steps went far smoother. Lesson learnt: don’t think you know what you’re doing with upgrades and updates on a slightly different version of Linux than you’re used to.
After getting Minibian running, I followed the guide for installing Plex. Being from the UK, I first attempted to install Plex using the local
en_GB.utf8 rather than
en_US.utf8. I managed to update
libc6 to version 2.19 manually, and followed Method 1 to install Plex Media server by using a repository.
Before going any further, I also set up password-less access to the Pi, using the official documentation. This fails because Minibian doesn’t have either a
.ssh folder, nor an
authorised_keys file in that folder. A quick look at this Ras Pi TV guide showed that the easy and obvious solution is to simply log into the Pi and make them (making sure they’re owned by the user you’re wanting to log in as without passwords). Side note: I created the
authorized_keys file with the command
This is a command I’ve seen used, but was never quite sure what it did. Now I know. After making this file, the command to copy the contents of the public key on my computer to the authorized_keys file on the Pi went through successfully, and I could log in without entering my password.
The last thing I needed to do was to alter the
fstab to auto-mount my external drive. Although I thought I already knew how to do this from my previous dealings with my first Raspberry Pi and RaspBMC/Kodi, I found the htcguides guide on setting disks to auto-mount to be a great resource on how to find all the useful information (UUID, file system type, etc.). More importantly, the end of the guide included an explanation that there is a bug on the Raspberry Pi 2 that messes up auto-mounting, and outlines two ways to fix this. First, edit the
/boot/cmdline.txt file to add a delay. Unfortunately this made no difference, so I had to apply he second fix, adding the command
sudo mount -a
to the script
/etc/rc.local. This, however, also did nothing. A quick google search later, and I found this discussion on the Plex forums, which finally allowed me to solve the auto-mounting issue by amending
/etc/rc.local to read as follows:
sleep 30 sudo mount -a exit 0
Edit: Just a quick update. During the installation of the Plex media server, the HTPC guide gets you to pin apt sources, namely the Jessie repositories, when upgrading
libc6. This can cause issues installing packages, as noted in the guide. I encountered this problem rather quickly when attempting to install the
python-dev package. In order to install this package, I had to use the
-t flag when installing it. That is:
sudo apt-get install -t jessie package name
-t flag for
apt-get install alters the pin status for the declared resource.
 Possibly the most important step to editing the
fstab is to ensure you run the
sudo mount -a command after editing the
fstab, to make sure that you’ve not broken anything before rebooting! A broken
fstab can prevent the disk with the root file system on from mounting properly. The only solutions to a broken
fstab being to mount the drive on another computer and edit the
fstab from there, or to restore form a backup
 I also have my TV wired into the network. The wireless card broke a year or two ago, for no real reason. Samsung wouldn’t help me out, but Amazon did offer me a partial refund due to the Sales of Goods Act, which now seems to have been replaced by the Consumer Rights Act.
 See the manual for more information.