Driver Disks

A driver disk adds support for hardware that is not otherwise supported by the OS installation program. There is usually no need to use a driver disk unless you need a particular device in order to install the OS. Driver disks are most often used for non-standard or very new CD-ROM drives, SCSI adapters, or NICs. These are the only devices used during the installation that might require drivers not included on the OS install disk.

If a motherboard or other hardware vendor gives you a driver disk or you are told to download a driver disk from a Web site, you need to install it onto the system at OS install time (or afterwards, by booting from the OS install disk and doing a reinstall).

To begin, download the image, if you don't already have a disk, and burn it to a diskette or CD using a program like rawwritewin (under Windoze) or dd (under Linux). If you were given a diskette and need a CD, you'll probably need to first create a diskette and then copy all of the files on it to a CD using one of the CD burning programs. Be sure that you have the right driver for your version of the OS, the correct platform (e.g. x686 or 32_64), and the exact hardware that you're trying to support.

Incidentally, the driver disks for the r8168 driver for CentOS are listed on this page:

     http://wiki.centos.org/AdditionalResources/HardwareList/RealTekRTL8111b

Boot from the Linux install disk and at the first prompt, type the following:

     linux dd

Once you've done that, you should either proceed with a fresh install or, if you are simply adding the driver to an existing install (probably, only works for NICs), proceed with a reinstall. At some point in the install/reinstall, you will be prompted to insert the driver disk and the driver will be copied to your system.

After the OS is installed or reinstalled, you may have some additional work to do. If the new driver doesn't get added to the kernel dependencies properly, you can do it by hand. You may also have to do it by hand if you install any updates (especially to the kernel), since the driver installed by the install program is not tracked anywhere (nothing like the right hand keeping secrets from the left hand). Many updates will simply put the original (i.e. non-working) device driver back onto your system.

Begin by checking if the old, non-working driver is installed (if you're just installing a completely new driver, skip these steps). We'll look for the r8169 driver, which is broken when used with RTL8168/RTL8111 chips:

     lsmod | grep r8169

If the old driver is found, remove it:

     su
     rmmod r8169

Note that you should be doing things at your system's console since, at this point, your network, if it was working at all, will stop working.

Next, check to see if the new driver is there or not, for example the new r8168 driver:

     lsmod | grep r8168

If it isn't, install it from the install path where it was put, for example:

     su
     cp /lib/modules/2.6.18-53.el5/i686/r8168.ko \
        /lib/modules/`uname -r`/kernel/drivers/net
     insmod /lib/modules/`uname -r`/kernel/drivers/net/r8168.ko

If you don't know where the install program "hid" the driver, you may be able to find it fairly quickly like this:

     find /lib/modules -name r8168\*

Check again to see that it is now properly installed:

     lsmod | grep r8168

At this point, you should add an alias for any devices that will use the new device driver to /etc/modprobe.conf, while at the same time making sure that nothing references the old device driver. For example:

     su
     edit /etc/modprobe.conf
Then
     # alias eth0 r8169
     alias eth0 r8168

Now, you can update the module dependencies list using:

     su
     depmod -A

Also, the conflicting, original driver may still think that it knows how to handle the hardware (but it doesn't really). To get around this, you may have to blacklist it by adding its name to one of the blacklist files. For example, for network cards:

     su
     cd /etc/modprobe.d
     touch blacklist-network
     edit blacklist-network

Regardless of whether the blacklist file is new or if it already exists, add something that looks like the following lines to it:

     # Don't load the r8169 driver. It is replaced by the r8168 driver.
     blacklist r1869

Finally, some versions of Linux boot from a RAM image of the kernel which will still have the old driver (if any) installed and the new driver missing. If you are using one of these versions of Linux (e.g. Ubuntu, CentOS), you need to update this image or the incorrect driver will still get loaded and take over the show.

To update the RAM image on CentOS, use:

     su
     mkinitrd -f /boot/initrd-`uname -r`.img `uname -r`

To update the RAM image on Ubuntu, use:

     su
     update-initramfs -u

Reboot the machine to see if the changes are permanent and that the new piece of hardware now works.

You can check new ethernet drivers with:

     ethtool -i eth0