I am currently trying to flash my SD card, but keeps getting this error that the sd cards unreadable, I tried using etcher and dd, and it keeps doing it?

I am trying to flash https://www.home-assistant.io/hassio/installation/ to an SD card so I can use it on my RPI, but why can't i open the sd card after a normal flash?

I am able to reformat, and then add files to it, but its only when I flash it breaks?

the SD card works fine, I can without any problem open it using my linux machine or Windows machine, so it is only this macbook - the one i prefer to work with, that seem to be buggy here.

Why? Format issue?


sudo dd if=hassos_rpi3-1.13.img of=/dev/disk8 bs=2m
dd: /dev/disk8: Resource busy
MacBook-Pro:Downloads$ dd
dd            ddns-confgen  
MacBook-Pro:Downloads$ dd
dd            ddns-confgen  
MacBook-Pro:Downloads$ diskutil unmountdisk /dev/disk8 
Unmount of all volumes on disk8 was successful
MacBook-Pro:Downloads$ sudo dd if=hassos_rpi3-1.13.img of=/dev/disk8 bs=2m
1024+0 records in
1024+0 records out
2147483648 bytes transferred in 487.625960 secs (4403957 bytes/sec)

enter image description here

Computer can not read the disk you've connected.

  • 1
    Can you post the actual error? Does the error occur during image writing or during boot attempts of the written SD card? – RubberStamp Dec 22 '18 at 14:21
  • It happens after the flash has completed, and every time I re insert it – neq Dec 22 '18 at 14:28
  • dd writes without checking, or even caring, about what type of data, partition, or any filesystem it is reading and writing. It's possible that the Mac you are using can't read the partition information that dd wrote to the card. So, what happens when you try to boot the card in your RPI? .... The image file seems to contain a GPT partition table with a Microsoft Reserved partition as the first partition. I don't have a Mac handy to check readable of the written partition information. – RubberStamp Dec 22 '18 at 14:54
  • 2
    When you write a rPi image to the SD card then you're writing a Linux filesystem (probably ext4) to it. MacOS doesn't understand this filesystem and so is reporting the error. Does diskutil list show the drive and possibly partitions? If so then the dd probably worked. – Stephen Harris Dec 22 '18 at 16:24
  • 1
    I'm voting to close this question as off-topic because it OS/X specific and should be at apple.stackexchange.com – tink Dec 24 '18 at 1:05

Please note that the tools presented in this answer are GNU/Linux tools and not Mac tools

The image file listed in your question, hassos_rpi3-1.13.img contains the following partitions:

# gdisk -l hassos_rpi3-1.13.img
GPT fdisk (gdisk) version 1.0.3

Partition table scan:
  MBR: hybrid
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with hybrid MBR; using GPT.
Disk hassos_rpi3-1.13.img: 4194304 sectors, 2.0 GiB
Sector size (logical): 512 bytes
Disk identifier (GUID): 6A9E3D38-090C-48BA-A14D-7682BA479872
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 4194270
Partitions will be aligned on 2048-sector boundaries
Total free space is 671677 sectors (328.0 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048           67583   32.0 MiB    0C01  hassos-boot
   2           67584          116735   24.0 MiB    8300  hassos-kernel0
   3          116736          641023   256.0 MiB   8300  hassos-system0
   4          641024          690175   24.0 MiB    8300  hassos-kernel1
   5          690176         1214463   256.0 MiB   8300  hassos-system1
   6         1214464         1230847   8.0 MiB     8300  hassos-bootstate
   7         1230848         1427455   96.0 MiB    8300  hassos-overlay
   8         1427456         3524607   1024.0 MiB  8300  hassos-data

The first partition is listed as type 0C01 which is a Microsoft Reserved Partition. The rest of the partitions are of type 8300 which is the code for a standard Linux partition.

According to the gdisk man page, this type of partition is generally used for storing code necessary for booting Windows:

If Windows is to boot from a GPT disk, a partition of type Microsoft Reserved (gdisk internal code 0x0C01) is recommended. This par‐
tition should be about 128 MiB in size. It ordinarily follows the EFI System Partition and immediately  precedes  the  Windows  data
partitions.  (Note  that old versions of GNU Parted create all FAT partitions as this type, which actually makes the partition unus‐
able for normal file storage in both Windows and Mac OS X.)

This Microsoft Reserved Partition partition contains a VFAT filesystem and the bootstrap files:

ls -l
total 3304
-rwxr-xr-x 1 root root   25311 Nov 21 08:14 bcm2710-rpi-3-b.dtb
-rwxr-xr-x 1 root root   25574 Nov 21 08:14 bcm2710-rpi-3-b-plus.dtb
-rwxr-xr-x 1 root root   24087 Nov 21 08:14 bcm2710-rpi-cm3.dtb
-rwxr-xr-x 1 root root   52116 Nov 21 08:14 bootcode.bin
-rwxr-xr-x 1 root root    1847 Nov 21 08:14 boot.scr
-rwxr-xr-x 1 root root      34 Nov 21 08:14 cmdline.txt
-rwxr-xr-x 1 root root      52 Nov 21 08:14 config.txt
-rwxr-xr-x 1 root root    6666 Nov 21 08:14 fixup.dat
drwxr-xr-x 2 root root   14336 Nov 21 08:14 overlays
-rwxr-xr-x 1 root root 2857060 Nov 21 08:14 start.elf
-rwxr-xr-x 1 root root  364060 Nov 21 08:14 u-boot.bin

This is standard configuration when booting the Raspberry Pi's Broadcom System On Chip (SOC) ARM processor.

So, Microsoft Windows machines should be able to read and write to the first partition on the SD card. This is convenient for many users who don't have a regular machine with a Linux or Unix based operating system. Various system level configuration parameters are available in cmdline.txt and config.txt and placing an empty file named ssh in the directory should enable the RPi's ssh server.

The rest of the partitions contain ext filesystems. Support for ext is variable on Mac machines and is not included as a default option in either Mac or Microsoft operating systems. However, it is possible to install OSXfuse which will add support for ext filesystems on Mac.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.