Course list: http://www.c-jump.com/bcc/
| Byte Range | Description | Essential |
|---|---|---|
| 0-445 | Boot Code | No |
| 446-461 | Partition Table Entry #1 | Yes |
| 462-477 | Partition Table Entry #2 | Yes |
| 478-493 | Partition Table Entry #3 | Yes |
| 494-509 | Partition Table Entry #4 | Yes |
| 510-511 | Signature value (0xAA55) | Yes |
| Byte Range | Description | Essential |
|---|---|---|
| 0-0 | Bootable Flag | No |
| 1-3 | Starting CHS Address | Yes |
| 4-4 | Partition Type | Yes |
| 5-7 | Ending CHS Address | Yes |
| 8-11 | Starting LBA Address | Yes |
| 12-15 | Size in Sectors | Yes |
| Type | Description |
|---|---|
| 0x00 | Empty |
| 0x01 | FAT12, CHS |
| 0x04 | FAT16, 16-32 MB, CHS |
| 0x05 | Microsoft Extended, CHS |
| 0x06 | FAT16, 32 MB-2 GB, CHS |
| 0x07 | NTFS |
| 0x0b | FAT32, CHS |
| 0x0c | FAT32, LBA |
| 0x0e | FAT16, 32 MB-2 GB, LBA |
| 0x0f | Microsoft Extended, LBA |
| 0x11 | Hidden FAT12, CHS |
| 0x14 | Hidden FAT16, 16-32 MB, CHS |
| 0x16 | Hidden FAT16, 32 MB-2 GB, CHS |
| 0x1b | Hidden FAT32, CHS |
| 0x1c | Hidden FAT32, LBA |
| 0x1e | Hidden FAT16, 32 MB-2 GB, LBA |
| 0x42 | Microsoft MBR. Dynamic Disk |
| 0x82 | Solaris x86 |
| 0x82 | Linux Swap |
| 0x83 | Linux |
| 0x84 | Hibernation |
| 0x85 | Linux Extended |
| 0x86 | NTFS Volume Set |
| 0x87 | NTFS Volume Set |
| 0xa0 | Hibernation |
| 0xa1 | Hibernation |
| 0xa5 | FreeBSD |
| 0xa6 | OpenBSD |
| 0xa8 | Mac OSX |
| 0xa9 | NetBSD |
| 0xab | Mac OSX Boot |
| 0xb7 | BSDI |
| 0xb8 | BSDI swap |
| 0xee | EFI GPT Disk |
| 0xef | EFI System Partition |
| 0xfb | Vmware File System |
| 0xfc | Vmware swap |
| File System | Data Structs | Content | Metadata | File Name | Application |
|---|---|---|---|---|---|
| ExtX | Superblock, group descriptor | Blocks, block bitmap | Inodes, inode bitmap, extended attributes | Directory entries | Journal |
| FAT | Boot sector, FSINFO | Clusters, FAT | Directory entries, FAT | Directory entries | N/A |
| NTFS | $Boot, $Volume, $AttrDef | Clusters, $Bitmap | $MFT, $MFTMirr, $STANDARD_ INFORMATION, $DATA, $ATTRIBUTE_LIST, $SECURITY_DESCRIPTOR | $FILE_NAME, $IDX_ROOT, $IDX_ALLOCATION, $BITMAP | Disk Quota, Journal, Change Journal |
| UFS | Superblock, group descriptor | Blocks, fragments, block bitmap, fragment bitmap | Inodes, inode bitmap, extended attributes | Directory entries | N/A |
| Bytes | Purpose |
|---|---|
| 0-2 | Assembly code instructions to jump to boot code (mandatory in bootable partition) |
| 3-10 | OEM name in ASCII |
| 11-12 | Bytes per sector (512, 1024, 2048, or 4096) |
| 13 | Sectors per cluster (Must be a power of 2 and cluster size must be <=32 KB) |
| 14-15 | Size of reserved area, in sectors |
| 16 | Number of FATs (usually 2) |
| 17-18 | Maximum number of files in the root directory (FAT12/16; 0 for FAT32) |
| 19-20 | Number of sectors in the file system; if 2 B is not large enough, set to 0 and use 4 B value in bytes 32-35 below |
| 21 | Media type (0xf0=removable disk, 0xf8=fixed disk) |
| 22-23 | Size of each FAT, in sectors, for FAT12/16; 0 for FAT32 |
| 24-25 | Sectors per track in storage device |
| 26-27 | Number of heads in storage device |
| 28-31 | Number of sectors before the start partition |
| 32-35 | Number of sectors in the file system; this field will be 0 if the 2B field above (bytes 19-20) is non-zero |
| Bytes | Purpose |
|---|---|
| 0-35 | (See previous table) |
| 36 | BIOS INT 13h (low level disk services) drive number |
| 37 | Not used |
| 38 | Extended boot signature to validate next three fields (0x29) |
| 39-42 | Volume serial number |
| 43-53 | Volume label, in ASCII |
| 54-61 | File system type level, in ASCII. (Generally "FAT", "FAT12", or "FAT16") |
| 62-509 | Not used |
| 510-511 | Signature value (0xaa55) |
| Byte Range | Description | Essential |
|---|---|---|
| 0-35 | See above. | Yes |
| 36-39 | 32-bit size in sectors of one FAT. | Yes |
| 40-41 | Defines how multiple FAT structures are written to. If bit 7 is 1, only one of the FAT structures is active and its index is described in bits 0-3. Otherwise, all FAT structures are mirrors of each other. | Yes |
| 42-43 | The major and minor version number. | Yes |
| 44-47 | Cluster where root directory can be found. | Yes |
| 48-49 | Sector where FSINFO structure can be found. | No |
| 50-51 | Sector where backup copy of boot sector is located (default is 6). | No |
| 52-63 | Reserved. | No |
| 64-64 | BIOS INT13h drive number. | No |
| 65-65 | Not used. | No |
| 66-66 | Extended boot signature to identify if the next three values are valid. The signature is 0x29. | No |
| 67-70 | Volume serial number, which some versions of Windows will calculate based on the creation date and time. | No |
| 71-81 | Volume label in ASCII. The user chooses this value when creating the file system. | No |
| 82-89 | File system type label in ASCII. Standard values include "FAT32," but nothing is required. | No |
| 90-509 | Not used. | No |
| 510-511 | Signature value (0xAA55). | No |
00-02: eb 3c 90 Instructions to jump to boot code
03-0a: 4d 53 44 4f 53 35 2e 30...
...Name string (e, g. MSDOS5.0)
0b-0c: 00 02 Bytes/sector (0x0200 = 512)
0d : 01 Sectors/cluster (1)
0e-0f: 01 00 Size of reserved area (1 sector)
10 : 02 Number of FATs (2)
11-12: e0 00 Max. number of root directory entries (0x00e0 = 224)
13-14: 40 0b Total number of sectors (0x0b40 = 2,880)
15 : f0 Media type (removable)
16-17: 09 00 FAT size (0x0009 = 9 sectors)
18-19: 12 00 Sectors/track (0x0012 = 18)
1a-1b: 02 00 Number of heads (0x0002 = 2)
1c-1f: 00 00 00 00 Number of sector before partition (0)
20-23: 00 00 00 00 Total number of sectors (0 because 2B value not equal 0)
24 : 00 Drive number (0)
25 : 00 Unused
26 : 29 Extended boot signature
27-2a: cf cd b1 c4 Volume serial number (C4B1-CDCF)
2b-35: 4e 4f 20 4e 41 4d 45 20 20 20 20
Volume label ("NO NAME ")
36-3d: 46 41 54 31 32 20 20 20
File system type label ("FAT12 ")
3e-1fd : [snip] Not used
1fe-1ff: 55 aa Signature value (0xaa55)
| Byte Range | Description | Essential |
|---|---|---|
| 0-0 | First character of file name in ASCII and allocation status (0xe5 or 0x00 if unallocated) | Yes |
| 1-10 | Characters 2 to 11 of file name in ASCII | Yes |
| 11-11 | File Attributes (see below) | Yes |
| 12-12 | Reserved | No |
| 13-13 | Created time (tenths of second) | No |
| 14-15 | Created time (hours, minutes, seconds) | No |
| 16-17 | Created day | No |
| 18-19 | Accessed day | No |
| 20-21 | High 2 bytes of first cluster address (0 for FAT12 and FAT16) | Yes |
| 22-23 | Written time (hours, minutes, seconds) | No |
| 24-25 | Written day | No |
| 26-27 | Low 2 bytes of first cluster address | Yes |
| 28-31 | Size of file (0 for directories) | Yes |
| Flag Value (in bits) | Description | Essential |
|---|---|---|
| 0000 0001 (0x01) | Read only | No |
| 0000 0010 (0x02) | Hidden file | No |
| 0000 0100 (0x04) | System file | No |
| 0000 1000 (0x08) | Volume label | Yes |
| 0000 1111 (0x0f) | Long file name | Yes |
| 0001 0000 (0x10) | Directory | Yes |
| 0010 0000 (0x20) | Archive | No |
| Byte Range | Description | Essential |
|---|---|---|
| 0-0 | Sequence number (ORed with 0x40) and allocation status (0xe5 if unallocated) | Yes |
| 1-10 | File name characters 1-5 (Unicode) | Yes |
| 11-11 | File attributes (0x0f) | Yes |
| 12-12 | Reserved | No |
| 13-13 | Checksum | Yes |
| 14-25 | File name characters 6-11 (Unicode) | Yes |
| 26-27 | Reserved | No |
| 28-31 | File name characters 12-13 (Unicode) | Yes |
The standard directory entry can support names with only 8 characters in the name and 3 characters in the extension.
Longer names or names that use special characters require long file name (LFN) directory entries.
LFN entries will precede the normal entry.
|
|
| 00 - NULL | 10 - DLE | 20 - SPC | 30 - 0 | 40 - @ | 50 - P | 60 - ` | 70 - p |
| 01 - SOH | 11 - DC1 | 21 - ! | 31 - 1 | 41 - A | 51 - Q | 61 - a | 71 - q |
| 02 - STX | 12 - DC2 | 22 - " | 32 - 2 | 42 - B | 52 - R | 62 - b | 72 - r |
| 03 - ETX | 13 - DC3 | 23 - # | 33 - 3 | 43 - C | 53 - S | 63 - c | 73 - s |
| 04 - EOT | 14 - DC4 | 24 - $ | 34 - 4 | 44 - D | 54 - T | 64 - d | 74 - t |
| 05 - ENQ | 15 - NAK | 25 - % | 35 - 5 | 45 - E | 55 - U | 65 - e | 75 - u |
| 06 - ACK | 16 - SYN | 26 - & | 36 - 6 | 46 - F | 56 - V | 66 - f | 76 - v |
| 07 - BEL | 17 - ETB | 27 - ' | 37 - 7 | 47 - G | 57 - W | 67 - g | 77 - w |
| 08 - BS | 18 - CAN | 28 - ( | 38 - 8 | 48 - H | 58 - X | 68 - h | 78 - x |
| 09 - TAB | 19 - EM | 29 - ) | 39 - 9 | 49 - I | 59 - Y | 69 - i | 79 - y |
| 0A - LF | 1A - SUB | 2A - * | 3A - ; | 4A - J | 5A - Z | 6A - j | 7A - z |
| 0B - BT | 1B - ESC | 2B - + | 3B - ; | 4B - K | 5B - [ | 6B - k | 7B - { |
| 0C - FF | 1C - FS | 2C - , | 3C - < | 4C - L | 5C - \ | 6C - l | 7C - | |
| 0D - CR | 1D - GS | 2D - - | 3D - = | 4D - M | 5D - ] | 6D - m | 7D - } |
| 0E - SO | 1E - RS | 2E - . | 3E - > | 4E - N | 5E - ^ | 6E - n | 7E - ~ |
| 0F - SI | 1F - US | 2F - / | 3F - ? | 4F - O | 5F - _ | 6F - o | 7F - |