The file Fstab contains information about the storage device and its file system on the system. It determines the only file in which a hard disk (partition) is used or integrated into the entire system, so once the file is deleted it will cause the system to fail to boot.
We now delete the Fstab file simulation was mistakenly deleted for recovery
Demo Environment: VMware centos6.8
1, the simulation file is deleted
650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M00/87/23/wKioL1fVbU2Sf4HGAAAp64dacKQ234.png-wh_500x0-wm_3 -wmp_4-s_3484140653.png "title=" Figure 1.png "alt=" Wkiol1fvbu2sf4hgaaap64dackq234.png-wh_50 "/>
Failed to start!
650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M02/87/27/wKiom1fWAPPiCohBAABa63dj9y4296.png-wh_500x0-wm_3 -wmp_4-s_3983274648.png "title=" CentOS 64-bit -2016-09-12-09-11-38.png "alt=" wkiom1fwappicohbaaba63dj9y4296.png-wh_50 "/>
2, through the CD, U disk and other system disk into the rescue mode (rescue mode into the Step reference blog: http://snowbamboo1.blog.51cto.com/9291858/1851781)
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M01/87/27/wKiom1fWArzgwUguAAD2yLbIxYw093.png-wh_500x0-wm_3 -wmp_4-s_1181647728.png "title=" Wkiol1fvv7pqkzedaabgajbz2ma753.png-wh_500x0-wm_3-wmp_4-s_3377388524.png "alt=" Wkiom1fwarzgwuguaad2ylbixyw093.png-wh_50 "/>
3, because now do not know which partition is mounted/, which partition is mounted on/boot, so to a partition of a partition to go to mount.
By mounting know that my sda1 is the boot partition, SDA2 is/partition (this is the most stupid way to not label in the partition, only one to mount the test, so it is advisable to label the partition when partitioning.) )
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/87/24/wKioL1fWBM3Rw2BRAABL5rAyDaw600.png-wh_500x0-wm_3 -wmp_4-s_449837346.png "title=" CentOS 64-bit -2016-09-12-09-26-00.png "alt=" Wkiol1fwbm3rw2braabl5raydaw600.png-wh_50 " />
4, create the Fstab file, mount the SDA2 partition to/(view the partition file system before mounting)
Blkid viewing file system types
Fdisk-l Viewing partition information
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M00/87/25/wKioL1fWCLTAgAkYAAAMyDgfhYs732.png-wh_500x0-wm_3 -wmp_4-s_142358394.png "style=" Float:none; "title=" CentOS 64-bit -2016-09-12-09-44-01.png "alt=" Wkiol1fwcltagakyaaamydgfhys732.png-wh_50 "/>
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M02/87/25/wKioL1fWCLSD1M-rAAAIhgswb3U009.png-wh_500x0-wm_3 -wmp_4-s_2302450236.png "style=" Float:none; "title=" CentOS 64-bit -2016-09-12-09-44-14.png "alt=" Wkiol1fwclsd1m-raaaihgswb3u009.png-wh_50 "/>
5, mount other partitions to the directory
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M02/87/27/wKiom1fWCgKwOK4TAAATUw0xuZA380.png-wh_500x0-wm_3 -wmp_4-s_804879071.png "title=" CentOS 64-bit -2016-09-12-09-50-25.png "alt=" Wkiom1fwcgkwok4taaatuw0xuza380.png-wh_50 " />
6, restart View status
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M02/87/25/wKioL1fWC8_h6PgCAAKGRHdy9LQ713.png-wh_500x0-wm_3 -wmp_4-s_3911028028.png "title=" CentOS 64-bit -2016-09-12-09-52-48.png "alt=" wkiol1fwc8_h6pgcaakgrhdy9lq713.png-wh_50 "/>
Small suggestion: We recommend you to create the partition when the label, so it is convenient to know which partition mount which directory, perhaps one day to chop hands like today to the Fstab deleted.
This article is from the "Notes" blog, so be sure to keep this source http://snowbamboo1.blog.51cto.com/9291858/1851865
CentOS mistakenly deleted fstab File recovery