Simple application of rescue mode in Linux

Source: Internet
Author: User
Tags exit in

Operating environment: virtual machine centos6.9 Centos7

I. Introduction of Rescue mode

When we in the Linux operating system because of the misuse of some important files to remove the majority of commands can not be used or some programs can not be used, at this time, the use of Linux rescue mode to temporarily enter the system, file modification, correcting errors.

Note the essence of rescue mode is actually just a Linux runtime environment with Shell,

Second, the way to enter the rescue mode

Linux operating system because the version of the different, so the steps to enter the rescue mode is not the same, but the general is the same, here to introduce centos6.9 and centos7 how to enter the rescue mode

(1) centos6.9

Because the virtual machine is running, so it needs a personal hand speed, if the normal click on the virtual machine to start running, the mouse needs to quickly click into the virtual machine, and then quickly press the ESC key (pop the following box on the line, more press and will exit!) )

1. Enter the Startup item selection screen: Here we select the third disc to boot, select drive driver

2. Here we choose the third:Rescue installed system

3, wait for a period of time after the new box will appear, the following can all default options

( No network settings are currently required in rescue mode to select No and enter)

4. Click OK to get a running environment with shell

5, incidentally, the way to exit the rescue mode

In centos6.9, after entering the exit command in the command, click Enter to enter the following interface, click on Point three,rebootreboot, enter exit in Centos7 to exit directly.

(2) Centos7

The first step is the same as centos6.9, the second step into a new interface, such as, through the keyboard up and down the move to select the third option troubleshooting, and then we will see and centos6.9 familiar with a word Rescue , click enter input ' 1 ' and press ENTER to get a shell.


Third, the rescue mode of simple combat

Experiment: Mistakenly delete the/lib64/libc.so.6 file, which causes all commands except internal command to be invalidated, try to recover the original file

The consequences of deleting a file by mistake are as follows:

Current connection reboot (restart), Poweroff (shutdown) command can not be executed, only manually on the virtual machine shutdown restart, after restarting directly into rescue mode

1, enter the rescue mode (above has introduced how to enter the rescue mode)

2. View the current partition mount status by DF command

2. Enter the ls/lib64/libc.so.6 command to see if there is a file (because it is a system that comes with the CD and is not mounted in the root directory, so the file is not deleted)

3, the need to find the file is good to do, just to copy the file to the lost file system can, here we can see their system is mounted to the /mnt/sysimage

cp/lib64/libc.so.6/mnt/sysimage/lib64 ( Copy the file to the missing file system)

4, exit, quit and restart

Simple use of rescue mode in Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.