INTRODUCTION Flashcards
Understanding Your Hardware
What is hardware and what are peripherals?
Hardware refers to the entire computer your Linux operating system will run on while the peripherals are the hardware bits that are removable or otherwise talk with the world. Video cards can be part of the motherboard or separate cards, they’re still considered peripherals. Peripherals are also called devices.
What is the kernel of an operating system?
The kernel of an operating system is just the part that manages the interactions between the hardware and the applications.The Linux kernel runs on the CPU and memory that’s on the motherboard. To write something to disk, display something on the screen, or talk to a web server in Brazil, the kernel must send messages over the bus that connects the CPU to the peripherals. Think of the kernel as an air traffic controller that coordinates all the airplanes, runways, and ground crew.
What does a driver do? what is its function?
The solution is to get the kernel to speak a common language and have the peripheral manufacturers provide a driver that allows their specific hardware to speak that common language.
how to find out how the CPU address the peripheral?
the CPU needs to be able to address the peripheral through one or more of several means:
Enumerating Your Peripherals
Peripherals talk to the CPU and other peripherals on a shared resource called a bus. To uniquely identify hardware, the CPU needs to be able to address the peripheral through one or more of several means:
Image
Image IO port—An address, or range of addresses, identifying the device; e.g., 0080, 1000-107f.
Image IRQ—Interrupt requests (IRQs) signal the processor that an event has happened and that the CPU is requested to come check on the resource. It a limited resource that can sometimes be shared.
Image DMA—Direct memory access (DMA) allows a peripheral to access system memory directly rather than having the CPU intervene.
The two methods of viewing the current hardware list on a Linux system are
Image Viewing the contents of the /proc filesystem
Image Using one of the hardware listing tools
What is procfs?
procfs is the most popular way to expose kernel information to users.
what is the goal of sysfs?
The goal of sysfs is to solve some of these shortcomings by migrating device data to /sys. Data still can exist on both, and the device tools such as lspci still use /proc.
What is udev?
udev is the Linux kernel’s device manager. It manages the device files under /dev using information about the device from sysfs. Every accessible device on the system will have a corresponding device file under /dev
If a device is plugged in to the computer while it is running, udev can configure it and make it available to the system. Devices that support being plugged in at runtime are also called hotplug devices, as opposed to coldplug devices that require the computer to be rebooted for them to be used.
what is D-bus?
Another loosely related service is called D-Bus. This is a distributed software bus that lets desktop applications send messages to each other and receive messages from the kernel. It could also be used by udev to notify the window manager when a DVD has been inserted into the system.
What is the motherboard?
Motherboards is the component that houses the CPU and RAM. It often comes with integrated peripherals, which are peripherals built into the motherboard. Video cards and network adapters are the most frequent integrated peripherals, but sound cards, RAID adapters, or special external peripheral ports could also be present.
What is the command to check coldplug devices?
Its #lspci
What is the command to check or look for hotplug devices like usb?
Its #lsusb
What is Redundant Array of Independent Disks (RAID)??
. This adapter may do some of the necessary parity calculations and it prevents data lost and help to storage data.
What do you do when a peripheral is not supported at all?
If the peripheral is not supported at all, your best course of action is to disable it entirely so that you can replace it with something that works. To do so
Step 1. Reboot your computer and enter BIOS setup mode. This involves pressing a special key while the computer boots. Your computer’s BIOS displays a message such as “PRESS F12 TO ENTER BIOS SETUP.”
Step 2. Navigate the setup menu to find the hardware section corresponding to the device you want to disable.
Step 3. Select the option to disable the peripheral.
Step 4. Exit the BIOS menu, making sure to select the option to save. This last part is important as the usual default is to discard all changes and reboot!
What is a partition? And what is used for?
A single disk drive is divided up into one or more partitions that logically separate the disk. This logical separation allows you to assign space on the same drive for different uses.
What is the filesystem?
It´s a partition formatted that allows it to store files. The operating system uses the filesystem to map files to the actual blocks on disk and manage directories and permissions.