Os Diskk Formatting
Os Diskk Formatting
BY:
• Before a disk can store data, it must be prepared so that the disk controller can read and write
data. This preparation process is called disk formatting.
• Ways to Format Disks:
• Low-Level Formatting (Physical Formatting)
• Logical Formatting (Creation of a File System):
Low Level Formatting:
• Before a disk can store data, it must be divided into sectors.
• This process is called low-level formatting or physical formatting.
• Low-level formatting creates a structure for each sector.
• Each sector has a header, a data area (usually 512 bytes), and a trailer.
• The header and trailer contain information like sector number and ECC.
• ECC (Error-Correcting Code) helps detect and correct data errors.
• Most hard disks are low-level-formatted at the factory.
• This formatting allows the manufacturer to test and initialize the disk.
Logical Formatting:
• The OS partitions the disk into groups of cylinders.
• Each partition can be treated as a separate disk.
• Logical formatting creates a file system on the disk.
• Stores file system data structures like free space maps and directories.
Boot Block:
• When a computer starts or
reboots, it runs an initial
bootstrap program.
• This simple program initializes system components and starts the OS.
• The bootstrap program is stored in read-only memory (ROM).
• ROM is
convenient and
secure, but hard
to update.
• To update easily, a small bootstrap loader in ROM loads a full bootstrap from disk.
• The full bootstrap program is stored in fixed "boot blocks" on the disk.
• The boot ROM instructs the disk controller to load the boot blocks into memory.
• This full bootstrap can load the entire OS from any location on disk.
• In Windows, the boot code is in the master boot record (MBR) on the hard disk.
• The MBR also contains a partition table and flags for booting.
Booting from Disk: The Initial Spark
1 Bootstrap Loader
When a computer is powered on or rebooted, it requires an initial program to run, called the
bootstrap loader. This simple program is typically stored in read-only memory (ROM) and is
responsible for loading the full bootstrap program from the disk's boot blocks.