How to boot a system into rescue mode
Environment
- Red Hat Enterprise Linux 10
- Red Hat Enterprise Linux 9
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 5
- Red Hat Enterprise Linux 4
- Rescue mode
- note: in RHEL 7/8, rescue mode is referred to as "Anaconda Rescue Mode" to differentiate it from the
vmlinuz-0-rescue-*rescue image.
- note: in RHEL 7/8, rescue mode is referred to as "Anaconda Rescue Mode" to differentiate it from the
Issue
- Having trouble booting my system, how do I get into rescue mode during boot time?
Resolution
System Admin/Installation Guide instructions:
- Red Hat Enterprise Linux 10: "B.8.1. Booting into rescue mode"
- Red Hat Enterprise Linux 9: "B.10.1. Booting into rescue mode"
- Red Hat Enterprise Linux 8: "B.10.1. Booting into rescue mode"
- Red Hat Enterprise Linux 7: "31.2. Anaconda Rescue Mode"
- Red Hat Enterprise Linux 6: "36.1.2. Booting into Rescue Mode"
- Red Hat Enterprise Linux 5: "27.2. Booting into Rescue Mode"
- Red Hat Enterprise Linux 4: "5.2. Booting into Rescue Mode"
To boot the system into rescue mode please use following steps:
- Boot from ISO
Boot the system from the relevant Binary DVD or boot disc of the same major release as the system. The ISO9660 disc images are available as follows:
- This content is not included.RHEL 10. Binary DVD (7.88 GB) or Boot ISO (816 MB).
- This content is not included.RHEL 9.6. Binary DVD (11.9 GB) or Boot ISO (1.15 GB).
- This content is not included.RHEL 8.10. Binary DVD (13.3 GB) or Boot ISO (1020 MB).
- This content is not included.RHEL 7.9. Binary DVD (4.22 GB) or Boot ISO (608 MB).
- This content is not included.RHEL 6.10. Binary DVD (3.63 GB) or Boot ISO (280 MB).
- This content is not included.RHEL 5.11. Binary DVD (4.14 GB) or Binary CD 1 (634 MB).
- This content is not included.RHEL 4.8. Install DVD (2.51 GB) or Install Disc 1 (208 MB).
- Enter rescue mode
Once the system has successfully booted from the ISO image, the Red Hat Enterprise Linux install menu will appear.
-
Red Hat Enterprise Linux 7/8/9/10:
Select 'Troubleshooting/Rescue a Red Hat Enterprise Linux system' at the install menu or append the
inst.rescueoption to the boot command line. -
Red Hat Enterprise Linux 6:
Select 'Rescue installed system' at the install menu or type 'linux rescue' at the 'boot:' prompt.
-
Red Hat Enterprise Linux 4/5:
Type 'linux rescue' (without the quotes) at the 'boot:' prompt and hit Enter.
[F1-Main] [F2-Options] [F3-General] [F4-Kernel] [F5-Rescue] boot: linux rescue
- Configure rescue options (Red Hat Enterprise Linux 4/5/6)
- Configure language and keyboard
- Configure networking.
- Mount filesystems (if desired)
-
A 'Rescue' screen will appear telling you that the program will now attempt to find an existing Red Hat Enterprise Linux installation to mount on
/mnt/sysimagein Read & Write mode in RHEL7 and/mnt/sysroot/in RHEL8/9. Select 'Continue' on this screen or 'Skip/Skip to shell' if you do not wish to mount filesystems.If you choose to mount filesystems, a confirmation message will appear that the system has been mounted.
- RHEL 5 and later: Press <return> or Enter to get a shell.
- RHEL 4 immediately drops to a shell.
If you choose not to mount filesystems you will immediately be dropped to a shell.
After entering rescue mode
-
The rescue shell
This shell exists in the installation/rescue environment, with the installed system optionally mounted under
/mnt/sysimage. This shell has a number of tools available for rescuing a system, such as all common file system, disk, LVM, and networking tools. The various bin directories of the target system are added to the default executable search path (${PATH}) as well. -
Check that filesystems have been mounted (if desired)
At the shell prompt, run
dfto see if the dev, sys, proc filesystems are mounted under/mnt/sysimage. If these directories are not mounted, you can try to mount them manually as follows:# mount -o bind /dev /mnt/sysimage/dev # mount -o bind /sys /mnt/sysimage/sys # mount -t proc /proc /mnt/sysimage/proc # mount -o bind /dev/shm /mnt/sysimage/dev/shm -
chroot(if desired)To chroot to the existing system root:
# chroot /mnt/sysimage -
To exit from the
chrootenvironment:# exitAfter exiting from
chrootenvironment, the system can be rebooted by executingexitcommand again:# exit -
Resources
Red Hat Enterprise Linux Rescue Options
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.