Chinaunix首页 | 论坛 | 博客
  • 博客访问: 440363
  • 博文数量: 96
  • 博客积分: 4594
  • 博客等级: 上校
  • 技术积分: 1130
  • 用 户 组: 普通用户
  • 注册时间: 2009-07-30 19:56
文章分类
文章存档

2012年(8)

2011年(49)

2010年(18)

2009年(21)

分类: LINUX

2010-12-19 09:53:25

MBR,全称为Master Boot Record,即的主引导记录
硬盘的0柱面、0磁头、1扇区称为主引导扇区(也叫主引导记录MBR)。它由三个部分组成,主引导程序、DPT(Disk Partition table)和硬盘有效标志(55AA)。在总共512字节的里主引导程序(boot loader)占446个字节,第二部分是Partition table区(分区表),即DPT,占64个字节,硬盘中分区有多少以及每一分区的大小都记在其中。第三部分是magic
  

  

number,占2个字节,固定为55AA
 
 
 
首先使用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 用来确定分区表在备份文件中的位置
阅读(8469) | 评论(2) | 转发(1) |
1

上一篇:CE-清除僵尸进程

下一篇:squid详细配置

给主人留下些什么吧!~~

hitwh_Gypsy2015-05-02 17:18:45

恢复分区表:
dd if=/root/mbr of=/dev/sda1 bs=512 skip=446 count=66

这句有问题吧?个人觉得应该这样写:
dd if=/root/mbr of=/dev/sda1 bs=1 skip=446 count=66

chinaunix网友2010-12-19 14:47:40

很好的, 收藏了 推荐一个博客,提供很多免费软件编程电子书下载: http://free-ebooks.appspot.com