How to find your SD card's device
In laptop computers with SD card slots, this will often be
/dev/mmcblk0. In most desktop computers, even if it has an
integrated SD card reader, they will be connected by a multiport USB
unit and will be presented as
/dev/sdX, where X is a
single letter. Given your first hard drive is often
will be looking for the highest letter possible.
I find the following recipe to be reliable and simple:
- Open a terminal
Get the list of existing devices in your system into a temporary file (say,
$ ls /dev > /tmp/before_sd
- Insert your SD card (be it via an external reader or directly to the SD port of your computer)
Get again the list of devices into a second temporary file (say,
$ ls /dev > /tmp/after_sd
Compare them. Don’t worry, Unix is your friend!
$ diff /tmp/before_sd /tmp/after_sd 36a37,39 > mmcblk0 > mmcblk0p1 > mmcblk0p2
Or, if the device follows
sdX, it would be:
$ diff /tmp/before_sd /tmp/after_sd 55a56,57 > sdc > sdc1
Note the topmost name you received — In my case, either
sdc. That’s the device you want to write to! (the other devices will point to partitions within the media you inserted).
Just for cleanness sake, remove the temporary files:
$ rm /tmp/before_sd /tmp/after_sd