System Recovery for Linux

Source: Internet
Author: User

Overview of the system boot process
650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M02/9D/EB/wKiom1mIcWGj-YNyAAVcyvEhZiU774.png "title=" Screenshot from 2017-08-07 21-54-31.png "alt=" Wkiom1micwgj-ynyaavcyvehziu774.png "/>


1. System Startup process

Power

BIOS (in read-only storage on the motherboard, basic input or output system), hardware detection, activation of 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, restart
Go to rescue mode, perform chroot/mnt/sysimage switch to real/environment,
and execute Grub2-install/dev/vda

Primary boot partition MRB corrupt

View boot partition

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M02/9D/EB/wKioL1mIcr-SmXeiAAAWcTnTWrw956.png "style=" float : none; "title=" screenshot from 2017-08-07 14-06-54.png "alt=" Wkiol1micr-smxeiaaawctntwrw956.png "/>

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M01/9D/EB/wKioL1mIcr7AfGi2AAAERbt-2Tg568.png "style=" float : none; "title=" screenshot from 2017-08-07 14-02-00.png "alt=" Wkiol1micr7afgi2aaaerbt-2tg568.png "/>

Turn off SELinux

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M02/9D/EB/wKiom1mIcr_BlfAOAAAfuoV5FFQ150.png "style=" float : none; "title=" screenshot from 2017-08-07 14-02-14.png "alt=" Wkiom1micr_blfaoaaafuov5ffq150.png "/>

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M02/9D/EB/wKioL1mIcr_CWFoqAAACf4QUTKY429.png "style=" float : none; "title=" screenshot from 2017-08-07 14-02-33.png "alt=" Wkiol1micr_cwfoqaaacf4qutky429.png "/>

Select rescue Mode

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M02/9D/EB/wKioL1mIcrvRKTx7AAARFGVDdPA701.png "style=" float : none; "title=" screenshot from 2017-08-07 13-41-18.png "alt=" Wkiol1micrvrktx7aaarfgvddpa701.png "/>

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M00/9D/EB/wKiom1mIcruzKuEJAAAZL_tc0KQ177.png "style=" float : none; "title=" screenshot from 2017-08-07 13-41-43.png "alt=" Wkiom1micruzkuejaaazl_tc0kq177.png "/>

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M01/9D/EB/wKiom1mIcrvRsnuBAAAyREc8xsY144.png "style=" float : none; "title=" screenshot from 2017-08-07 13-42-25.png "alt=" Wkiom1micrvrsnubaaayrec8xsy144.png "/>

Go to the real directory and install the system boot GRUB2

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M00/9D/EB/wKioL1mIcryxzb6jAAAu2NbmfYA177.png "style=" float : none; "title=" screenshot from 2017-08-07 13-44-56.png "alt=" Wkiol1micryxzb6jaaau2nbmfya177.png "/>

Recall the hard drive after installation is complete

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M01/9D/EB/wKioL1mIcr2jcj47AADby9a7e9E755.png "style=" float : none; "title=" screenshot from 2017-08-07 13-45-20.png "alt=" Wkiol1micr2jcj47aadby9a7e9e755.png "/>

Repair complete, can start normally

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M02/9D/EB/wKiom1mIcr2zmZb_AAAJMIpITeA278.png "style=" float : none; "title=" screenshot from 2017-08-07 13-45-51.png "alt=" Wkiom1micr2zmzb_aaajmipitea278.png "/>



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 file Grub corruption

View/directory partition is Vda3

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M02/9D/EB/wKiom1mIdQmCzwB_AAAUw4Bmqo8031.png "style=" float : none; "title=" screenshot from 2017-08-07 15-02-56.png "alt=" Wkiom1midqmczwb_aaauw4bmqo8031.png "/>


To delete a boot file

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M00/9D/EB/wKioL1mIdQezi7o2AAAFyzdNQ9E470.png "style=" float : none; "title=" screenshot from 2017-08-07 14-54-13.png "alt=" Wkiol1midqezi7o2aaafyzdnq9e470.png "/>

Manually enter the boot file after booting

Set root= ' hd0,msdos1 ' root directory

linux16/vmlinuz-3.10.0-327.e17.x86_64 ro root=/dev/vdb3 Kernel file

INITRD16/INITRAMFS-3.10.0-327.E17.X86_64.IMG Boot-up service

Boot boot

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M02/9D/EB/wKioL1mIdQixjVqyAAAqww-EPC4386.png "style=" float : none; "title=" screenshot from 2017-08-07 14-57-13.png "alt=" Wkiol1midqixjvqyaaaqww-epc4386.png "/>

Repairing grub.cfg files with Grub2-mfconfig

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M01/9D/EB/wKiom1mIdQjAiA-LAAAtyd4JLBI634.png "style=" float : none; "title=" screenshot from 2017-08-07 14-59-36.png "alt=" Wkiom1midqjaia-laaatyd4jlbi634.png "/>

Check the/boot/grub2/grub.cfg boot file after entering the system has been restored repair

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M01/9D/EB/wKioL1mIdQmyb2OxAAAm9vZAJ7k263.png "style=" float : none; "title=" screenshot from 2017-08-07 15-00-44.png "alt=" Wkiol1midqmyb2oxaaam9vzaj7k263.png "/>




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

Remove kernel files from boot directory

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M00/9D/EB/wKioL1mIeb_jAt9CAAAeeX5oj74623.png "style=" float : none; "title=" screenshot from 2017-08-07 15-25-24.png "alt=" Wkiol1mieb_jat9caaaeex5oj74623.png "/>

Missing kernel file, unable to start

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M01/9D/EB/wKiom1mIeb_hs1MHAAAMp9DZUag770.png "style=" float : none; "title=" screenshot from 2017-08-07 15-27-11.png "alt=" Wkiom1mieb_hs1mhaaamp9dzuag770.png "/>

Loading the optical drive

650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M01/9D/EB/wKioL1mIecDhCTgBAAA6a4zqbcU472.png "style=" float : none; "title=" screenshot from 2017-08-07 15-27-27.png "alt=" Wkiol1miecdhctgbaaa6a4zqbcu472.png "/>

Enter rescue mode, enter the rescue system, the real system root directory for/mnt/sysimage

Decomposition of kernel packs within the installation disk

650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M02/9D/EB/wKiom1mIecHRKOLTAAAlHeeC04o517.png "style=" float : none; "title=" screenshot from 2017-08-07 15-34-15.png "alt=" Wkiom1miechrkoltaaalheec04o517.png "/>

Copy the decomposed kernel file to/mnt/sysimage/boot and exit after completion

650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M02/9D/EB/wKioL1mIecGTHaj6AAAPj1EDczg080.png "style=" float : none; "title=" screenshot from 2017-08-07 15-40-23.png "alt=" Wkiol1miecgthaj6aaapj1edczg080.png "/>

Kernel repair complete, enter system

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M00/9D/EB/wKiom1mIecKiy-JLAAAIX-NlV5o754.png "style=" float : none; "title=" screenshot from 2017-08-07 15-43-11.png "alt=" Wkiom1mieckiy-jlaaaix-nlv5o754.png "/>



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 with: mkinitrd initramfs-' uname-r '. img ' uname-r ' recovery

System initialization INITRD Image corruption

Delete initrd image file initramf-3.10.0-327.x86_64.img

650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M01/9D/EB/wKioL1mIe1eyDKdBAAA0Dq-z9oE482.png "style=" float : none; "title=" screenshot from 2017-08-07 16-09-13.png "alt=" Wkiol1mie1eydkdbaaa0dq-z9oe482.png "/>

Unable to enter system after reboot, missing initialize image file

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M00/9D/EB/wKiom1mIe1jzZQ5OAAAHw25U04Y735.png "style=" float : none; "title=" screenshot from 2017-08-07 16-10-01.png "alt=" Wkiom1mie1jzzq5oaaahw25u04y735.png "/>

Reboot the system and load the CDROM installation disk file

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M00/9D/EB/wKioL1mIe1nSLBA4AACXWPzz6eI788.png "style=" float : none; "title=" screenshot from 2017-08-07 16-10-18.png "alt=" Wkiol1mie1nslba4aacxwpzz6ei788.png "/>

Recovering Initramfs image files

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M01/9D/EB/wKiom1mIe1nizyJEAAAxr-hA4_I070.png "style=" float : none; "title=" screenshot from 2017-08-07 16-15-03.png "alt=" Wkiom1mie1nizyjeaaaxr-ha4_i070.png "/>

Hard Drive Boot

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M02/9D/EB/wKiom1mIe1qhC75AAACVTGSpQWs123.png "style=" float : none; "title=" screenshot from 2017-08-07 16-15-23.png "alt=" Wkiom1mie1qhc75aaacvtgspqws123.png "/>

Restore success, enter the system

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M01/9D/EB/wKioL1mIe1rg2_M8AAAIStu2A6o096.png "style=" float : none; "title=" screenshot from 2017-08-07 16-16-43.png "alt=" Wkiol1mie1rg2_m8aaaistu2a6o096.png "/>



System Recovery for 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.