UMBC CMSC 421 Spring 2017 The FAT Filesystem.

Slides:



Advertisements
Similar presentations
COMP091 – Operating Systems 1
Advertisements

Operating Systems File Management.
Chapter 4 : File Systems What is a file system?
Computer Forensics NTFS File System.
File Systems Examples.
The FAT File System CSC 414. Objectives  Understand the structure and components of the FAT (12/16/32) File Systems  Understand what happens when a.
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.
Ceng Operating Systems
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 –
Files & Partitions BACS 371 Computer Forensics. Data Hierarchy Computer Hard Disk Drive Partition File Physical File Logical File Cluster Sector Word.
BACS 371 Computer Forensics
1 File Systems Chapter Files 6.2 Directories 6.3 File system implementation 6.4 Example file systems.
FAT Structure. File Allocation Table (FAT) File Systems Used with all flavors of Windows Supported by all Windows and UNIX varieties Used in flash cards.
 FILE S SYSTEM  DIFFERENT FILE SYSTEMS  FILE SYSTEM COMPONENTS  FILE OPERATIONS  LOG STRUCTERD FILE SYSTEM  FILE EXAMPLES.
1Fall 2008, Chapter 11 Disk Hardware Arm can move in and out Read / write head can access a ring of data as the disk rotates Disk consists of one or more.
Lecture 9: The FAT and VFAT Filesystems 6/16/2003 CSCE 590 Summer 2003.
Files CS Spring Overview Example: FAT File System File Organization File System Organization –File Directories and File Sharing –Record Blocking.
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.
IOS110 Introduction to Operating Systems using Windows Session 5 1.
File System Implementation Chapter 12. File system Organization Application programs Application programs Logical file system Logical file system manages.
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.
Copyright © 2007 Heathkit Company, Inc. All Rights Reserved PC Fundamentals Presentation 15 – The Hard Drive.
MS-DOS / PC-DOS Lindsey Buranych Alan Crouch Matthew Letnaunchyn Sandy Saab Carl Shapiro.
Chapter 3 Partitioning Drives using NTFS and FAT32 Prepared by: Khurram N. Shamsi.
File Systems in Real-Time Embedded Applications March 5th Eric Julien Understanding How the File Allocation Table (FAT) Operates 1.
File Storage Organization The majority of space on a device is reserved for the storage of files. When files are created and modified physical blocks are.
Operating System Concepts and Techniques Lecture 18 Information management-2* FFS, UFS2, NTFS M. Naghibzadeh Reference M. Naghibzadeh, Operating System.
DISK THEORY. Disk Theory n How information is stored on disk n How we can take advantage of that when bad things happen.
1 Floppy Drive Formatting ©Richard Goldman February, 2001.
Lecture 18 Windows – NT File System (NTFS)
OPERATING SYSTEMS Frans Sanen.  Analyze a FAT file system manually  FAT12 first and simplest version  Still used on smaller disks (e.g. floppies) 
University of Pennsylvania 10/31/00CSE 3801 Windows File System - FAT originally invented as a method for storing data on floppy disks. later used by MS-DOS.
FAT File Allocation Table
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.
BOOT SECTOR, RDE AND FAT ANALYSIS AND STUDY. FLOPPY CONSTRUCTION 1.Write - Protect Notch. 2.Hub. 3.Shutter. 4.Outer Jacket. 5.Protective Woolen Film.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems File systems.
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.
Digital Forensics Dr. Bhavani Thuraisingham The University of Texas at Dallas Lecture #8 File Systems September 22, 2008.
Chapter 8 File Systems FAT 12/16/32. Defragmentation Defrag a hard drive – Control Panel  System and Security  Administration tools  Defrag hard drive.
BACS 371 Computer Forensics
File Systems May 12, 2000 Instructor: Gary Kimura.
BITS Pilani Pilani Campus Pawan Sharma Lecture ES C263 INSTR/CS/EEE F241 Microprocessor Programming and Interfacing.
Master Boot Record (MBR)
Day 28 File System.
Advanced Computer Forensics
CENG334 Introduction to Operating Systems
Computer Forensics NTFS File System.
File System Structure How do I organize a disk into a file system?
A “Walk Through” Experiment
Windows XP File Systems
Filesystems.
Project 3: An Introduction to File Systems
Introduction to Computers
File Management.
File Structure 2018, Spring Pusan National University Joon-Seok Kim
File Managements.
Booting Up 15-Nov-18 boot.ppt.
FILE SYSTEM ANALYSIS Dr Fudong Li
Project 3: An Introduction to File Systems
Files Management – The interfacing
Computer Forensics NTFS File System.
Modern PC operating systems
Disk Structure Analysis
By Laurynas Peteraitis
File system : Disk Space Management
FAT File System.
Chapter 5 File Systems -Compiled for MCA, PU
Presentation transcript:

UMBC CMSC 421 Spring 2017 The FAT Filesystem

Overview Definitions What is a File Allocation Table? History of FAT/FAT Versions Basic structures File organization

Definitions Endianness – Byte ordering of multi-byte integers FAT follows the Little Endian byte ordering, placing the least significant byte first on disk (like x86 processors do for memory) Multi-byte integer – Numeric data type that takes up more than one byte. Common types: word (16 bits/2 bytes), double-word (32 bits/4 bytes), and quad- word (64 bits/8 bytes) Logical block – A series of one or more consecutive disk sectors. Usually contains a power-of-two number of raw disk sectors. In FAT, usually a logical block contains a single 512 byte disk sector. Cluster – A series of consecutive filesystem logical blocks. Usually contains a power-of-two number of blocks.

What is a File Allocation Table? A File Allocation Table is a simple disk structure for finding the disk blocks allocated to a file Contains one entry per data cluster on the filesystem Entries form linked lists to where the data is for each file on the disk For instance, if a file begins in data cluster 10, then conceptually FAT[10] will tell us the next cluster in the file, unless the file fits in one cluster on the disk Special markers for end of chain, unallocated space, bad clusters (a cluster that contains one or more bad disk sectors) The directory structure will tell us where the first cluster is in a file

History of FAT FAT8 – 1977-1979 FAT12 – 1980-1982 Originally written by Marc McDonald Designed for 8” floppy disks used on the NCR 7200 Model VI terminal Used an 8 bit file allocation table, 9 byte file names Directory entries originally 16 bytes long, extended later to 32 bytes (which is still the case to this day) FAT12 – 1980-1982 Designed for Seattle Computer Products (SCP) QDOS/86-DOS operating system, based on the original 8 bit FAT filesystem by Tim Paterson Again, designed for floppy disks Used a 12 bit file allocation table, 11 byte (8.3) file names Acquired by Microsoft when purchasing the rights to 86-DOS, which was the basis for MS- DOS and IBM PC-DOS Modified slightly several times to adapt to newer disk technologies and to add minor features - still used on floppy disks (not that we use those all that much anymore) Maximum volume size of approximately 16 or 32MiB

History of FAT FAT16 – 1984 FAT16B – 1987 Further extended the file allocation table size to 16 bits Designed for early PC hard drives (which were 20MB in size) Maximum volume size of 32MiB (65536 512-byte disk sectors) Logical sectored versions exist, which extend the maximum volume size FAT16B – 1987 What is commonly referred to as FAT16 today Extended the sector count to be a 32-bit value, vastly expanding the maximum volume size to up to 16GiB on some systems (like Windows NT4) Common maximum volume size limit is 2GiB

History of FAT FAT32 - 1996 Other variants Introduced with Windows 95 OSR2 Extended the FAT entry size to 28 bits Each entry is actually 32 bits in length, but the top 4 bits are reserved Maximum volume size of 2TiB (4,294,967,296 512-byte sectors) Can use a logical-sectored variant for a larger maximum volume size Maximum file size of 2 or 4 GiB, depending on filesystem variant Other variants FATX – 2001, used on the Xbox and Xbox 360 video game consoles exFAT – 2006, used commonly on flash media such as SDXC cards

Basic FAT Filesystem Structure FAT filesystems follow a specific structure, placing important filesystem metadata at the beginning of the volume: Sector 0: Boot Sector/Volume Boot Record (VBR) Contains the BIOS Parameter Block (BPB) which defines the basic characteristics of the volume After the BPB (and any extended BPBs), contains boot code for the OS if the volume is bootable Sector 1 (FAT32 only): Filesystem Information Sector Contains information intended to speed up certain common disk operations, such as the number of free clusters and the last allocated cluster Reserved Sectors (if any) immediately follow the VBR (FAT12/FAT16) or FS Info Sector (FAT32)

Basic FAT Filesystem Structure Immediately after the reserved sectors, one or more copies of the File Allocation Table itself are present Contains one entry (either 12, 16, or 32 bits in length) per data cluster of the volume First two entries of the FAT are reserved (entries 0 and 1), meaning the first data cluster is 2 FAT12 and FAT16 place the root directory at the beginning of the volume as well, pre-allocating some number of sectors for it FAT32 places the root directory in the data area of the volume, usually (but not necessarily) starting in cluster 2 After the root directory (FAT12/FAT16) or the File Allocation Table (FAT32), the data area of the volume begins with cluster 2

BIOS Parameter Block The BPB/EBPB of a volume contains the basic parameters of the volume itself including: Bytes per logical block Blocks per cluster Number of logical blocks Length of the FATs Volume ID/Name

Directory Entries Directory entries (either in the root directory or any other subdirectory) follow a very simple format Name of the file (11 bytes) - Divided into an 8 byte file name and a 3 byte extension File attributes (1 byte) - such as read only/hidden/system status) Reserved (1 byte) - used by some OSes for various extended attributes Creation timestamp (3 bytes) and date (2 bytes) Access date (2 bytes) High-order 16-bits of the starting cluster of the file (2 bytes) Modification timestamp (2 bytes) and date (2 bytes) Low-order 16-bits of the starting cluster of the file (2 bytes) File size (4 bytes)

Long File Names Long file name support uses directory entries in a specific format so that non-LFN- aware systems will ignore them Sequence Number (1 byte) 5 characters of the filename in UCS-2 (10 bytes) 0x0F – attributes in a normal directory entry (1 byte) 0x00 – LFN type, reserved byte in a normal entry (1 byte) Short filename checksum (1 byte) 6 characters of the filename in UCS-2 (12 bytes) 0x0000 – first cluster of file in a normal entry (2 bytes) 2 characters of the filename in UCS-2 (4 bytes) Entries are chained together by way of the sequence number field Maximum file name length is 256 UCS-2 characters LFN entries directly proceed the basic directory entry for the file and are organized such that the last characters of the filename appear first in the directory structure

FAT structure First two entries of the FAT are reserved: FAT[0] = FAT ID (always 0xF0) in bits 0-7, all other bits set to 1 FAT[1] = End of Chain marker (typically all bits set, but values with none of the low order 4 bits set are also valid) Each allocated entry of the File Allocation Table is a next cluster pointer End of Chain marker used to tell when a file/directory ends Non-allocated (and non-reserved) clusters contain 0

Resources Wikipedia (yes, I will tell you to look at Wikipedia here) https://en.wikipedia.org/wiki/File_Allocation_Table https://en.wikipedia.org/wiki/Design_of_the_FAT_file_system Microsoft’s FAT32 Specification http://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9- 843a-923143f3456c/fatgen103.doc Other Microsoft Articles https://support.microsoft.com/EN-US/help/100108 https://technet.microsoft.com/en-us/library/cc938438.aspx