1

In Linux, it seems like the operating system knows what kind of storage device it is connected to. Eg. I see /dev/sda for SSD device and /dev/mmcblk for SD card.

I was wondering how the operating system is able to know what kind of device is plugged in? Also, what is the component is the OS that lets it interact with these devices.. is it the device driver? I read that the OS presents all devices as a file.. is it the device driver that is presenting a common interface to allow for this file abstraction?

closed as too broad by Scott, Romeo Ninov, muru, slm May 31 at 4:18

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

2

You are mainly right. The OS needs to know the kind of storage device, because it has a completely different interface to an SD-Card (probably dedicated MMC pads on the CPU with the MMC protocol) than to the SSD (SATA?) or some external drive (USB mass storage?). You have completely different device drivers talking with a different protocol over a different hardware bus. Actually, there is no need to wonder how to know the kind of device, but to wonder how to make those completely different devices look all the same.

Not the answer you're looking for? Browse other questions tagged or ask your own question.