OC-misc/partition
Izaya 518cb39d66 better organise the partition structure 2023-10-11 10:23:38 +10:00
..
OpenOS/etc/rc.d better organise the partition structure 2023-10-11 10:23:38 +10:00
README.md add bootloader compatible with mtpt 2023-08-03 10:21:32 +10:00
driveboot.lua implement proper tape support, also speed up loading from tapes. 2023-08-05 10:19:07 +10:00
partition.lua update mtpt for how it's actually being used now 2023-08-03 00:28:35 +10:00

README.md

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.