## Storage Device Driver Reference

[prev][next][parent][TOC]

### Extended DOS Partition

Fixed disks can be divided into primary partitions, and an extended partition that contains multiple logical block devices. The extended partition is indicated by a System ID byte of 05h in the partition table of the Master Boot Record. This partition cannot be started, and programs that can set startable partitions (such as OS/2 FDISK) do not allow the partition to be marked as able to start.

The extended DOS partition can be created only if a primary DOS partition already exists on a startable drive. A primary partition is a partition with a System ID byte of 01h, 04h, 06h, or 07h. If the drive cannot be started, then an extended DOS partition can be created without having a primary DOS partition.

Note:

1.FDISK refers to extended volumes as logical drives.

2.This extended partition support can be used on any fixed disk supported by the OS/2 operating system.

The extended DOS partition starts and ends on a cylinder boundary, and contains a collection of extended volumes that are linked together by a pointer in the extended volumes' extended boot record. An extended volume consists of an extended boot record and one logical block device. In OS/2 Version 1.0, an extended volume could not be larger than 32MB, due to the limitations of the FAT file system. However, in OS/2 2.0 and 2.1, this restriction has been removed. An extended volume created within the extended DOS partition can be any size, from one cylinder long through the maximum available contiguous space in the extended DOS partition. All extended volumes must start and end on a cylinder boundary. The extended boot record corresponds to the Master Boot Record at the beginning of an actual physical disk. The logical block device corresponds to the DOS partition that is pointed to by the Master Boot Record.

The logical block device begins with a normal DOS boot sector if it is a DOS logical block device (System ID=1, 4, or 6). Installable File System ( IFS) logical block devices (System ID=7) need not start with a normal DOS boot sector. This logical block device must start on a cylinder and head boundary and must follow the extended boot record on the physical disk. The logical block device and the extended volume both end on the same cylinder boundary.

Each extended volume contains an extended boot record located in the first sector of the disk location assigned to it. This extended boot record contains the 55AAh signature ID byte. This allows programs that look at the Extended (Master) Boot Record to be compatible. This extended boot record also contains a partition table, which can contain only two types of entries. The boot code is not critical, as the devices are not considered startable. The boot code can simply report a message indicating an unstartable partition if it is executed.

The partition table portion of the extended boot record is the same as the partition table structure in the Master Boot Record. This structure has four partition entries of 16 bytes each. The System ID byte must be filled in for all four entries with one of the following values:

00h No space allocated in this entry.

01h DOS partition up to 16MB.

04h DOS partition with 32MB > SIZE > 16MB.

05h Maps out area assigned to the next extended volume. Serves as a pointer to the next extended boot record.

06h DOS partition size > 32MB.

07h Installable file system.

If the System ID byte is 0, then the values in that partition table entry are set to 0.

If the operating system detects any values other than 01h, 04h, 06h, or 07h , it ignores that entry and does not attempt to install the logical block device. This allows future expansion of devices in this area without problems of compatibility with earlier systems.

The partition start and end fields Cylinder, Head, and Sector (C,H,S) are filled in for any of the four partition entries in an extended boot record that have one of the System ID bytes. This allows a program such as FDISK to determine the allocated space in the extended DOS partition, and allows the physical device drivers to determine the physical DASD area that belongs to it. The partition start and end fields (C,H,S) for the partition entry that points to the logical block device (System ID 01h, 04h , 06h, or 07h) map out the physical boundaries of the logical block device. They are offset relative to the beginning of the extended boot record that the entry resides in. The partition start and end fields for the partition entry that points to the next extended volume (System ID 05h) map out the physical boundaries of the next extended volume. They are relative to the beginning of the entire physical disk.

The relative sector and number of sector fields are set up differently depending on what System ID byte is used. If 01h, 04h, 06h, or 07h is in the System ID field for that extended partition entry (pointer to the logical block device), the relative sector field is set up as an offset from (and including) the start of the extended boot record for the associated extended volume. The number of sectors field is filled in with the size of the created logical block device area (that is, the number of sectors mapped out by the start and stop cylinder/track/sector fields). The size of the extended volume can be calculated by adding the relative sector field and the sector size field of the associated extended boot record.

If the System ID byte is 05h, then the relative sector field is the offset (of the next extended volume) in sectors from the start of the entire extended DOS partition The number of sectors field is not used in this field, and is filled with 00hs.

This architecture allows only one logical block device to be defined for each extended boot record. Therefore, a maximum of two partition entries at a time is used in each extended boot record - an entry with System ID byte of 01h, 04h, 06h, or 07h, and an entry with ID of 05h (which is the pointer to the next extended volume).

Although only two entries can be used, a program installing these devices does not assume that the first two entries will be the non-zero entries.