grub bootloader damage under repair

grub bootloader damage: the first 446 bytes of the device, i.e. the boot program is corrupted, one sector is 512 bytes, first 446 bytes of the boot program

The sync data in memory to the hard disk synchronization data is not written to disk cotton

Specific operation is as follows

Analog damage

dd if = / dev / zero of = / dev / sda bs = 200 count = 1 // bs represents a flow rate control, count represents the number of transmission times, dd command cover

reboot reboot //

The following operation after restarting

Mode into the shell -4.2 #

Perform the following steps

chroot / mnt / sysimage / switch to bash-4.2 #

Further backup using the following conditions: Method a

dd if=/backup/sda.mbr.bak of=/dev/sda bs=446 count=1

exit

reboot

Method two: no backup situation, the reconstruction sector

grub2-install /dev/sda

sync

exit

exit

reboot

 

Guess you like

Origin www.cnblogs.com/elin989898/p/11315960.html