How to set up a media center with Raspberry Pi

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.

Subscribe to Xmodulo

Do you want to receive Linux FAQs, detailed tutorials and tips published at Xmodulo? Enter your email address below, and we will deliver our Linux posts straight to your email box, for free. Delivery powered by Google Feedburner.

The following two tabs change content below.
Kristophorus Hadiono is a Linux enthusiast and a teacher in private higher educations in Indonesia. He uses Linux for his daily computing, also when he teaches his students. He is currently continuing his education with government scholarship at a private university in Bangkok, Thailand.

8 thoughts on “How to set up a media center with Raspberry Pi

  1. Thanks! Best how-to I've seen on the RPi media center. I had about given up making it work but setting up RaspBMC went flawlessly just following your steps. Fun, but now my wife wants to buy a large-screen TV for it. I love it when she urges me to do something I want to do anyway, heh.
    :)

  2. I suggest OpenELEC. I have been using Raspbmc for half a year and it's more lazy and harder to overclock. Now I am on 1000Mhz, NFS sharing, not Samba.

    It's fine for 99% of full-hd movies. It's also pretty fast in menu navigation.

  3. Since updating my iPad to iOS7 airplay video is broken on both Openelec and Raspbmc :-( I've tried reinstalling both but no joy.

  4. I got working RaspBMC. no remote but don't need it as i am using the web interface remotely. a bit slow but still good.

  5. do you have any tutorial about raspberry pi with temperature - humidity sensor?
    i would like to configure it so i can monitoring my chamber, but i'm still new with raspberry pi.
    please help me.
    lot of thanx before.

Leave a comment

Your email address will not be published. Required fields are marked *

Current ye@r *