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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • 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. How to configure and Manage Network Connections using nmcli
  2. a2enconf Command Examples in Linux
  3. hdiutil Command Examples in Mac
  4. s2i: command not found
  5. mandb: command not found
  6. How To Masquerade Sender Address In Sendmail in CentOS/RHEL
  7. UNIX / Linux : Examples of bash history command to repeat last commands
  8. pvck Command Examples in Linux
  9. lsmod: command not found
  10. Configure Persistent NIC Names of Network Adaptors in CentOS/RHEL using udev Rules

You May Also Like

Primary Sidebar

Recent Posts

  • qm Command Examples in Linux
  • qm wait Command Examples in Linux
  • qm start Command Examples in Linux
  • qm snapshot Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright