磁盘主引导记录(MBR)详解
前言:xxc取名叫“详解”,不是说xxc要打多少字(xxc指法不好,多多谅解),在说了,把问题的要点提出来,也就够了。个人之见,只共参考。
一、? ? ? ? MBR 简介 Master Boot Record,位于磁盘的Cyclinder0,Head0,Sector1(Notice: Sector No. start from??ONE.),在NAND Flash / DOM上如果你有partition的话,也有相同的MBR。只是没有Cyclinder,Head组织结构。MBR结构图如下: Offset? ? ? ? length(B)? ? ? ? illustration _____________________________ 0x000? ? ? ? 446? ? ? ? ? ? ? ? ? ? ? ? 启动代码 (by the way,BR 与 MBR的主要不同就在与它没有启动代码,全0填充) 0x1be? ? ? ? 16? ? ? ? ? ? ? ? ? ? ? ? DPT Entry 1 0x1ce? ? ? ? 16? ? ? ? ? ? ? ? ? ? ? ? DPT Entry 2 0x1de? ? ? ? 16? ? ? ? ? ? ? ? ? ? ? ? DPT Entry 3 0x1ee? ? ? ? 16? ? ? ? ? ? ? ? ? ? ? ? DPT Entry 4 0x1fe? ? ? ? 2? ? ? ? ? ? ? ? ? ? ? ? 0x55AA 二、? ? ? ? DPT(Disk partition Table)结构 Offset? ? ? ? Length? ? ? ? ? ? ? ? illustration __________________________________________________________ 0x00? ? ? ? 1B? ? ? ? ? ? ? ? ? ? ? ? 0X00: not default partion,whereas 0x80 is ok. 0x01? ? ? ? 1B? ? ? ? ? ? ? ? ? ? ? ? Starting Head(SH) of this partition 0x02? ? ? ? 6bit? ? ? ? ? ? ? ? ? ? ? ? Starting Head(SH) of this partition 0x03? ? ? ? 10bit? ? ? ? ? ? ? ? Starting Cyclinder(SC) of this partition 0x04? ? ? ? 1B? ? ? ? ? ? ? ? ? ? ? ? System Type(ST) 即分区的FS type 0x05? ? ? ? 1B? ? ? ? ? ? ? ? ? ? ? ? End Head(EH) of this partition 0x06? ? ? ? 6bit? ? ? ? ? ? ? ? ? ? ? ? End Head(EH) of this partition 0x07? ? ? ? 10bit? ? ? ? ? ? ? ? End Cyclinder(EC) of this partition 0x08? ? ? ? 4B? ? ? ? ? ? ? ? ? ? ? ? Start Sector Address (SSA) 0x0C? ? ? ? 4B? ? ? ? ? ? ? ? ? ? ? ? Sector Number (SN) 分区表中有以下关系:(首先要说明两个参数: firstly,HPC (Head Per Cyclinder),secondly,SPLT (Sector Per logic Track),一般都为 255和63。 通过#fdisk –l 就可以看到这两个参数。) 四、? ? ? ? 以我自己的disk为例子说明 既然第3个是扩展分区,那一定有一个BR所定义的逻辑分区撒,且看 0281 df4a(实际为: 0xdf4a 0x81),及从这个sector开的地方,长度自然还是512哈。于是, 推荐另一个资料:http://blog.csdn.net/nydzdoking/article/details/3720972 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |