In this tutorial we will demonstrate the installation of OpenELEC onto a single hard drive system (USB, SSD, HDD, CF, etc).

First off all boot your Linux System or download and boot Ubuntu Live CD. If you use a Ubuntu live cd, remember to enable the needed universe repository for the extlinux installation.

In my case /dev/sdb.

sudo fdisk -l

1 - System 250MB | 2 - Storage reminding free space

Or use Gparted and set the partition size option to cluster.

sudo fdisk /dev/sdb

Now you have 2 linux partitions like this.


sudo mkfs.ext4 -m0 /dev/sdb1
sudo mkfs.ext4 -m0 /dev/sdb2

sudo e2label /dev/sdb1 System
sudo e2label /dev/sdb2 Storage

sudo tune2fs -O ^has_journal /dev/sdb1
sudo tune2fs -O ^has_journal /dev/sdb2

 sudo mkfs.ext4 -v -m0 -O ^has_journal -L System /dev/sdb1
 sudo mkfs.ext4 -v -m0 -O ^has_journal -L Storage /dev/sdb2

For SSD you can enable the discard mount option if TRIM is supported.

sudo hdparm -I /dev/sdb1 | grep TRIM

If you get the output TRIM supported activate discard.

sudo tune2fs -o discard /dev/sdb1
sudo tune2fs -o discard /dev/sdb2

sudo apt-get install extlinux

Write MBR (Master Boot Record Code) to the device.

sudo dd if=/usr/lib/extlinux/mbr.bin of=/dev/sdb bs=440 count=1

Mount System partition for bootloader & system installation.

sudo mkdir -p /media/System
sudo mount /dev/sdb1 /media/System

sudo extlinux -i /media/System/

Create bootloader menu config file.

sudo gedit /media/System/extlinux.conf

And paste the following lines. In case of problems with the Partition Labels use APPEND boot=/dev/sdb1 disk=/dev/sdb2 quiet

 DEFAULT linux
 LABEL linux
 APPEND boot=LABEL=System disk=LABEL=Storage quiet ssh

Now copy the KERNEL & SYSTEM file from the OpenElec.tar.gz/target/* folder to the System partition.

sudo cp ./ /media/System/
sudo cp ./ /media/System/

sudo umount /dev/sdb1