Linux Hardware Management
Linux Hardware Management
Device files:
• Character devices. Relate to devices through
which the system transmits data one character
at a time.
/dev/ttyS0
• Block devices. Relate to devices through which
the system moves data in the form of blocks.
/dev/sda
• Ambiguity
devfs
Totally in kernel.
Examples:
KERNEL=="sd[0-9]*",NAME="flash/%n"
KERNEL=="sd[a-z]",PROGRAM="check_cd.sh %M %m",
NAME="%c{1}", SYMLINK="cdrom"
KERNEL=="lp*", SUBSYSTEMS=="usb",
ATTRS{idVendor}=="03f0", ATTRS{product}=="hp
LaserJet 1000", SYMLINK+="hplj1000-%n", RUN+="/
usr/sbin/hplj1000"
D-Bus
Bus types:
• system
• session
Message types:
• Method calls
• Responces
• Signals
D-Bus
UDI = '/org/freedesktop/Hal/devices/disk1'
|---block.device /dev/sda1
|---block.is_volume 1
|---info.capabilities volume,block
|---volume.label WORK `
|---volume.uuid 0717-AD77
HAL
HAL
• DeviceKit-disks
• Consumes udev information
• Started on demand
• High-level API w/ progress reporting
Mount, Unmount, Eject, Poll, Fsck
Partitioning, Formatting, FS Label
ATA SMART monitoring
MD-RAID (Create, Start/Stop, Check, …)
Drive spindown
DeviceKit-disks
Comments ???