Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

skippymac

macrumors 6502a
Original poster
Jun 9, 2010
592
3
Hampshire, UK
I didn't know where to post this so I thought I'd put it here, please move it if it's in the wrong place!

I'm trying to install a raspbmc image on an 8GB sd card for my raspberry pi. I put it in my MBP sd card slot and do the following:

Code:
diskutil unmount /dev/disk4s1
dd bs=1m if=~/Downloads/installer.img of=/dev/rdisk4

and every single time I get this error:

Code:
dd: /dev/rdisk4: Permission denied

I tried this with a USB drive and it worked just fine. I have tried it with the sd switch in both locked and unlocked positions and have even tried blowing in the sd slot as per this page.

Is my sd card slot well and truly screwed or is this another problem? Do I just need to blow harder?! :rolleyes:
 

Nermal

Moderator
Staff member
Dec 7, 2002
20,595
3,935
New Zealand
You definitely need sudo. Where did you get "rdisk4" from? Did you look it up through System Profiler (good) or just copy it from a tutorial (bad)?
 

chown33

Moderator
Staff member
Aug 9, 2009
10,706
8,346
A sea of green
tried both with and without sudo and same thing happened both times :(

Post the complete command, and the exact error message.

It seems unlikely that a correct use with 'sudo' could result in a Permission denied error.


The raspbmc website also shows a Python-based install process. What happens if you use that?
 

Nermal

Moderator
Staff member
Dec 7, 2002
20,595
3,935
New Zealand
used df -h to find the sd card

Edit: This is not good advice; see below.

While df probably does something similar, when I've looked it up using System Profiler then I get disk1, not rdisk1 (and this works in dd). Try disk4 instead of rdisk4 and see what happens.
 
Last edited:

robvas

macrumors 68040
Mar 29, 2009
3,240
629
USA
Is there a write-protect switch on the SD card?

raZ53K3.gif


While df probably does something similar, when I've looked it up using System Profiler then I get disk1, not rdisk1 (and this works in dd). Try disk4 instead of rdisk4 and see what happens.

The command you should use is actually:

sudo diskutil list

However, you want to use /dev/rdisk4 and not just /dev/disk4 - Writing to a 'raw' device with dd (in the case of an SD card) is much, much faster. link
 

skippymac

macrumors 6502a
Original poster
Jun 9, 2010
592
3
Hampshire, UK
Post the complete command, and the exact error message.

It seems unlikely that a correct use with 'sudo' could result in a Permission denied error.


The raspbmc website also shows a Python-based install process. What happens if you use that?

Same thing with the install.py it gives the same error. Here's an example of what commands I've been using (It's disk 3 now)
Code:
diskutil unmount /dev/disk3s1
Volume UNTITLED on disk3s1 unmounted

dd bs=1m if=~/Downloads/installer.img of=/dev/rdisk3
dd: /dev/rdisk3: Permission denied

sudo dd bs=1m if=~/Downloads/installer.img of=/dev/rdisk3
dd: /dev/rdisk3: Permission denied

Is there a write-protect switch on the SD card?

Yes, and I've tried it multiple times in both positions. Im beginning to think the write protection switch in my sd card reader is knackered :(
 

robvas

macrumors 68040
Mar 29, 2009
3,240
629
USA
Thanks for that, it's good to know. I wondered why it took so long to write!

Imagine what I thought when I went out and bought faster, more expensive SD cards and it still took forever to write an image.
 

ElectricSheep

macrumors 6502
Feb 18, 2004
498
3
Wilmington, DE
Yes, and I've tried it multiple times in both positions. Im beginning to think the write protection switch in my sd card reader is knackered :(

Can you use the SD card normally (Format it with Disk Utility, copy files to it with the Finder, etc)? If not, then yeah, its probably the card.
 

juancn

macrumors newbie
Jun 10, 2013
1
0
Found a fix

I had the exact same problem, I managed to get it to work by unmounting just the fat partition of the SD card, but not the whole SD from Disk Utility (I selected 'NO NAME' rather than 'Apple SDXC reader media').

I also made rdisk3 writable, but I'm not sure if this helped at all.

Hope it helps others.
 

mrfusi0n

macrumors newbie
Feb 28, 2014
1
0
Another solution

I was having the exact same problem (getting a permission denied error to the device even when using sudo). I figured maybe it was an issue with sudo not giving me full root access so I first ran:

sudo su

Then entered my password and retried the dd command (without "sudo" since I'm not using the root user).
It worked!!!
Hope this helps someone...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.