OC-misc/partition/README.md

32 lines
1.2 KiB
Markdown
Raw Permalink Normal View History

2023-08-03 10:21:32 +10:00
# Minitel Partition Table (MTPT)
2020-02-19 18:39:48 +11:00
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.
2020-02-19 18:39:48 +11:00
### 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.
2020-02-19 18:39:48 +11:00
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.
2020-02-19 18:39:48 +11:00
## Booting
It is suggested that firmware loads and runs the first partition with type "boot". More advanced booting logic may be implemented if desired.