LevitateOS

Documentation

recpart

Mode-aware partition planning and apply backend for installation flows.

Section

Overview

recpart handles disk inventory, deterministic partition planning, and plan application. It is intentionally limited to partitioning/format/mount handoff and does not install payloads.

WARNING

Destructive tool: real apply requires explicit confirmation (--confirm DESTROY). Use --dry-run first.

Section

Usage

Command
bash
recpart <COMMAND> [OPTIONS]
Command Purpose
list-disks Enumerate candidate disks
plan Generate deterministic layout and script
apply Apply partition plan to disk

Section

Install Modes

Mode Intent
ab (default) A/B immutable-ready layout
mutable Classic mutable root layout

Section

Examples

Discover candidate disks (JSON)
recpart list-disks --json
Generate an A/B plan without applying
recpart plan --disk /dev/sda --mode ab --json
Dry-run apply for review
recpart apply --disk /dev/sda --mode ab --dry-run --json
Real apply (destructive)
recpart apply --disk /dev/sda --mode ab --confirm DESTROY

Section

Error Codes

Code Description
E001 Invalid target disk / safety failure
E002 Required tool missing
E003 Plan generation or policy validation failed
E004 Missing destructive confirmation
E005 Partition apply failed
E006 Filesystem format failed
E007 Mount operation failed
E008 Handoff generation failed
E009 JSON serialization failed
E010 Reserved not-implemented code
E011 Root privileges required
E012 Internal/runtime error

Section

Boundaries

  • Does: disk planning, apply, and install handoff metadata
  • Does not: rootfs extraction (recstrap), fstab generation (recfstab), or chroot config (recchroot)
  • Does not: A/B slot commit/rollback state machine (recab)

Section

See Also