1
0
mirror of git://projects.qi-hardware.com/iris.git synced 2024-06-26 02:48:55 +03:00
iris/mbr+fat.txt
2010-06-22 20:55:02 +02:00

90 lines
2.4 KiB
Plaintext

mbr structure. Size: 200.
000 1b8 code or fat:
00 3 jump instruction
03 8 OEM name
0b 2 bytes per sector
0d 1 sectors per cluster
0e 2 reserved sectors (incl. boot sector, from boot sector)
10 1 number of fats
11 2 non fat32: number of entries in root directory
13 2 total number of sectors on disk if < 32MB
15 1 media descriptor (bit 2 set means removable)
16 2 non fat32: sectors per fat
18 2 sectors per track
1a 2 heads
1c 4 number of sectors before boot sector
20 4 number of sectors on disk, if > 32MB
24 xx 4 sectors per fat
28 xx 2 bit 0-4: active fat, bit 7 set: write to all fats.
2a xx 2 file system version number
2c xx 4 cluster number for root directory
30 xx 2 sector number for FSInfo structure
32 xx 2 boot sector backup sector
34 xx c reserved
40 24 1 drive number
41 25 1 current head (dos internal)
42 26 1 boot signature (with 0x29, the next 3 fields are valid)
43 27 4 volume id
47 2b b volume label
52 36 8 file system type "FAT16 " / "FAT32 " / ...
1b8 004 disk signature
1bc 002 null
1be 010 partition 0
1ce 010 partition 1
1de 010 partition 2
1ee 010 partition 3
1fe 002 mbr signature: 55 aa.
Partition structure. Size: 10.
0 1 bootable flag 00=no; 80=yes.
1 3 first sector in partition, chs
4 1 partition type
5 3 last sector in partition, chs
8 4 first sector in partition, lba
c 4 number of sectors in partition, for lba
CHS address. Size: 3.
head = chs[0]
sector = chs[1] & 0x3f
cylinder = (chs[1] & 0xc0) << 2 | chs[2]
Fat filesystem information sector. Size: 200.
000 4 signature: 52 52 61 41
004 1e0 unused
1e4 4 fsinfo signature: 72 72 41 61
1e8 4 number of free clusters
1ec 4 most recently allocated cluster
1f0 c reserved
1fc 2 unknown
1fe 2 boot record signature: 55 aa
Directory entry. Size: 20.
00 8 name
08 3 extension
0b 1 attributes (00arshdv)
0c 1 0
0d 1 creation time: (milli?)seconds
0e 2 creation time: hour and minute
10 2 creation date
12 2 last accessed date
14 2 cluster[31:16]
16 2 time
18 2 date
1a 2 cluster[15:0]
1c 4 file size
long file name: stored in directory entries immediately before the 8.3 name (last entry is first part of name)
00 1 ordinal field, bit 6 set means highest.
01 a 5 unicode characters.
0b 1 attribute: 000rsh0v.
0c 1 0
0d 1 checksum of short filename.
0e c 6 unicode characters.
1a 2 0
1c 4 2 unicode characters.
checksum is name[0] rotated 11 times, name[1] 10 times, etc and all added up.