Installing OpenELEC on Raspberry Pi
This is for users with a Linux computer.
Installing OpenELEC for Raspberry Pi from a Linux computer is a very simple process and whether you're new to Linux or a hardened *NIX user, you shouldn't have any problems.
Things you'll need
- A computer (your normal PC)
- A Raspberry Pi
- Media to install to (SD card)
The first thing you need to do is download the latest stable build of OpenELEC for Raspberry Pi, located here
Once it's downloaded, you'll have a file that ends in .tar.bz2 - This file contains the OpenELEC installer files. We need to extract the files from the archive in order to use them.
Download the current release archive from here:
Extracting the archive using the GUI
There are two ways to do this: the easiest way is if you're running a desktop (Gnome, KDE, etc). If you are, just open the folder you downloaded the file, find the file, right-click on it and select 'Extract Files...'. This will create a new folder with the installer files in it.
Extracting the archive using the CLI (Command Line Interface)
Open the Terminal, if you are using Ubuntu it's in the applications menu, each distro has a different way of getting to the Terminal however it is usually called something like Terminal or Term.
Change to the folder where you downloaded the release archive to (lets assume the Downloads folder in your home directory):
Then extract the archive. It will be named OpenELEC-build-architecture-version.tar. We need to use tar to extract the archive.
tar xvf OpenELEC-RPi.arm-3.2.3.tar
You should see a list of files - these are the contents of the archive as they're extracted.
Creating the SD Card
At this point, whether you've used a graphic application or tar to extract the files, you now need a terminal open. Navigate to where you've downloaded the files, then into the folder the extraction has created:
Now, pop your SD card in that you're going to use and find out what device it is (after you've inserted the SD card, use dmesg | tail to find out. It should be something like /dev/sdX).
Next we need to create the installation key. You'll need superuser privileges to do this, whether you use the root user or sudo. Either way, you need to execute the following command:
sudo ./create_sdcard /dev/sdX (where /dev/sdX is the device you looked up a second ago)
It's very important that you make sure you have the right device as it will be wiped as part of the process. For example, it's extremely unlikely that your device will be /dev/sda, as that's almost always the first hard disk in your computer. Note: make sure there's nothing important on your SD card as the above command will wipe ALL data on it.
Lastly ensure the changes are synced to the SD card before removing it:
You can now remove the SD card and plug it into your Raspberry Pi.
Format the sd card in Disk Utility (open with Finder) as msdos
Then open a terminal window and run the following
This will output something like this
/dev/disk0 #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *60.0 GB disk0 1: EFI 209.7 MB disk0s1 2: Apple_RAID 59.7 GB disk0s2 3: Apple_Boot Boot OS X 134.2 MB disk0s3 /dev/disk1 #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *60.0 GB disk1 1: EFI 209.7 MB disk1s1 2: Apple_RAID 59.7 GB disk1s2 3: Apple_Boot Boot OS X 134.2 MB disk1s3 /dev/disk2 #: TYPE NAME SIZE IDENTIFIER 0: Apple_HFS Mountain Lion *119.4 GB disk2 /dev/disk4 #: TYPE NAME SIZE IDENTIFIER 0: FDisk_partition_scheme *8.0 GB disk4 1: DOS_FAT_32 UNTITLED 8.0 GB disk4s1
Find your sdcard, in my case it is disk4
You can build the image yourself using these instructions or take the easy path and download a pre-built unofficial image from one of the following locations:
- http://openelec.thestateofme.com/ (from Chris Swan, note official_images directory)
- http://resources.pichimney.com/ (mirror of above)
- http://sparky0815.de/category/raspberry-pi-2/openelec/ (from sparky0815, German)
- http://184.108.40.206/sparky0815-rpi/ (sparky0815 FTP)
Unzip the image and place it somewhere accessible.
Go back to Disk Utility and unmount the SD card partition (do not eject) by right-clicking on the partition name (child of the volume).
Then dd the image to the sd card using something like the following (NOTE: DD IS DANGEROUS, BE CAREFULE WHEN USING IT. MAKE SURE THE diskX MATCHES THE NUMBER ABOVE)
dd if=/Users/lukas/Desktop/r11542.img of=/dev/disk4
You may have to run this as sudo
You may need to wait up to 10 minutes while it copies. There won't be any progress indicator. Eventually you'll be returned to command prompt, indicating it has finished.
You may get this error
dd: /dev/disk4s1: Resource busy
In that case you have to unmount the disk
diskutil unmount /dev/disk4
Wait for the command prompt to come back and you're done
Install Raspberry Pi with USB drive
The aim here is to use a SD card for the system files and a USB DRIVE as the storage device. This is to stop corruption of SD Cards with issues. Some knowledge needed using Linux and "vi".
The gain is speed, cheap storage and ability to upgrade without loosing configuration data.
- HW: A Raspberry PI (Obviously) and a Power Supply.
- HW: A SD card. Any type will do. (You will be using this to store your OS onto.)
- HW: A Memory Stick.
- HW: A working Network Cable.
- HW: SD card reader.
- SW: MiniTool Partition Wizard. (MiniTool Partition Wizard)
- SW: Raspberry Pi Openelec (OpenELEC)
- Create a 150MB, FAT32, PRIMARY, ACTIVE, partition on your SD card. (label: System) - NOTE: You could use the entire SD size.
- Create a partition (I used the full size) , EXT4, PRIMARY partition on your Memory Stick. (label :Storage)
Extracting the Archive:
- Extract the archive using either 7zip or winrar.
- Open a DOS BOX and cd to the directory where you extracted the archive.
- Run the following commands to copy the files to the SD card. (Mine was mounted on G:\ - Change this to your need):
copy target\KERNEL g:\kernel.img copy target\SYSTEM g:\ copy 3rdparty\bootloader\*.* g:\ copy openelec.ico g:\ copy README.md g:\
Create your startup files:
- "edit g:\cmdline.txt" (Remember to change g:\ for your own drive.)
- Add the following content to the file:
boot=/dev/mmcblk0p1 disk=/dev/sda1 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 ssh
- The following is what it will look like if you make a standard SD card installation:
boot=/dev/mmcblk0p1 disk=/dev/mmcblk0p2 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 ssh
Explanation: What you have just done:
- You have used MiniTool to create 2 filesystems. One a FAT32 and one a EXT4 filesystem
- You extracted the archive and dumped all the files to your SD card.
- You then created a startup cmdline.txt file
- Changing the OS to a newer OS is easy, just do Points 2.2 and 2.3
- By just doing Points 2.2 and 2.3 you will not loose any data stored or customization on your USB Device.
- You can replace the USB device with a HDD for more storage.
Setting the time correctly:
Raspberry PI does not come with a real clock. What that means is that you will have to set the time every-time you boot by hand. But, there is an easy way to rectify this:
- ssh to OpenElec. (u:root/p:openelec)
- "vi /storage/.config/autostart.sh"
- Add the following content:
#!/bin/sh (sleep 30; \ /usr/sbin/ntpdate pool.ntp.org; \ )&
- "chmod +x /storage/.config/autostart.sh"
When your PI comes up, it will take 30 seconds and the time will be in sync.
Safely remove your SD card and place it in your Raspberry Pi
Connect the RPi to your display, plug in the ethernet cable and power it on. Once booted you can ssh to the device with;
username: root password: openelec
Note that if you do not have a USB input device you can enable XBMC Wifi remote access (via Android/iOS etc) by editing the XBMC config files directly, turn on the XBMC webserver and set a username/password in ~/.xbmc/userdata/guisettings.xml
- OpenELEC RaspberryPi development builds: http://sources.openelec.tv/tmp/image/openelec-rpi/
- OpenELEC wiki: http://wiki.openelec.tv/index.php?title=Compile_from_source
- OpenELEC developer forum: http://openelec.tv/forum/20-development-discussion
- Sources on github: https://github.com/OpenELEC/OpenELEC.tv
- Issues (bug) tracker: https://github.com/OpenELEC/OpenELEC.tv/issues
- IRC chat support: http://openelec.tv/support/chat
- Pre-compiled builds: https://www.ghcif.de/~t4c/raspberry/openelec/