Chapter 1
EXAM OBJECTIVES
Looking at device driver requirements and installation
Identifying and using signed drivers
Working with drivers and diagnosing driver errors
The United Nations’ goal is for the nations of the world to work together and achieve common goals. They achieve this end by communicating with each other, but they first have to overcome the language barrier, which is done by employing hundreds of translators. Device drivers serve a similar role for computers that translators serve for the UN, converting information between the operating system and various pieces of hardware. Device drivers are responsible for establishing and maintaining communication links between an operating system and the various hardware devices on a computer. Each hardware device has its own language. The job of the device driver is to translate data from the device into something that the OS can understand, and then translate the OS data into something that the device can understand.
Even with the advent of Plug and Play, an A+ Certified Professional still needs to understand how drivers work and how to diagnose driver-related problems. Even though Plug and Play may allow for default drivers to be automatically selected and loaded, the entire process of managing drivers is not a hands-off process, and intervention will be required on many occasions.
Because device drivers are so important, you should consider how device drivers are loaded onto your system. In the following sections, you take a look at loading device drivers for Windows. In Book 3, you see how to configure the hardware to be added to a system; in this chapter, you focus on the software side of configuring these devices.
Drivers and their installation are tied to INF files, which contain installation instructions. There are several ways to install drivers with INF files:
By default, Windows uses Windows Update to locate and install drivers for devices that are installed into or connected to the system, which takes a lot of the work out of installing drivers. The settings for this behavior are found in the System Properties, as shown in Figure 1-1. To locate these settings on Windows 7, follow these steps:
Right-click Computer and choose Properties from the shortcut menu to open the System Properties dialog box.
On a Windows 8.1 computer, right-click Start and choose System.
Choose Advanced System Settings from the navigation menu.
If you are prompted with a User Account Control dialog, choose Continue to proceed to the Systems Properties dialog.
If you choose not to use Windows Update and if the drivers are not built into Windows or if they have not been installed, Windows will not be able to locate appropriate drivers for the device.
To install a device driver on Windows using Add Legacy Hardware, follow these steps:
Right-click the computer in Device Manager and click Add Legacy Hardware.
The Add Hardware Wizard starts.
Indicate whether you already added the hardware to your system; then click Next.
If you are adding a device, Windows performs a search of Plug and Play devices. The results of this search are displayed for you and include any unknown devices.
Because adding a device also includes a troubleshooting option, this is your opportunity to select a device already installed on the system that you would like to troubleshoot. If you select to troubleshoot a device, the next screen in the wizard informs you that when you finish the wizard, you will start the troubleshooter. The troubleshooter lets you set resource settings, such as IRQ and I/O addresses.
You have the option of letting Windows search for new hardware (shown in Figure 1-2), or you can select the hardware from a list.
If your computer appears to not be responding, give it some time to finish its detection process.
To install a device manually, first choose the hardware type (shown in Figure 1-3), and after you make your selection, click Next.
A screen listing manufacturers and models appears.
Choose the manufacturer and a model from that manufacturer and then click Next after making your selection.
If the device cannot be matched to known devices, you can click the Have Disk button to browse for or type the location of the device’s INF file, as shown in Figure 1-4.
If Windows cannot detect the device settings for your device, it asks you to manually enter the settings for some or all of the hardware resources, which are I/O addresses, Memory, DMA, and IRQs.
You might be prompted for special device-related settings. If not, you should have a hardware installation dialog box on your screen.
Click Next to start installing your hardware.
If Windows cannot locate some of the required files, it might ask you to insert a disk with the drivers on it or to locate the files that it needs.
If you need to manually adjust the hardware resource settings, you can change the settings for the device by using either the device’s control panel (if one exists) or Device Manager.
To access the resource settings on Windows through Device Manager, use these steps:
Choose Start ⇒ Control Panel, click on Hardware and Sound, and then click the Device Manager link. (If you are using Windows 8.1, right-click Start and choose Device Manager.)
The Device Manager opens, and you can expand the device tree and select the device that you want to work with.
When you find the device, right-click it and choose Properties.
From the Properties window for the device, you can troubleshoot the device, examine driver details, change resource settings, and choose which hardware profiles will use the device.
Regardless of how you install the drivers for the device, if Windows can’t detect the settings for the device, you are prompted to specify IRQ, I/O, DMA, and memory resource settings. The prompt should only be necessary for non–Plug and Play devices. If you are not sure of the current settings for the device, confirm the settings by examining the hardware or by using the configuration utility that came with the device. A configuration utility should be included on the driver disk of any devices that support software configuration. If the device is configured for Plug and Play, you shouldn’t have to worry about this.
For many devices, you can add drivers from the device’s Control Panel applet, if there is one. This ability is not available for all devices but is available for modems and several other devices.
If you want to change the settings for a device that is installed on your system, you can use either the Control Panel applet for the device (such as Phone and Modem, Display, or Network) or Device Manager. Because each Control Panel applet is different, I do not go through each of them here, but rather show you Device Manager.
To access Device Manager in Windows 7, choose Start ⇒ Control Panel, click the Hardware and Sound link (opening the Hardware and Sound option), and then click the Device Manager link. You can also open the System Properties dialog box by right-clicking My Computer and choosing Manage, then clicking the Device Manager link in the Systems Tools section of the navigation menu. In Windows 8.1, right-click Start and choose Device Manager. With Device Manager open, expand the appropriate device tree until you see the device that you want to work with; then right-click the device and choose Properties. You can use the Properties window to change the driver, and set resources for the device (see Figure 1-6). Based on how the driver was designed, you might not have a Driver or Resources tab and you will not be able to configure the settings on those tabs.
From time to time, software vendors update their drivers, and you can choose to not update them, manually update them, or use Windows Update. When these drivers make it to the Windows Update website or Microsoft Update website, if you have upgraded, you can add them to your updates by choosing the optional hardware components. If you choose to update the drivers manually, right-click the device in Device Manager and choose Update Driver or click the Update Driver button on the Driver tab. Because some drivers do make it to the Windows Update website, the first question you will be asked when you choose to update your driver is whether you want to check Windows Update for copies of the drivers. If you choose not to use Windows Update or if there are no updated drivers on the site, you can still update them manually.
The next step in the update process is either allowing Windows to search automatically for updated driver software or having you manually specify a location for the drivers (“Browse my computer for driver software”). If you use the automatic method, Windows checks your currently installed INF files and the root directories of your removable media. If no matching drivers are found, you need to come back and choose Manual, which allows you to recheck the same paths as well as specify a directory in which to look for drivers. If all else fails, you can select “Don’t search. I will choose the drivers I want to install.” This option gives you a list of all drivers as well as a Have Disk button to load other drivers into the system. In most cases, you won’t have to use this screen. Just telling Windows to search a specific directory is usually enough for it to locate the correct driver for you.
Windows Vista and Windows 7 streamline the dialog boxes for this process, and will always check the Windows Update site as part of their automatic driver update process, unless you have changed the default Device Installation Settings, on the Hardware tab of System properties (or Advanced System Settings).
At some point, you might want to remove a device. The proper and clean removal of devices represents a large step forward in device management for the Windows OS. You can use Device Manager with all versions of Windows to cleanly remove devices and drivers. Device Manager allows you to select any installed device on your system and delete it. In addition to Device Manager, you may be able to use the individual device’s Control Panel applet, such as the Network Control Panel applet.
To use Device Manager to remove a device from Windows, follow these steps:
Expand the hardware tree to locate your device, right-click the device, and choose Uninstall.
You are presented with a confirmation dialog box.
Click OK.
The device will be uninstalled.
Windows will (by default) unplug devices that you have removed, leaving drivers and settings behind for you in case you want to re-install the device. To see devices with Device Manager that have only been unplugged, choose View ⇒ Show Hidden Devices in Device Manager. This now shows all devices that have been installed on your computer, even if they are currently unplugged, and you can choose to remove them here and delete their drivers.
Driver signing prevents installing unverified drivers on a system. Hardware vendors have to register with a certificate authority and verify their identity. Once they have accomplished this, they are able to sign the drivers which they created and generate a signature file. This signature file has a .cat extension and contains information about the original driver file to ensure that the driver was not modified since it was sent to Microsoft for Windows Update or delivered to you. When loading drivers, Windows checks for the existence of the signature file. If the signature is not available, you can configure what you want to have happen on the system. Your choices are
Typically, the option to block unsigned drivers is enforced on high-availability workstations or servers. To modify these settings for Windows, you can
bcdedit.exe /set loadoptions DDISABLE_INTEGRITY_CHECKS
Thanks to Plug and Play, you have to do less work to add a device because device identification, driver selection, and hardware configuration are handled by Plug and Play (at least after the device has been added to the driver database). The Plug and Play specification says that a device should do the following:
The Plug and Play standard also requires that Plug and Play devices be backward compatible with non–Plug and Play systems — at least, that’s the recommendation. All Plug and Play hardware should also be independent of operating systems that are installed on the system.
The Plug and Play process starts with the computer BIOS that supports Plug and Play. In addition, you also need an operating system that supports Plug and Play and Plug and Play devices. Current Windows OSes are Plug and Play–aware operating systems. The Plug and Play process contains three major components:
Figure 1-8 shows how these components fit together, and I discuss the whole Plug and Play process in the following paragraphs.
At the lowest level in the Plug and Play process is the Bus Enumerator, whose job is to deal directly with individual devices. Each bus architecture in your computer has a Bus Enumerator, and the major bus architectures include PCIe, ExpressCard, SCSI, and USB. When a device is added to the system, especially in the case of PCMCIA devices, it announces its presence to the Bus Enumerator. The Bus Enumerator assigns an ID to the device, interrogates the device IRQ and I/O preferences, and possibly reconfigures the device based on requests from Configuration Manager.
The Bus Enumerator is called into action when a Plug and Play computer boots, and it has work to do whenever a device is added or removed from a particular bus. When the Bus Enumerator (and the rest of the Plug and Play system) is given a notification of device removal, it can prepare for it. For example, if you want to remove a PCMCIA Ethernet adapter, you can notify the Plug and Play system by stopping the device by clicking the PC Card icon in the notification area and choosing the Ethernet adapter.
The Bus Enumerator does not decide what resources the new device is going to use — that is the job of Configuration Manager. The Bus Enumerator passes all information about the device to Configuration Manager, which takes a look at all the resources required by all devices on the system. If multiple devices require the same resources, the Configuration Manager calls on the Resource Arbitrator, which evaluates which devices can operate at which settings and provides a solution in which all devices are able to use compatible settings.
After the Resource Arbitrator works its magic, a new resource configuration is passed to Configuration Manager. Configuration Manager accepts the new configuration; it contacts each Bus Enumerator and has the Bus Enumerator reconfigure any devices that require reconfiguration. So, although the Bus Enumerator doesn’t decide how to reconfigure devices, it does actually carry out the reconfiguration of the devices.
All information about devices on your computer is written into the Registry, which maintains the hardware tree. Configuration Manager is responsible for writing the information into the Registry. In a computer that supports the Plug and Play BIOS, the basic Plug and Play configuration is actually performed at the BIOS level. When the OS loads, it goes through the Plug and Play process and modifies any configurations that require modification.
If legacy devices (non–Plug and Play devices) exist on your system, resources are assigned to them first. This makes perfect sense because these devices cannot be reconfigured through the Plug and Play process. To ensure that the proper resources are allocated to legacy devices, you can reserve those resources in the system BIOS.
In most BIOS configurations, you have the option of reserving resources for non–Plug and Play devices. The settings in the BIOS tell you whether you are reserving resources for non–Plug and Play devices, reserving resources for legacy devices, or disabling resources. Those resources are not actually disabled, but their use by Plug and Play devices is disabled; legacy devices are still able to use these resources. The BIOS represents the best place to reserve legacy resources for this reason: It represents the first area where Plug and Play resources are actually assigned to devices.
Because legacy devices cannot be reconfigured through the Plug and Play process, they should always be allowed to use the resources that they require. In a perfect world, that would be all you need. Because we don’t live in a perfect world, though, you must reserve resources. Reserving the resources for legacy devices at the BIOS level is more consistent for achieving a working configuration than allowing them to be reserved at the OS level.
When Plug and Play systems first entered the market, they were plagued with difficulty. Much of this difficulty came from devices that were not fully Plug and Play–compliant or from non–Plug and Play–aware system BIOS, not to mention mixing Plug and Play and non–Plug and Play devices together in a computer, which always causes additional problems and was often the case in early systems. Over the years, hardware and software manufacturers have learned a lot about how Plug and Play should and can work, and today Plug and Play is much closer to its ideal.
To install drivers on a Windows computer, by default, you need to be a member of the Administrators group. In most cases, you do not want just anybody adding hardware devices to a computer and causing no end of problems for the people responsible for maintaining the computer. This ability to install the software for the device is controlled in the same way all rights on the computer are controlled, through the Security Policy. The computer policy can be changed locally. However, if the computer is part of Active Directory (AD), conflicting AD settings would override the local Security Policy. To view the active security settings on your computer and to see whether they are being overridden, you only have to look as far as the Administrative Tools by choosing Control Panel ⇒ System and Security.
In Administrative Tools, you will find the Local Security Policy application, which lets you see all security settings on your computer. To see the right to load and unload device drivers, expand the tree on the left to see Local Policies ⇒ User Rights Assignments. After selecting User Rights Assignments, you can browse the list on the right for Load and Unload Device Drivers. The Security Setting column tells you who has the permission, as shown in Figure 1-9. To change the permission, double-click the security setting, and use the Load and Unload Device Drivers Properties dialog box to change the list of people who have permissions.
To ensure that the drivers for a device are working properly, you should check three things:
What do you do if a device driver does not work? This is a question heard many times by users with driver problems. The answer is, as always with computers, “It depends.” Some actions that you can take to deal with a malfunctioning driver include
If the driver is not working or if it has compromised the stability of the computer, you do have the preceding options. Issues with drivers could range from the driver just not working to the computer having a Stop event (blue screen error) during the boot process. In most cases, if the driver is just not working, look at how the device is connected to the computer and also examine any related components. For example, if the problem is with a USB device, are the rest of the USB components (such as the USB hubs and controllers) on the computer working?
After you verify this, and that the device is properly attached and powered, examine the driver version and its settings. Check for a newer (usually) driver or an older (rarely) driver that could fix your problem. Discussion boards often help diagnose driver-related issues, be they a version issue to settings related. In most cases, you should initially load the component with the latest driver available, which means ignoring the DVD that came with the device and going directly to the manufacturer’s website. If the device doesn’t work because of a hardware conflict, simply remove the device and replace it with a different manufacturer’s version. These hardware conflicts are very rare, but when they happen, you may have no choice but to replace with a different product.
Rather than just not working, the problem with the driver failure might be more prominent, such as a blue screen error during system boot. If that is the issue, your resolution is somewhat more critical. The first step is deciding what your immediate resolution needs to be. If it is to allow the computer to be usable and that the device was considered an extra feature, remove the device and look at adding and troubleshooting the device installation later. If it is to get the device working, you need to troubleshoot the device installation immediately. Your steps might vary some, but usually you want to do the following:
Risking the loss of configuration settings or files, the last two options are last-chance efforts to restore system stability in the form of booting to the Last Known Good Configuration or using a past system restore point. Because these two items return to a past point in time, you do run the risk of losing additional settings that you were not aware of. For more information about these two procedures, see Book 7, Chapter 3.
In a perfect world, one of these fixes will work for you, and you won’t lose any data or settings.
In this chapter, you look at general processes to load and configure device drivers. Specifically, you find out the following:
1. A user has chronic issues with his computer. Your manager has asked you to visit the user and examine the device drivers. Device drivers are used to do what?
(A) Provide power to the device while it is operating
(B) Act as a software interface between the operating system and the device
(C) Provide advanced configuration options for the device
(D) Steer the device to a new location on the computer
2. You have been looking for a driver for an old hardware device. You have not been able to find a signed driver and have only located an unsigned driver. What is the risk of using an unsigned driver?
(A) Unsigned drivers are only reliable when using Windows XP.
(B) Unsigned drivers are missing their SIG files.
(C) Unsigned drivers are not backward compatible with older hardware versions.
(D) Unsigned drivers cannot be verified for authenticity.
3. You are reviewing the Plug and Play process with a customer. Which of the following is not part of the Plug and Play procedure?
(A) Resource Arbitrator
(B) Dynamic Reconfigurator
(C) Configuration Manager
(D) Bus Enumerator
4. Which users on a Windows Vista computer have the right to load device drivers?
(A) Guests
(B) All Users
(C) Administrators
(D) Power Users