How to set up a media center with Raspberry Pi

Last updated on February 3, 2014 by Kristophorus Hadiono

'One of the most popular and useful projects with Raspberry Pi (RPi) board is turning RPi into a media center box. All you need to do is to download a media center image for RPi, and write it to your SD card. There are plenty of media center distributions for Raspberry Pi, such as OpenELEC, RaspBMC, GeeXboX, RaspyFi, etc.

In this article, I will discuss how to set up a media center on Raspberry Pi using two of the most popular media center images: OpenELEC and RaspBMC. Both images use XBMC as built-in media player software.

Set up OpenELEC Media Center on Raspberry Pi

To set up an XBMC media center with OpenELEC on Raspberry Pi, follow instructions below.

First, download the latest OpenELEC image for RPi from the official OpenELEC site. As of this writing, the latest build is 3.2.4.

Extract the image, and go to the extracted OpenELEC directory.

$ tar xvf OpenELEC-RPi.arm-3.2.4.tar
$ cd OpenELEC-RPi.arm-3.2.4

Put your SD card into a card reader.

We need to find out what device name is assigned to the SD card. To do so, run this command.

$ dmesg | tail
[ 3999.329472] sd 6:0:0:0: [sdb] Cache data unavailable
[ 3999.329476] sd 6:0:0:0: [sdb] Assuming drive cache: write through
[ 3999.330486] sd 6:0:0:0: [sdb] Cache data unavailable
[ 3999.330490] sd 6:0:0:0: [sdb] Assuming drive cache: write through
[ 3999.332054]  sdb: sdb1

In this example, the SD card is assigned /dev/sdb. Note that sdb1 is a partition name. When you write an image to the SD card, you need to use /dev/sdb, not /dev/sdb1.

Make sure that no partition in the SD card is mounted since the card will be partitioned/formatted subsequently.

$ umount /dev/sdb1

Run the script called create_sdcard with the device name of your SD card (e.g., /dev/sdb). The script is found inside the extracted OpenELEC image directory. The script will write the OpenELEC image into your SD card (/dev/sdb).

$ sudo ./create_sdcard /dev/sdb

Wait for a while until it is finished. Once it's done, run the following command, which will flush file system buffers. After that, eject the SD card.

$ sudo sync

Plug the SD card to your RPi, and turn the power on to start enjoying your OpenELEC media center. The default username and password of OpenELEC is root and openelec.

Set up RaspBMC Media Center on Raspberry Pi

To set up an XBMC media center with RaspBMC on Raspberry Pi, here are the steps to follow.

First, download the "standalone" image of RaspBMC from the official RaspBMC website, which contains complete RaspBMC packages, and automatically expands the RaspBMC image to use the full size of your card on bootup.

Extract the downloaded RaspBMC image file.

$ gunzip raspbmc-final.img.gz

Insert your SD card into a card reader.

Using the same steps described in OpenELEC case above, find out the device name assigned to the inserted SD card (e.g., /dev/sdb).

Make sure that none of the partition(s) (if any) in the SD card is mounted.

$ umount /dev/sdb1

Now go ahead and write the image to the SD card as follows.

$ sudo dd bs=4M if=/path/to/raspbmc-final.img of=/dev/sdb

After it's completed, plug the SD card into your Raspberry Pi, and start enjoying the RaspBMC system.

Here I show some pictures of RaspBMC system running on my RPi. I use Raspberry Pi B model with 1 TB Toshiba ext HDD for movie storage, and Acer AL1916W as my main display. For interactions with RaspBMC system, I use mini USB keyboard.

First time boot of RaspBMC.

Initial appearance after booting.

External HDD is mounted automatically after booting.

The complete appearance of my RaspBMC system.

List of movies stored in an external HDD.

System summary of my RaspBMC system.

Support Xmodulo

This website is made possible by minimal ads and your gracious donation via PayPal (Credit Card) or Bitcoin (1M161JGAkz3oaHNvTiPFjNYkeABox8rb4g).

Please note that this article is published by Xmodulo.com under a Creative Commons Attribution-ShareAlike 3.0 Unported License. If you would like to use the whole or any part of this article, you need to cite this web page at Xmodulo.com as the original source.

Xmodulo © 2021 ‒ AboutWrite for UsFeed ‒ Powered by DigitalOcean