Partitions and Blocks

The smallest unit of information that can be read from or written to a disk is a block. Blocks can't be split up - two files can't use the same block, therefore even if a file only uses one byte of a block, it is still allocated the entire block.

When partitions are created, the first block of every partition is reserved as the boot block. However, only one partition may act as a boot partition. BIOS checks the partition table of the first hard-drive at boot time to determine which partition is the boot partition. In the boot block of the boot partition, there exists a small program called a bootstrap loader - this program is executed at boot time by BIOS and is used to launch the OS. Systems that contain two or more operating systems use the boot block to house small programs that ask the user to choose which OS they wish to boot. GRUB is now the default used on Red Hat Linux. LILO is another popular bootloader for Linux.

The second block on the partition is called the superblock. It contains all the information about the partition including information on:

• The size of the partition

• The physical address of the first data block

• The number and list of free blocks

• Information of what type of file system uses the partition

• When the partition was last modified

The remaining blocks are data blocks. Exactly how they are used and what they contain are up to the file system using the partition.

Was this article helpful?

0 0

Post a comment