OC-misc/partition/README.md

32 lines
1.2 KiB
Markdown

# Minitel Partition Table (MTPT)
This document specifies a general partition table format suitable for both unmanaged disks, and tapes.
## Partition table
The partition table resides at the end of the disk - the last sector of the disk, for several reasons:
- Ease of implementation for firmware to load from first partition
- Compatibility with existing partition table formats
The partition table takes one sector (512 bytes) and is divided into 16 entries, 32 bytes each. The first entry must have a type of `mtpt` or the partition table is to be considered invalid. This first entry's name should be considered the label for the whole disk.
### Partition entry
Each entry consists of:
- A 20 byte name field, padded with null characters.
- A 4 byte type field. This can be used either as a number or a string.
- A 32-bit big-endian start sector field.
- A 32-bit big-endian length field.
Any entry with no name should be ignored.
## Tape considerations
In the case of tapes, the partition table uses the last whole sector and any remaining space, as some tapes aren't evenly divisible by 512 bytes.
## Booting
It is suggested that firmware loads and runs the first partition with type "boot". More advanced booting logic may be implemented if desired.