Quote:
Originally Posted by GeneCode
Hi all.
I am working with barebox Linux right now. I am not sure why some SD card that I plug in, shows as 2 devices:
/dev/disk0.0
/dev/disk0
but another SD card I have only detected as 1 device:
/dev/disk0
I guess it is something to do with partition? Or something? I'd like to know how to get a consistent ref name for a device because I have a script to automount it to a directory.
Thank you
|
If I'm understanding your question correctly, the first device node represents the device itself, where as the 0 (or 1, etc) represents the partitions on said device/media (SD card, USB, etc).
For example, if I had a device with 2 partitions on it, and it's got the device node
/dev/sda the
sda1 would be the first partition on said device/media, with
sda2 being the second partition.
The device node given to a device is (to my understanding anyway) decided by the order in which storage devices are "seen" by the kernel.
Hope this helps.