Linux: Hardware Settings

8
Hardware Settings Hardware configuration and settings on Linux By John Troon

Transcript of Linux: Hardware Settings

Page 1: Linux: Hardware Settings

Hardware SettingsHardware configuration and

settings on Linux

By John Troon

Page 2: Linux: Hardware Settings

Determine & Configure Settings

● Determine Settings– HAL (Hardware Abstraction Layer)

– Dbus

– Udev

● Configure Settings– Set device ID

– Kernel modules

– Adding/removing devices

Page 3: Linux: Hardware Settings

● 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

Page 4: Linux: Hardware Settings

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

Page 5: Linux: Hardware Settings

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

Page 6: Linux: Hardware Settings

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).

Page 7: Linux: Hardware Settings

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.

Page 8: Linux: Hardware Settings

Questions?

John Troon

Email: [email protected]

Twitter: @johntroony