OSMC Installer Error in OSX writing SD for RP2

Hello,

Please forgive me for asking, but I have searched the wiki and forum; I can think of no other option, sorry if I got it wrong…

I am using the OSMC installer on a Mac OSX (10.11.3) attempting to write the latest version to an SD card for my Raspberry Pi version 2; this has failed each time with the message ‘an error occured while writing the image, please consult the logfile’.

Please see below, from osmc_installer_log.txt

Mon Feb 29 20:30:09 2016 Determined Yes as ejactableProperty for /dev/rdisk3
Mon Feb 29 20:30:12 2016 Device selected: 3 /dev/rdisk3 4.0 GB Storage Device
Mon Feb 29 20:30:15 2016 EULA has been accepted
Mon Feb 29 20:30:15 2016 Downloading http://ftp.fau.de/osmc/osmc/download/installers/diskimages/OSMC_TGT_rbp2_20160130.img.gz
Mon Feb 29 20:30:19 2016 File claims to be already an ‘img’. No need to extract.
Mon Feb 29 20:30:19 2016 Requesting confirmation from user
Mon Feb 29 20:30:21 2016 User confirmed
Mon Feb 29 20:30:22 2016 going to start osa
Mon Feb 29 20:30:22 2016 pasting admin script to process do shell script “dd if=/Volumes/Mac\ Home/OSMC_TGT_rbp2_20160130.img of=/dev/rdisk3 bs=1m conv=sync && sync” with administrator privileges
Mon Feb 29 20:30:22 2016 waiting for finish
Mon Feb 29 20:30:22 2016 osa claims to be done…collect output and verify
Mon Feb 29 20:30:22 2016 Imaging failed!
Mon Feb 29 20:30:22 2016 Messages are:
Mon Feb 29 20:30:22 2016 stdout:
Mon Feb 29 20:30:22 2016 stderr: 36:37: syntax error: Expected “"” but found unknown token. (-2741)

I have tried this process using two different Macs, both have failed every time with the same error message; but I have been able to format the SD card on each machine.

Please help,

gt

Did you try to put the card into a pi anyway?

Hi Mcobit,

Thanks for your reply, it is much appreciated; I have checked the contents of the SD card after each attempt, it is always empty…

Thanks again,

gt

Hi

can you first try to unmount your card ?

$ sudo diskutil unmount /dev/disk3

Just in case, can you check your SD card adapter is not write protected ?

Hi Fredouye,

Thanks for your suggestions; I have tried starting with both (SD card mounted and unmounted), same result.

I have also checked to make sure the card is not write protected, it is not; but the installer will not offer the card as an option if it is write protected.

Thanks again,

gt

What size is this card? Did you try a different card?

Hi ActionA,

It’s a 4Gb SD card, which had the previous version of OSMC and worked fine; I have not tried another card yet, but I am able to format this card without any issues.

Thanks,

gt

Hi again,

Just for your info, I have now tried another (16Gb) SD card; the same ‘an error occurred while writing the image, please consult the logfile’ message…

Any advice would be gratefully received.

Thanks,

gt

Since OSX seems to have some issue with the installer, try grabbing one of the images from our download page and use dd on the OSX console to write the image to the card.

Thanks ActionA,

I’ll try your suggestion, looking up the dd command now; I assume the OSX console is terminal…

Thanks again,

gt

That’s correct.

To use dd to write the image on a mac, do the following:

First extract the .img.gz you downloaded to a .img. You can do this by double clicking on it in the finder.

Then in terminal run the following command before inserting the SD card to get a list of the other drives on your system:

diskutil list

You will see something similar to this:

MacServer:~ simon$ diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            999.3 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3

/dev/disk0 in my case is the internal hard drive. If you have other drives they will be listed as /dev/disk1 and so on.

Then insert your SD card and wait a few seconds then run the same command again and you will see an additional drive, for example:

MacServer:~ simon$ diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            999.3 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *32.0 GB    disk1
   1:             Windows_FAT_32 FAT32                   254.8 MB   disk1s1
   2:                      Linux                         31.8 GB    disk1s2

We know for sure that /dev/disk1 is the correct drive because it wasn’t there before you inserted the SD card.

Do not get the drive name/number wrong in the following dd command or you will wipe your internal hard drive or other connected drive by mistake. Check for typos before pressing enter. You have been warned.

You would then run the following command:

sudo dd if=rpi2.img of=/dev/disk1

Replace rpi2.img with the name of the image you extracted earlier. Your image file should be in the current directory otherwise you will need to provide a full path. You will need to be running under an administrator account and provide the password when prompted.

When finished the Mac may try to mount the FAT file system on the SD card, so before removing the card either eject it in the finder or do so from the command line:

diskutil eject /dev/disk1

Replace disk1 with the correct name that you found earlier.

1 Like

Hi DBMandrake,

Firstly, thanks for your detailed suggestion; it is much appreciated…

I have tried using the dd command as suggested, without success; the resource is busy with the SD card mounted, and the operation is not supported with the card unmounted.

Please see below -

Last login: Thu Mar 3 12:13:50 on ttys000
gtxmac:~ gtxpro$ diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *80.0 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Microsoft Basic Data Mac Home 79.8 GB disk0s2
/dev/disk1 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *640.1 GB disk1
1: EFI EFI 209.7 MB disk1s1
2: Apple_HFS Mac OSX 639.3 GB disk1s2
3: Apple_Boot Recovery HD 650.0 MB disk1s3
/dev/disk2 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *1.0 TB disk2
1: Windows_NTFS Mac Data 1.0 TB disk2s1
gtxmac:~ gtxpro$ diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *80.0 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Microsoft Basic Data Mac Home 79.8 GB disk0s2
/dev/disk1 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *640.1 GB disk1
1: EFI EFI 209.7 MB disk1s1
2: Apple_HFS Mac OSX 639.3 GB disk1s2
3: Apple_Boot Recovery HD 650.0 MB disk1s3
/dev/disk2 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *1.0 TB disk2
1: Windows_NTFS Mac Data 1.0 TB disk2s1
/dev/disk3 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *4.0 GB disk3
1: DOS_FAT_32 GTXRPI 4.0 GB disk3s1
gtxmac:~ gtxpro$ sudo dd if=OSMC_TGT_rbp2_20160130.img of=/dev/disk3
dd: /dev/disk3: Resource busy
gtxmac:~ gtxpro$ diskutil eject /dev/disk3
Disk /dev/disk3 ejected
gtxmac:~ gtxpro$ sudo dd if=OSMC_TGT_rbp2_20160130.img of=/dev/disk3
dd: /dev/disk3: Operation not supported
gtxmac:~ gtxpro$

Thanks again,

gt

Not sure what your problem is there I’m afraid. It should not be reporting “Resource busy”. Just tried my own instructions on a Mac running Yosemite and it worked fine.

Are you definitely logged in using an Administrative account, and when you used the sudo command did it come up and warn you that you needed to authenticate ? (I don’t see that in your copy/paste above) Only an administrator who has authenticated when prompted has rights to write directly to a device like /dev/disk3.

Hi DBMandrake,

I’m not sure what the problem is either, I am logged in as an Admistrator; when I used the sudo command I was asked for my password which I gave…

I can only assume it’s an OSX bug, so I’m not sure if there’s anything else I can do; any ideas would be much appreciated.

Thanks,

gt

You say you have tried two different Mac’s, however have you tried a different SD card ?

Also are you using a MicroSD card adaptor - if so have you made sure the write protect switch is slid towards the computer before inserting it ? It’s very easy to knock the switch backwards when inserting the card, which makes it read only…

I have tried two different Macs, and another SD card; I have also checked to make sure the SD card adaptor is not write proctected…

Maybe it’s a change in El Capitan - none of the devs has access to or has tested on an El Capitan Mac and Apple have a habit of changing things like this in Mac OS X updates. (In Yosemite they changed the output of the diskutil list command which broke the Mac Installer until we got a chance to investigate and fix it)

I would suggest using a Windows or Linux box to write the SD card in the meantime. On Windows you can use The OSMC installer, on Linux you could use the OSMC installer or use use dd similar to the Mac, although the method of figuring out which drive to write to is different.

If you have another OSMC device already running you could put the SD card into a USB SD card reader and plug it into that devices USB port to do it from there.

Use diskutil unmountDisk diskN … You are ejecting it.