36.3. Using Rescue Mode to Fix or Work Around Driver Problems
36.3. Using Rescue Mode to Fix or Work Around Driver Problems A malfunctioning or missing driver can prevent a system from booting normally. Rescue mode provides an environment in which you can add, remove, or replace a driver even when the system fails to boot. Wherever possible, we recommend that you use the RPM package manager to remove malfunctioning drivers or to add updated or missing drivers. If you cannot remove a malfunctioning driver for some reason, you can instead blacklist the driver so that it does not load at boot time. Note that when you install a driver from a driver disc, the driver disc updates all initramfs images on the system to use this driver. If a problem with a driver prevents a system from booting, you cannot rely on booting the system from another initramfs image. 36.3.1. Using RPM to Add, Remove, or Replace a Driver In rescue mode, you can use RPM to install, remove, or update packages from the installed system, even though you did not boot the installed system. To remove a malfunctioning driver: Boot the system into rescue mode with the linux rescue command at the boot prompt, or the linux rescue dd command if you need to load a third-party driver from a driver disc. Follow the instructions in Section 36.1.2, "Booting into Rescue Mode" and do not choose to mount the installed system as read only. Change the root directory to /mnt/sysimage/ : Use the rpm -e command to remove the driver package. For example, to remove the kmod-foobar driver package, run: Exit the chroot environment: Installing a driver is a similar process, but the RPM package that contains the driver must be available on the system. Boot the system into rescue mode with the linux rescue command at the boot prompt, or the linux rescue dd command if you need to load a third-party driver from a driver disc. Follow the instructions in Section 36.1.2, "Booting into Rescue Mode" and do not choose to mount the installed system as read only. Make the RPM package that contains the driver available. For example, mount a CD or USB flash drive and copy the RPM package to a location of your choice under /mnt/sysimage/ , for example: /mnt/sysimage/root/drivers/ . Change the root directory to /mnt/sysimage/ : Use the rpm -ivh command to install the driver package. For example, to install the kmod-foobar driver package from /root/drivers/ , run: Note that /root/drivers/ in this chroot environment is /mnt/sysimage/root/drivers/ in the original rescue environment. When you have finished removing and installing drivers, reboot the system.
chroot /mnt/sysimage/ -e kmod-foobar exit chroot /mnt/sysimage/ -\u00adivh /root/drivers/kmod-foobar-\u00ad1.2.0\u00ad4.17.el6.i686