# neverklear/repairs architecture

> Architecture diagram of the GitHub repository neverklear/repairs, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/neverklear/repairs
- Repository: https://github.com/neverklear/repairs

## Overview

Boot Repair Tool is a Windows recovery batch script for repairing boot configuration on UEFI/GPT and BIOS/MBR systems. An administrator runs it from a recovery environment; it locates and mounts the boot partition, checks it, attempts bootrec repairs, falls back to bcdboot if needed, and displays entries for verification. The README also documents removing a temporary drive-letter assignment. Source excerpts were unavailable, so relationships below reflect documented behavior only.

Main entry points: [`repair_boot.bat`](https://github.com/neverklear/repairs/blob/main/repair_boot.bat) (Repair script)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_repair["Boot repair"]
  node_script["Repair script<br/>[repair_boot.bat]"]
  node_partition["Partition setup<br/>[repair_boot.bat]"]
  node_filesystem["Filesystem check<br/>[repair_boot.bat]"]
  node_bootrec["Boot record repair<br/>[repair_boot.bat]"]
  node_fallback["BCD fallback<br/>[repair_boot.bat]"]
  node_verify["Boot entry verification<br/>[repair_boot.bat]"]
  node_cleanup["Drive-letter cleanup<br/>[repair_boot.bat]"]
end

node_admin(("Recovery operator"))
node_diskpart["Partition utilities"]
node_chkdsk["chkdsk"]
node_bootrec_tool["bootrec"]
node_bcdboot_tool["bcdboot"]
node_bcdedit["bcdedit"]

node_admin -->|"runs"| node_script
node_script -->|"locates and mounts"| node_partition
node_partition -->|"assigns drive letter"| node_diskpart
node_script -->|"checks partition"| node_filesystem
node_filesystem -->|"runs"| node_chkdsk
node_script -->|"attempts repair"| node_bootrec
node_bootrec -->|"runs commands"| node_bootrec_tool
node_script -->|"uses on failure"| node_fallback
node_fallback -->|"rebuilds BCD"| node_bcdboot_tool
node_script -->|"lists entries"| node_verify
node_verify -->|"runs"| node_bcdedit
node_script -->|"removes assignment"| node_cleanup

click node_script "https://github.com/neverklear/repairs/blob/main/repair_boot.bat"
click node_partition "https://github.com/neverklear/repairs/blob/main/repair_boot.bat"
click node_filesystem "https://github.com/neverklear/repairs/blob/main/repair_boot.bat"
click node_bootrec "https://github.com/neverklear/repairs/blob/main/repair_boot.bat"
click node_fallback "https://github.com/neverklear/repairs/blob/main/repair_boot.bat"
click node_verify "https://github.com/neverklear/repairs/blob/main/repair_boot.bat"
click node_cleanup "https://github.com/neverklear/repairs/blob/main/repair_boot.bat"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_script,node_partition,node_filesystem,node_bootrec,node_fallback,node_verify,node_cleanup toneBlue
class node_admin,node_diskpart,node_chkdsk,node_bootrec_tool,node_bcdboot_tool,node_bcdedit toneIndigo
```

## Components

### Boot repair

- [Repair script](https://github.com/neverklear/repairs/blob/main/repair_boot.bat): `repair_boot.bat`
- [Partition setup](https://github.com/neverklear/repairs/blob/main/repair_boot.bat): `repair_boot.bat`
- [Filesystem check](https://github.com/neverklear/repairs/blob/main/repair_boot.bat): `repair_boot.bat`
- [Boot record repair](https://github.com/neverklear/repairs/blob/main/repair_boot.bat): `repair_boot.bat`
- [BCD fallback](https://github.com/neverklear/repairs/blob/main/repair_boot.bat): `repair_boot.bat`
- [Boot entry verification](https://github.com/neverklear/repairs/blob/main/repair_boot.bat): `repair_boot.bat`
- [Drive-letter cleanup](https://github.com/neverklear/repairs/blob/main/repair_boot.bat): `repair_boot.bat`

### Other components

- **Recovery operator**
- **Partition utilities**
- **chkdsk**
- **bootrec**
- **bcdboot**
- **bcdedit**

## Connections

- Recovery operator → Repair script: runs (evidence: `README.md`)
- Repair script → Partition setup: locates and mounts (evidence: `README.md`)
- Partition setup → Partition utilities: assigns drive letter (evidence: `README.md`)
- Repair script → Filesystem check: checks partition (evidence: `README.md`)
- Filesystem check → chkdsk: runs (evidence: `README.md`)
- Repair script → Boot record repair: attempts repair (evidence: `README.md`)
- Boot record repair → bootrec: runs commands (evidence: `README.md`)
- Repair script → BCD fallback: uses on failure (evidence: `README.md`)
- BCD fallback → bcdboot: rebuilds BCD (evidence: `README.md`)
- Repair script → Boot entry verification: lists entries (evidence: `README.md`)
- Boot entry verification → bcdedit: runs (evidence: `README.md`)
- Repair script → Drive-letter cleanup: removes assignment (evidence: `README.md`)
