[MacOS Catalina] Error: Couldn't open /dev/disk2

  • Hello guys,


    Everything seems works, but when I try to "Write" this error always happens: Error: Couldn't open /dev/disk2
    The sd-card adapter is unlock. I have a Macbook Pro (Early 2015) running MacOS Catalina (10.15).
    The only weird thing it's that when I chose the folder for th download, or chose the download file, and the LibreELEC needs to interact with Finder/iCloud Drive this Error appears too, but it does not prevent me from selecting the correct folder or file. :/
    I attached the relevant print screens.

    Thanks in advance

  • This happened to me as well and I suspect it to be related to MacOS Catalina post [LibreELEC Forum]


    This is how you flash the image manually on Mac:

    1. Get LibreELEC-xxxxx.img.gz for your device from Direct Downloads
    2. Unpack it: gunzip -d LibreELEC-Generic.x86_64-9.0.2.img.gz (the filename can be different, I will continue to refer to my case going forward)
    3. Determine the disk device corresponding to USB/SD Card you want to flash to:
      1. Execute diskutil list
      2. Plug the device you'll be flashing the image to
      3. Execute diskutil list again and take note of the new disk which appeared (I will refer to /dev/disk2 going forward)
      4. Be 200% sure that you took note of the right device so that you don't damage your system. It is very unlikely that your USB flash or SD card is represented as /dev/disk0, because that is almost always the disk on which your system is installed
    4. Unmount the disk: diskutil unmountDisk /dev/disk2 (it was /dev/disk2 in my case, yours can be different, so replace the disk number in all the following commands)
    5. Zero out the partition map: sudo dd if=/dev/zero of=/dev/rdisk2 bs=1024 count=1 (now you are accessing the disk in raw, so the device name is /dev/rdisk2 and not /dev/disk2)
    6. Flash: sudo dd if=LibreELEC-Generic.x86_64-9.0.2.img.gz of=/dev/rdisk2 bs=4m (it will take a while and no progress is printed, be patient and don't unplug the USB/SD Card)
    7. Unmount the disk: diskutil unmountDisk /dev/disk2


  • Hi thanks for the support. I try to follow your instruction but at instruction 5 the system is asking for a pasword??

    I have not set any password?

    Can you help?

  • yes but i have no permission

    GermaNico:~ Liem$ sudo dd if=/dev/zero of=/dev/rdisk2 bs=1024 count=1

    Password:

    dd: /dev/rdisk2: Operation not permitted

    GermaNico:~ Liem$

  • yes but i have no permission

    GermaNico:~ Liem$ sudo dd if=/dev/zero of=/dev/rdisk2 bs=1024 count=1

    Password:

    dd: /dev/rdisk2: Operation not permitted

    GermaNico:~ Liem$

    Looks like there were some typos in steps 5 and 6. Change the /dev/rdisk2 to /dev/disk2 in both commands and also change the LibreELEC-Generic.x86_64-9.0.2.img.gz to LibreELEC-Generic.x86_64-9.0.2.img in step 6.

  • Sorry but my understanding is that Tbouska ment it to change it with the extra "r"

    Further the command is accepted but it seems that in catalina it is now not permitting it any more.

    This is why libereelec USB-CD creator is not working on a mac and the error: Couldn't open /dev/disk2 is shown.

  • Sorry but my understanding is that Tbouska ment it to change it with the extra "r"

    Further the command is accepted but it seems that in catalina it is now not permitting it any more.

    This is why libereelec USB-CD creator is not working on a mac and the error: Couldn't open /dev/disk2 is shown.

    I believe it is some kind of permission issue with the creator program as when it runs it seems to run as root and hence the documents/desktop/icloud folders don't work properly. I just ran through all of the terminal commands on my Macbook with Catalina without issue.

  • Sorry All,

    But it is suddenly working Thanks for the support. Indeed it has something to do with documents/desktop/icloud folders don't work properly.

    If I turn icloud off it work!

    Nico

  • I hope everybody understands how dd works and that correct output device is used.


    Support my work with small (or big) Paypal donation


    Amlogic devices works better with CoreELEC

    Blu-ray Disc Java menus support - forum thread, Github

    my lamp addon (unofficial/community with limited support)
    my touchscreen support and instructions by Grruhn (now touchscreen addon exists in repository)