Linux Grbu system Repair

Source: Internet
Author: User

Repair of Linux Systems

First, the basic knowledge review

This content is based on a certain understanding of Linux boot-up process and system.

In the beginning of the Linux system repair, first talk about the WinDOS pe,windos PE This tool is provided to us to install WinDOS system and repair system use, when the WinDOS system problems, we can try to use F8 into Safe Mode repair system, if not successful, We use PE for repair. Linux also provides a tool for us to repair the system, but the Linux repair tool is the disc image, the CD-ROM installation system of the third option, rescue installed system, now with me to learn, how to solve the Linux system repair small problem it!

Second, the experiment

One, the grub information on the MBR is lost and corrupted

1, the simulation of the grub information on the MBR loss damage

DD If=/dev/zero OF=/DEV/SDA count=1 bs=400

2. Enter Disc Repair mode

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/43/CF/wKiom1PdAJXQAcbbAAE3VwCKa7k253.jpg "title=" 36020140802161526619.jpg "alt=" Wkiom1pdajxqacbbaae3vwcka7k253.jpg "/>

Select language

650) this.width=650; "Style=" background-image:none;padding-left:0px;padding-right:0px;border-top-width:0px; border-bottom-width:0px;border-left-width:0px;padding-top:0px; "title=" wps_clip_image-23130 "border=" 0 "alt=" wps_ clip_image-23130 "src=" Http://img1.51cto.com/attachment/201408/2/8400375_14069715392WA1.png "width=" 525 "height=" 290 "/>

Select network mode

650) this.width=650; "Style=" background-image:none;padding-left:0px;padding-right:0px;border-top-width:0px; border-bottom-width:0px;border-left-width:0px;padding-top:0px; "title=" wps_clip_image-27478 "border=" 0 "alt=" wps_ clip_image-27478 "src=" http://img1.51cto.com/attachment/201408/2/8400375_1406971542GyRq.png "width=" 524 "height=" 292 "/>

Configuring network cards to enable networking

650) this.width=650; "Style=" background-image:none;padding-left:0px;padding-right:0px;border-top-width:0px; border-bottom-width:0px;border-left-width:0px;padding-top:0px; "title=" wps_clip_image-10827 "border=" 0 "alt=" wps_ clip_image-10827 "src=" Http://img1.51cto.com/attachment/201408/2/8400375_14069715508gsI.png "width=" 523 "height=" 247 "/>

Prompt information

650) this.width=650; "Style=" background-image:none;padding-left:0px;padding-right:0px;border-top-width:0px; border-bottom-width:0px;border-left-width:0px;padding-top:0px; "title=" wps_clip_image-1110 "border=" 0 "alt=" wps_ clip_image-1110 "src=" Http://img1.51cto.com/attachment/201408/2/8400375_140697156420fd.png "width=" 522 "height=" 274 "/>

Focus on how this goes into this pattern.

650) this.width=650; "Style=" background-image:none;padding-left:0px;padding-right:0px;border-top-width:0px; border-bottom-width:0px;border-left-width:0px;padding-top:0px; "title=" wps_clip_image-12574 "border=" 0 "alt=" wps_ clip_image-12574 "src=" Http://img1.51cto.com/attachment/201408/2/8400375_1406971569Ob4W.png "width=" 517 "height=" 267 "/>

into the rescue mode to provide us with a small operating environment

650) this.width=650; "Style=" background-image:none;padding-left:0px;padding-right:0px;border-top-width:0px; border-bottom-width:0px;border-left-width:0px;padding-top:0px; "title=" wps_clip_image-16702 "border=" 0 "alt=" wps_ clip_image-16702 "src=" Http://img1.51cto.com/attachment/201408/2/8400375_1406971573Tj8K.png "width=" 517 "height=" 281 "/>

2. Start repairing grub information on MBR the first method of losing damage is the first step

650) this.width=650; "Style=" background-image:none;padding-left:0px;padding-right:0px;border-top-width:0px; border-bottom-width:0px;border-left-width:0px;padding-top:0px; "title=" wps_clip_image-14312 "border=" 0 "alt=" wps_ clip_image-14312 "src=" Http://img1.51cto.com/attachment/201408/2/8400375_1406971578Hsym.png "width=" 517 "height=" 252 "/>

Step Two

650) this.width=650; "Style=" background-image:none;padding-left:0px;padding-right:0px;border-top-width:0px; border-bottom-width:0px;border-left-width:0px;padding-top:0px; "title=" wps_clip_image-24448 "border=" 0 "alt=" wps_ clip_image-24448 "src=" http://img1.51cto.com/attachment/201408/2/8400375_14069715859RXA.png "width=" 516 "height=" 260 "/>

3. The second method of repairing grub information loss on MBR

650) this.width=650; "Style=" background-image:none;padding-left:0px;padding-right:0px;border-top-width:0px; border-bottom-width:0px;border-left-width:0px;padding-top:0px; "title=" wps_clip_image-995 "border=" 0 "alt=" wps_ clip_image-995 "src=" Http://img1.51cto.com/attachment/201408/2/8400375_1406971590cdmS.png "width=" 510 "height=" 214 "/>

4. Reboot to finish repairing grub information on the MBR is missing and damaged.

Second, the repair method of/boot/grbu damage

1, Analog/boot/grbu damage

Mv/boot/grub/tmp

2, enter the rescue mode to repair the first step

650) this.width=650; "Style=" background-image:none;padding-left:0px;padding-right:0px;border-top-width:0px; border-bottom-width:0px;border-left-width:0px;padding-top:0px; "title=" wps_clip_image-19303 "border=" 0 "alt=" wps_ clip_image-19303 "src=" Http://img1.51cto.com/attachment/201408/2/8400375_1406971598z6Hm.png "width=" 519 "height=" 294 "/>

3. Edit the configuration document/boot/grub/grub.conf

650) this.width=650; "Style=" background-image:none;padding-left:0px;padding-right:0px;border-top-width:0px; border-bottom-width:0px;border-left-width:0px;padding-top:0px; "title=" wps_clip_image-1092 "border=" 0 "alt=" wps_ clip_image-1092 "src=" Http://img1.51cto.com/attachment/201408/2/8400375_14069716051qzu.png "width=" 513 "height=" 201 "/>

Last configuration modified version of the document

650) this.width=650; "Style=" background-image:none;padding-left:0px;padding-right:0px;border-top-width:0px; border-bottom-width:0px;border-left-width:0px;padding-top:0px; "title=" wps_clip_image-25376 "border=" 0 "alt=" wps_ clip_image-25376 "src=" Http://img1.51cto.com/attachment/201408/2/8400375_1406971609Bzth.png "width=" 531 "height=" 178 "/>

4, restart Reboot/boot/grub damage will be repaired.

Third, reinstall/bin/bash/de repair method

1, Analog/bin/bash damage

Mv/bin/bash/tmp

2. Reboot into the rescue mode under bash environment Mount chroot/mnt/sysimage/

650) this.width=650; "Style=" background-image:none;padding-left:0px;padding-right:0px;border-top-width:0px; border-bottom-width:0px;border-left-width:0px;padding-top:0px; "title=" wps_clip_image-17190 "border=" 0 "alt=" wps_ clip_image-17190 "src=" Http://img1.51cto.com/attachment/201408/2/8400375_1406971616Lawx.png "width=" 556 "height=" 255 "/>

3. Mount successfully and mount a disc that matches the current system software package

650) this.width=650; "Style=" background-image:none;padding-left:0px;padding-right:0px;border-top-width:0px; border-bottom-width:0px;border-left-width:0px;padding-top:0px; "title=" wps_clip_image-8817 "border=" 0 "alt=" wps_ clip_image-8817 "src=" Http://img1.51cto.com/attachment/201408/2/8400375_1406971623ZK5I.png "width=" 563 "height=" 231 "/>

4. Install Bash Pack

650) this.width=650; "Style=" background-image:none;padding-left:0px;padding-right:0px;border-top-width:0px; border-bottom-width:0px;border-left-width:0px;padding-top:0px; "title=" wps_clip_image-26344 "border=" 0 "alt=" wps_ clip_image-26344 "src=" Http://img1.51cto.com/attachment/201408/2/8400375_1406971629j3NZ.png "width=" 558 "height=" 199 "/>

Iii. Summary

For the Linux system rescue, I just talk about the basic operation method, I think to do Linux operations this line, like these basic disk partitions, System rescue, RAID must be mastered, to be skilled, otherwise the real in production environment, basic services can not solve, Don't think about the high-level and operational issues.

Related Article

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.