NOTE! This site uses cookies and similar technologies.

If you not change browser settings, you agree to it.

I understand

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: HOWTO: Installing OpenELEC on USB-key with solely Mac OSX command line.

HOWTO: Installing OpenELEC on USB-key with solely Mac OSX command line. 6 years 2 weeks ago #1

  • tdegrunt
  • tdegrunt's Avatar
If you're on Mac OSX (Lion) and you want to create a bootable USB-key to install OpenELEC on your hardware (in my case Xtreamer Ultra), you have to jump through hoops to get it to work. It's almost impossible! I haven't gotten it to work through unetbootin or anything. Neither had I any interest in using Ubuntu or Windows for it, as I am of course a Mac user. Writing this up and putting it in a procedure and testing this, took me hours of work, I hope to save you from that!

I've written up a small manual, which can be found here: cl.ly/2w3n2A0S1T1M300H3X1n
You'll also need a small installation ZIP file, as explained in the manual: cl.ly/0y3q182c1F1Y0t0s1q0p

The ZIP file contains two files: mbr.bin and a Mac-intel-binary version of syslinux.
A Mac OSX version of SYSLINUX can be obtained through: github.com/gkovacs/syslinux-mac. I found the mbr.bin in the unetbootin.app's Contents/Resources folder.

My hope is that someone will know a better way (in Mac OSX) for step 9: "Making the USB-stick bootable, by marking the first partition active". But then in a non-interactive way. That way a shell-script could be made, similar to Linux and Windows. Of course after that, it would be brilliant if a Mac OSX shell-script version could be included with OpenELEC.
The administrator has disabled public write access.

Re: HOWTO: Installing OpenELEC on USB-key with solely Mac OSX command line. 6 years 2 weeks ago #2

  • chewitt
  • chewitt's Avatar
I found this statement via google:
fdisk reads from stdin so you just need to feed it the appropriate commands. For example, the following clears the partition table, if there is one, and makes a new one that has a single parititon that is the; entire disk:

(echo o; echo n; echo p; echo 1; echo 1; echo; echo w) | fdisk
I'll have a look at simplifying what you've done into a script - my problem will be that I don't have a normal HTPC to test the results on - only a mk1 AppleTV box which requires a completely different approach to OE installation.
The administrator has disabled public write access.

Re: HOWTO: Installing OpenELEC on USB-key with solely Mac OSX command line. 6 years 2 weeks ago #3

  • tdegrunt
  • tdegrunt's Avatar
Not sure whether Apple's version does the same thing, but from here:
developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man8/fdisk.8.html

the -d and -r options could be of help:
-d Dump partition table in a format readable by the -r option.
-r Read a partition table from the standard input.

I still have my Xtreamer Ultra available, so I can test a script for you.
The administrator has disabled public write access.

Re: HOWTO: Installing OpenELEC on USB-key with solely Mac OSX command line. 6 years 1 week ago #4

  • blargman
  • blargman's Avatar
just registered to say thank you for this invaluable tutorial
The administrator has disabled public write access.

Re: HOWTO: Installing OpenELEC on USB-key with solely Mac OSX command line. 6 years 1 week ago #5

  • chewitt
  • chewitt's Avatar
If someone could test the attached script I would be grateful. It needs to be run from the same folder as the existing "create_installstick" and "create_installstick.bat" files.

DOWNLOAD SCRIPT HERE
The administrator has disabled public write access.

Re: HOWTO: Installing OpenELEC on USB-key with solely Mac OSX command line. 6 years 1 day ago #6

  • randomtask
  • randomtask's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 1
  • Karma: 0
Tested on Lion 10.7.2, works great! Installed on ASUS ION barebone, no problems at all.

P.S.: One thing, though: if possible, disk0 should not be included as a choice for installation, as that's usally OS X's boot drive.
Last Edit: 6 years 1 day ago by randomtask.
The administrator has disabled public write access.

Re: HOWTO: Installing OpenELEC on USB-key with solely Mac OSX command line. 6 years 1 day ago #7

  • tdegrunt
  • tdegrunt's Avatar
After a holiday, back online! Just tested this on my Xtreamer Ultra and it works perfectly! Would be great to see this, or something very similar, included in the OpenELEC download!
The administrator has disabled public write access.

Re: HOWTO: Installing OpenELEC on USB-key with solely Mac OSX command line. 5 years 11 months ago #8

  • pnerges
  • pnerges's Avatar
chewitt: Very nice script. It worked like a charm and easy to read as well. :)
The administrator has disabled public write access.

Re: HOWTO: Installing OpenELEC on USB-key with solely Mac OSX command line. 5 years 11 months ago #9

  • pgkool
  • pgkool's Avatar
Chewitt:

Your script has a parsing bug in it. If any of the outputs for "diskutil list" do not have a value for any of the columns, your parsing through "awk" does not work right.

I would suggest the code in the script to be changed

FROM:
diskutil list | grep 0: | awk '{print $5,$3,$4}'
TO:
echo "   #:                       TYPE NAME                    SIZE       IDENTIFIER"
	diskutil list | grep 0:
ALSO:
FROM:
OUTPUT=$(diskutil list | grep 0: | awk '{print $5}' | grep "${INSTALL_DEVICE}" 2>/dev/null)
TO:
OUTPUT=$(diskutil list | grep 0: | awk '{print $NF}' | grep "${INSTALL_DEVICE}" 2>/dev/null)
I see that you were trying to make this script user friendly, but if the name of the disk for instance has a space in it or one of the columns are missing, you get the wrong output. For instance here was my output...
The following devices were found:

disk0 *250.1 GB
GB OS *19.2
MB NAME *512.8

Running "diskutil list" manually , with out the awked output, i get this (of course this is my fault since i manually partitioned my drives)...
   0:      GUID_partition_scheme                        *250.1 GB   disk0
   0:                  Apple_HFS OS                     *19.2 GB    disk1
   0:                            NO NAME                *512.8 MB   disk2

As you can see, not very useful, didn't give me the right options.


Otherwise, thankyou, well done.
Last Edit: 5 years 11 months ago by pgkool.
The administrator has disabled public write access.

Re: HOWTO: Installing OpenELEC on USB-key with solely Mac OSX command line. 5 years 11 months ago #10

  • drewdatrip
  • drewdatrip's Avatar
  • Offline
  • Junior Boarder
  • Posts: 29
  • Karma: 0
chewitt wrote:
If someone could test the attached script I would be grateful. It needs to be run from the same folder as the existing "create_installstick" and "create_installstick.bat" files.

DOWNLOAD SCRIPT HERE

Worked like a champ! Now to Install on my Revo!

Drew
The administrator has disabled public write access.

Re: HOWTO: Installing OpenELEC on USB-key with solely Mac OSX command line. 5 years 11 months ago #11

  • gugahoi
  • gugahoi's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
chewitt wrote:
If someone could test the attached script I would be grateful. It needs to be run from the same folder as the existing "create_installstick" and "create_installstick.bat" files.

DOWNLOAD SCRIPT HERE

Why is this script not in the installation guide?!!! It worked perfectly and saved me a lot of trouble...
The administrator has disabled public write access.

Re: HOWTO: Installing OpenELEC on USB-key with solely Mac OSX command line. 5 years 11 months ago #12

  • drewdatrip
  • drewdatrip's Avatar
  • Offline
  • Junior Boarder
  • Posts: 29
  • Karma: 0
Im baffled here i incorrectly used the wrong build ie Intel for my Ion system when updating which resulted in a no longer working or booting OE system.
I went to create a new bootable install flash drive using the script just as b4 and i now getting this error:
Creating OpenELEC Install Stick

cp: target/KERNEL: No such file or directory
cp: target/SYSTEM: No such file or directory
cp: sample.conf/syslinux_installer.cfg: No such file or directory
ALL DONE! ..it's now safe to remove your USB stick

This is the exact same usb stick i used to make the first installer and at a loss as to why this is happening

HAALLP

Drew
The administrator has disabled public write access.

Re: HOWTO: Installing OpenELEC on USB-key with solely Mac OSX command line. 5 years 8 months ago #13

  • zebu
  • zebu's Avatar
  • Offline
  • Junior Boarder
  • Posts: 29
  • Thank you received: 6
  • Karma: 2
Just created an install stick for one of my friends. Worked like a charm :woohoo: If it will boot, we have to wait an see :lol:

This should be included as standard!!! :silly:
Karma to chewitt.

For people having trouble with:

cp: target/KERNEL: No such file or directory
cp: target/SYSTEM: No such file or directory
cp: sample.conf/syslinux_installer.cfg: No such file or directory
ALL DONE! ..it's now safe to remove your USB stick

Do as follow:

1) Download openelec and extract it
2) copy the script inside the folder you just extracted
3) Start the terminal
4) Change directory to the folder you just extracted
5) run the command: sudo sh create_installstick_osx.sh
type your administrator password an follow the guide

6 Done :woohoo:
Last Edit: 5 years 8 months ago by zebu.
The administrator has disabled public write access.
The following user(s) said Thank You: Rich_O

Re: HOWTO: Installing OpenELEC on USB-key with solely Mac OSX command line. 5 years 5 months ago #14

  • relatif
  • relatif's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 2
  • Karma: 0
Here is a version of chewitt's script that addresses the parse problems described by pgkool. Please try it out.
Download here: http://pastebin.com/yiLaQAsh

Great job, by the way!
Last Edit: 5 years 5 months ago by relatif. Reason: Resorted to pastebin
The administrator has disabled public write access.

Re: HOWTO: Installing OpenELEC on USB-key with solely Mac OSX command line. 5 years 4 months ago #15

  • lbstephane
  • lbstephane's Avatar
Hi,

Doesn't work for me on my both mac.

Got this error :

: command not foundtallstick_osx.sh: line 2:
'penelec_create_installstick_osx.sh: line 3: syntax error near unexpected token `{
'penelec_create_installstick_osx.sh: line 3: `read_input(){

Thanks for your help !
The administrator has disabled public write access.
  • Page:
  • 1
  • 2