If a have a /dev device node and its major/minor numbers how do i know the kernel module name that exported this node?
The answer to this question is most likely different based on a number of factors. For example, if you're running udev, devfs, pre-devfs, etc.
If you're using Ubuntu (or another equally modern distro) the udevadm
command might be what you want.
% udevadm info -q path -n /dev/cdrom
/devices/pci0000:00/0000:00:1f.1/host3/target3:0:0/3:0:0:0/block/sr0
So, my /dev/cdrom is provided by the sr
driver, which resides in the sr_mod
kernel module. I don't know of a command that takes /dev/cdrom
as an argument and prints sr_mod
as output.