linux-備份硬盤的分區信息:

備份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 用來確定分區表在備份文件中的位置

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章