150 likes | 539 Views
Disk Partition. Booting the operating system Primary Boot Sector (sector 0) – MBR and Partition Table – allocate the active partition and jump to it’s secondary boot sector Active Partition – the loader of the OS is in the secondary boot sector – set the OS file system
E N D
Disk Partition • Booting the operating system • Primary Boot Sector (sector 0) –MBR and Partition Table – allocate the active partition and jump to it’s secondary boot sector • Active Partition – the loader of the OS is in the secondary boot sector – set the OS file system • inactive partition – the secondary boot sector is ignored – additional file system
Disk Formatting and Partitioning • Disk Partitioning • MS-DOS /Linux – fdisk • MS-DOS partitions can mount as separate drives • Linux – one partition for root file system and one for swap file system • Disk Formatting • Setup the partition with the file system structure • MS-DOS format – bootstrap code, FAT, root directory • UNIX mkfs – bootstrap code ,super block , i-nodes
Case Study: UNIX • i-node structure is small , fixed size • Smaller files can be accessed quickly – larger files longer • How big can a file be ? • Assume 1K disk block and 32 bit address • 10Kb + 256 * 1K + 256*256*1K + 256*256*256*1K > 16GB
Directory implementation • File name + Extension - 8 + 3 Bytes • Attribute – 1 Byte • Time + Date – 4 Bytes • First Block Number – 2 Bytes • Size – 4 Bytes