Workbook 2: Hardware and Device Configuration Flashcards

1
Q

What is a device driver? [5]

A

hardware, such as network interface cards, USB devices, and disks, use more specialized components of the kernel referred to as device drivers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a static kernel image?

A

The static kernel image is the file that is loaded when your system is booted. lives in the /boot directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the name of the static kernel image?

A

name vmlinuz-version

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How can you determine which command line was used to boot the current instance of the kernel

A

When read, the file /proc/cmdline reports the command line that was used to boot the current instance of the kernel.
[root@station root]# cat /proc/cmdline
ro root=LABEL=/ vga=0x317

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a kernel module? [6]

A

Supplementary device drivers (which are not needed during the initial stages of system booting), such as network interface drivers and sound card drivers, are usually implemented as kernel modules

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Where are kernel modules stored in the filesystem? [6]

A

usually underneath the directory /lib/modules/version

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What command generates a list of currently loaded kernel modules? [6]

A

The lsmod command

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How can parameters be passed to modular device drivers as they are loaded? [6]

A

Whenever a module is loaded “on demand” by the kernel, the file /etc/modprobe.conf is examined for module parameters

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does the dmesg buffer contain? [7]

A

all messages emitted by the kernel, are stored in a dynamic kernel buffer referred to as the dmesg buffer. The dmesg buffer is a “ring buffer”.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What command outputs the current contents of the dmesg buffer? [8]

A

The current contents of the dmesg buffer can be dumped to standard out with the dmesg command.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Where can a snapshot of the dmesg buffer be found? [8]

A

a snapshot of the dmesg buffer is recorded in the file /var/log/dmesg.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does the kudzu utility do? [8]

A

The kudzu utility is a bootup utility that detects newly added or removed hardware, and configures the machine appropriately

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the absolute reference of the file that contains a dynamic database of currently detected hardware? [9]

A

The first, /etc/sysconfig/hwconf is

a dynamic database of currently detected hardware.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Give a command line that can be used to monitor hardware changed dynamically. [10]

A

The lshal command can also be used to monitor hardware changed dynamically, by adding a -m
command line switch.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the /proc filesystem? [11]

A

resource for determining hardware configuration is the proc filesystem.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Does Linux support SMP? [12]

A

Linux supports symmetric multiple processing, with support for up to 32 CPU’s, though more than 8 is seldom implemented in the x86 architecture.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is the absolute reference of the file that reports information about detected CPUs? [12]

A

The proc filesystem file /proc/cpuinfo reports information about detected CPU(s).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is the absolute reference of the file that provides statistics about the amount of detected memory and current memory utilization? [13]

A

The proc filesystem file /proc/meminfo provides statistics about the amount of detected memory,

19
Q
What are the naming conventions for 
(i) an IDE primary master disk 
(ii) an IDE primary slave disk 
(iii) an IDE secondary master disk 
(iv) an IDE secondary slave disk?
 [14/15]
A

1 hda - primary master
2. hdb - primary slave
3 hdc - secondary master
4. hdd secondary slave

20
Q

In which directory can low level information about a primary master IDE disk be found? [15]

A

The proc filesystem directory /proc/ide contains subdirectories for every detected IDE drive

21
Q

How does Linux usually refer to the first detected SCSI or SATA disk? [16]

A

Linux usually refers to the first detected SCSI drive as sda, the second drive as sdb, and so on.

22
Q

What command lists all attached PCI devices? [23]

A

The lspci command can be used to list all attached PCI devices.

23
Q

Give a command line that displays the available IRQ lines and any device drivers which are using them. [24]

A

The proc filesystem file /proc/interrupts displays the available IRQ lines,

24
Q

Give a command line that outputs which ports have been claimed by which device driver. [25]

A

The proc filesystem file /proc/ioports displays which ports have been claimed by which device driver.

25
Q

Give a command line that outputs all of the devices whose memory buffers have been mapped into physical memory and the physical memory addresses which have been assigned to each buffer. [25]

A

The proc filesystem file /proc/iomem displays all of the devices whose memory buffers have been mapped into physical memory,

26
Q

What happens when a new PCI device is recognized by the HAL but an appropriate device driver is not already present in the kernel? [26]

A

appropriate modules for various PCI devices is consulted, found at /lib/modules/2.6.18-8/modules.pcimap

27
Q

What is the purpose of the lspci command’s –v switch? [27]

A

The lspci, if used with the -v command line switch, will report the resources associated with each device.

28
Q

How do processes communicate with device drivers? [34]

A

processes communicate with device drivers as if they were files.

29
Q

What are files which reference device drivers referred to as? [35]

A

device nodes.

30
Q

In which directory are device nodes found? [35]

A

in a dedicated /dev directory.

31
Q

Give an example of a
(i) block device
(ii) character device.
[35]

A
  1. Block Devices are devices that allow random access, and transfer information in fixed size chucks, or “blocks”.
  2. Character Devices are devices that don’t interact with the I/O cache
32
Q

In a long listing, what character is used to identify a
(i) block device node
(ii) character device node?
[35]

A
  1. block device nodes are identified by a “b”.

2. character device nodes are identified by a “c”,

33
Q

What information, if any, is stored in a device node? [35]

A

Device nodes are not used for storing information.

Instead, they serve as a conduit, transferring information to and from an underlying device driver.

34
Q

Explain the purpose of the major number of a filesystem device node. [36]

A

The major number of a filesystem device node correlates to the major number of the device driver with which it is associated.

35
Q

What three parameters are used to associate a device node to a particular device driver? [37]

A

block or character file type
major number,
minor number.

36
Q

Give a command line to create a device node named mytty4 that can be used to output data to the fourth virtual console. [37/38]

A

mknod command to create device nodes.

37
Q

What is special about /dev/cdrom? [39]

A

x

38
Q

Give a command line to backup the MBR of the primary master IDE disk. [40]

A

[root@station root]# dd if=/dev/hda of=/tmp/MBR.backup bs=512 count=1
1+0 records in

39
Q

Which command returns how long a machine has been operating without powering down or rebooting? [46]

A

uptime

40
Q

Explain the meaning of the three load averages output by the uptime command? [46]
08:14:10 up 1:28, 4 users, load average: 0.56, 0.23, 0.12

A

A 1 minute average, a 5 minute average, and a 15 minute average).

41
Q

Which command gives a dynamic output of processes running on a machine? [46]

A

cat /proc/meminfo

42
Q

By default, how often is the top command’s output refreshed? [46]

A

The list is refreshed about every five seconds.

43
Q

Refer to the output on the top of page 49. Explain the significance of the values labelled 1 and 2. [49]

A

Recall the MemTotal line

44
Q

Refer to the top command’s output in the middle of page 49. Explain the significance of the values labelled 1 through 5. [49]

A

1: Total Physical Memory
2. Available Memory is currently in use
3. Available Memory is currently available
4 & 5 : How much memory is currently being used to cache disk