Install Kodi on Minibian for Raspberry Pi HTPC NAS Combo

raspberry-pi-kodi-logoKodi can now be installed directly on a Raspbian distro so you can get the best of both worlds thanks to Michael Gorven. Many people use Raspmbc and OSMC which is great if all you want to use it for is a media center only. However, if you want an HTPC combo device that can act as a hybrid NAS media center and download from torrents or usenet, Raspbmc and OSMC are less optimal choices. I have used Minibian as a base for this guide and my image with all of my initial setup configurations so it will work out of the box. The guide works on both Raspberry Pi B+ and the Pi 2, the image I tested works on both devices as well. All of my usenet and torrent software guides will work on this image because of the unaltered Minibian debian base.

If you are trying to figure out which hardware would work best for you, consider reading the Pi benchmarks.

Pi Unit
Processor
RAM
RAM Bus
Network
WiFi
USB
SATA
Cost
Raspberry Pi 3
1.2 GHz ARMv8
Quad Core
1 GB DDR2
450 MHz
100 Mbit
Yes
4
No
$35
Raspberry Pi 2
900 MHz ARMv7
Quad Core
1 GB DDR2
450 MHz
100 Mbit
No
4
No
$35.00
Raspberry Pi
700 MHz ARMv6
Single Core
512 MB SDRAM
400 MHz
100 Mbit
No
4
No
$25
Banana Pi
1 GHz ARMv7
Dual Core
1 GB DDR3
432 MHz
Gigabit
No
2
Yes
$36.99
Banana Pi Pro
1 GHz ARMv7
Dual Core
1 GB DDR3
432 MHz
Gigabit
Yes
2
Yes
$45.00

Install Kodi on Minibian for Raspberry Pi

This guide was entirely adapted from Michael Gorven's site, I only adjusted things to make it copy and paste friendly.

Add Michael's Raspberry Pi Kodi repo and gpg key, change wheezy to jessie if you are on Raspbian or Minibian jessie

echo "deb http://archive.mene.za.net/raspbian wheezy contrib" | sudo tee /etc/apt/sources.list.d/mene.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key 5243CDED

Update repository list

sudo apt-get update

Install Kodi XBMC on Raspberry Pi

sudo apt-get install kodi -y

Add the user group input

sudo addgroup --system input

Add the kodi user to all of the necessary groups

sudo usermod -a -G audio,video,input,dialout,plugdev,tty kodi

Open the input group's permissions

sudo nano /etc/udev/rules.d/99-input.rules

Create some permissions for the input group

SUBSYSTEM=="input", GROUP="input", MODE="0660"
KERNEL=="tty[0-9]*", GROUP="tty", MODE="0660"

Open the Kodi default configuration

sudo nano /etc/default/kodi

Enable Kodi to boot on startup by changing ENABLED to 1

# Set this to 1 to enable startup
ENABLED=1

Enable GPU memory, 128 MB should play back HD video

Open the Raspberry Pi's configuration file

sudo nano /boot/config.txt

Increase the memory by changing gpu_mem to 128

gpu_mem=128

Reboot to test

sudo reboot

When you reboot for the first time you may just see a black screen, SSH in and reboot again, for me Kodi popped up then

You can update Kodi on the Raspberry Pi easily now (applies to the image as well) with these commands

sudo apt-get update && sudo apt-get upgrade -y

Here is the image based on my Minibian customized image. SSH login is root and pi both with password htpcguides. Reveal the link by sharing this page. Michael also has an image prepared on his site which I haven't tested as I'm very happy with Minibian for media server purposes.

After you burn the image use raspi-config to expand the SD card. The image is designed to be used with a nice stable ethernet connection because WiFi is less stable and slower. WiFi tools are installed though so you should be able to configure your wireless dongle, you may need to get additional drivers for it, however.

Afterwards you can install Plex Media Server, NZBGet, Transmission (install last), SickRage, Sonarr, Mylar and Headphones.