Wednesday 18 March 2015

CREATE USING LINUX

This part is for users with a Linux computer.
You should have a file with a .tar extension. This file contains the OpenELEC installer files. We need to extract the files from the archive in order to use them.

Extracting 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 using the CLI

If you're not running a desktop (or prefer the terminal), then you'll need to navigate to where the downloaded file is:
cd ~/Downloads
Then, extract the file. It will be named OpenELEC then something regarding the architecture and version, with the extension .tar. We need to use the tar utility to extract the files.
tar xvf OpenELEC-Generic.x86_64-4.0.3.tar
You should see a list of files - these are the contents of the archive as they're extracted.

Creating the USB boot/installation media

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:
cd ~/Downloads/OpenELEC-Generic.x86_64-4.0.3/
Now, pop your USB flash drive in that you're going to use as your installation media and find out what device it is, after you've inserted the key you can find the device by executing the following commands
sudo fdisk -l
or
sudo parted -l
You should see your device listed as /dev/sdX, the X will vary depending on what you have connected to your computer it will change from time to time so always make sure!
Next we need to create the installation media. 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:
Note: This will wipe the USB drive! Be careful to not have any important information on it.
sudo ./create_livestick /dev/sdX
(For Gotham and Helix builds:  sudo ./create_installstick /dev/sdX )

Where /dev/sdX is the device you looked up earlier. It's extremely unlikely that your device will be /dev/sda as that's almost always the first hard disk in your computer.
You should then see something like the following on your screen:
#########################################################
#                                                       #
#             OpenELEC.tv USB Installer                 #
#                                                       #
#########################################################
#                                                       #
#     This will wipe any data off your chosen drive     #
# Please read the instructions and use very carefully.. #
#                                                       #
#########################################################
checking MD5 sum...
target/KERNEL: OK
target/SYSTEM: OK
writing new disklabel on /dev/sdb (remove any partition)...
1024+0 records in
1024+0 records out
4194304 bytes (4.2 MB) copied, 1.63624 s, 2.6 MB/s
create an partition on /dev/sdb...
make partition active...
tell kernel we have a new partitiontable...
make filesystem on /dev/sdb1...
mkfs.vfat 3.0.9 (31 Jan 2010)
install syslinux to /dev/sdb1...
mounting partition /dev/sdb1 to /tmp/usb_install...
finding UUID from /dev/sdb1 ...UUID=1CF6-F9AD
create bootloader...
copy files to /dev/sdb1...
syncing disk...
unmounting partition /dev/sdb1...
cleaning tempdir...
...ready
That's it, unplug the flash drive and connect it to the device you will be installing OpenELEC on.

USING A MAC OSX

This part is for users with a Mac OSX computer.
You should have a file that ends in .tar. This file contains the OpenELEC installer files. You'll need a program that can extract the files from this file. OSX native archive utility can do this (double click the archive). If you have problems, use keka.
With the file extracted you will need to open terminal and enter the extracted folder. An easy way to do this is to type cd followed by a space, then to drag the folder onto the terminal window. For example:
cd /Users/chewitt/Downloads/OpenELEC-ION.x86_64-3.2.4
Then hit enter. Next we need to execute the create_installstick_osx.sh script as root using sudo (superuser, admin)
Note: This will wipe the USB drive! Be careful to not have any important information on it.
sudo ./create_installstick_osx
The script will ask you confirm the /dev/disk for the USB key. It runs with root privileges so please be careful with your selection! Once the target device has been confirmed the script will erase and repartition the USB key, install files needed to make the USB key bootable and then install them. It should take no more than a minute to complete.
For reference, the output from the script should look similar to this:
********************************************************************************
*                                                                              *
*              Welcome to the OpenELEC Mac OS X Livestick Creator!             *
*                                                                              *
********************************************************************************

INFO: The following drives are available to create the OpenELEC USB on:

/dev/disk1 *2.1GB

INFO: Please enter the target device (e.g. /dev/disk1): /dev/disk1

/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                                                   *2.1 GB     disk1

WARN: Continuing will erase all data from /dev/disk1, continue? (Y/n): y

INFO: Erasing existing partition schemes on /dev/disk1
INFO: Creating MBR 'OPENELEC' disk on /dev/disk1
INFO: Creating partitions
INFO: MD5 checksums for SYSTEM and KERNEL match
INFO: Copying SYSTEM and KERNEL files to 'OPENELEC'
INFO: Copying syslinux files to 'OPENELEC'
INFO: Creating syslinux.cfg on 'OPENELEC'
INFO: Checking filesystem on /dev/disk1

INFO: Livestick USB creation is complete!

Create An OpenELEC USB Install Stick Using Windows,MAC OSX & Linux

This part is for users with a Windows computer.
You should have a file that has a .tar file extension. This file contains the OpenELEC installer files. You'll need a program that can extract the files from this file, I'd suggest you use WinRar (mainly because it's free) so get it here then extract the files from the archive.

Installation

Once the files have extracted, enter the folder you extracted to and you should see lots of files and folders. The file we're most interested in is create_installstick.bat which will create an installer USB key.
Doubleclick create_installstick.exe (or create_installstick.bat)
Insert your installer USB key.
Note: This will wipe the USB drive! Be careful to not have any important information on it.
Now, double-click on the batch file and you should get a new window appear.
Createstick2.png
Note: If you're running Windows Vista or Windows 7, administrator rights are required. If your current account needs elevating, before the above window appears, you'll be prompted by windows' UAC:
Createstick3.png
Simply click 'Yes' to continue.
After a quick check in My Computer, I can see my USB key is E (my CD-ROM drive is D). So I enter the following and press enter:
Createstick4.png
The installer now creates the bootable USB stick:
Createstick5.png
After around 20 seconds, it's finished:
Createstick6.png
Have a look at your USB key in Windows explorer quickly - you should see the following files if all has gone well:


Createstick7.png

Note: Your USB stick needs to have been named OPENELEC, if it is not the case after running the script, rename it manually.