Saturday, December 17, 2011

MBR structure

——————————————————————–
|位移值|大小 | 說明                                                                          |
+——+———————————————————–+
|  00  |Byte | BOOT ID – 若為可開機的分割區則為 80h ~ FFh, 否則為  |
|      |     | 00h。 80h = C, 81h = D, 82h = E … 以此類推        |
|      |     | 以 fdisk 來說,若第一顆硬碟的分割區設為 Active 則 ID |
|      |     | = 80h。 4 個分割表中, 只能有一個被設為可開機, 否則  |
|      |     | 將會發生錯誤。                                      |
+——+—–+—————————————————–+
|  01h |Byte | 此分割開始之磁頭編號                                |
+——+—–+—————————————————–+
|  02h |Byte | 此分割開始之磁區編號 (6 bits)                       |
|      |     | 最高的 2 個 bits(bit6-7), 為磁柱編號的 bit8-9       |
+——+—–+—————————————————–+
|  03h |Byte | 此分割開始之磁柱編號 (10 bits)                      |
|      |     | bit8-9 放在位移值 02h 的 bit 6-7                    |
+——+—–+—————————————————–+
|  04h |Byte | 作業系統識別碼                                      |
|      |     |   00 None                                           |
|      |     |   01 DOS FAT-12 bits                                |
|      |     |   02 XENIX root                                     |
|      |     |   03 XENIX usr                                      |
|      |     |   04 DOS FAT-16 bits < 32M                          |
|      |     |   05 Extended                                       |
|      |     |   06 DOS FAT-16 bits > 32M                          |
|      |     |   07 HPFS/NTFS                                      |
|      |     |   08 AIX                                            |
|      |     |   09 AIX bootable                                   |
|      |     |   0A OS/2 Boot Manager                              |
|      |     |   0B DOS FAT-32 bits (Int 13h extensions)           |
|      |     |   0C DOS FAT Cylinder > 1024 (Int 13h extensions)   |
|      |     |   0E DOS FAT System (Int 13h extensions)            |
|      |     |   0F DOS BigExtended (Int 13h extensions)           |
|      |     |   20 SPF Boot manager                               |
|      |     |   40 Venix 80286                                    |
|      |     |   41 PPC PReP Boot                                  |
|      |     |   51 Novell                                         |
|      |     |   52 Microport                                      |
|      |     |   63 GNU HURD                                       |
|      |     |   64 Novell Netware                                 |
|      |     |   65 Novell Netware                                 |
|      |     |   75 PC/IX                                          |
|      |     |   80 Old MINIX                                      |
|      |     |   81 Linux/MINIX                                    |
|      |     |   82 Linux swap                                     |
|      |     |   83 Linux native                                   |
|      |     |   85 Linux extended                                 |
|      |     |   93 Amoeba                                         |
|      |     |   94 Amoeba BBT                                     |
|      |     |   A5 FreeBSD                                        |
|      |     |   A6 Open BSD                                       |
|      |     |   A7 NETSTEP                                        |
|      |     |   A9 NetBSD                                         |
|      |     |   B7 BSDI fs                                        |
|      |     |   B8 BSDI swap                                      |
|      |     |   C7 Syrinx                                         |
|      |     |   DB CP/M                                           |
|      |     |   E1 DOS access                                     |
|      |     |   E3 DOS R/O                                        |
|      |     |   EB BeOS fs                                        |
|      |     |   F2 DOS secondary                                  |
|      |     |   FF BBT                                            |
+——+—–+—————————————————–+
|  05h |Byte | 此分割結束之磁頭編號                                |
+——+—–+—————————————————–+
|  06h |Byte | 此分割結束之磁區編號 (6 bits)                       |
|      |     | 最高的 2 個 bits(bit6-7), 為磁柱編號的 bit8-9       |
+——+—–+—————————————————–+
|  07h |Byte | 此分割結束之磁柱編號 (10 bits)                      |
|      |     | bit8-9 放在位移值 06h 的 bit 6-7                    |
+——+—–+—————————————————–+
|  08h |DWord| 此分割區前之磁區總數                                |
+——+—–+—————————————————–+
|  12h |DWord| 此分割之磁區總數                                    |
+——+—–+—————————————————–+

No comments: