EaseUS

- Download Center|
- Partners|
- Support|
- Live Chat|
  LiveChat

  Need help? We're here for you.

  Technical Support
    For paid users only. Professional support on all technique problems.
  Pre-Sales Inquiry
    Inquiry,quote,sales order,license code, invoice and download link,etc.
- My Account|
- United States

> How to > Resource > FAT32 Structure Information - MBR, FAT32 Boot Sector Introduction

# FAT32 Structure Information - MBR, FAT32 Boot Sector Introduction

2016-08-05 13:37:16 Posted by Tracy King to Resource

- 0
  Share
- 0
  Tweet
- 0
  Share
- 0
  Pin
- 0
  Share
- 0
  Mail
- 0
  Share

Summary:
  This article introduces detail information about FAT32 file system structure, FAT32 MBR or FAT32 Boot sector etc. If you lost data on FAT32 drive or partition, just free download the best data recovery software here to restore data from FAT32 drive/partition right now.

### What is Master Boot Record?

The Master Boot Record is the same for pretty much all Operating Systems. It is located on the first Sector of the Hard Drive, at Cylinder 0, Head 0, Sector 1. It is the first piece of code that your computer runs after it has checked all of your hardware (POST) and turned control of loading software over the hard drive. It also contains the partition table, which defines the different sections of your hard drive. Basically if anything happens to this little 512 byte section, your hard drive is brain dead.

Offset | Description | Size
000h | Executable Code (Boots Computer) | 446 Bytes
1BEh | 1st Partition Entry (See NextTable) | 16 Bytes
1CEh | 2nd Partition Entry | 16 Bytes
1DEh | 3rd Partition Entry | 16 Bytes
1EEh | 4th Partition Entry | 16 Bytes
1FEh | Boot Record Signature (55hAAh) | 2 Bytes

- Partition Entry (Part of MBR)

Offset | Description | Size
00h | Current State of Partition(00h=Inactive, 80h=Active) | 1 Byte
01h | Beginning of Partition - Head | 1 Byte
02h | Beginning of Partition - Cylinder/Sector (See Below) | 1 Word
04h | Type of Partition (See List Below) | 1 Byte
05h | End of Partition - Head | 1 Byte
06h | End of Partition - Cylinder/Sector | 1 Word
08h | Number of Sectors Betweenthe MBR and the First Sector in the Partition | 1 Double Word
0Ch | Number of Sectors in thePartition | 1 Double Word

- Cylinder/Sector Encoding

I guess back in the days of 10MB hard drives and 8086's, code was at a premium. So they did everything they could to preserve space. Unfortunately now we have to live with it, but luckily they created new ways of translating the system so the 1024 Cylinder Limit (2^10) isn't too big of a problem, for newer computers, at least. Older ones usually need some sort of Disk Overlay program to make them see the whole hard drive.

Anyway, to get the Sector out of this, you need to apply an AND mask ($3F) to it. To get the Cylinder, you take the high byte and OR it with the low byte that has been AND masked with ($C0) and then Shifted Left Two. It's not very easy to explain, so I'll just show you how I did it with two routines I made (In Pascal) for Encoding and Decoding the Cylinder/Sector. Hopefully even if you don't know Pascal you'll be able to read it.

Function CylSecEncode(Cylinder, Sector: Word): Word;
Begin
CylSecEncode: = (Lo(Cylinder) shl 8) or (Hi(Cylinder) shl 6) or Sector;
End;

Procedure CylSecDecode(Var Cylinder, Sector: Word; CylSec : Word);
Begin
Cylinder: = Hi(CylSec) or ((Lo(CylSec) and $C0) shl 2);
Sector: = (CylSec and $3F);
End;

15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
Cylinder Bits 7to 0 | Cylinder Bits 9+8 | Sector Bits 5 to0

Partition Type Listing

There are more than just these shown, but I've only included that ones relevant to MS Operating Systems.

Value | Description
00h | Unknown or Nothing
01h | 12-bit FAT
04h | 16-bit FAT (Partition Smallerthan 32MB)
05h | Extended MS-DOS Partition
06h | 16-bit FAT (Partition Largerthan 32MB)
0Bh | 32-bit FAT (Partition Up to2048GB)
0Ch | Same as 0BH, but uses LBA1 13h Extensions
0Eh | Same as 06H, but uses LBA1 13h Extensions
0Fh | Same as 05H, but uses LBA1 13h Extensions

Reading Multiple Partitions

Although having multiple partitions in FAT32 isn't as likely as in FAT16, it still works the same way. The first partition is the Primary Partition, and everything else is stored in the Extended Partition. It's a little tricky when it comes to reading those extra partitions though (not a lot, just a little). The first record in the partition table shows where the Primary partition is (how big it is, where it starts, and where it ends). The second entry in the partition table shows where the Entire Extended Partition is (which may include more than just one partition). 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.

MBR of Whole Drive

Entry #1 - Points to Partition #1
Entry #2 - Points to the Entire Extended Partition

You would read the first sector of that Extended Partition, and see another MBR Structure.

MBR of Extended Partition

Entry #1 - Points to Partition #2
Entry #2 - Points to Rest of Extended Partition after Partition #2

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.

Once again, you would read the first sector of that Extended Partition, and see the next MBR.

MBR of Rest of Extended Partition

Entry #1 - Points to Partition #3
No Entry #2, since this was the Last Partition

If there were another partition, the pattern would continue just like before, until the last one was reached.

### FAT32 Boot Record Information

This information is located in the first sector of every partition.

Offset | Description | Size
00h | Jump Code + NOP | 3 Bytes
03h | OEM Name (Probably MSWIN4.1) | 8 Bytes
0Bh | Bytes Per Sector | 1 Word
0Dh | Sectors Per Cluster | 1 Byte
0Eh | Reserved Sectors | 1 Word
10h | Number of Copies of FAT | 1 Byte
11h | Maximum Root DirectoryEntries (N/A for FAT32) | 1 Word
13h | Number of Sectors inPartition Smaller than 32MB (N/A for FAT32) | 1 Word
15h | Media Descriptor (F8h forHard Disks) | 1 Byte
16h | Sectors Per FAT in Older FATSystems (N/A for FAT32) | 1 Word
18h | Sectors Per Track | 1 Word
1Ah | Number of Heads | 1 Word
1Ch | Number of Hidden Sectors inPartition | 1 Double Word
20h | Number of Sectors inPartition | 1 Double Word
24h | Number of Sectors Per FAT | 1 Double Word
28h | Flags (Bits 0-4 IndicateActive FAT Copy) (Bit 7 Indicates whether FAT Mirroringis Enabled or Disabled ) (If FATMirroring is Disabled, the FAT Information is onlywritten to the copy indicated by bits 0-4) | 1 Word
2Ah | Version of FAT32 Drive (HighByte = Major Version, Low Byte = Minor Version) | 1 Word
2Ch | Cluster Number of the Startof the Root Directory | 1 Double Word
30h | Sector Number of the FileSystem Information Sector (See Structure Below)(Referenced from the Start of the Partition) | 1 Word
32h | Sector Number of the BackupBoot Sector (Referenced from the Start of the Partition) | 1 Word
34h | Reserved | 12 Bytes
40h | Logical Drive Number ofPartition | 1 Byte
41h | Unused (Could be High Byteof Previous Entry) | 1 Byte
42h | Extended Signature (29h) | 1 Byte
43h | Serial Number of Partition | 1 Double Word
47h | Volume Name of Partition | 11 Bytes
52h | FAT Name (FAT32) | 8 Bytes
5Ah | Executable Code | 420 Bytes
1FEh | Boot Record Signature (55hAAh) | 2 Bytes

### File System Information Sector instruction

Usually, this exists a Second Sector of the partition, although since there is a reference in the Boot Sector to it. I'm assuming it can be moved around. I never got a complete picture of this one. Although I do know where the important fields are at.

Offset | Description | Size
00h | First Signature (52h 52h 61h41h) | 1 Double Word
04h | Unknown, Currently (Mightjust be Null) | 480 Bytes
1E4h | Signature of FSInfo Sector(72h 72h 41h 61h) | 1 Double Word
1E8h | Number of Free Clusters (Setto -1 if Unknown) | 1 Double Word
1ECh | Cluster Number of Clusterthat was Most Recently Allocated. | 1 Double Word
1F0h | Reserved | 12 Bytes
1FCh | Unknown or Null | 2 Bytes
1FEh | Boot Record Signature (55hAAh) | 2 Bytes

FAT32 Drive Layout

Offset | Description
Start of Partition | Boot Sector
Start + # of ReservedSectors | Fat Tables
Start + # of Reserved + (#of Sectors Per FAT * 2) | Data Area (Starts withCluster #2)

Cluster Meaning

A Cluster is a Group of Sectors on the Hard Drive that have information in them. A 4K Cluster has 8 Sectors in it (512*8=4096). 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. If the FAT Entry is 0, then there is no data in that cluster. If the FAT Entry is 0FFFFFFFh, then it is the last entry in the chain.

This is one of my biggest holes in my information. I am unable to find anyplace that shows what numbers mean what when it comes to the FAT table. I was able to tell the end of the chain just by looking at an FAT32 Drive, but I don't know what stands for a BAD Cluster or what the maximum valid number for showing data is.

For now, you can calculate the maximum valid cluster in a partition with this formula:

( (# of Sectors in Partition) - (# of Sectors per Fat * 2) - (# of Reserved Sectors) ) / (# of Sectors per Cluster)

If there is any remainder in the answer to that formula, it just means that there were a few extra clusters at the end of the partition (probably not enough to make another cluster), so you can just get rid of anything after the decimal point.

Directory Table

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. Basically, there is only one difference between the Directory Table of FAT16 and FAT32. The Difference is: the Reserved OS/2 Byte (Offset 20 [14h]) in the Short Filename Structure is replaced with the High Word of the Cluster Number (since it's now 4 bytes instead of 2).

File Allocation Table

Footnotes

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)

### Extra tip: restore lost data from FAT32 hard drive with EaseUS hard drive recovery software

If you accidentally deleted, removed or formatted data on an FAT32 hard drive, USB or other storage devices, don't be panic. Your best choice is to let professional hard drive data recovery software for help! Here we'd like to recommend you try EaseUS Data Recovery Wizard which allows you to effectively undelete, unformat and restore all lost data within 3 simple steps. Free download it to get all your lost FAT32 data back now:

Download for PC Download for Mac

Related Articles - ALSO ON EaseUS SOFTWARE

- GIF Recovery: Recover Deleted GIF Images on Android/iPhone/PC

  2016-12-14 15:46:50

  Abby Haines - Full GIF recovery solutions to recover deleted, lost or corrupted GIF files on iPhone, iPad, Android devices, PC, camcor…

- Fix Bad Sectors on HDD without Losing Any Data in Windows

  2016-10-10 17:31:40

  Tracy King - This article shows you how to fix bad sectors on HDD in Windows 10/8/7 PC without losing any data within 2 steps. First,…

- Fix PS4 Won't Read USB Hard Drive and Recover Data

  2017-04-25 17:23:52

  Jean - Can't access files on PS4 flash drive? Download EaseUS free data recovery software to recover files off from the raw usb…

- How to Recover Deleted/Wiped Windows Operating System

  2017-07-18 17:26:03

  Jean - Operating system deleted or wiped by mistake, virus or other malware? EaseUS bootable data recovery software is helpful …

Related Products

- Data Recovery Software
- Data Backup Software
- Partition Manager Software
- PC Transfer Software
- Mac System Utility
- File Sync Utility

Top 10 Hot Articles

- 2 Ways to Recover Permanently Deleted Files/Folder in Windows 10/8/7/XP/Vista
- Recover Pictures after Factory Reset on Android
- How to Retrieve Deleted Photos on Kik Messenger
- Recover Data from Android Phone Internal Memory
- How to Recover Deleted Photos from Android Phone
- How Can I Recover Contacts from Broken Android Phone
- How to Transfer Pictures from Disabled iPhone
- How to Retrieve Blocked Messages Deleted on iPhone
- How to Recover Lost Or Deleted Android Memo Files
- Transfer data, software and applications to Windows 10

- 30 days Money Back Guarantee

- Transactions Protected

- Trusted by Millions of Users

- 7 X 24 Service & Live Chat

LiveChat
LiveChat

Need help? We're here for you.

Technical Support
  For paid users only. Professional support on all technique problems.

Pre-Sales Inquiry
  Inquiry,quote,sales order,license code, invoice and download link,etc.

CHOOSE YOUR REGION

North America
  United States(English)Canada(English)Canada(Francais)

Latin America
  Brasil(Português)México(Español)Chile(Español)Argentina(Español)

Europe
  Deutschland(Deutsch)Österreich(Deutsch)France(Francais)Belgique(Francais)België(Nederlands)España(Español)Italia(Italiano)Portugal(Português)United Kingdom(English)Nederland(Nederlands)Polska(Polski)Česká(Čeština)

Asia Pacific
  Australia(English)Singapore(English)New Zealand(English)日本（日本語）대한민국(한국어)中国(简体中文)台灣(繁體中文)香港(繁體中文)Hong Kong(English)India(English)Indonesia(Bahasa Indonesia)امارات عربية متحدة‎(العربية)

International
  English

Download EaseUS Todo Backup Advanced Server

Fill out the form below for a 30-day free trial.

Be the first one to get exclusive special offer from EaseUS.

Email:

* Your information will only be used by EaseUS and only for subjects related to EaseUS' products and services..

Start your free trial

Click the download link below to start downloading:

http://download.easeus.com/free/tb_free.exe

Ready to buy?

Save this 40% off coupon for full version upgrade
Coupon Code: [ UPGD-4WLG ]

Buy Now >>

Awards & Reviews

- "Like any good backup tool, it will back up your entire system's current state, data, settings and what you want it to"

- "The Best Free Backup Tool in Existence. Back up partitions, restore partitions & individual files with highly useful backup program"

- "You get an easy to use solution that covers the needs of most users. It can create bootable copies of the system drive"

- "EaseUS Todo Backup Server provides a large assortment of advanced features and tools to prevent tragic data loss."

Customer Says

"It's fast, reliable and 100% sure, never failed restoring an image. Your software is 100% safe disaster recovery." −− Francis van den Heuvel

"EaseUS Todo Backup has become my first thoughts now. Favorite part is the disk cloning tool." −− Ray

Customer Says

"Just try your EaseUS System GoBack to get back to my previous system. It is amazing. Before upgrading to Windows 10, I backed up the whole system. It just costs me several minutes to go back to my Windows 8.1." −− Tommy

"EaseUS System GoBack is an innovative tool to eliminate the anxiety of Windows 10 upgrade. It's very useful for me to roll back to my previous Windows 7 when I feel unadaptable with the New Windows 10." −− Anna

"Thank you guys so much to develop such powerful system recovery software. With strong backup and restoring features, I get my old system and information back easily." −− Micheal

Awards & Reviews

- "It is a full-featured disk partition manager, which can not only format and partition drives but repartition them."

- "Perfect partitioning program - one that's easy, reliable, versatile, non-destructive - resize a partition without erasing it."

- "Managing partitions has never been my cup of tea. I always get the impression that it's something difficult - and I'm sure I'm not the only one who thinks like that."

- "EaseUS Partition Master is comprehensive, which enables you to perform basic and advanced partition operations."

Customer Says

"Thank You!!! I downloaded free version of EaseUS and it worked on my old xp program. It was so user friendly and I really appreciate your expertise." −− J.Balgal

"Just to leave a word about Easeus on our production environnement. I resized two big partitions on the same server and your product did the trick successfully in about 2 hours." −− Dennis M Hogan

Download EaseUS Todo Backup Free

Special price only for a limited time!

- Todo Backup Home
  Free lifetime Upgrade License$35.40 $59.00

  Buy Now

  One-time fee
  and enjoy all upgrade FOR FREE.

- Todo Backup Home
  Standard License$17.40 $29.00

  Buy Now

  Lifetime license
  but need to pay every major upgrade.

* EaseUS are offering registered customers a discount of up to 40% (20%-40%) on SELECTED PRODUCTS, use code [ UPGD-4WLG ] and Get it now >>