OC-misc/partition/README.md

1.0 KiB

Simple partition table format

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.

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 4-byte start sector field.
  • A 4-byte length field.

Any entry with no name should be ignored.

Tape considerations

It may prove easier to use a tape if one were to implement a virtual drive component that maps to the data on a tape.

Booting

It is suggested that firmware loads and runs the first partition with type "boot". More advanced booting logic may be implemented if desired.