How it works

The
BIOS should, for compatibility reasons, still only need to read the first sector on the media. This sector contains code and information on where to load the Bootmanager from. The sector also contains information on where the Partition Table starts.
The bootmanager can be a real bootmanager, where the user can chose from multiple partitions, or it could just be some code which choses the default partition, and then boots from it.
The available disk space is structured into the sections shown in the picture to the right. A detailed explation follows:
Master Boot Record
The Master Boot Record in the Omega Disk Format have structure seen below:
Structure of the Master Boot Record
Offset | Size | Description |
0000h - 01D4h | 469 | Primary boot code - Loads the bootmanager - Area may shrink in the future |
01D5h - 01D6h | 2 | Bytes per sector |
01D7h - 01D7h | 1 | Media Type |
01D8h - 01E1h | 10 | Total number of sectors on the disk |
01E2h - 01EBh | 10 | Bootmanager start (LBA address) |
01ECh - 01EDh | 2 | Number of sectors used by the Bootmanager |
01EEh - 01F7h | 10 | Partition Table start (LBA address) |
01F8h - 01F9h | 2 | Number of sectors used by the Partition Table |
01FAh - 01FAh | 1 | Disk Format Minor Version (03 in BCD format) |
01FBh - 01FBh | 1 | Disk Format Major Version (01 in BCD format) |
01FCh - 01FFh | 4 | Omega Discformat signature (1402AA55h) |
Read Only (RO)
The read only bit (bit 1) can be set by the system to prevent the drive from being write accessed. And it should be set, when the Disk Format is used on ex. cd-roms.
Removable (R)
The removable bit (bit 0) is used to tell the system that the media, is easily removable. The system may therefore want to write cached data quickly to the drive, or even disable the write cache for the drive.
Bootmanager
The minimum requirement to this code segment is that it is able to search through the Partition Table for the partition entry with the highest boot priority, if two is found to have the highest boot priority, to top-most in the Partition Table is used. When one is found it should be able to start the operating system, which is installed on the partition.
The intension with this code segment, is to have a real bootmanager and/or bootloader installed. One bootmanager which could be used is the Omega version of the
NlC Bootmanager. The bootmanager/bootloader will display a number of possible operating system to boot.
Partition Table
This part of the Omega Discformat, contain information about the partitions located on this media. A partition is just a part of the space on a larger media. One partition may take up all the space available, but typically on very large drives, the space is partitioned. There are several reasons for this, such as preventing loss of data in case of a crash, easier administration, and you can probably find more your self. People have different motives when partitioning drives.
Each entry in the Partition Table take up 64 bytes of data. This makes room for 8 entries in each 512 bytes sectors. The entries in the Partition Table have the following offsets from the start of the sector. The bases are: 0000h, 0040h, 0080h, 00C0h, 0100h, 0140h, 0180h and 01C0h
Structure of a Partition Table Entry
Offset from Base | Size | Description |
0000h - 0000h | 4 | Boot priority |
0000h - 0000h | 2 | Partition Format ID |
0000h - 0000h | 1 | Partition Format ID - Major Version |
0000h - 0000h | 1 | Partition Format ID - Minor Version |
0000h - 0000h | 1 | Attribute Byte |
0000h - 0000h | 29 | Reserved |
0000h - 0000h | 10 | Start of Secondary Boot Code (LBA address) |
0000h - 0000h | 2 | Length of Secondary Boot Code in sectors |
0000h - 0000h | 10 | Partition start (LBA address) |
0000h - 003Fh | 10 | Partition end (LBA address) |
Boot priority
The boot priority field is used by the code in the bootmanager section, to determine which partition that are going to be booted. The number of possible partitions are 524.288. It is most likely that a very little fraction of this number is actually going to be used.
Attribute Byte
This byte is used to determine the characteristics of the individual partitions. Depending on which attributes that has been set, the system can treat the media differently.
Partition Attributes
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
Reserved |
B |
0000h |
Bootable (B)
This attribute should be set when a partition contain executable code, which can continue the boot process.
Secondary Boot Code
The first value is the Logical Block Address (LBA) of the first sector in the partition. This value can be up to 80 bits long, but at the moment only a fraction of it is used. The start LBA address is relative to the partitions start LBA address. The next value is the lenght measured in sectors.
Partition Start / End
These two LBA addresses are relative to the beginning of the media. The size of the partition can be calculated by subtrating the End LBA address from the Start LBA address.
Disk Area
This is where the actual data is stored. This space is devided into one or more partitions, by the method described above. This area take up the rest of the available disk space.