Back it up using this command:
foo@bar:~$ sudo dd if=/dev/hda of=MBR-backup bs=512 count=1
The dd command copies the sector from the first disk (/dev/hda-change this to your disk) and saves it as MBR-backup in the current directory.
When referring to boot sectors you may see it prefixed as MBR-this is short for master boot record. To restore the sector, run this command:
foo@bar:~$ sudo dd if=MBR-backup of=/dev/hda bs=512 count=1
When you boot your computer in rescue mode, you can use these command to manage your boot sector.
No comments:
Post a Comment