Linux system Recovery for operations Learning (trouble test 1~6)

Source: Internet
Author: User

System Recovery

1. System Startup process

Power

||

BIOS (in read-only storage on the motherboard, basic input or output system)

function, hardware detection, activation hardware

||

Grub System boot (grub boot divided into two stages)

1) Stage 1 MBR (Master boot record) master boot record 0 tracks on hard disk, one sector, 446 bytes

*) dd If=/dev/zero Of=/dev/vda bs=446 count=1 can empty MBR

*) go to save mode, perform chroot/mnt/sysimage switch to real/environment,

and execute Grub2-install/dev/vda

2) Phase 2 Grub File boot phase

Locate the/boot partition

Read/boot/grub2/grub.cfg

File lost, Grub2-mkconfig >/boot/grub2/grub.cfg

||

Boot kernel, read-only mount/device

Testing equipment

Initialize the device driver

Enter the system initialization phase

Kernel is missing, the new kernel installation package can be resolved

RPM-IVH kernel-xxxxx.rpm--force

||

System initialization phase

System initialization phase Load INITRD mirror

Open initialization Process Systemd

Start SELinux

Load Kernel parameters

Initialize the system clock, keyboard, host name

Re-read/write mount/device

Activating RAID,LVM

Activate quotas

Start all services in the multi-user.target.wants

Turn on the Virtual Console

Start graphics

initramfs-' Uname-r '. IMG Lost by:

MKINITRD initramfs-' uname-r '. img ' uname-r '

Recovery

Test 1

Installation of trouble software with 6 test questions included

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M01/9E/16/wKioL1mLCFaDc2lVAAEdOpwPPsU909.png "style=" float : none; "title=" screenshot from 2017-08-09 09-34-08.png "alt=" Wkiol1mlcfadc2lvaaedopwppsu909.png "/>

650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M02/9E/16/wKiom1mLCFeQrLTwAABhurD4_Zs431.png "style=" float : none; "title=" screenshot from 2017-08-09 09-34-40.png "alt=" Wkiom1mlcfeqrltwaabhurd4_zs431.png "/>

Login not successful, the decision is to change the root user password

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M02/9E/16/wKioL1mLCFjy2G1gAAANihQNoRk562.png "style=" float : none; "title=" screenshot from 2017-08-09 09-35-42.png "alt=" Wkiol1mlcfjy2g1gaaanihqnork562.png "/>

In the system boot interface press the up and down keys to stop entering the boot, press E to edit, delete Linux16 this line of the following RO characters, change the RO to RW, and then type rd.break,ctrl+x into the system boot entry after setting

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M02/9E/16/wKioL1mLCFijQB_qAAAriw7D6vQ491.png "style=" float : none; "title=" screenshot from 2017-08-09 09-37-01.png "alt=" Wkiol1mlcfijqb_qaaariw7d6vq491.png "/>

Switch directory to real system environment, change root user password, create file/.autorelabel, enter two exit exit

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M00/9E/16/wKiom1mLCFnTJLGbAAAWCGGDj-E156.png "style=" float : none; "title=" screenshot from 2017-08-09 09-39-43.png "alt=" Wkiom1mlcfntjlgbaaawcggdj-e156.png "/>

Repair Success!

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M00/9E/16/wKioL1mLCFmwq0_GAAAPj6_tNJE305.png "style=" float : none; "title=" screenshot from 2017-08-09 09-40-43.png "alt=" Wkiol1mlcfmwq0_gaaapj6_tnje305.png "/>

Test 2

650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M01/9E/16/wKiom1mLC33T6qGCAABYO8OIaK0901.png "style=" float : none; "title=" screenshot from 2017-08-09 09-47-30.png "alt=" Wkiom1mlc33t6qgcaabyo8oiak0901.png "/>

The System boot screen is not displayed after the command is executed, which determines that the grub boot file is corrupt

Manually enter the following boot content, boot boot

650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M01/9E/16/wKiom1mLC32C1Oq0AAAv5jn-5Ew543.png "style=" float : none; "title=" screenshot from 2017-08-09 09-47-01.png "alt=" Wkiom1mlc32c1oq0aaav5jn-5ew543.png "/>

After landing, repair grub.cfg files with Grub2-mkconfig

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M01/9E/16/wKioL1mLC36ihhg8AAA8vlfYPaw689.png "style=" float : none; "title=" screenshot from 2017-08-09 10-02-00.png "alt=" Wkiol1mlc36ihhg8aaa8vlfypaw689.png "/>

View Grub.cfg file, fixed

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M01/9E/16/wKioL1mLC37hQmnHAAAu8qRxhLk186.png "style=" float : none; "title=" screenshot from 2017-08-09 10-03-53.png "alt=" Wkiol1mlc37hqmnhaaau8qrxhlk186.png "/>

T EST 3

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M00/9E/17/wKioL1mLDw3gMwZSAABY3jAb4lw098.png "style=" float : none; "title=" screenshot from 2017-08-09 10-08-33.png "alt=" Wkiol1mldw3gmwzsaaby3jab4lw098.png "/>

Lost kernel file, switch to optical drive Repair mode

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M00/9E/17/wKioL1mLDxHDAsN7AABXgo0PfGs214.png "style=" float : none; "title=" screenshot from 2017-08-09 10-09-52.png "alt=" Wkiol1mldxhdasn7aabxgo0pfgs214.png "/>

Select 1 to enter, in the current directory (the actual system root directory is/mnt/sysimage) to decompose the kernel package in the installation disk

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M01/9E/17/wKiom1mLDxGRqGMqAAA0Gz9VxuY827.png "style=" float : none; "title=" screenshot from 2017-08-09 10-11-18.png "alt=" Wkiom1mldxgrqgmqaaa0gz9vxuy827.png "/>

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M01/9E/17/wKioL1mLDxHTQzofAAAFOYb6AWE216.png "style=" float : none; "title=" screenshot from 2017-08-09 10-13-25.png "alt=" Wkiol1mldxhtqzofaaafoyb6awe216.png "/>

Review the resulting kernel files, copy to/mnt/sysimage/boot/, exit

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M01/9E/17/wKiom1mLDxKSIRK8AAAPnTRf670510.png "style=" float : none; "title=" screenshot from 2017-08-09 10-14-45.png "alt=" Wkiom1mldxksirk8aaapntrf670510.png "/>

Landing Success!

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M02/9E/17/wKiom1mLDxLytmGDAAANtWsfmAQ943.png "style=" float : none; "title=" screenshot from 2017-08-09 10-17-01.png "alt=" Wkiom1mldxlytmgdaaantwsfmaq943.png "/>

Test 4

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M00/9E/17/wKiom1mLEzuS54d1AACAxizp9YQ854.png "style=" float : none; "title=" screenshot from 2017-08-09 10-18-53.png "alt=" Wkiom1mlezus54d1aacaxizp9yq854.png "/>

System initialization load INITRD image corruption, rescue mode recovery

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M00/9E/17/wKioL1mLEzvTBEKMAABQANbkMJ4025.png "style=" float : none; "title=" screenshot from 2017-08-09 10-23-40.png "alt=" Wkiol1mlezvtbekmaabqanbkmj4025.png "/>

Enter Rescue mode

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M02/9E/17/wKiom1mLEzzCHRTbAAAx40JpG6I175.png "style=" float : none; "title=" screenshot from 2017-08-09 10-25-14.png "alt=" Wkiom1mlezzchrtbaaax40jpg6i175.png "/>

Switch to Real home directory, command to restore INITRAMFS image file, exit

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M01/9E/17/wKiom1mLEzyBsGZVAAAViinD908633.png "style=" float : none; "title=" screenshot from 2017-08-09 10-34-48.png "alt=" Wkiom1mlezybsgzvaaaviind908633.png "/>

Repair Success!

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M02/9E/17/wKioL1mLEzyCuuRUAAANo5hubfs816.png "style=" float : none; "title=" screenshot from 2017-08-09 10-36-20.png "alt=" Wkiol1mlezycuuruaaano5hubfs816.png "/>

Test 5

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M02/9E/17/wKiom1mLFXLDHLyuAACDDXsZ4ZA932.png "style=" float : none; "title=" screenshot from 2017-08-09 10-37-26.png "alt=" Wkiom1mlfxldhlyuaacddxsz4za932.png "/>

Boot login root account flash back, Shell file corruption, edit boot file as follows

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M02/9E/17/wKioL1mLFXSSgUQ1AAAn0TbW3lA655.png "style=" float : none; "title=" screenshot from 2017-08-09 10-38-57.png "alt=" Wkiol1mlfxssguq1aaan0tbw3la655.png "/>

Unable to switch to the real root directory, copy the rescue mode/bin/bash to/sysroot/bin/bash

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M00/9E/18/wKiom1mLFXWR0TwZAAAeQYMqJXU030.png "style=" float : none; "title=" screenshot from 2017-08-09 10-41-51.png "alt=" Wkiom1mlfxwr0twzaaaeqymqjxu030.png "/>

Repair Success!

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M00/9E/17/wKioL1mLFXaj9mgOAAANGcktUTc563.png "style=" float : none; "title=" screenshot from 2017-08-09 10-52-58.png "alt=" Wkiol1mlfxaj9mgoaaangcktutc563.png "/>

Test 6

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M02/9E/18/wKiom1mLGEjSKhVGAABZurOhBuE827.png "style=" float : none; "title=" screenshot from 2017-08-09 11-08-59.png "alt=" Wkiom1mlgejskhvgaabzurohbue827.png "/>

The boot is about to enter the system when the flash back, boot operation level error

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M02/9E/17/wKioL1mLGE6hk1KTAAAUE1V_WC0233.png "style=" float : none; "title=" screenshot from 2017-08-09 11-09-24.png "alt=" Wkiol1mlge6hk1ktaaaue1v_wc0233.png "/>

linux16 this line of the RO back part of the removal, change ro for RW, and then add Rd.break

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M00/9E/18/wKiom1mLGE_xU-OKAAAoCtdCh1Q871.png "style=" float : none; "title=" screenshot from 2017-08-09 11-10-17.png "alt=" Wkiom1mlge_xu-okaaaoctdch1q871.png "/>

Switch to the real root directory

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M02/9E/17/wKioL1mLGAyh2h3CAAAZ1zH0n6w241.png "style=" float : none; "title=" Img_4969.png "alt=" Wkiol1mlgayh2h3caaaz1zh0n6w241.png "/>

View run-level soft links, point to shutdown, and re-do soft-link levels

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M01/9E/17/wKioL1mLGA6T1xS9AADtghp7JEA741.png "style=" float : none; "title=" Img_4968.png "alt=" Wkiol1mlga6t1xs9aadtghp7jea741.png "/>

Repair Success!
650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M00/9E/17/wKioL1mLFXaj9mgOAAANGcktUTc563.png "title=" Screenshot from 2017-08-09 10-52-58.png "style=" Float:none; "alt=" Wkiol1mlfxaj9mgoaaangcktutc563.png "/>














Linux system Recovery for operations Learning (trouble test 1~6)

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.