Add a hard disk to the virtual machine to back up the information for the MBR
Fdisk-l See if the hard drive system knows
Fdisk/dev/sdb to Partition
Fdisk-l See if the partition is out
Mkfs-t EXT4/DEV/SBD1 for formatting
Mkdir/backup
Mount/dev/sb1/backup Mount to Backup
Do a backup before destroying the MBR, back up the system with:
DD IF=/DEV/SDA Of=/backup/sda.mbr.bak bs=512 count=1 back up the SDA front 512 bytes to the backup directory
Ls/backup to see if there are any files backed up
Simulating the destruction of MBR sectors
DD If=/dev/zero OF=/DEV/SDA bs=512 Count=1 destroys the first 512 bytes of the SDA device through a zero file. Because MDMDR exists on the first 512 bytes of this disk
Reboot start the system to see what will be found, can not enter the system.
into the repair mode, no Repair mode can be entered into the disc system. Then bring up the command prompt window. Fdisk-l See if there are any additional disks. Then perform the following command to restore the backup. Rebooting the system is normal.
Fix Grub Boot failure:
The following shows how grub was compromised and how the system started
vim/boot/grub/grub.conf edit this file
Reboot the system and do the operation at the grub prompt
Root (hd0,0) specifies which partition of the hard drive to boot the operating system from
kernel/vmlinuz-(tab) RO root=/dev/sda1 (primary file system) executes from which kernel to boot the system RO back mounted file system in what way to mount Root to represent the location of the root partition
initrd/initramfs-2.6.32
Boot
Linux Repair MBR sector failure