Search notes:

Linux devices

Block devices

Data is accessed in chunks of a fixed size.

Identifying block devices

Block devices can be found like so
$ lsblk
or
$ find /dev -type b
or
$ ls /sys/block
ls -l prints a leading b for block devices.

Disk partitions

Some (all?) block devices can be divided into one or more logical disks called partitions.

See also

/sys/block contains information about block devices.
The shell command blockdev alows to call block device ioctls.

Character devices

ls -l prints a leading c for character devices.
TOOD: TTY

Device drivers

The main purpose of device drivers include
When a device driver is loaded, the events the driver detects are sent to the userspace daemon udevd.
udevd then decides how it will react to the given event.

Major and minor numbers

The correct device driver for a device is identified by the kernel by the major number of the device driver.
The minor number is used by the device driver itself. The meaning changes from driver to driver.

See also

device files,
loop device, partition table

Index