Rescue Mode In RedHat Linux

What is Rescue Mode?

When something goes wrong in your Linux box, there are so many ways to resolve that, however, these methods require that you to understand the system very well. As the name implies, rescue mode is there to rescue you from something. In normal operations, the Red Hat Linux systems use the files located on the system harddrive’s to do everything. But there may be a time when you are unable to get the Linux running completely enough to access its files on your system harddrive’s, By rescue mode, it is possible to access your files stored on your system hard drive, even if you can’t actually run the Linux from your system Harddrive.

When Rescue Mode is required?

You might need to boot in to rescue mode for any of these following reasons mentioned below;

1.You forgot the root password and bootloader password

2. You might need to re-install the Bootloader(i.e, GRUB)

3. Having Software/Hardware issues and you need to retrieve some important data from the hard drive

4.Unable to Boot the Linux in to the run level 3 or 5

Forgot the root and GRUB password:

What if you forgot your root password? You can boot your system to single user mode and from where you can reset the root password by using the “passwd” command, To boot the system to single user mode while booting, via bootloader is the only way to get in to single user mode, now what if I have assigned the bootloader password? You have no options now to get in to the single user mode when there is no way to recover your Linux box, “Rescue Mode” is the only way to resolve all these types of problems.

Having Software/Hardware issues:

There can be as many different situations under this category, Things like failing hard drive and forgetting to run the GRUB after building a new kernel, are the two things that can keep you from booting Rehat Linux. If you can get in to the rescue mode you may be able to resolve the problems and you can also get off some important files from your failing hard drives.

How to Boot the system in to Rescue Mode?

Use the following steps to boot in to the Rescue mode.

Step1: Boot the system from the Installation Media(cd/DVD)

Once the system has successfully booted  from the iso image, you will get the Red Hat Linux boot screen, choose the Rescue installed the system from the MENU SCREEN

Suppose if the Rescue option is not available means then you will need to choose the resue mode by using the following options at the boot prompt

[F1-main]  [F2:option]  [F3:Genera] [F4:Kernel] [F5:Rescue]

boot: Rescue

Step:2 Choose the Language

Select Language by using the arrow  keys and press enter

 

Step:3 Choose the Keyboard Type

Select the Keyboard type by using the arrow  keys and press enter

 

Step:4 Select the media contains the Rescue image

 

Step:5 Network type

If you want to access the system over the network in Rescue mode you can configure it from here. Mostly in the rescue mode network configuration are unnecessary.

 

Step:6 Next, a screen will appear telling you that the program now will attempt to find the RedHat Linux installation to rescue, choose “select” and enter

Step:7 Now you are in Rescue mode, if you grant it, then your root filesystem is mounted under the /mnt/sysimage directory, for example, all you files will be mounted under this location,your /etc/inittab file will get mounted under /mnt/sysimage/etc/inittab.

Once it is mounted under the /mnt/sysimage you will get the below confirmation on your screen

Step:8 Start the resuce mode shell and enter

Run the below command after entering in to the command line mode

#chroot   /mnt/sysimage

After this, you can open the system files to make the neccessary changes to make it function properly.

To exit from Rescue mode:

Type “exit” command twice to come out from the rescue envirnonment

#exit      (Leaving chroot environment)

#exit      (Leaving Rescue mode and restart)

 

Then choose “reboot” and press enter, this time your system will restart and reload all the selinux polices .

 

I hope you have enjoyed this tutorial if so Kindly subscribe and share it with your friends.
                                          🙏🙏 Thank you 🙏🙏
#############################################################
For More Videos Subscribe My Youtube Channel  Linux Vasanth
If you found this article useful, Kindly Subscribe here 👉  Click this link to Subscribe

################################################################################

 

About Author:

Hello readers! Let me introduce my self first. My name is Vasanth Nirmal Singh J S having 9+ years of experience in IT on all flavours of Unix operating systems ,Storage's and many more .. I would like to share my technical experience i have come across - can be help to other people. So in this blog, I'll post my thoughts related to ITIS. I'll share experiences that I've had while working in different environments. You can expect content related to Unix,Solaris,Linux,EMC Storeages,HP-UX and many others. I hope this blog can be useful for you! Your comments will be appreciated!

Leave a Reply

Your email address will not be published. Required fields are marked *