Post on 20-Jan-2016
1
OverviewIn this chapter, you will learn to
Explain the partitions available in Windows
Discuss the formatting options
Partition and format a hard drive
Introduction
3
A new Hdive (HD) is nothing than a huge pile of sectors.
CMOS sees the drive, it shows up in the auto-detect screen and BIOS knows how to talk to drive.
For operating system, It must organize that pile of sectors so one can create 2 things: folders and files.
After installing a HD, 2 more steps must be performed to translate a drives geometry into something usable to the system. Partitioning and formatting.
Partitioning
4
Process of electronically subdividing the physical hard drive into groups of cylinders. Called partitions or volumes A HD must have at least one partition. You can have multiple partitions on single HD.Windows assigns them names such as C:C: or D:D:LogicalLogical divisions of a hard drive.
Partitioning
5
Formatting
6
After partition you must format derive.
Installs a file system onto the drive that organizes each partition in such a way that operating system can store files and folders on the drive. called high level formatting.
Hard Drive Partitions
7
Partitions provides flexibility in HD organization. You can organize a drive in a way that suits your taste. How?How?
Partitioning enables a single HD to store more than one operating system .
Windows 2000/XP support 2 different Partitioning methodsPartitioning methods: 1.1. MMaster BBoot RRecord (MBRMBR) partitioning
scheme. • Older but universal• The HD is called ‘basic disk’
2.2. DynamicDynamic partitioning scheme.• Newer but proprietary to Microsoft• The HD is called ‘dynamic disk’.
Basic Disk
8
Basic disk partitioning creates two very small data structures on a drive: Master Boot Record (MBR) and a Partition TableStores them on the first sector of the
HD- called the Boot SectorBoot Sector.MBR is a tiny bit of code that takes
control of the boot process from system BIOS.
When a computer boots to a HD, BIOS automatically looks for MBR code on the boot sector.
Basic Disk
9
MBR looks in the partition table for a partition with a valid operating system.
Only one MBR per disk
Program Data
Basic Disk
10
Partition table supports up to 4 partitions.Supports 2 types of partitions: primary and
extended.Primary: designed to support operating
systems.(bootable) Extended: not bootableA single disk may have up to 3 primary
partitions and only one extended partition.If you don’t have an extended partition, you
may have up to 4 primary partitions. This allows for multiple (up to 4) operating systems (called multiboot, dual boot)
Basic Disk
11
Each partition must have some unique identifier to enable user to recognize it as an individual partition.
Windows assign primary partitions a drive letter from C: to Z:. Extended partition do not get drive letters.
After you create an extend partition you must create logical drives within that extend partition. Logical drive get a drive letter from D: to Z:
C: is always reserved for first primary partition in windows PC.
Hard Drive Partitioning
12
C:
?
Volume boot sector
13
The first sector of the first cylinder of each partition also has a boot sector called volume boot sector.
Stores information important to its partition, such as location of OS boot files and partition size.
Primary Partition
14
Can be bootableHas a special setting called ‘active’ stored
in the partition table. It is either on/off on each primary partition.
Only one partition at a time can be the active partition because you can run only one OS at a time.
At boot, the MBR uses the active setting to determine which primary partition is active to load OS from.
The partition is set active when you install OS. It never actually says this in the install.
Rest of chapter assume only one primary partition.
15
16
Few system use more than one primary partition.
You almost never see four partitions used in windows world.
How we can change active partition? And why?
Extended Partition
17
Why we have extended partition?Further divided into logical drives which
get a drive letter from D: to Z:An extend partition may have as many
logical drives as you wish.
Cannot be bootable or ActiveCompletely optional. What doest means?Why we try to create extended partition.
18
Primary Partition
Drive Letter = c:
Set to “Active”
Stores O.S.
Extended Partition
LogicalDrive 1
LogicalDrive 2
Primary Partition
Hard Disk
Drive Letter = d:
Drive Letter = e:
19
MBRtells layout of the disk
Primary Partition Extended Partition
Logical Drives
C: E: F:
MBRtells layout of the disk
Primary Partition Extended Partition
Logical Drives
D: G: H:
Master
Slave
2 Drives (DOS)2 Drives (DOS)Dual OSDual OS
When to partition
20
Two most common situations:when installing an OS on a new system when adding a second drive to an
existing system Traditionally, once a partition is made,
you can not change its size or type other than by erasing it.
Third-party tools can non-destructively resize partitions (without losing the data)
Windows 2000 and XP can non-destructively resize a partition to be larger but not smaller.
Vista can non-destructively resize partitions any way we wish.
21
Hard Drive Formatting
22
Done after partitioningEvery partition needs to be formatted.
Why?Formatting does two things
It creates a file system – like a library’s card catalog
and makes the root directory in that file system.
Current file systems in Windows: FAT16 FAT32NTFS.
Root directory provides foundation upon which OS builds files and folders.
FAT – File Allocation Table
23
A file is stored in many sectors (possibly one).
The main job of FAT is to track which sectors are assigned to each file, which sectors are unused and which are bad.
The sector number is represented in 1616 bits. Therefore there are 64K sectors (2^16).
64K sectors limits partition size to 32MB (how?)
FAT – File Allocation Table
24
The right column of the FAT contains information about the status of sectors.
Formatting: creating FAT and testing sectors. Assign 0000 to good and open for use sectors and FFF7 to bad ones.OS must locate bad sectors (if any). This mapping of bad sectors is one of the functions of high-level formatting.Floppy disks use FAT with 12 bits.
0000 0000
0001 FFF7
0002 0000
…….…
0000
…….…
0000
FFFF
0000
FAT Limited
25
Using 16-bit FAT addresses a maximum of 64 K location.
The size of hard disk partition should be limited to 64 K x 512 bytes per sector (32 M).
As hard drives grew in size you could use FDISK to break them up into multiple partitions.
Therefore using FAT 16 with very large HD is unacceptable.
Solution was clustering, allowing partition sizes up to 2 GB
Clustering
26
To break the limit of 32MB in partition size with backward compatibility.
Enables one to format partition larger than 32MB
Idea: combining a set of contiguous sectors and treating them as a single unit (cluster) in FAT. i.e. FAT addresses a cluster instead of a sector. So, the cluster became the smallest addressable block of data stored on a drive. The size of a cluster is not fixed.
27
Number of clusters is still 64K (16 bit). So, number of sectors/cluster is determined according to partition size. (how?how?)
The large the partition the more sector per cluster.
Clustering
28
FAT16
29
FAT16: clustering FAT where the cluster is represented in 16 bits.
Cluster sizes: 4,8,16,32 64 (max. partition is 2GB). Compute it?Compute it?
Hard Drives become fragmented. This mean that data for one individual file may not be in consecutive clusters
Excess fragmentation slows down systems. It needs defragmentation from time to time.
FAT16 in Action
30
When an API tells the OS to save a file (MOM.TXT).
Windows start at beginning of FAT looking for the first open cluster.
FAT16 in Action
31
FAT 16
Before filling 3ABC window enter the value 3ABC in 3ABB status.
FAT16 in Action
32
FAT16 in Action
330000 = Good FFF7 = Bad FFFF = End of File
34
Windows then goes to the folder storing the file and adds the file name and the cluster’s number to the folder list
File folder located in different cluster.What happen if program requesting that
file?
Fragmentation
35
Fragmentation occurs when files are spread across drives (not contiguous)Individual files are broken into pieces that fit
into a sector or clusterThe pieces are stored on the hard drive but
may not be stored in contiguous clustersFragment take place all the time on FAT 16.
Fragmentation slows down the system during hard drive reads and writes
Programs such as Disk Defragmenter or Speed Disk can be used to defragment files, folders, or both
Takes longer for system to piece together and can impact performance.
36
Disk Defragmenter
37
Disk Defragmenter
FAT 32
38
Uses 32 bits to describe each clusterCluster size can drop to reasonable size
compared to FAT16.A 2-GB volume using FAT16 would use 32-
KB clusters, while the same 2-GB volume using FAT32 would use the minimum cluster size (4KB).
FAT 32 support partition up to 2 terabyte.But needs de-fragmentation
Remember, only DOS and Windows 3.x/95/98/Me use FAT
NTFS
39
File system of choice today.NT File System (NT came from Windows
NT, first OS to use it)Windows NT, 2000, XP, Vista.Uses clusters and file allocation table in a
much more complex and powerful way compared to FAT16 and FAT32 this table called Master File Table (MFT).
Main improvements: redundancy, security, compression, encryption, disk quotas, and cluster sizing.
NTFS
40
Security:Provides file and folder access controlUses Access Control List Access Control List with permissionspermissionsIf you’re on the list, you’re granted the specific permission
Compression: Compresses data on a hard drive to allow more data to be written to the drive. (SlowerSlower).
Encrypting file system:Allows files and folders to be encrypted and unreadable to anyone without the key
NTFS
41
Files and folders can be encrypted or compressed
Disk quotasCan control how users
can use spaceSet on a per-drive
basis
Cluster sizesCan adjust cluster
sizesRare to do so
Divisions of a Hard Drive
42
43
Bootable Disks
44
Any softwaresoftware that can boot up a system is by default OS.
Bootable disk Bootable disk is any removable media that has a bootable OS installed
Floppy, CD-ROM, USB thumb drive
All Windows and Linux installation CDs are bootable
Install Hard Drive
45
ConnectivityCMOSPartitioningFormatting
46
48
49
50
51
52
53
54