You will be able to use rescue mode to recover from grub at work. Rescue mode can also be used to restore the root password.
Use dd If=/dev/zero OF=/DEV/SDA count=1 bs=300 to destroy and restart the boot sector
650) this.width=650; "title=" 1.png "src=" Http://s3.51cto.com/wyfs02/M02/5B/72/wKioL1UJTTXidPxgAACcWucZ0UU855.jpg " alt= "Wkiol1ujttxidpxgaaccwucz0uu855.jpg"/>
Boot press F2 into BIOS setup Cd-dvd boot, depending on the machine to enter the BIOS is different. and into rescue mode.
650) this.width=650; "title=" 2.png "src=" Http://s3.51cto.com/wyfs02/M01/5B/78/wKiom1UJTcKg8BNLAANAfI4yOeo598.jpg " alt= "Wkiom1ujtckg8bnlaanafi4yoeo598.jpg"/>
Choose the language, here can not choose Chinese, will be garbled, other has not chosen
650) this.width=650; "title=" 3.png "style=" Float:none; "src=" http://s3.51cto.com/wyfs02/M01/5B/72/ Wkiol1ujtxzx6gjyaadk4bbbefe006.jpg "alt=" Wkiol1ujtxzx6gjyaadk4bbbefe006.jpg "/>
Select keyboard
650) this.width=650; "title=" 4.png "style=" Float:none; "src=" http://s3.51cto.com/wyfs02/M02/5B/78/ Wkiom1ujtfpjcc5haaczlqyarrq476.jpg "alt=" Wkiom1ujtfpjcc5haaczlqyarrq476.jpg "/>
Whether to set up the network, if required optional general select No
650) this.width=650; "title=" 5.png "src=" Http://s3.51cto.com/wyfs02/M00/5B/78/wKiom1UJTnOjJfLBAACCIg3Zf_g731.jpg " alt= "Wkiom1ujtnojjflbaaccig3zf_g731.jpg"/>
Select continue can also be read-only to mount the selected read-only
650) this.width=650; "title=" 7.png "style=" Float:none; "src=" http://s3.51cto.com/wyfs02/M02/5B/72/ Wkiol1ujuasbb4huaah87fhxznc793.jpg "alt=" Wkiol1ujuasbb4huaah87fhxznc793.jpg "/>
Here tell us/the location of the file
650) this.width=650; "title=" 8.png "style=" Float:none; "src=" http://s3.51cto.com/wyfs02/M02/5B/78/ Wkiom1ujtturkicuaabwe_3nuus085.jpg "alt=" Wkiom1ujtturkicuaabwe_3nuus085.jpg "/>
Select the first entry
650) this.width=650; "title=" 9.png "style=" Float:none; "src=" http://s3.51cto.com/wyfs02/M00/5B/72/ Wkiol1ujuawi00akaacvvyf1mu0710.jpg "alt=" Wkiol1ujuawi00akaacvvyf1mu0710.jpg "/>
Enter rescue mode input chroot/mnt/sysimage switch to the current root directory and execute the GRUB command. Enter root (hd0,0) If you are prompted for the error root (hd0,1) If there are multiple disk root (hd1,0) such a test. This step is to find the root of the disk there, enter setup (hd0) to load grub into the disk
650) this.width=650; "title=" 1.png "style=" Float:none; "src=" http://s3.51cto.com/wyfs02/M00/5B/78/ Wkiom1ujxc2snz8taagwjksdtrw241.jpg "alt=" Wkiom1ujxc2snz8taagwjksdtrw241.jpg "/>
Exit GRUB Exit Bash input reboot and restart
650) this.width=650; "title=" 2.png "style=" Float:none; "src=" http://s3.51cto.com/wyfs02/M01/5B/72/ Wkiol1ujxvbso6lzaab1nkltyhe397.jpg "alt=" Wkiol1ujxvbso6lzaab1nkltyhe397.jpg "/>
System has been restored
650) this.width=650; "title=" 3.png "style=" Float:none; "src=" http://s3.51cto.com/wyfs02/M01/5B/78/ Wkiom1ujxc2zmv6waabpqibkyeq025.jpg "alt=" Wkiom1ujxc2zmv6waabpqibkyeq025.jpg "/>
The second experiment: Deleting a/boot/grub/grub.conf
650) this.width=650; "title=" 4.png "style=" Float:none; "src=" http://s3.51cto.com/wyfs02/M02/5B/72/ Wkiol1ujxvaxdhjyaabgbkre0h0840.jpg "alt=" Wkiol1ujxvaxdhjyaabgbkre0h0840.jpg "/>
Reboot is as follows
650) this.width=650; "title=" 5.png "style=" Float:none; "src=" http://s3.51cto.com/wyfs02/M02/5B/78/ Wkiom1ujxc7ivyytaadymn2gljs088.jpg "alt=" Wkiom1ujxc7ivyytaadymn2gljs088.jpg "/>
Input root (hd0,0) if not the same as the previous experiment to find, and enter the kernel version number, as well as the location RHGB display progress bar, quiet does not show the details. Restart
650) this.width=650; "title=" 6.png "style=" Float:none; "src=" Http://s3.51cto.com/wyfs02/M00/5B/72/wKioL1UJXVfje_ M-aaee8-aoxza591.jpg "alt=" Wkiol1ujxvfje_m-aaee8-aoxza591.jpg "/>
After entering the system, I'm going to rebuild grub here because I just dropped grub.conf.
650) this.width=650; "title=" 7.png "style=" Float:none; "src=" Http://s3.51cto.com/wyfs02/M00/5B/78/wKiom1UJXC6RQs_ Xaadni55pqlg890.jpg "alt=" Wkiom1ujxc6rqs_xaadni55pqlg890.jpg "/>
Default=0 title from 0 to start the experiment in the wrong, why not error? This has to be checked.
Timeout=5 This, needless to say.
Root (hd0,0) kernel location
The version number of the kernel can be passed.! Ls/boot/v (can be complete) to find. The input parameters of the kernel can be come through. Blkid/dev/sda3 to find (Sda3 is where my original root partition is located, which differs depending on the root partition)
650) this.width=650; "title=" 8.png "style=" Float:none; "src=" http://s3.51cto.com/wyfs02/M01/5B/72/ Wkiol1ujxvic5nvtaactqtvoplu760.jpg "alt=" Wkiol1ujxvic5nvtaactqtvoplu760.jpg "/>
650) this.width=650; "title=" 9.png "style=" Float:none; "src=" http://s3.51cto.com/wyfs02/M01/5B/78/ Wkiom1ujxc-gtq0laackl4y73du290.jpg "alt=" Wkiom1ujxc-gtq0laackl4y73du290.jpg "/>
Pass.! ls/boot/i (full complement) look up
650) this.width=650; "title=" 10.png "style=" Float:none; "src=" http://s3.51cto.com/wyfs02/M02/5B/72/ Wkiol1ujxvjd86zuaacitrvkj8i188.jpg "alt=" Wkiol1ujxvjd86zuaacitrvkj8i188.jpg "/>
Save and restart
650) this.width=650; "title=" 11.png "style=" Float:none; "src=" http://s3.51cto.com/wyfs02/M02/5B/78/ Wkiom1ujxc-drxu9aabpzf-m1is137.jpg "alt=" Wkiom1ujxc-drxu9aabpzf-m1is137.jpg "/>
An error occurred, check the kernel version number and kernel image file you just entered to find the problem
650) this.width=650; "title=" 12.png "style=" Float:none; "src=" http://s3.51cto.com/wyfs02/M00/5B/72/ Wkiol1ujxvjd-dcaaabuoseiozy564.jpg "alt=" Wkiol1ujxvjd-dcaaabuoseiozy564.jpg "/>
By looking, the kernel device is found to have more/boot/dev/sda3 and the file behind the UUID has double quotes. The kernel image file finds that Q is more than/boot and the version number is different from the kernel file. Restart after correct
650) this.width=650; "title=" 15.png "style=" Float:none; "src=" http://s3.51cto.com/wyfs02/M01/5B/78/ Wkiom1ujxddhlbemaac0yktdnsa560.jpg "alt=" Wkiom1ujxddhlbemaac0yktdnsa560.jpg "/>
System is normal after reboot
650) this.width=650; "title=" 16.png "style=" Float:none; "src=" http://s3.51cto.com/wyfs02/M02/5B/72/ Wkiol1ujxvncram-aabotusbni4413.jpg "alt=" Wkiol1ujxvncram-aabotusbni4413.jpg "/>
Through these two experiments found that the boot sector damage and configuration file corruption repair is not the same, is not really such a waiter after further discovery
Linux Rescue mode Restore grub