View Single Post

  #1 (permalink)  
Old 09-05-2007
sh1025.oh@samsung.com
 
Posts: n/a
Default Hi~ I have a question about FAT32

Hi, there~

I have searched a file formatted by FAT32 recently, some of questions
doesn't be cleared.

My file is generated by fdisk utility, like this

"dd bs=1M count=32 if=/dev/zero of=./backing_file

fdisk ./backing_file

and so on...."

You know what I did, of course, to test linux gadget driver making a
file as parameter of driver.

After all of this, I dumped the file, it showed awesome result.

00000000h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
......(all zero)
000001c0h: 01 00 0B 0F 48 FF 08 00 00 00 F8 FF 00 00 00 00
......(all zero)
000001f0h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 AA

Above all are root records, first 1 sector.
As I know, boot record keeps some of infomations about partition,
root directory etc
but my file doesn't have, except only one partition info, partition
information also
I can't understand.

This is my first questiion~

And Reserved area(32 sectors in FAT32, right?, as I know) are
located,

......h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
......(all zero)
000011f0h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 AA
00001200h: F8 FF FF FF 00 00 00 00 FF FF FF FF FF FF 00 00
.......(all zero)
Next FAT1, FAT2 are located,
(If reserved area size is 32 sectors, FAT1's location 000065f0h
00009200h: F8 FF FF FF 00 00 00 00 FF FF FF FF FF FF 00 00
.......(all zero)
F8 FF FF FF 00 00 00 00 FF FF FF FF FF FF 00 00 <- what's this??
this line appears twice.

Because FAT1,2 have cluster chain info, it means cluster chain? I
don't know
This, second question~

.......(all zero)
Since it's ok Root directory to be placed in anywhere, I find it

00011200h: E5 32 00 32 00 32 00 2E 00 74 0 0F 00 32 78 00
00011210h: 74 00 00 00 FF FF FF FF FF FF 00 00 FF FF FF FF
00011220h: E5 32 32 20 20 20 20 20 54 58 54 20 00 64 00 00
00011230h: 21 00 21 00 00 00 00 00 21 00 03 00 04 00 00 00
00011240h: 41 33 00 33 00 33 00 2E 00 74 00 0F 00 56 78 00
00011250h: 74 00 00 00 FF FF FF FF FF FF 00 00 FF FF FF FF
00011260h: 33 33 33 20 20 20 20 20 54 58 54 20 00 64 00 00
00011270h: 21 00 21 00 00 00 00 00 21 00 04 00 04 00 00 00
......(all zero)


I am interested in where real data cluster is and how to find it.
For example, 333.txt (00011260h)'s real data location is 00 04(by
FAT32 format)
, 4th cluster, it means that data cluster is from FAT2's last? or
file's first?
my last question~


please help me^^

thanks in advance~

Reply With Quote