CHAPTER 2 Hardware Management
CHAPTER 2 Hardware Management
HARDWARE MANAGEMENT
CHAPTER OBJECTIVES
In this chapter, weespecially would learn to configure and check the
hardware for a Linux system. Learn to:
• Enable and disable integrated peripherals
• Configure systems with or without external peripherals such as
keyboards
• Distinguish different types of mass storage devices
• Understand cold-plug and hot-plug devices
• Know what hardware resources devices use
• Use tools to list and manipulate devices
• Understand sysfs, procfs, udev, and dbus
CHAPTER OUTLINE
II.1 Computer Hardware
II.2 Hardware settings
II. 3 Mass Storage devices
II.4 Hot plug and Cold plug
II.5 Virtual Files for Hardware and System Information
II.1 Computer Hardware
What are the basic components of a Computer?
II.1 Computer Hardware (prerequisite)
What are the basic components of a Computer?
The Von Neumann architecture
• The role of the processor
• The in put and output devices
• Types of memory
• Storage devices
II.1 Computer Hardware
All computers and servers are shipped with a set of core hardware
• A CPU
• RAM
• Additional features that help glue everthing together
• The firmware which provides config tools and initiates the OS booting process. It can be used to disable
or enable harware components before booting.
• Once linux has booted, you would need Linux utilities to manage the hardware
• Key components managed by the firmware once linux is booted include I/O
addresses, DMA addresses, the real time clock and ATA hard disk interfaces.
II.2 Hardware Settings
The BIOS or the Extensible Firmware Interface (EFI) or the Unified EFI
(UEFI) are installed in flash memory on the motherboard. (After 2011,
most computers come with UEFI)
How do you get to your BIOS?
• Interrupt Requests (IRQs)
• It is a signal sent to the CPU instructing it to suspend its current activity and to handle some
external event such as keyboard input.
• There were 16 (0-15) on the X86 platform. They are more on the modern platforms.
• You can examine the IRQs in use by examining the contents of /proc/interrupts file
$more /proc/interrupts
II.2 Hardware Settings
• The /proc file system is a virtual file system – it does
not refer to actual files on a hard disk but to kernel
data that is convenient to represent using a file
system.
• Linux does not start using IRQs until it has loaded
the required
II.2 Hardware Settings
I/O Addresses.
• I/O ports are unique locations in memory that are reserved for
communication between the CPU and specific hardware devices.
• Prior to « plug and play » technology, you would have to configure I/O devices
addresses in the BIOS and OS before using the devices. Today the allocation is
done automatically the OS and the bus.
• They can be viewed examining the contents of the /proc/ioports file
• $ cat /proc/ioports
II.2 Hardware Settings
I/O Addresses.
Linux device Windows Typical IRQ I/O address
name
/dev/ttyS0 COM1 4 0x03f8
/dev/ttyS1 COM2 3 Ox02f8
/dev/ttyS2 COM3 4 0x03e8
/dev/ttyS3 COM4 3 0x02e8
/dev/lp0 LPT1 7 0x0378 -0x037f