emoleumassi
emoleumassi

Reputation: 5149

install operating system image on sd card mac error

I try to install an operating system image on sd card from mac and i got an error.

First I list all my partitions:

diskutil list 

I got:

/dev/disk2
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *4.0 GB     disk2
   1:                 DOS_FAT_32 MONITOR-IOS             4.0 GB     disk2s1

and i run:

sudo dd if=bananian-1504.img of=/dev/rdisk2 bs=1m && diskutil eject disk2
Password:
dd: /dev/rdisk2: Invalid argument
1811+1 records in
1811+0 records out
1898971136 bytes transferred in 176.389385 secs (10765790 bytes/sec)

Any ideas about it?

Upvotes: 1

Views: 1036

Answers (2)

Bruno Bronosky
Bruno Bronosky

Reputation: 70469

While the selected answer is technically "correct" if you goal is to get the Invalid argument message to go away. I'd like to point out the using rdisk still works in spite of the message and writing to a "raw disk" device is drastically faster than writing to a buffered disk (with is what /dev/disk2 is).

I still use rdisk. And in fact I believe that messaging to be wrong and actually triggered by another cause. I'll not go into that until I can prove it.

Upvotes: 1

TobyLL
TobyLL

Reputation: 2306

The obvious answer seems to be that you have specified of=/dev/rdisk2 when you mean of=/dev/disk2 - is it really that simple?

Upvotes: 1

Related Questions