A, Recovery MBR boot sector
of a physical sector located MBR boot sector of a hard disk, also known as the primary boot sector of the sector, in addition to the portion of the data comprising a system boot program, also contains the entire hard disk partition table records. When the failure of the master boot sector, may result in the failure to enter the black state is such that the host does not turn on power. The following will lead everyone to learn how to recover when the MBR sector failure.
This step is typically the case where the troubleshooting are: MBR sector ahead of the backup → CD-ROM to boot into emergency mode → restored from a backup file.
The following will demonstrate the detailed process in detail MBR sector recovery.
1, the backup data to another disk MBR sector
1), and create a new disk partition.
2), on the new disk format and mount.
3) to copy the MBR sector data to the new disk.
2, simulated fault MBR sector
3, the boot image to restore the emergency mode mbr sector
mbr sector failure host can not restart normally, so when the host computer to restart the reading of the eye grassland Press esc to enter a mode, since we are using mirror instead of the guide so here we choose the third.
Here we have chosen the difficult problems of mbr problem solving.
Here we select the second pair of CentOS 7 for diagnosis.
The interface we choose a command into the emergency mode.
Found in the emergency command mode and we do not just mount points, so we re-mount the new disk here.
The backup copy data back into the mbr sector repair.
4, restart the server for authentication.
Two, grub menu resume
preparations: Analog fault grub menu
grub menu configuration file is deleted again after restarting the server will be shown below, which can not start properly.
After the server restart, after a few steps with the same MBR sector recovery operations until entering the emergency mode command.
1, the guide rescue mode, the mirroring system load
command: CHROOT / mnt / sysimage /
2, to re-establish the partition sda load
command: the install-grub2 / dev / sda
. 3, rebuild grub profile menu
command: grub2-mkconfig -o / boot /grub2/grub.cfg
4, after exiting the bash mode to restart the server to verify whether the normal boot
exit
reboot