dd if=/dev/hda of=disk.mbr count=1 bs=512
It copies 1 chunk of 512 bytes which is the amount of info that the MBR of the disk takes.
and for restoring the MBR:
dd if=disk.mbr of=/dev/hda
It overwrites the first 512 bytes of your /dev/hda drive.
Just another command that I use to do afterwards for saving the partitions:
sfdisk -d /dev/hda > disk.sf
It dumps the partitions of the /dev/hda disk to a text file, which you’ll be able to recover easily.
sfdisk /dev/hda < disk.sf
It copies 1 chunk of 512 bytes which is the amount of info that the MBR of the disk takes.
and for restoring the MBR:
dd if=disk.mbr of=/dev/hda
It overwrites the first 512 bytes of your /dev/hda drive.
Just another command that I use to do afterwards for saving the partitions:
sfdisk -d /dev/hda > disk.sf
It dumps the partitions of the /dev/hda disk to a text file, which you’ll be able to recover easily.
sfdisk /dev/hda < disk.sf
1907

被折叠的 条评论
为什么被折叠?



