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:
  1. 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.
  2. Change the root directory to /mnt/sysimage/:
    chroot /mnt/sysimage/
  3. Use the rpm -e command to remove the driver package. For example, to remove the kmod-foobar driver package, run:
    rpm -e kmod-foobar
  4. Exit the chroot environment:
    exit
Installing a driver is a similar process, but the RPM package that contains the driver must be available on the system.
  1. 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.
  2. 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/.
  3. Change the root directory to /mnt/sysimage/:
    chroot /mnt/sysimage/
  4. Use the rpm -ivh command to install the driver package. For example, to install the kmod-foobar driver package from /root/drivers/, run:
    rpm -­ivh /root/drivers/kmod-foobar-­1.2.0­4.17.el6.i686
    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.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.