Bookmark this page

Lab: Identifying Hardware Issues

Configure options for the usb-storage kernel module.

Outcomes

You should be able to configure a module option for the usb-storage driver.

As the student user on the workstation machine, use the lab command to prepare your system for this exercise.

[student@workstation ~]$ lab start hardware-review

This command confirms that the required host for this exercise is accessible and sets up the needed modules for the requested activities.

Instructions

Your servera system has issues with a removable storage device that uses the usb-storage driver. After testing and research, you determined that your device incorrectly reports being write-protected.

The USB vendor ID for this device is 0513 and the device ID is 0132.

Documentation for the usb-storage module option is in the kernel-parameters.txt file from the kernel-doc package.

You are asked to configure the servera system so that the usb-storage module ignores the write-protect mode from that device.

  1. Install the kernel-doc package, and search for options that relate to usb-storage in the kernel-parameters.txt file.

    1. Log in to servera and switch to the root user.

      [student@workstation ~]$ ssh student@servera
      ...output omitted...
      [student@servera ~]$ sudo -i
      [sudo] password for student: student
      [root@servera ~]#
    2. Install the kernel-doc package.

      [root@servera ~]# yum install kernel-doc
    3. Open the /usr/share/doc/kernel-doc*/Documentation/admin-guide/kernel-parameters.txt file and search for usb-storage. Identify which parameter might be useful, and which flag to use.

      The quirks parameter seems useful, with the w (NO_WP_DETECT) flag added.

  2. Create a permanent configuration to force-enable the NO_WP_DETECT flag for the USB device with vendor ID 0513 and product ID 0132.

    1. Create a file called /etc/modprobe.d/usb-storage.conf with the following content:

      options usb-storage quirks=0513:0132:w
    2. Return to workstation as the student user.

      [root@servera ~]# exit
      [student@servera ~]$ exit
      [student@workstation ~]$

Evaluation

On the workstation machine, use the lab command to grade your work. Correct any reported failures and rerun the script until you receive a passing grade.

[student@workstation ~]$ lab grade hardware-review

Finish

On the workstation machine, use the lab command to complete this exercise. This is important to ensure that resources from previous exercises do not impact upcoming exercises.

[student@workstation ~]$ lab finish hardware-review

Revision: rh342-8.4-6dd89bd