tailieunhanh - Embedded FreeBSD Cookbook p9

Mục đầu tiên trong phân vùng đó là nhà nước, là một trong hai giá trị 0 hoặc 80H. Một giá trị của 80H biểu thị phân vùng này được kích hoạt và có thể được khởi động. Bắt đầu của phân vùng Để xử lý vấn đề này, một lược đồ địa chỉ mới được phát triển sử dụng các bit trong đầu, hình trụ và các lĩnh vực ngành. Kế hoạch này mới được gọi là khối logic biểu (LBA). | 186 Embedded FreeBSD Cookbook State The first entry in the partition is the state which is either value 0 or 80H. A value of 80H denotes that this partition is active and can be booted. Start of partition The next three bytes contain the start of the partition in head sector cylinder format. Disks traditionally access storage by head cylinder and sector offset. With the constant increase in capacity of hard drives the space reserved in the MBR became too small to address a complete hard drive. To handle this issue a new addressing scheme was developed that used the bits in the head cylinder and sector fields. This new scheme is called Logical Block Addressing LBA . Let s look at an example using the start of the partition offset 2 the sector and 3 the cylinder. The address of the starting sector is computed using the offsets 2 and 3 from the partition table and a few bitwise operations. Cylinder Offset 3 Offset 2 C0H 2 Sector Offset 2 3FH Start Cylinder Sector The address of the sector is computed by combining all 8 bits of the cylin der contained in offset 3 with the upper 2 bits of the sector value. These 10 bits contain the upper 10 bits of the address of the sector. The lower 6 bits of the sector in offset 2 contain the sector within the cylinder. The address is the combination of the computed cylinder and the computed sector. Type The type of the partition represents the file system type. A few of the common types of partitions are contained in Table 11-2. End of partition The next three bytes contain the end of the partition in head sector cylinder format. The logical block address LBA of the partition end is computed using the same method as the start of the partition. Type Description 00H Empty 01H DOS 12 bit FAT 04H DOS 16 bits 05H Extended partition 82H Linux Swap 83H Linux Native A5H BSD B7H BSDI B8H BSDI swap Table 11-2 187 Chapter Eleven System Startup Distance from MBR The next four bytes represent the LBA of the partition. The LBA is the sector .

TỪ KHÓA LIÊN QUAN