Linux operating system boot record backup and recovery method

  
                  

Backup Linux master boot record (MBR):

The root user enters the shell and executes:

dd if=/dev/hda of=/boot.bak bs=512 count= 1

Restore the saved MBR to boot.grub.

Write MBR

dd if=/boot.bak of=/dev/hda

Or use a tool such as: diskgen to write this file;

I think the content is unconfirmed, it is online excerpt:

mount the C drive to the Linux partition, copy the mbr file to the root directory of the c drive, find the boot file boot.ini, at the end Add C:\\boot.bak=ubuntu to the line. The file content is similar to:

[boot loader]
timeout=10
default=multi(0)disk(0)rdisk(0)partition(1)\\WINDOWS
[operating systems ]
multi(0)disk(0)rdisk(0)partition(1)\\WINDOWS="Microsoft Windows XP Professional" /fastdetect
C:\\boot.bak=ubuntu

Reboot After the linux system, open the shell, execute:

dd if=/mnt/hda1 of=/dev/hda

Revert back to the original GRUB bootloader.

Copyright © Windows knowledge All Rights Reserved