Week 11
Week 11
1
Outline
2
Recap – Intro to Project 3
and FAT32
3
Project 3
4
FAT32 Manipulation Utility
open cd
close ls
create mkdir
rm rmdir
size read
write
5
File System Image
6
File System Image
7
Terminology
8
FAT32 Disk Layout
3 main regions…
Sector
Reserved Region
Additional
FS Information
Boot Sector Reserved Sectors
Sector
(Optional)
FAT Region
13
File System Image Mount Example
14
Hint
15
Hexedit
16
Hexedit
17
Line
Hexedit numbers in
hex
18
Hexedit Content in
hex
19
Content in
Hexedit printable
ASCII
20
Hexadecimal Hints
21
Hexadecimal Hints
22
Endianness
23
Endianness
24
Endianness
25
Starting Project 3
26
Parse the Boot Sector
27
Important Boot Sector Information
BPB_BytesPerSector
Offset 11, size 2 bytes
0x0200 = 512
29
Next Steps
30
Finding the Root Directory
31
Finding the Root Directory
BPB_RootClus
Offset 44, size 4 bytes
0x00000002 = 2
32
Finding the Root Directory
33
Finding the Root Directory
34
Finding the Root Directory
35
What exactly is the FAT?
36
Finding the Root Directory
37
Finding the Root Directory
…otherwise this
would be the
next cluster
number…
38
Directory Structure
39
Finding Files and Directories
40
Finding fatgen103.pdf
41
Finding fatgen103.pdf
42
Finding fatgen103.pdf
43
Finding fatgen103.pdf
44
Finding fatgen103.pdf
45
Summary of Finding Files/Dirs
46
File System Utility
Operations
47
Starting our Utility
$>./fat32_reader fat32.img
/]
48
Handling Open Files
/] open “fatinfo.txt” rw
52
Closing Files
/] close “fatinfo.txt”
53
To Do
54
Next Time
55