Lab Environment: RHEL7.0
Experimental content:
Startup file corruption
Kernel missing
Start Run Level Error
File causes system not to boot
1. startup file corruption
Linux startup file is/boot/initramfs-3.10.0-123.el7.x86_64.img
1.1 Corrupt Boot file
[Email protected] ~]# rm-rf/boot/initramfs-3.10.0-123.el7.x86_64.img
1.2 Phenomena
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/87/D2/wKioL1fig3PxGCTJAAAHHVjuEDQ708.png "title=" Screenshot from 2016-09-21 20:55:56.png "alt=" Wkiol1fig3pxgctjaaahhvjuedq708.png "/>
1.3 Fix
1.3.1 mount disc, 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 "width=" to "height=" 317 "border=" 0 "hspace=" 0 "vspace=" 0 "alt=" Wkiom1fieuir8coyaaeph4jra2a757.png "style=" padding:0px;margin:0px;vertical-align:top;border:none;width:400px; height:317px; "/>
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/87/D6/wKiom1fieUbBvWdSAAA_bmfLlqo453.png "title=" Screenshot from 2016-09-21 20:12:12.png "alt=" Wkiom1fieubbvwdsaaa_bmfllqo453.png "style=" padding:0px;margin:0px; Vertical-align:top;border:none;float:none; "/>
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 "alt=" Wkiol1fiekxtnqjyaaao3oliqym473.png "style=" padding:0px;margin:0px; Vertical-align:top;border:none;float:none; "/>
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 "alt=" Wkiom1fiektcp7rjaaawnqwf1ay258.png "style=" padding:0px;margin:0px; Vertical-align:top;border:none;float:none; "/>
1.3.3 Important return hit 3 and then go into the black box interface ready to repair startup files
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/87/D6/wKiom1fiekTC1MVWAAAehvVoJxc448.png "title=" Screenshot from 2016-09-21 20:15:30.png "width=" to "height=" 348 "border=" 0 "hspace=" 0 "vspace=" 0 "alt=" Wkiom1fiektc1mvwaaaehvvojxc448.png "style=" padding:0px;margin:0px;vertical-align:top;border:none;width:400px; height:348px; "/>
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 "alt=" Wkiol1fiekoqgpv8aaatnq44vci313.png "style=" padding:0px;margin:0px; Vertical-align:top;border:none;float:none; "/>
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 "alt=" Wkiom1fiekpa6vsxaaaids3fl3s451.png "style=" padding:0px;margin:0px; Vertical-align:top;border:none;float:none; "/>
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 "alt=" Wkiol1fiekpixhmtaaansuuosr0090.png "style=" padding:0px;margin:0px; Vertical-align:top;border:none;float:none; "/>
1.3.4 Switch root file system, repair startup file
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/87/D7/wKiom1fiir_DQWyUAAAZAh4j2pw196.png "title=" Screenshot from 2016-09-21 21:26:15.png "alt=" Wkiom1fiir_dqwyuaaazah4j2pw196.png "/>
1.3.5 re-start, the system has been repaired and completed
2. Kernel loss
kernel file is/boot/vmlinuz-3.10.0-123.el7.x86_64
2.1 Corrupt kernel files
[Email protected] ~]# rm-rf/boot/vmlinuz-3.10.0-123.el7.x86_64
2.2 Phenomena
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/87/D7/wKiom1fijCmDZ1KVAAAIOmh7L4s890.png "title=" Screenshot from 2016-09-21 21:33:15.png "alt=" Wkiom1fijcmdz1kvaaaiomh7l4s890.png "/>
2.3 Repairing kernel files
2.3.1 like repair startup files, mount the CD, CD-ROM, enter rescue mode, install the kernel.
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/87/D7/wKiom1fijiyjNpKQAAAgY7OnD-g188.png "title=" Screenshot from 2016-09-21 21:40:54.png "width=" to "height=" 196 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:700px; height:196px; "alt=" Wkiom1fijiyjnpkqaaagy7ond-g188.png "/>
2.3.2 Repair complete, re-start
3. Start a Run level error
3.1 Set level 6 for Start level reboot
[Email protected] ~]# Rm-rf/etc/systemd/system/default.target
[Email protected] ~]# ln-s/usr/lib/systemd/system/reboot.target/etc/systemd/system/default.target
3.2 Phenomena
The system is up and running.
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/87/D3/wKioL1filSHDHNXwAAFBTHQXJbs369.png "title=" Screenshot from 2016-09-21 22:11:17.png "alt=" Wkiol1filshdhnxwaafbthqxjbs369.png "/>
3.3 Fix
3.3.1 like repair startup file, Mount CD, CD boot, enter rescue mode, repair
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/87/D3/wKioL1filkfhg4tdAAAX_at7pe4076.png "title=" Screenshot from 2016-09-21 22:16:25.png "width=" to "height=" 162 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:700px; height:162px; "alt=" Wkiol1filkfhg4tdaaax_at7pe4076.png "/>
3.3.2 Re-start, repair complete
4. File system causes no boot
The file system file is/etc/fstab, and when the file is written incorrectly, the system does not mount the file system correctly, which will cause the system not to start properly
4.1 Destroying file System files
[Email protected] ~]# Vim/etc/fastab
/DEV/MAPPER/RHEL-ROOT/XFS Defaults 1 1
Uuid=91a2d7b9-ce2c-4370-8180-025a6c289c53/boot XFS Defaults 1 2
/dev/mapper/rhel-swap swap swap defaults 0 0
/MNT/HELLO/MNT # # #随便添加错误的文件内容
4.2 Startup phenomenon
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/87/D3/wKioL1fimDqj-rDfAAAQ_jHppsM236.png "title=" Screenshot from 2016-09-21 22:23:28.png "style=" Float:none; "alt=" Wkiol1fimdqj-rdfaaaq_jhppsm236.png "/>
4.3 Directly Enter the password login, modify the correct/etc/fstab file
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/87/D3/wKioL1fimDqiH_yiAAATMGpeka0121.png "title=" Screenshot from 2016-09-21 22:23:55.png "style=" Float:none; "alt=" Wkiol1fimdqih_yiaaatmgpeka0121.png "/>
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/87/D7/wKiom1fimDqQO4OhAAAYPtBIpwI224.png "style=" float: none; "Title=" screenshot from 2016-09-21 22:24:16.png "alt=" Wkiom1fimdqqo4ohaaayptbipwi224.png "/>
4.4 Restart, normal start
This article from the "Technology life, Simple not simple" blog, please be sure to keep this source http://willis.blog.51cto.com/11907152/1855196
Linux system Recovery "II"