Questo contenuto non è disponibile nella lingua selezionata.
33.4. Resolving Problems in System Recovery Modes
root
password:
Procedure 33.4. Resetting a Root Password
- Boot to
single-user mode
as described in Procedure 33.2, “Booting into Single-User Mode”. - Run the
passwd
command from the maintenance shell command line.
rescue mode
.
Procedure 33.5. Reinstalling the GRUB Boot Loader
- Boot to
rescue mode
as described in Procedure 33.1, “Booting into Rescue Mode”. Ensure that you mount the system's root partition in read-write mode. - Execute the following command to change the root partition:
sh-3.00b# chroot /mnt/sysimage
sh-3.00b# chroot /mnt/sysimage
Copy to Clipboard Copied! - Run the following command to reinstall the GRUB boot loader:
sh-3.00b# /sbin/grub-install boot_part
sh-3.00b# /sbin/grub-install boot_part
Copy to Clipboard Copied! where boot_part is your boot partition (typically,/dev/sda
). - Review the
/boot/grub/grub.conf
file, as additional entries may be needed for GRUB to control additional operating systems. - Reboot the system.
rescue mode
and modify the /boot/grub/grub.conf
file.
rescue mode
. 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
Procedure 33.6. Remove a Driver in Rescue Mode
- Boot to
rescue mode
as described in Procedure 33.1, “Booting into Rescue Mode”. Ensure that you mount the system's root partition in read-write mode. - Change the root directory to
/mnt/sysimage/
:sh-3.00b# chroot /mnt/sysimage
sh-3.00b# chroot /mnt/sysimage
Copy to Clipboard Copied! - Run the following command to remove the driver package:
sh-3.00b# rpm -e driver_name
sh-3.00b# rpm -e driver_name
Copy to Clipboard Copied! - Exit the
chroot
environment:sh-3.00b# exit
sh-3.00b# exit
Copy to Clipboard Copied! - Reboot the system.
Procedure 33.7. Installing a Driver in Rescue Mode
- Boot to
rescue mode
as described in Procedure 33.1, “Booting into Rescue Mode”. Ensure that you mount the system's root partition in read-write mode. - Mount a media with an RPM package that contains the driver and copy the package to a location of your choice under the
/mnt/sysimage/
directory, for example:/mnt/sysimage/root/drivers/
. - Change the root directory to
/mnt/sysimage/
:sh-3.00b# chroot /mnt/sysimage
sh-3.00b# chroot /mnt/sysimage
Copy to Clipboard Copied! - Run the following command to install the driver package:
sh-3.00b# rpm -ihv /root/drivers/package_name
sh-3.00b# rpm -ihv /root/drivers/package_name
Copy to Clipboard Copied! Note that/root/drivers/
in this chroot environment is/mnt/sysimage/root/drivers/
in the original rescue environment. - Exit the
chroot
environment:sh-3.00b# exit
sh-3.00b# exit
Copy to Clipboard Copied! - Reboot the system.
Procedure 33.8. Blacklisting a Driver in Rescue Mode
- Boot to
rescue mode
with the commandlinux rescue rdblacklist=driver_name
, where driver_name is the driver that you need to blacklist. Follow the instructions in Procedure 33.1, “Booting into Rescue Mode” and ensure that you mount the system's root partition in read-write mode. - Open the
/boot/grub/grub.conf
file in the vi editor:sh-3.00b# vi /boot/grub/grub.conf
sh-3.00b# vi /boot/grub/grub.conf
Copy to Clipboard Copied! - Identify the default kernel used to boot the system. Each kernel is specified in the
grub.conf
file with a group of lines that beginstitle
. The default kernel is specified by thedefault
parameter near the start of the file. A value of0
refers to the kernel described in the first group of lines, a value of1
refers to the kernel described in the second group, and higher values refer to subsequent kernels in turn. - Edit the
kernel
line of the group to include the optionrdblacklist=driver_name
, where driver_name is the driver that you need to blacklist. For example:kernel /vmlinuz-2.6.32-71.18-2.el6.i686 ro root=/dev/sda1 rhgb quiet rdblacklist=driver_name
kernel /vmlinuz-2.6.32-71.18-2.el6.i686 ro root=/dev/sda1 rhgb quiet rdblacklist=driver_name
Copy to Clipboard Copied! - Save the file and exit the vi editor by typing:
:wq
:wq
Copy to Clipboard Copied! - Run the following command to create a new file
/etc/modprobe.d/driver_name.conf
that will ensure blacklisting of the driver after the root partition is mounted:echo "install driver_name" > /mnt/sysimage/etc/modprobe.d/driver_name.conf
echo "install driver_name" > /mnt/sysimage/etc/modprobe.d/driver_name.conf
Copy to Clipboard Copied! - Reboot the system.