Linux: Hardware Settings
-
Upload
john-ombagi -
Category
Technology
-
view
68 -
download
1
Transcript of Linux: Hardware Settings
Hardware SettingsHardware configuration and
settings on Linux
By John Troon
Determine & Configure Settings
● Determine Settings– HAL (Hardware Abstraction Layer)
– Dbus
– Udev
● Configure Settings– Set device ID
– Kernel modules
– Adding/removing devices
● HAL – Hardware Abstraction Layer– /sys and the hald
● Dbus– Creates a channel on how information is transmited
between the hardware and the software.
● udev – Determine how hardware and mounts are
represented on the system depending on the udev rules
sysfs and procfs
● Sysfs is mounted at /sys– This where HAL keeps database of the information of the Hardware
connected on the system.
● Procfs is mounted at /proc– This is where the kernel keeps all of it's running commands. It's not
a real directory but a pseudo file created in the RAM when the system boots.
– Configs are loaded here to affect the Kernel and you MUST be root to make any of these temporary changes.
● E.g. /proc/sys/fs/file-max● /proc/sys/net/ipv4/ip_forward
The udev
● The udev uses the udev rules to determine how to represent hardware on a Linux system.
● These hardwares are mapped on /dev – For instance the first harddrive on the system is
represented as /dev/sda if it has partitons, they will be represented as /dev/sda1 /dev/sda2 and so on.
If we have a second harddrive, sdb and so on.
– lsusb, lspci, lshal, lspcmia, lshw
Kernel Modules
● To view loaded modules on the System, lsmod● To remove a loaded module from the system,
rmmod● To load a module to the running system,
modprobe (probes for all dependencies).
Device ID
● Instead of refering to devices on how they are represented by the udev, you can refrence them by their UUID as well.
● UUID – Unique Universal Identifire.● Cat /proc/mounts● Hotplug – add hardware while the computer is still on● Coldplug – add hardware when the computer is
switched off.