MBR,全称为Master Boot Record,即硬盘的主引导记录。
首先使用fdisk -l 确定MBR位置。
备份MBR:
dd if=/dev/sda1 of=/root/mbr bs=512 count=1
恢复MBR:
dd if=/root/mbr of=/dev/sda1 bs=512 count=1
恢复分区表:
dd if=/root/mbr of=/dev/sda1 bs=512 skip=446 count=66
注:mbr大小512 所以bs=512 count=1
bs=512 skip=446 count=66 用来确定分区表在备份文件中的位置
备份MBR:
dd if=/dev/sda1 of=/root/mbr bs=512 count=1
恢复MBR:
dd if=/root/mbr of=/dev/sda1 bs=512 count=1
恢复分区表:
dd if=/root/mbr of=/dev/sda1 bs=512 skip=446 count=66
注:mbr大小512 所以bs=512 count=1
bs=512 skip=446 count=66 用来确定分区表在备份文件中的位置
转载请注明:21运维 » linux操作系统MBR详解说明