FAT32 Directory Entries and Operations Guide

Slides:



Advertisements
Similar presentations
Operating Systems Lecture 10 Issues in Paging and Virtual Memory Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard. Zhiqing.
Advertisements

1 Week 11 FAT32 Boot Sector, Locating Files and Dirs Classes COP4610 / CGS5765 Florida State University.
Recap – Intro to Project 3 and FAT32
1 Week 12 FAT32 Utility Operations Guide Classes COP4610 / CGS5765 Florida State University.
File Systems Examples.
Ext2/Ext3 Linux File System Reporter: Po-Liang, Wu.
In this assignment you are going to read floppy disk. You can run ‘mdir’ Unix function to see what output your program should give. FAT-12 MS-DOS file.
11/13/01CS-550 Presentation - Overview of Microsoft disk operating system. 1 An Overview of Microsoft Disk Operating System.
Lecture 10: The FAT, VFAT, and NTFS Filesystems 6/17/2003 CSCE 590 Summer 2003.
Wince File systems. File system on embedded File system choice on embedded is important –File system size can be an issue –Different media are used –
Week 10 Project 3: An Introduction to File Systems
Mastering Windows Network Forensics and Investigation Chapter 7: Windows File Systems.
Lecture 9: The FAT and VFAT Filesystems 6/16/2003 CSCE 590 Summer 2003.
1 Project 3: An Introduction to File Systems CS3430 Operating Systems University of Northern Iowa.
Bits, Bytes, Files, Hard Drives. Bits, Bytes, Letters and Words ● Bit – single piece of information ● Either a 0 or a 1 ● Byte – 8 bits of information.
File System Management File system management encompasses the provision of a way to store your data in a computer, as well as a way for you to find and.
1 Interface Two most common types of interfaces –SCSI: Small Computer Systems Interface (servers and high-performance desktops) –IDE/ATA: Integrated Drive.
The disk surface is divided into tracks. into tracks. 1.
ENGI 3655 Lab Sessions 1Richard Khoury.  Linked Allocation ◦ Section Richard Khoury2.
Chapter 3 Partitioning Drives using NTFS and FAT32 Prepared by: Khurram N. Shamsi.
Operating System What is an Operating System? A program that acts as an intermediary between a user of a computer and the computer hardware. An operating.
DISK THEORY. Disk Theory n How information is stored on disk n How we can take advantage of that when bad things happen.
OPERATING SYSTEMS BY LANDON, KYLE, AND ETHAN. WHAT IS THEIR PURPOSE? (1) manage the computer's resources, such as the central processing unit (2) establish.
1 Week 13 FAT32 Utility Operations Guide: rm and rmdir Classes COP4610 / CGS5765 Florida State University.
CS101 Storage Information Storage The zeros and ones in the input devices, output devices and process devices are in _______ form and are lost when the.
Manage Directories and Files in Linux Part 2. 2 Identify File Types in the Linux System The file types in Linux referred to as normal files and directories.
OPERATING SYSTEMS Frans Sanen.  Analyze a FAT file system manually  FAT12 first and simplest version  Still used on smaller disks (e.g. floppies) 
Lecture 10 Page 1 CS 111 Summer 2013 File Systems Control Structures A file is a named collection of information Primary roles of file system: – To store.
FAT 12 File Format ( ) Alex Milenkovich.
Computer Forensics Hard Drive Format.
NTFS Filing System CHAPTER 9. New Technology File System (NTFS) Started with Window NT in 1993, Windows XP, 2000, Server 2003, 2008, and Window 7 also.
File system and file structures
Chapter 8 File Systems FAT 12/16/32. Defragmentation Defrag a hard drive – Control Panel  System and Security  Administration tools  Defrag hard drive.
1 FAT32 Boot Sector, Locating Files and Dirs Operating Systems CS3430 Sarah Diesburg.
Master Boot Record (MBR)
CS101 Storage Information.
Operating System Kernel Compilation
Buffer Overflow Walk-Through
EXT in Detail High-Performance Database Research Center
UMBC CMSC 421 Spring 2017 The FAT Filesystem.
Introduction to Kernel
Jonathan Walpole Computer Science Portland State University
Chapter 11: File System Implementation
Chapter 12: File System Implementation
FAT32 Directory Entries and Operations Guide
File System Structure How do I organize a disk into a file system?
A “Walk Through” Experiment
Windows XP File Systems
Project 3: An Introduction to File Systems
Contents Todays Topic: Introduction to Computer Software We will learn
Introduction to Computers
File Management.
Buffer Overflow Walk-Through
Operating System Kernel Compilation
File I/O, Command Line Parameters, Endian-ness
Exploring the UNIX File System and File Security
File Managements.
Booting Up 15-Nov-18 boot.ppt.
Intro. To Operating Systems
Lecture 15 Reading: Bacon 7.6, 7.7
Project 3: An Introduction to File Systems
Programming Project #1 Command Shell
Modern PC operating systems
FAT32 Directory Entries and Operations Guide
Disk Structure Analysis
Chapter 15: File System Internals
Operating System Kernel Compilation
Recap – Intro to Project 3 and FAT32
FAT File System.
File I/O, Command Line Parameters, Endian-ness
Presentation transcript:

FAT32 Directory Entries and Operations Guide Operating Systems CS3430 Sarah Diesburg

Outline Directory entries Project 3 operations Short-name and long-name entries Project 3 operations

Directory Entries

Directory Entries Lists names of files and directories in a directory Types Short-name directory entry Long-name directory entry

Short-name Directory Entry Limits name size to 8 bytes with additional 3 bytes after “.” Compatible with previous FAT versions 32 bytes total size Holds important information about file or dir: Attributes, timestamp, last access date, first cluster number, size

Short-name Directory Entry If DIR_Name[0] == 0xE5, then the directory entry is free (no file or directory name in this entry) If DIR_Name[0] == 0x00, then the directory entry is free (same as for 0xE5), and there are no allocated directory entries after this one

Long-name Directory Entry Backwards-compatible way to allow longer names to be displayed Each long-name directory entry is 32 bytes A long file name can cover a set of long-name directory entries Each set of long-name directory entries must correspond to a short-name directory entry Long-name entries must immediately precede corresponding short-name entry

Long-name Directory Entry Long-name part 1 Two long-name entries are needed to hold the file name Long-name part 2 Short-name

Long-name Directory Entry Long-name part 1 Long-name part 2 Short name entry for the file must exist too Short-name

Long-name Directory Entry Long-name part 1 Long-name entries for this file immediately precede short-name entry Long-name part 2 Short-name

Directory entries Long-name entry for “fatgen103.pdf"

Directory entries Short-name entry for “fatgen103.pdf"

Long-name Directory Entries You can ignore the long directory entries Can just display the short names This makes the project easier

“Dot” Entries All directories (except root directory of entire system) have “.” and “..” directory entries “.” means “this directory” “..” means “the parent directory” Why do you think the root directory does not have these entries?

Directory Entry Attributes Offset 11 in directory entry, 1 byte long ATTR_READ_ONLY 0x01 ATTR_HIDDEN 0x02 ATTR_SYSTEM 0x04 ATTR_VOLUME_ID 0x08 ATTR_DIRECTORY 0x10 ATTR_ARCHIVE 0x20 ATTR_LONG_NAME ATTR_READ_ONLY | ATTR_HIDDEN | ATTR_SYSTEM | ATTR_VOLUME_ID

Checking the Image… You can tell your OS to “mount” the image just like a real file system $> sudo mount –o loop fat32.img /mnt $> cd /mnt $> sudo umount /mnt Be sure you cd out of the /mnt directory first

Checking the Image Mac computer automatically mount the image They also *modify* it Add Trash can directory Add other files Your test image may become different than other people’s images

Utility Operations

FAT32 Utility Oprations Utility recognizes the following built-in commands: info stat volume cd ls read

Precautions File or directory must exist before performing operations on it Be sure you are reading from the right location Off by 1 byte can throw whole project off

Volume Volume ID string exists in two places Can get it either place Boot sector Root directory Can get it either place

stat Check that provided file name exists in the requested directory Can be accomplished by seeking through the clusters of the requested directory If it does, extract the size information Pay attention to endianness!

ls Make sure that provided directory name is directory and exists in requested directory Seek first data cluster Iterate through and print each directory entry in the cluster If more directory entries left than first cluster can hold, seek next cluster and repeat 3

cd Check that provided directory name is a directory and exists Alter your current working directory to reflect the change For ease of debugging and use, you may want to alter your prompt to show current working directory

I/O Files /] read FATINFO.TXT 0 100 Only allow the read if fatinfo.txt is open In order to read fatinfo.txt, you must look into the open file table, look up the address of fatinfo.txt (or store it with its name), and read enough of the data clusters to satisfy the read request

read Make sure file name provided is in open-file table and flagged as read-capable Check that the provided position is valid Check that the requested number of bytes is valid Seek to data cluster corresponding to the requested start position and begin reading If more data to be read, seek the next clusters and repeat 4

Other Things Be sure to look at the Project 3 Use Cases document and make sure you code acts the same way. You must read the Microsoft FAT32 Specification to understand what’s going on Be sure your code works on the class virtual machine You may need to boot into the original kernel