📄 fat16 structure information.htm
字号:
To read any more partitions, you go to the where it says the Extended
Partition starts, and read the first sector. It acts just like the
MBR. It'll have blank where the code is supposed to be, and in the
partition table it will have for it's first entry the next Partition in the
Drive, and if there are anymore, there will be another Extended partition,
just like before. However, all references to Sector Numbers are made
using the that new MBR point as the reference, making it a virtual
drive. Just incase this doesn't make much sense (and by the way I
explain things I can understand if it doesn't), let me show you how a drive
with three partitions is setup.</P>
<P>MBR of Whole Drive</P>
<P> Entry #1 - Points to Partition #1<BR>
Entry #2 - Points to the Entire Extended Partition</P>
<P>You would read the first sector of that Extended Partition, and see another
MBR Structure.</P>
<P>MBR of Extended Partition</P>
<P> Entry #1 - Points to Partition #2<BR>
Entry #2 - Points to Rest of Extended Partition after Partition #2</P>
<P>Now, all references to Sector Numbers (most specifically the entry at
Offset 08h) in those Entries wouldn't be referenced from the start of the
drive, but from the start of the Extended Partition. However, the CHS
(Cylinder, Head, Sector) numbers would still be right.</P>
<P>Once again, you would read the first sector of that Extended Partition, and
see the next MBR.</P>
<P>MBR of Rest of Extended Partition</P>
<P> Entry #1 - Points to Partition #3<BR>
No Entry #2, since this was the Last Partition</P>
<P>If there were another partition, the pattern would continue just like
before, until the last one was reached.</P></BLOCKQUOTE>
<P> </P>
<P><BR><U><STRONG>FAT16 Boot Record</STRONG></U></P>
<BLOCKQUOTE>
<P>This information is located in the first sector of every
partition.</P></BLOCKQUOTE>
<DIV align=left>
<TABLE height=192 width=518 border=1>
<TBODY>
<TR>
<TD width=60 height=19>Offset</TD>
<TD width=329 height=19>Description</TD>
<TD width=110 height=19>Size</TD></TR>
<TR>
<TD width=60 height=10>00h</TD>
<TD width=329 height=10>Jump Code + NOP</TD>
<TD width=110 height=10>3 Bytes</TD></TR>
<TR>
<TD width=60 height=25>03h</TD>
<TD width=329 height=25>OEM Name</TD>
<TD width=110 height=25>8 Bytes</TD></TR>
<TR>
<TD width=60 height=6>0Bh</TD>
<TD width=329 height=6>Bytes Per Sector</TD>
<TD width=110 height=6>1 Word</TD></TR>
<TR>
<TD width=60 height=7>0Dh</TD>
<TD width=329 height=7>Sectors Per Cluster</TD>
<TD width=110 height=7>1 Byte</TD></TR>
<TR>
<TD width=60 height=12>0Eh</TD>
<TD width=329 height=12>Reserved Sectors</TD>
<TD width=110 height=12>1 Word</TD></TR>
<TR>
<TD width=60 height=7>10h</TD>
<TD width=328 height=7>Number of Copies of FAT</TD>
<TD width=111 height=7>1 Byte</TD></TR>
<TR>
<TD width=60 height=4>11h</TD>
<TD width=328 height=4>Maximum Root Directory Entries</TD>
<TD width=111 height=4>1 Word</TD></TR>
<TR>
<TD width=60 height=5>13h</TD>
<TD width=328 height=5>Number of Sectors in Partition Smaller than 32MB</TD>
<TD width=111 height=5>1 Word</TD></TR>
<TR>
<TD width=60 height=8>15h</TD>
<TD width=328 height=8>Media Descriptor (F8h for Hard Disks)</TD>
<TD width=111 height=8>1 Byte</TD></TR>
<TR>
<TD width=60 height=4>16h</TD>
<TD width=328 height=4>Sectors Per FAT</TD>
<TD width=111 height=4>1 Word</TD></TR>
<TR>
<TD width=61 height=14>18h</TD>
<TD width=328 height=14>Sectors Per Track</TD>
<TD width=111 height=14>1 Word</TD></TR>
<TR>
<TD width=61 height=23>1Ah</TD>
<TD width=328 height=23>Number of Heads</TD>
<TD width=111 height=23>1 Word</TD></TR>
<TR>
<TD width=61 height=22>1Ch</TD>
<TD width=328 height=22>Number of Hidden Sectors in Partition</TD>
<TD width=111 height=22>1 Double Word</TD></TR>
<TR>
<TD width=61 height=22>20h</TD>
<TD width=328 height=22>Number of Sectors in Partition</TD>
<TD width=111 height=22>1 Double Word</TD></TR>
<TR>
<TD width=61 height=22>24h</TD>
<TD width=328 height=22>Logical Drive Number of Partition</TD>
<TD width=111 height=22>1 Word</TD></TR>
<TR>
<TD width=61 height=22>26h</TD>
<TD width=328 height=22>Extended Signature (29h)</TD>
<TD width=111 height=22>1 Byte</TD></TR>
<TR>
<TD width=61 height=22>27h</TD>
<TD width=328 height=22>Serial Number of Partition</TD>
<TD width=111 height=22>1 Double Word</TD></TR>
<TR>
<TD width=61 height=22>2Bh</TD>
<TD width=328 height=22>Volume Name of Partition</TD>
<TD width=111 height=22>11 Bytes</TD></TR>
<TR>
<TD width=61 height=22>36h</TD>
<TD width=328 height=22>FAT Name (FAT16)</TD>
<TD width=111 height=22>8 Bytes</TD></TR>
<TR>
<TD width=61 height=22>3Eh</TD>
<TD width=328 height=22>Executable Code</TD>
<TD width=111 height=22>448 Bytes</TD></TR>
<TR>
<TD width=61 height=22>1FEh</TD>
<TD width=328 height=22>Executable Marker (55h AAh)</TD>
<TD width=111 height=22>2 Bytes</TD></TR></TBODY></TABLE></DIV>
<P><BR><BR><U><STRONG>FAT16 Drive Layout</STRONG></U></P>
<DIV align=left>
<TABLE height=64 width=521 border=1>
<TBODY>
<TR>
<TD width=374 height=23>Offset</TD>
<TD width=111 height=23>Description</TD></TR>
<TR>
<TD width=374 height=10>Start of Partition</TD>
<TD width=111 height=10>Boot Sector</TD></TR>
<TR>
<TD width=374 height=14>Start + # of Reserved Sectors</TD>
<TD width=111 height=14>Fat Tables</TD></TR>
<TR>
<TD width=374 height=-1>Start + # of Reserved + (# of Sectors Per FAT *
2)</TD>
<TD width=111 height=-1>Root Directory Entry</TD></TR>
<TR>
<TD width=374 height=3>Start + # of Reserved + (# of Sectors Per FAT * 2)
+ ((Maximum Root Directory Entries * 32) / Bytes per Sector) </TD>
<TD width=111 height=3>Data Area (Starts with Cluster
#2)</TD></TR></TBODY></TABLE></DIV>
<P> </P>
<P><U><STRONG>Cluster Meaning (FAT Table Entries)</STRONG></U></P>
<BLOCKQUOTE>
<P>A Cluster is a Group of Sectors on the Hard Drive that have information in
them. A 16K Cluster has 32 Sectors in it (512*32=16384). Each
Cluster is given a spot in the FAT Table. When you look at an Entry in
the FAT, the number there tells you whether or not that cluster has data in
it, and if so, if it is the end of the data or there is another cluster after
it. All Data on a Partition starts with Cluster #2 (Right after Root
Directory). If the FAT Entry is 0, then there is no data in that
cluster. If the FAT Entry is FFFFh, then it is the last entry in the
chain. </P></BLOCKQUOTE>
<DIV align=left>
<TABLE height=78 width=430 border=1>
<TBODY>
<TR>
<TD width=247 height=19>FAT Code Range</TD>
<TD width=171 height=19>Meaning</TD></TR>
<TR>
<TD width=247 height=11>0000h</TD>
<TD width=171 height=11>Available Cluster</TD></TR>
<TR>
<TD width=247 height=10>0002h-FFEFh</TD>
<TD width=171 height=10>Used, Next Cluster in File</TD></TR>
<TR>
<TD width=247 height=7>FFF0h-FFF6h</TD>
<TD width=171 height=7>Reserved Cluster</TD></TR>
<TR>
<TD width=247 height=4>FFF7h</TD>
<TD width=171 height=4>BAD Cluster</TD></TR>
<TR>
<TD width=247 height=9>FFF8h-FFFF</TD>
<TD width=171 height=9>Used, Last Cluster in
File</TD></TR></TBODY></TABLE></DIV>
<P><U><STRONG>Directory Table</STRONG></U></P>
<BLOCKQUOTE>
<P>Another aspect when looking at a File System at Low Level is the Directory
Table. The Directory Table is what stores all of the File and Directory
Entries. Someone else has already written a good resource for this
information on the net, so go <A
href="http://www.teleport.com/~brainy/lfn.htm">here</A> to look at it.
The link doesn't work anymore, but luckily I saved the page a while back, so
i'll just post it on my site.</P></BLOCKQUOTE>
<P> </P>
<P>Footnotes</P>
<P>1 - LBA = Logical Block Addressing - Uses the Int 13h Extensions built into
newer BIOS's to access data above the 8GB
barrier, or to access strickly in LBA mode, instead of CHS (Cylinder, Head,
Sector).</P>
<P align=center><A href="http://www.teleport.com/~brainy">Home</A> <A
href="http://www.teleport.com/~brainy/rps.html">Reference Point Software</A> <A
href="http://www.teleport.com/~brainy/fat32.htm">FAT32 Structure Information</A>
FAT16 Structure Information <A
href="http://www.teleport.com/~brainy/diskaccess.htm">Disk Access
Information</A> <BR><A href="http://www.teleport.com/~brainy/bio.html">About
Me</A> <A href="http://www.teleport.com/~brainy/links.html">Links</A> <A
href="http://www.teleport.com/~brainy/dobiash.html">Dobiash?</A></P></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -