现在的位置: 首页 > 综合 > 正文

Linux下如何备份和恢复分区表

2013年10月06日 ⁄ 综合 ⁄ 共 309字 ⁄ 字号 评论关闭

备份MBR分区
   0. 备份硬盘的分区信息:
     #fdisk /dev/sda -l > /tem/sda.txt
 
  1.使用fdisk -l 确定MBR位置
 
  2.备份MBR
 
  dd if=/dev/sda1 of=/root/mbr bs=512 count=1
 
  3.恢复MBR
 
  dd if=/root/mbr of=/dev/sda1 bs=512 count=1
 
  4.恢复分区表
 
  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 用来确定分区表在备份文件中的位置

【上篇】
【下篇】

抱歉!评论已关闭.