About the Linux startup rescue mode for recovery steps

Source: Internet
Author: User

Because I had previously done the/etc/passwd file, so that the subsequent start-up failure problem.

After modifying /etc/passwd , the system will appear /etc/passwd-is Linux regular auto-generated backup

Let's go into rescue mode and move the/mnt/sysiamge/etc/passwd-to rename.

what the rescue model does:

You can change the root password;

Recover hard disk, file system operation;

When the system starts, it can only be started by rescue mode;

The steps to start the rescue mode are as follows:

Virtual machines in the case. (The first step is to load the disc and connect at startup.) )

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/7E/F9/wKioL1cOdeKwP8MgAADOqXQ5nFI430.png "title=" 1.png " alt= "Wkiol1codekwp8mgaadoqxq5nfi430.png"/>

1, boot into the BIOS settings (each computer into the BIOS of the method different according to their own computer access), boot boot sequence for CD-ROM priority to start the CD drive using the keypad's +-number adjustment in the upper and lower order, set up and then save and exit.

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/7E/FC/wKiom1cOdT3BbeDtAADmmDzfWpw697.png "title=" 2.png " alt= "Wkiom1codt3bbedtaadmmdzfwpw697.png"/>

2, restart the system after entering the installation Start menu, the upper and lower keys to move to the Rescueinstall system rescue installation systems;

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/7E/FC/wKiom1cOdVLTBXsEAAHj5x6WYQI457.png "title=" 3.png " alt= "Wkiom1codvltbxseaahj5x6wyqi457.png"/>

3. Select the language and keep the default 中文版

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/7E/FC/wKiom1cOdWDxIMEbAABcQfn301k823.png "title=" 4.png " alt= "Wkiom1codwdximebaabcqfn301k823.png"/>

4, select the keyboard type, keep the default us

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/7E/F9/wKioL1cOdiODpUdSAABVcNXtB9w595.png "title=" 5.png " alt= "Wkiol1codiodpudsaabvcnxtb9w595.png"/>

5, whether to start the network, you need to choose according to your actual situation, if you need to copy data through the network, select Yes, here we choose No;

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/7E/F9/wKioL1cOdi_SLkwnAAA6az7LuU4364.png "title=" 6.png " alt= "Wkiol1codi_slkwnaaa6az7luu4364.png"/>

6, enter into the rescue interface, select Continue

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/7E/F9/wKioL1cOdjvgV8fJAACDy8O_h0E706.png "title=" 7.png " alt= "Wkiol1codjvgv8fjaacdy8o_h0e706.png"/>

7, the system is mounted under/mnt/sysimage if you want to run the Chroot/mnt/sysimage command in the root environment, click OK

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/7E/F9/wKioL1cOdkWyNarEAABg-NeJJm8547.png "title=" 8.png " alt= "Wkiol1codkwynareaabg-nejjm8547.png"/>

8, three kinds of options: Shell into the command line mode; FAKD is the diagnostic mode; reboot restart the computer; we choose the shell here.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/7E/FC/wKiom1cOdaPgJGASAABCTHbLObw509.png "title=" 9.png " alt= "Wkiom1codapgjgasaabcthblobw509.png"/>

9. Enter the shell command line and the prompt is bash-4.1#

ls/mnt/sysimage/displays files that are mounted as root directories

Execute chroot/mnt/sysimage/to move the files under the/mnt/sysimage/directory to the root directory;

Command after prompt is sh-4.1#

LS is displayed as the root directory of the file;

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/7E/F9/wKioL1cOdo-x0p1PAAAuNmWiNvE921.png "title=" 10.png "alt=" Wkiol1codo-x0p1paaaunmwinve921.png "/>

10. Here we carry out the ls/mnt/sysimage/etc/passwd-(when the tab is complete, we need to change the passwd-name and use the MV. )

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/7E/FC/wKiom1cOdemhnwNaAAASk1bNRDQ421.png "title=" 11.png "alt=" Wkiom1codemhnwnaaaask1bnrdq421.png "/>

Here we'll use the MV command.

mv/mnt/sysimage/etc/passwd-/mnt/sysimage/etc/passwd

Then use cat to view the files inside the/MNT/SYSIMAGE/ETC/PASSWD

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/7E/F9/wKioL1cOdq3g9EEKAAAKL8Hm0JI612.png "style=" float: none; "title=" 12.png "alt=" Wkiol1codq3g9eekaaakl8hm0ji612.png "/>

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/7E/F9/wKioL1cOdq6izj0JAABFS62t0ZU902.png "style=" float: none; "title=" 13.png "alt=" Wkiol1codq6izj0jaabfs62t0zu902.png "/>


Use reboot to reboot after correct. Enter the system normally.


This article is from the IT Network blog, so be sure to keep this source http://531572034.blog.51cto.com/4383413/1763635

About the Linux startup rescue mode for recovery steps

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.