Questo contenuto non è disponibile nella lingua selezionata.
32.2. Anaconda Rescue Mode
Note
- Chapter 7, Booting the Installation on 64-bit AMD, Intel, and ARM systems for 64-bit AMD, Intel, and ARM systems
- Chapter 12, Booting the Installation on IBM Power Systems for IBM Power Systems servers
Important
dracut
boot options (such as rd.zfcp=
or root=iscsi:options
), or in the CMS configuration file on IBM Z. It is not possible to configure these storage devices interactively after booting into rescue mode.
dracut
boot options, see the dracut.cmdline(7)
man page. For information about the CMS configuration file, see Chapter 21, Parameter and Configuration Files on IBM Z.
Procedure 32.1. Booting into Anaconda Rescue Mode
- Boot the system from either minimal boot media, or a full installation DVD or USB drive, and wait for the boot menu to appear.
- From the boot menu, either select theoption from the submenu, or append the
inst.rescue
option to the boot command line. To enter the boot command line, press the Tab key on BIOS-based systems or the e key on the UEFI-based systems. - If your system requires a third-party driver provided on a driver disc to boot, append the
inst.dd=driver_name
to the boot command line:inst.rescue inst.dd=driver_name
For more information on using a driver disc at boot time, see Section 6.3.3, “Manual Driver Update” for AMD64 and Intel 64 systems or Section 11.2.3, “Manual Driver Update” for IBM Power Systems servers. - If a driver that is part of the Red Hat Enterprise Linux 7 distribution prevents the system from booting, append the
modprobe.blacklist=
option to the boot command line:inst.rescue modprobe.blacklist=driver_name
For more information about blacklisting drivers, see Section 6.3.4, “Blacklisting a Driver”. - When ready, press Enter (BIOS-based systems) or Ctrl+X (UEFI-based systems) to boot the modified option. Then wait until the following message is displayed:
The rescue environment will now attempt to find your Linux installation and mount it under the
/mnt/sysimage/
directory. You can then make any changes required to your system. If you want to proceed with this step choose 'Continue'. You can also choose to mount your file systems read-only instead of read-write by choosing 'Read-only'. If for some reason this process fails you can choose 'Skip' and this step will be skipped and you will go directly to a command line.If you select, it attempts to mount your file system under the directory/mnt/sysimage/
. If it fails to mount a partition, you will be notified. If you select , it attempts to mount your file system under the directory/mnt/sysimage/
, but in read-only mode. If you select , your file system is not mounted. Choose if you think your file system is corrupted. - Once you have your system in rescue mode, a prompt appears on VC (virtual console) 1 and VC 2 (use the Ctrl+Alt+F1 key combination to access VC 1 and Ctrl+Alt+F2 to access VC 2):
sh-4.2#
multi-user.target
or graphical.target
). If you selected to mount your file system and it mounted successfully, you can change the root partition of the Anaconda rescue mode environment to the root partition of your file system by executing the following command:
sh-4.2#
chroot /mnt/sysimage
rpm
, that require your root partition to be mounted as /
. To exit the chroot
environment, type exit
to return to the prompt.
/directory/
, and typing the following command:
sh-4.2#
mount -t xfs /dev/mapper/VolGroup00-LogVol02 /directory
/directory/
is a directory that you have created and /dev/mapper/VolGroup00-LogVol02
is the LVM2 logical volume you want to mount. If the partition is a different type than XFS, replace the xfs string with the correct type (such as ext4
).
sh-4.2#
fdisk -l
pvdisplay
, vgdisplay
or lvdisplay
commands, respectively.
ssh
,scp
, andping
if the network is startedFor details, see the Red Hat Enterprise Linux 7 System Administrator's Guide.dump
andrestore
for users with tape drivesFor details, see the RHEL Backup and Restore Assistant.parted
andfdisk
for managing partitionsFor details, see the Red Hat Enterprise Linux 7 Storage Administration Guide.yum
for installing or upgrading softwareFor details, see the Red Hat Enterprise Linux 7 Administrator's Guide
32.2.1. Capturing an sosreport
sosreport
command-line utility collects configuration and diagnostic information, such as the running kernel version, loaded modules, and system and service configuration files, from the system. The utility output is stored in a tar archive in the /var/tmp/
directory.
sosreport
utility is useful for analyzing the system errors and can make troubleshooting easier. The following procedure describes how to capture an sosreport
output in Anaconda rescue mode:
Procedure 32.2. Using sosreport
in Anaconda Rescue Mode
- Follow steps in Procedure 32.1, “Booting into Anaconda Rescue Mode” to boot into Anaconda rescue mode. Ensure that you mount the installed system
/
(root) partition in read-write mode. - Change the root directory to the
/mnt/sysimage/
directory:sh-4.2#
chroot /mnt/sysimage/
- Execute
sosreport
to generate an archive with system configuration and diagnostic information:sh-4.2#
sosreport
Important
When running,sosreport
will prompt you to enter your name and case number that you get when you contact Red Hat Support service and open a new support case. Use only letters and numbers because adding any of the following characters or spaces could render the report unusable:# % & { } \ < > > * ? / $ ~ ' " : @ + ` | =
- Optional. If you want to transfer the generated archive to a new location using the network, it is necessary to have a network interface configured. In case you use the dynamic IP addressing, there are no other steps required. However, when using the static addressing, enter the following command to assign an IP address (for example 10.13.153.64/23) to a network interface (for example dev eth0):
bash-4.2#
ip addr add 10.13.153.64/23 dev eth0
See the Red Hat Enterprise Linux 7 Networking Guide for additional information about static addressing. - Exit the chroot environment:
sh-4.2#
exit
- Store the generated archive in a new location, from where it can be easily accessible:
sh-4.2#
cp /mnt/sysimage/var/tmp/sosreport new_location
For transferring the archive through the network, use thescp
utility:sh-4.2#
scp /mnt/sysimage/var/tmp/sosreport username@hostname:sosreport
- For general information about
sosreport
, see What is a sosreport and how to create one in Red Hat Enterprise Linux 4.6 and later?. - For information about using
sosreport
within Anaconda rescue mode, see How to generate sosreport from the rescue environment. - For information about generating an
sosreport
to a different location than/tmp
, see How do I make sosreport write to an alternative location?. - For information about collecting an
sosreport
manually, see Sosreport fails. What data should I provide in its place?.
32.2.2. Reinstalling the Boot Loader
Procedure 32.3. Reinstalling the GRUB2 Boot Loader
- Follow instructions in Procedure 32.1, “Booting into Anaconda Rescue Mode” to boot into Anaconda rescue mode. Ensure that you mount the installed system's
/
(root) partition in read-write mode. - Change the root partition:
sh-4.2#
chroot /mnt/sysimage/
- Use the following command to reinstall the GRUB2 boot loader, where install_device is the boot device (typically, /dev/sda):
sh-4.2#
/sbin/grub2-install install_device
- Reboot the system.
32.2.3. Using RPM to Add, Remove, or Replace a Driver
Note
Procedure 32.4. Using RPM to Remove a Driver
- Boot the system into Anaconda rescue mode. Follow the instructions in Procedure 32.1, “Booting into Anaconda Rescue Mode”. Ensure that you mount the installed system in read-write mode.
- Change the root directory to
/mnt/sysimage/
:sh-4.2#
chroot /mnt/sysimage/
- Use the
rpm -e
command to remove the driver package. For example, to remove the xorg-x11-drv-wacom driver package, run:sh-4.2#
rpm -e xorg-x11-drv-wacom
- Exit the chroot environment:
sh-4.2#
exit
Procedure 32.5. Installing a Driver from an RPM package
- Boot the system into Anaconda rescue mode. Follow the instructions in Procedure 32.1, “Booting into Anaconda Rescue Mode”. 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/
:sh-4.2#
chroot /mnt/sysimage/
- Use the
rpm -ivh
command to install the driver package. For example, to install the xorg-x11-drv-wacom driver package from/root/drivers/
, run:sh-4.2#
rpm -ivh /root/drivers/xorg-x11-drv-wacom-0.23.0-6.el7.x86_64.rpm
Note
The/root/drivers/
directory in this chroot environment is the/mnt/sysimage/root/drivers/
directory in the original rescue environment. - Exit the chroot environment:
sh-4.2#
exit