How-to install OpenELEC for Raspberry Pi under Windows


Using a Raspberry for multimedia application is something quite interesting. Beginning of November 2015 version 6 (as of today version 6.0.3 is current) of OpenELEC has been released bringing a new version of Kodi (formerly known as XBMC) to your Raspi. Unfortunately creating a bootable SD card is not straightforward if you’re Windows-centric. The distributed tar archive contains a script for creating such a SD card under Linux only. But creating the SD card under Windows is not that complicated.

Under Windows the following ingredients are required

  1. a properly formatted SD card
  2. the distribution archive

Formatting the SD card

A properly formatted SD card for OpenELEC requires to have two partition on it whereas one of them is formated with an ext4 filesystem. This requires a third party tool like the MiniTool® Partition Wizard. It happens that MiniTool is offering a Home Edition which is free for home use only.

After inserting a new SD card and starting the Partition Wizard you’ll get something like this:

pw-shot1For this tutorial I used a spare 1 GB card with a FAT32 partition. The first step is deleting all partitions and then create the first one afterwards.

pw-shot2The original script is creating a FAT32 partition occupying approx. 260 MB, i.e. the size was doubled compared to former versions. So did I and named it “System”. In addition I assigned drive letter S: to it (the assigned drive letter will be used later).

pw-shot3On the left side of the Partition Wizard you can follow the actions that will be performed upon apply. Next the ext4 partition is created and named “Storage” consuming the remaining space on the card. You will receive a warning stating that Windows will only show the very first partition on a removable media. Acceptable in our case.

pw-shot4The new partition layout now should look similar to this:

pw-shot5At this point the modifications can be applied (via the button “Apply” in the upper left) and in a last step the first partition will be marked as “Active” (right-click over the partition; Modify → Set Active).

pw-shot6Copying OpenELEC to the SD card

The distribution comes as compressed tar archive which needs to be extracted first (7zip will do this job). At the end you should have a folder OpenELEC-RPi.arm-6.0.3 containing the distribution. NOTE: If you intend to use the SD card for the new Raspberry Pi 2 you need to use a different archive. Your files will then be in a folder OpenELEC-RPi2.arm-6.0.3.

Assuming that you have assigned drive letter S: to the SD card the following sequence will copy the required files to the card:

cd OpenELEC-RPi.arm-6.0.3
copy target\KERNEL S:\kernel.img
copy target\SYSTEM S:\
copy 3rdparty\bootloader\*.* S:\
copy openelec.ico S:\
copy README.md S:\

The command sequence for a Pi2 is similar. Just change the first command to

cd OpenELEC-RPi2.arm-6.0.3

Last but not least you need to create a file ‘cmdline.txt’ on the SD card with the following content:

boot=/dev/mmcblk0p1 disk=/dev/mmcblk0p2 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 ssh

That’s it. Insert the SD card into your Raspi and power it on. The Raspberry will boot OpenELEC 6.0.3.

Advertisements

108 Replies to “How-to install OpenELEC for Raspberry Pi under Windows”

  1. hehe, great – such a tool we searched… (does it really works with creating ext4 partitions under windows?) would be great if we can take (or you write) this howto on our wiki – for sure with all the credits for you and if you want a link to your blog/this article?

      1. Yes I did. Multiple times.
        This is the exact message:

        *** Error in mout_flash: mount_part: Unknown filesystem ***
        [ 2.709386] System Halted.

        I’m sure to have made 2 primary partitions, first a FAT or FAT32 of 130MB, second an EXT4 of the remaining MB’s (also tried with only 1000MB).
        I’m using an 8GB SD card.

      2. I discovered that I missed the cmdline.txt on the SD card (see above). Check if this works for you as well. I tried this with several SD cards and it worked for me.

  2. it is necessary that the files are copied over the dos console?
    Or you can just copy over the files in Windows explorer?

    what about the 16 cylinder to understand exactly.
    Must be calculated based on the size of the SD card?

    1. The Same here 16GB SD-CARD

      *** Error in mout_flash: mount_part: Unknown filesystem ***
      [ 2.709386] System Halted.

      1. I’m getting this exact error as well.. followed the instructions exactly and have tried multiple times…

    2. You can also copy via Windows explorer. The 16 cylinder thing is only to calculate the original partition size that the script from the distribution is creating.

  3. I ended up doing just that – Downloading an (unofficial?) 3.0.2 .img and writing it directly to an SD card using physdiskwrite.

    I should have added in my previous comment, that I followed the guide exactly, except that I was using the 3.0.2 release (and did not try 3.0.0 as per the guide). It would surprise me if this is the problem, but I probably should have noticed, not discounted and tried 3.0.0

  4. Tried also, all steps seemed to work, but when connected to Pi and booted, I just get a coloured screen and nothing else.

    1. that is just what is happening now with me… I have my raspberry for over three months now, and i wasn’t able to boot it correctly one single time… my sd is a Kingston SCHC 8GB…

      1. commandline.txt line was incomplete:
        =tty1 ssh
        was missing.
        No I am stuck with error:
        Couldn’t find /dev/mmcblk0p2 partitition …
        System halted.

  5. just doesn’t understand one thing. over windows, all the files such as kernel and the ones inside 3rdparty folder need to be copied to the root of the sd card?

  6. thank you for wonderful guide :)
    everything works fine i did everything step wise…
    my pi booted as charm but on openelec logo it stuck with error:
    ***error in mount_storage:mount_common: could not mount /devmmcblk0p2**

    1. I got the same error message :(
      I’ve used a 16gb sd-card.
      my first partition 1024 mb (fat32)
      and the rest ext4

  7. i think it’s my mistake only as i make storage partition logocal… that’s so noob sry ..
    BTW great work

  8. I just tried to install version 3.0.3, added the cmdline.txt to the root of the SD card.
    But once again the message is:

    *** Error in mount_flash: mout_part: Unknown filesystem ***
    [ 2.731268] System halted.

    Is the above manual only usable with versions below 3.0.3.?

      1. You have two (and only two) primary partitions on your SD card? The second partition is ext4 formatted? What does your cmdline.txt contain?

  9. as an addition to the guide for copying openELEC in windows :
    – copy all the files from the extracted file to the SD-card. (Windows will only detect STORAGE and that is the good one)
    – cut and paste all the files from 3rdparty/bootloader into the ROOT of the SD-card.
    – cut and paste system and kernel also to the ROOT of the SD-card. (leave the .md5 files)
    – in the ROOT change kernel to kernel.img

    -add cmdline.txt

    boot your Raspberry Pi

    1. Yep. As written above except that Windows will not see the “Storage” but the “System” partition. “Storage” is formatted with ext4 which Windows usually won’t recognize…

  10. i loaded 3.0.4 onto my 8G SD card then attemted to load 3.0.5 but now my SD card is reporting that it is only 130MB. I think this is a Linux thing. Have tried Flashnul and Mini Tool Partition Wizard to sort this out with no luck. Any suggestions?

  11. I have a 32GB SD, can I set it up to use whats needed for OpenELEC and the remainder for downloads on my Pi. If so, do the same instructions apply.

    Thanks,

      1. Worked exactly as you outlined, perfect, thanks. Now I got some decent onboard storage space for movies and shows.

        Regards,
        Vipz

  12. RPi Model: B
    OpenElec: 3.0.6

    Worked perfect 1’st time by following your instructions. Thank you very much for this tutorial.

  13. Just followed these instructions on a 32GB SD Card with 3.0.6

    I copied the files using windows explorer rather than cmd

    No issues at all :)

    Thanks :)

  14. Can I use this program to resize the storage partition and not loose all the data that is on it. I used an image to burn an 8GB SD card but it left over 6GB un-used. Otherwise I got to start from scratch again.

    1. Arwin,

      I am not following how you got to resize the Ext4 storage partition. I as referring to the Windows app and I cannot get the (freeware) version to resize and utilize the “unallocated” space. Can you elaborate, thanks.

  15. Thanks for this guide ,
    Just installed the OpenELEC Testing – Raspberry Pi ARM Version:3.1.0, according to your instructions and it worked, watching Vampire Hunter D right now.
    only changed the first CMD line ofcourse

  16. I am using a 8 gig sd card S:drive is 321 mb trying to install OpenELEC Testing – Raspberry Pi ARM Version:3.1.0 This is my cmd line ***boot=/dev/mmcblk0p1 disk=/dev/mmcblk0p2 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 ssh **** I just get a rainbow screen. and no boot. Does my cmd line have to be different? What do you mean changed CMD line?

  17. I have followed your tut almost exactly apart from the fact that I am on linux
    so once I had formatted the card using gparted first partition calledwith the label “system”, second partition label “storage” and copy and pasted all the files into the first partition using roxfiler on my machine known as sdc1 and the storage is sdc2. Can’t use the terminal for all commands as bloody keyboard locales are still stuffed from when I first installed my OS and still can’t seem to change them so needless to say I am unsure whether copying and pasting into sdc1 is the actual root of the sd card(may sound dumb, but whats the work around copy and paste wise since commandline not an option?) also you mention when formatting it to select the first partition and setting it to active. Would this be the equivalent to setting the flags to “boot” ?

  18. The entire process written above works and I would like to share my experience with all.
    I did a total of 3 tries and sure enough the first 2 times I am getting the same error message as many users shared above “***error in mount_storage:mount_common:…..”.
    On my third try I looked into Windows Disk Manager and noticed my action on Mini Tool Partition Wizard is not committed e.g. when I wipe the SD card my partition info remains, I confirm this visiting Windows Explorer and all my files copied previously remains accessible. I then re-examine Mini Tool Partition Wizard and noticed pending actions at lower left which prompted me to look for a commit button and I found “Apply” at the upper left corner. Upon depressing Apply button I see my SD card being partition and formatted. Thereafter coping the files stated in the above instructions result in a fully functional OpenELEC system.
    I hope this will help some of the user that fails to get OpenELEC running on their Pi.

  19. I am a complete NOOB. I followed the writeup to the letter even copying the cmdline.txt line and pasting it and i am getting the error in storage mount unrecognized …. error.
    any help?

    2 primary partitions one fat32 one ext4. i am using a 32 gb card. but it just isnt working.

  20. Make sure you apply the changes in the Wizard, make your first partition, press apply then make your second partition.
    The only thing u need to change is the cmd command
    “cd OpenELEC-RPi.arm-3.0.6” < change this to the newer version.
    Hope this helps

  21. I just downloaded Openelec, looked into its create_sdcard script and noticed that it creates cmdline.txt with a line:

    boot=/dev/mmcblk0p1 disk=/dev/mmcblk0p2 quiet

    and not the one as you gave in your article:

    boot=/dev/mmcblk0p1 disk=/dev/mmcblk0p2 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 ssh

    What is the difference between them? WHich one should I choose and why?

  22. F.A.O. Martin in response to your q about which cmdline.txt should I use:
    martin , don’t take my word 4 it but I believe the default script is telling openelec installer to place /storage on SDCard whereas the script that appears on the taskofohm instructions is to tell the installer to place /storage
    on a properly formatted usb flash/pen/thumb drive so as to free up space and apparently optimise the raspberry pi etc. seems rather convoluted to me. I have openELEC v.3.0 running fine on my pi rev. 2 512mbram everything,works fine and the,only lag I have experienced is as per usual when streaming, 1080p avi files from servers on the web. as far as streaming from local network is concerned , no lag whatsoever even with large mkv files. if you want any help please give a shout at michael.lowe@yahoo.co.uk with openELEC HELP REQUIRED in the subject field. if you are on windows, you can always download puppylinux alpha4 which a special armfriendly flavour of puppy linux specially optimised for the pi and you can use it for editing the cmdline.txt and config.txt files in a terminal. in puppy you are already root or superuser so you don’t need to put sudo in front of all your scripts and commands, worth looking into

  23. Coming from a windows user… I can’t thank you enough for this guide, as long as you follow these instructions exactly you will have no problems.
    Mini-tool Partition Wizard worked like a charm, well done for finding this.
    The advantage of this method is you will gain all of your SD space on the second partition, unlike the other methods I found which involve flashing an image to the SD.
    Awesome, and thanks again

  24. that’s work with the 3.0.6 but something is not goot with the beta 3.1.6 can you try it, i am a noob and just following instruction, i think i have to copy more file or something, can’t find the problem, please help me i really wanna try the beta :)
    Ty for your time and your tuto is very good ;)

    1. The described steps also work with version 3.1.6 (tested it, one of my PIs is running it). As version 3.1.x is still in testing phase I didn’t update the instructions for that version. As soon as it reaches stable status I will review and update if nessecary.

  25. When I try to partition my SD card, it seems to partition just fine, but as soon as it finishes it changes to (Bad Disk) and becomes unrecognizable by windows. I can fix this by running partition recovery wizard (in which the storage partition is deleted) but if I redo all the steps, it ultimately ends the same: Bad Disk. Anyone else have this problem?

    1. From the screenshots you can see that both partition needs to be primary partitions. You could decide otherwise but this requires some more adjustments as the numbering of the partitions will change.

  26. As I should have known this, I feel like a noob…

    I had the ‘Error in mount_flash: mout_part: Unknown filesystem’ error. I searched for the error, redid the entire thing from scratch, following the guide step by step (even renaming the drive to S: to follow the guide to the letter), to no avail.

    Turns out, when I created the cmdline.txt file, I used the context menu, selected ‘New Text Document’, and immediately renamed it to ‘cmdline.txt’.

    HOWEVER: my filename extentions are invisible, so it was actually named: ‘cmdline.txt.txt’. After removing the redundant ‘.txt’, openelec booted just fine.

    Now to dive into linux and try not to mess up too badly.

  27. It works. 1 thing wont and thats there is no internetconnection. The cable is ok because i aso use it for my laptop sometimes. Someone can help?

  28. Hi all, first thing first thank you for the guide. I bumped here just because I got the following error:
    error in mount_flash: mount_part: unknown filesystem.
    Reading the guide I realised that I was missing the cmdline.txt file which I have created with notepad and copied into the FAT32 partition. Now the problem that I have got is that nothing is coming up on my screen like a lack of signal as if nothing is booted or the Raspberry PI is turned off. Any idea? Thank you.

    I use OpenELEC 3.2.3

    1. …and yes the cmdline.txt file has the following info inside it:
      boot=/dev/mmcblk0p1 disk=/dev/mmcblk0p2 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 ssh

  29. Not working for me Error in mount_flash:mount_part: Unknown filesystem. Double chcked cmdline.txt tried on two diffrent sdcards everytime got same error

    1. Many people have reported this problem. I saw the same thing when I created cmdline.txt through Explorer.

      In my case, Explorer actually created the file as cmdline.txt.txt (note the duplication, even though it only shows a single .txt in the GUI). Going to the DOS prompt and renaming the file so that it has a single .txt resolved the issue for me.

    1. Had that problem also. Then you probalby forgot to change the kernel file into kernel.img.

      That made my Rasperry restart. See it updating…and then same problem again.
      Using 3.2.3

  30. the error with the unmountable drive seems to happen if you choose utf8 code for the text file. i saved it as ansi and after it worked for me.
    ty mate

  31. I had the same problem with booting. I changed the cmdline.txt file to the below, and it worked!
    Just make sure the FAT32 partition is named “SYSTEM” and your ext4 partition is named “STORAGE”, case sensitive!

    boot=LABEL=SYSTEM disk=LABEL=STORAGE ssh quiet

    Hope that helps!

  32. All,

    for the people that are getting an error message about unable to mount the flash etc.

    Please check under windows when you create the cmdline.txt you have set it to display know extension. I had the same error and after investigating it showed that, my cmdline.txt was actually called : cmdline.txt.txt

    That is why it was not working for me, renamed it and worked like a charm,

    Thanks for the good guide.

    cheers,

    Raoul.

  33. Turns out when I right-clicked to create a new text document using notepad it didn’t work for me (it didn’t have anything to do with the .txt extension, I confirmed using the command line that the extension was fine, not doubled).

    To get it to work for me I had to open wordpad, enter the text in there, then save it as cmdline using the Save as type: Text Document – MS-DOS format

  34. Hi, i followed this guide succesfully but coudl you opdate the guide to use a USB stick?
    What i did is make the EXT4 partition on a USB stick and replace the comdline by
    boot=/dev/mmcblk0p1 disk=/dev/sda1console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 ssh
    Like most guides on net tell you to do but it does not work.
    I think it has to do with sda1 but i don’t know what to put there can you help?

    Thanks

  35. Like most of the guys who posted here I couldn’t get this to work.
    My Pi was showing a coloured screen and nothing else.

    THEN I REALISED I HAD TO RENAME “KERNEL” TO “KERNEL.IMG” and it worked!!!

    LOL…oops

  36. Hi all,
    Many thanks for the guide. I followed each step with one exception I named the drive E: instead of S: and copied all the necessary files as stated in the procedure
    The problem that I have is that nothing is coming up on my (HDMI) screen similar to a lack of signal or as if nothing is booted or the Raspberry PI is turned off exactly the same as Giuseppe had. Any ideas? I would appreciate some assistance.

    I used OpenELEC 3.2.4

  37. Works like clockwork !!!

    Followed it exactly as stated and installed OpenElec 4.0.0 official release !
    All partioins have to be PRIMARY and DON’t forget to create the file cmdline.txt !

    There is only a small bug in 4.0.0, screen calibrate settings are not stored …
    But solved that by editing the XBMC settings by means of a Putty.exe session to the PI.

    Regards,
    Jacob Havinga

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s