[FEATURE] Initialize regular GPT image files with boot-tool #7

Open
opened 2026-10-24 10:28:10 +02:00 by erikinkinen · 1 comment
Owner

Problem and motivation

The image recipe creates GPT metadata and queries geometry through sgdisk. EriX has its own caller-buffer GPT writer, but the builder cannot invoke it as a native file operation.

Proposed behavior and scope

Add boot-tool gpt-create on Linux and EriX. Explicit arguments select an ordinary output file, logical block size, disk length, GUIDs, table/header capacities and indexed partitions. Stream metadata and zero-filled gaps through one publication. Print versioned numeric geometry from the same checked plan after successful publication and retirement.

Adopt this command in Integration's real image recipe. Filesystem formatting and partition-file dd overlays remain separate work.

Authority, security and reliability

The original prepared invocation selects one exact Publish14 file occurrence and no READ grant. No device, mount, entropy, service lookup or signing-key authority is added. Preflight geometry, storage and complete u64 byte length before Begin. Retain the original owners, packets, first error and separate cleanup evidence. Never replay uncertain effects; Status observes only the original commit. Keep Linux stable-parent and best-effort temporary-cleanup limits explicit.

Acceptance criteria

  • Share one checked Bytes/Zeros publication path with existing byte-slice outputs, without whole-image allocation.
  • Preserve explicit GUID/name/slot/capacity semantics and non-512 blocks without fixed disk or partition limits.
  • Cover literal complete-image bytes, both GPT roles, invalid input without output effects, partial writes and exact native failure/retirement behavior.
  • Consume the exact selected owned host executable and strict numeric geometry; remove product sgdisk creation, queries and version dependency.
  • Update help, source-bound manuals, architecture, provenance and relevant native coverage.

Alternatives and tradeoffs

A separate tool would duplicate command admission and native entry. Sequential initialization needs no seek/truncate ABI: six metadata/gap segments use bounded memory and the existing linear initialization cost.

Tracking and rollout

Depends on the GPT metadata writer. Land Boot-tool, then its measured Integration supplier and host producer. Full partition-payload assembly, native filesystem formatting and complete self-hosting remain follow-up work.

## Problem and motivation The image recipe creates GPT metadata and queries geometry through sgdisk. EriX has its own caller-buffer GPT writer, but the builder cannot invoke it as a native file operation. ## Proposed behavior and scope Add boot-tool gpt-create on Linux and EriX. Explicit arguments select an ordinary output file, logical block size, disk length, GUIDs, table/header capacities and indexed partitions. Stream metadata and zero-filled gaps through one publication. Print versioned numeric geometry from the same checked plan after successful publication and retirement. Adopt this command in Integration's real image recipe. Filesystem formatting and partition-file dd overlays remain separate work. ## Authority, security and reliability The original prepared invocation selects one exact Publish14 file occurrence and no READ grant. No device, mount, entropy, service lookup or signing-key authority is added. Preflight geometry, storage and complete u64 byte length before Begin. Retain the original owners, packets, first error and separate cleanup evidence. Never replay uncertain effects; Status observes only the original commit. Keep Linux stable-parent and best-effort temporary-cleanup limits explicit. ## Acceptance criteria - [ ] Share one checked Bytes/Zeros publication path with existing byte-slice outputs, without whole-image allocation. - [ ] Preserve explicit GUID/name/slot/capacity semantics and non-512 blocks without fixed disk or partition limits. - [ ] Cover literal complete-image bytes, both GPT roles, invalid input without output effects, partial writes and exact native failure/retirement behavior. - [ ] Consume the exact selected owned host executable and strict numeric geometry; remove product sgdisk creation, queries and version dependency. - [ ] Update help, source-bound manuals, architecture, provenance and relevant native coverage. ## Alternatives and tradeoffs A separate tool would duplicate command admission and native entry. Sequential initialization needs no seek/truncate ABI: six metadata/gap segments use bounded memory and the existing linear initialization cost. ## Tracking and rollout Depends on the [GPT metadata writer](https://git.erikinkinen.fi/erix/lib-partition/issues/3). Land Boot-tool, then its measured Integration supplier and host producer. Full partition-payload assembly, native filesystem formatting and complete self-hosting remain follow-up work.
Author
Owner

The GPT initializer and image-builder changes are committed locally. The command prepares metadata before native authority binding, streams six byte/zero segments through one publication, and returns geometry after commit and grant retirement. The builder selects the original owned tool and binds its complete compiler source vector to the packaged revisions.

Coordinated publication is pending. Partition-file overlays and filesystem formatting remain separate work. The shared GPT writer is available.

The GPT initializer and image-builder changes are committed locally. The command prepares metadata before native authority binding, streams six byte/zero segments through one publication, and returns geometry after commit and grant retirement. The builder selects the original owned tool and binds its complete compiler source vector to the packaged revisions. Coordinated publication is pending. Partition-file overlays and filesystem formatting remain separate work. The shared [GPT writer](https://git.erikinkinen.fi/erix/lib-partition/src/commit/357cafd16fce9ed2de8c67c2184cfcd159318659) is available.
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:33:33 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
erix/boot-tool#7
No description provided.