1

I have a MacBook Pro (Retina, mid-2012) running Arch Linux (kernel version 4.8.6-1). I want to write a Raspbian Jessie image to a MicroSD card which I've plugged into the SD card slot using a standard, working adapter.

Oddly, when I try to write to it using sudo dd if=/path/to/raspbian of=/dev/mmcblk0 bs=32M, the write hangs, even taking a full minute or two to acknowledge ^C and ^D.

Checking dmesg reveals the following:

[15595.812268] mmc0: new ultra high speed SDR104 SDHC card at address 0002
[15595.812530] mmcblk0: mmc0:0002 00000 7.32 GiB 
[15595.822700] mmc0: Controller never released inhibit bit(s).
[15595.822703] sdhci: =========== REGISTER DUMP (mmc0)===========
[15595.822709] sdhci: Sys addr: 0x000000c8 | Version:  0x00001502
[15595.822714] sdhci: Blk size: 0x00007040 | Blk cnt:  0x00000001
[15595.822720] sdhci: Argument: 0x00000000 | Trn mode: 0x00000010
[15595.822725] sdhci: Present:  0x1fff0a02 | Host ctl: 0x0000001f
[15595.822731] sdhci: Power:    0x0000000f | Blk gap:  0x00000000
[15595.822736] sdhci: Wake-up:  0x00000000 | Clock:    0x00000007
[15595.822742] sdhci: Timeout:  0x0000000a | Int stat: 0x00000000
[15595.822747] sdhci: Int enab: 0x02ff008b | Sig enab: 0x02ff008b
[15595.822752] sdhci: AC12 err: 0x00000000 | Slot int: 0x00000000
[15595.822757] sdhci: Caps:     0x176ec8b0 | Caps_1:   0x03002177
[15595.822762] sdhci: Cmd:      0x0000133a | Max curr: 0x00000000
[15595.822765] sdhci: Host ctl2: 0x0000804b
[15595.822773] sdhci: ADMA Err: 0x00000001 | ADMA Ptr: 0x0000000263594204
[15595.822774] sdhci: ===========================================
[15605.865266] mmc0: Timeout waiting for hardware cmd interrupt.
[15605.865276] sdhci: =========== REGISTER DUMP (mmc0)===========
[15605.865387] sdhci: Sys addr: 0x00000000 | Version:  0x00001502
[15605.865436] sdhci: Blk size: 0x00007040 | Blk cnt:  0x00000001
[15605.865442] sdhci: Argument: 0x00020000 | Trn mode: 0x00000010
[15605.865448] sdhci: Present:  0x1fff0000 | Host ctl: 0x0000001f
[15605.865455] sdhci: Power:    0x0000000f | Blk gap:  0x00000000
[15605.865461] sdhci: Wake-up:  0x00000000 | Clock:    0x00000007
[15605.865468] sdhci: Timeout:  0x0000000a | Int stat: 0x00000000
[15605.865475] sdhci: Int enab: 0x02ff008b | Sig enab: 0x02ff008b
[15605.865480] sdhci: AC12 err: 0x00000000 | Slot int: 0x00000000
[15605.865486] sdhci: Caps:     0x176ec8b0 | Caps_1:   0x03002177
[15605.865493] sdhci: Cmd:      0x00000d1a | Max curr: 0x00000000
[15605.865497] sdhci: Host ctl2: 0x0000804b
[15605.865506] sdhci: ADMA Err: 0x00000001 | ADMA Ptr: 0x0000000263594204
[15605.865508] sdhci: ===========================================
[15605.865603] mmcblk0: error -110 sending status command, retrying
[15605.867728] mmcblk0: unknown error -5 sending read/write command, card status 0x900
[15611.525041] mmc0: Skipping voltage switch

As I understand it, there's some issue with the SD reader controller, but I'm having trouble deciphering the actual messages; I'm not used to debugging this close to the metal.

This problem persists between two SD cards of different make and capacity.

Can someone offer some advice about how I could this? Is it just a question of installing some drivers (which aren't mentioned on ArchWiki as far as I can tell)?

  • I don't know why killing hangs, but writing should take a quiet (silent) while. There was a parameter for verbose mode somewhere... – Tomasz Nov 10 '16 at 21:30
  • @tomas sending SIGINFO (^T) under BSD dd does show progress, but this isn't implemented under coreutils' implementation of dd, AFAIK. Piping through pv shows no progress (no output at all, actually). – Jules Nov 10 '16 at 21:34

Your Answer

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

Browse other questions tagged or ask your own question.