Linux system Recovery "one"

Source: Internet
Author: User

Lab Environment: RHEL7.0

Experimental content:

    1. MBR first 446 bytes corrupted

    2. Grub boot file is missing

    3. Forget the power-on password



1.MBR First 446 bytes damaged

1.1 Damage to MBR

[Email protected] ~]# df-h

/DEV/SDA1 497M 119M 379M 24%/boot

[[email protected] ~]# dd if=/dev/zero OF=/DEV/SDA bs=400 count=1

[email protected] ~]# reboot

1.2 Phenomena

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/87/D2/wKioL1fid5yz4VgMAADgmtSeArc305.png "title=" Screenshot from 2016-09-21 20:05:01.png "alt=" Wkiol1fid5yz4vgmaadgmtsearc305.png "width=" to "height=" 157 "border=" 0 " Hspace= "0" vspace= "0" style= "width:700px;height:157px;"/>

1.3 Fix

1.3.1 Mount CD, CD Boot

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/87/D6/wKiom1fieUiR8COYAAEpH4jRa2A757.png "title=" Screenshot from 2016-09-21 20:11:39.png "style=" WIDTH:400PX;HEIGHT:317PX; "width=" "height=" 317 "border=" 0 "hspace= "0" vspace= "0" alt= "wkiom1fieuir8coyaaeph4jra2a757.png"/>

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/87/D6/wKiom1fieUbBvWdSAAA_bmfLlqo453.png "style=" float: none; "Title=" screenshot from 2016-09-21 20:12:12.png "alt=" Wkiom1fieubbvwdsaaa_bmfllqo453.png "/>

    

1.3.2 Select troubleshooting, continue to select repair Redhat system

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/87/D2/wKioL1fiekXTnqjYAAAO3OlIQyM473.png "title=" Screenshot from 2016-09-21 20:14:38.png "style=" Float:none; "alt=" Wkiol1fiekxtnqjyaaao3oliqym473.png "/>

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/87/D6/wKiom1fiekTCP7rjAAAWNQwf1AY258.png "title=" Screenshot from 2016-09-21 20:15:08.png "style=" Float:none; "alt=" Wkiom1fiektcp7rjaaawnqwf1ay258.png "/>



1.3.3 Important carriage return Knock 3 and then go into the black box interface ready to repair MBR

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/87/D6/wKiom1fiekTC1MVWAAAehvVoJxc448.png "style=" width : 400px;height:348px; "title=" screenshot from 2016-09-21 20:15:30.png "width=" to "height=" 348 "border=" 0 "hspace=" 0 " Vspace= "0" alt= "wkiom1fiektc1mvwaaaehvvojxc448.png"/>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/87/D2/wKioL1fiekOQgPV8AAATNQ44VcI313.png "title=" Screenshot from 2016-09-21 20:15:45.png "style=" Float:none; "alt=" Wkiol1fiekoqgpv8aaatnq44vci313.png "/>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/87/D6/wKiom1fiekPA6VSXAAAIDS3FL3s451.png "title=" Screenshot from 2016-09-21 20:15:52.png "style=" Float:none; "alt=" Wkiom1fiekpa6vsxaaaids3fl3s451.png "/>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/87/D2/wKioL1fiekPixHMTAAANsUuOSr0090.png "title=" Screenshot from 2016-09-21 20:16:01.png "style=" Float:none; "alt=" Wkiol1fiekpixhmtaaansuuosr0090.png "/>


1.3.4 Switch root file system, repair MBR

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/87/D6/wKiom1fie7-xm6fUAAAkWhowBk0853.png "title=" Screenshot from 2016-09-21 20:22:58.png "alt=" Wkiom1fie7-xm6fuaaakwhowbk0853.png "/>


1.4 Repair Complete, adjust boot order to hard drive boot, restart view

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/87/D6/wKiom1fifGqAz25PAABCeUKrVWk346.png "title=" Screenshot from 2016-09-21 20:24:51.png "alt=" Wkiom1fifgqaz25paabceukrvwk346.png "/>

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/87/D6/wKiom1fifI_ziUAOAAALHHwuRS0866.png "title=" Screenshot from 2016-09-21 20:26:37.png "width=", "height="-"border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:750px; height:128px, "alt=" Wkiom1fifi_ziuaoaaalhhwurs0866.png "/>650" this.width=650; "src=" Http://s5.51cto.com/wyfs02 /m01/87/d2/wkiol1fiflejkoq7aablrpsgkbg496.png "title=" screenshot from 2016-09-21 20:27:14.png "width=" "height=" 397 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" WIDTH:600PX;HEIGHT:397PX; "alt=" wkiol1fiflejkoq7aablrpsgkbg496.png "/ >

Repair complete.


2.GRUB boot file is missing

Grub Boot file is/boot/grub2/grub.cfg  

[Email protected] ~]# file/boot/grub2/grub.cfg

/boot/grub2/grub.cfg:ascii text

2.1 Corrupted files

[Email protected] ~]# rm-rf/boot/grub2/grub.cfg

2.2 Phenomena

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/87/D2/wKioL1fifirxUXWKAAALtIOmsT0751.png "title=" Screenshot from 2016-09-21 20:33:20.png "alt=" Wkiol1fifirxuxwkaaaltiomst0751.png "/>

2.3 Fix

2.3.1 like repairing MBR, mount the disc, CD-ROM, and enter rescue mode.

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/87/D2/wKioL1fif8CAIWYkAAAlEmpsA5c747.png "title=" Screenshot from 2016-09-21 20:39:29.png "alt=" Wkiol1fif8caiwykaaalempsa5c747.png "/>

2.3.2 Re-start view

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/87/D2/wKioL1fifLejKoq7AAblRPSGkbg496.png "title=" Screenshot from 2016-09-21 20:27:14.png "width=" "height=" 397 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:600px; height:397px; "alt=" Wkiol1fiflejkoq7aablrpsgkbg496.png "/>

3 Boot password forgotten.

I've written about how to change the root password by forgetting the boot password. See links for details.

Linux forgot root password solution






This article from the "Technology life, Simple not simple" blog, please be sure to keep this source http://willis.blog.51cto.com/11907152/1855173

Linux system Recovery "one"

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.