• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

CentOS / RHEL 6 : How to boot into rescue mode

By admin

Rescue mode is the same as a single-user mode. This mode can be used when a condition exists that prevents your system from completing the regular boot process. The system attempts to mount local file systems and start some system services. But rescue mode does not start the network service and does not allow other users to log on to the system. Changing to rescue mode prompts for the root password.

Booting into rescue mode

To boot the system into rescue mode please use following steps:

1. Boot the system from installation DVD – Boot the system from the installation DVD/ ISO image of the same major release as the system (this may require you to change the bios to boot from DVD). Once the system has successfully booted from the ISO image and Red Hat Enterprise Linux boot screen will appear. Choose the option Rescue installed system from the menu screen.

rescue mode boot menu option RHEL 6

If the option “Rescue installed system is not available, which may be the case you will have to choose Rescue Mode by typing the following at the boot prompt and pressing [Enter]:

[F1-Main] [F2-Options] [F3-General] [F4-Kernel] [F5-Rescue] 

boot: linux rescue

2. Choose the Language – Select desired language using arrow keys then press enter.

choose language RHEL 6 rescue mode

3. Choose Keyboard Type – Select desired keyboard type using arrow keys then press enter.

keyboard type RHEL 6 rescue mode

4. Network Interfaces – The network interfaces are unnecessary. Use arrow keys to highlight No then press enter. If you want to access the system over the network in rescue mode you can do it by configuring IP address as well. For the example in the post, we will go without network configuration.

setup networking in rescue mode RHEL 6

5. Next, a screen will appear telling you that the program will now attempt to find a Red Hat Enterprise Linux installation to rescue. Select “Continue” on this screen.

sysimage information rescue mode RHEL CentOS

6. You are currently in Rescue Mode. If you allowed it, your root filesystem should be mounted as the /mnt/sysimage directory. For example, your /etc/fstab will be present at the /mnt/sysimage/etc/fstab location.

go to shell in rescue mode RHEL 6

system is currently mounted at :mnt:sysimage rescue mode RHEL

7. switch context – You can switch contexts so all the files will be available at their usual locations. Select start shell option.

start shell in rescue mode RHEL CentOS

Execute below command in the shell.

# chroot /mnt/sysimage

Exiting rescue mode

Although you are accessing the user-space files of your root filesystem, remember that you are still using the boot environment (such as the kernel and device inventory) from the rescue mode. Programs such as df or mount may not give the expected results. Leave the chroot context by using exit twice – first to exit the chroot and second one to exit rescue mode and reboot.

# exit            ### Leaving chroot environment
# exit            ### Leaving rescue mode and rebooting

Filed Under: Linux

Some more articles you might also be interested in …

  1. What is the purpose of “system user” in MySQL Replication
  2. How to create snapshot of LVM thin volumes using snapper command
  3. CentOS / RHEL : How to block incoming and outgoing ports using iptables
  4. NFSv4 Client Shows “nobody” As Owner And Group For Mount Point (CentOS/RHEL)
  5. How to rename a KVM VM with virsh
  6. CentOS / RHEL 6 : how to start the services interactively during boot (to disable/abort some services)
  7. How To Open A Port In CentOS / RHEL 7
  8. How to Use “repoquery” Command to List Package Dependencies
  9. Understanding TCP Wrappers (/etc/hosts.allow & /etc/hosts.deny) in Linux
  10. What is HBA Queue Depth and How to Check the Current Queue Depth Value and how to Change it

You May Also Like

Primary Sidebar

Recent Posts

  • Oracle Database – Configuring Secure Application Roles
  • Extend rule sets by using factors in Oracle Database Vault
  • What are Command Rules in oracle Database
  • Using Rule Sets in Oracle Database Vault
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary