Files
claudetools/docs/ENGINEER_CHANGELOG.html
Mike Swanson 29e2df60c5 feat: Complete DOS machine deployment verification and AD2-NAS sync infrastructure
This checkpoint establishes verified deployment infrastructure for the Dataforth
DOS Update System with proper file synchronization and documentation.

## Key Changes

### TS-4R Backup and Analysis
- Backed up complete TS-4R machine to D:\ClaudeTools\backups\TS-4R\
- Analyzed MENUX.EXE startup menu system (758-line QuickBasic program)
- Documented complete startup sequence: AUTOEXEC.BAT → STARTNET.BAT → MENUX.EXE
- Found MENUX.BAS source code (Feb 2008 version) from KEPCO ABC software archive

### AD2-NAS Sync Infrastructure Fixes
- Created junction: COMMON → _COMMON (single source of truth for software updates)
- Verified bidirectional sync logic prevents data backflow:
  * Test data: DOS → NAS → AD2 → Database (one-way, deleted from NAS)
  * Program updates: AD2 → NAS → DOS (one-way, files remain on AD2)
- Manually deployed correct BAT file versions to NAS after sync connection issues
- Verified all 9 BAT files deployed correctly (5.1KB-8.8KB each)

### Deployment Scripts Created
- check-junction.ps1: Verify COMMON/\_COMMON junction status
- compare-common-folders.ps1: Compare folder contents
- deploy-correct-bat-files.ps1: Deploy BAT files from local to AD2
- fix-common-junction.ps1: Create COMMON → _COMMON junction
- verify-bat-deployment.ps1: Verify file versions on AD2
- manual-push-to-nas.sh: Manual BAT file deployment to NAS
- read-sync-script.ps1: Read Sync-FromNAS.ps1 from AD2
- search-menux-ad2.ps1: Search for MENUX source files

### Documentation Updates
- Updated all deployment guides with MENUX startup sequence
- Added startup flow to credentials.md and session logs
- Documented junction requirement for COMMON/\_COMMON
- Added data flow verification confirming unidirectional sync

## Technical Details

**Files Deployed to NAS (2026-01-20 09:01-09:02):**
- UPDATE.BAT (5,181 bytes) - Machine backup utility
- DEPLOY.BAT (5,579 bytes) - One-time deployment installer
- NWTOC.BAT (6,305 bytes) - Network to Computer updates
- CTONW.BAT (7,831 bytes) - Computer to Network uploads
- CTONWTXT.BAT (1,504 bytes) - Text file version
- CHECKUPD.BAT (6,495 bytes) - Check for updates
- STAGE.BAT (8,794 bytes) - Stage system files
- REBOOT.BAT (5,099 bytes) - Apply staged updates
- AUTOEXEC.BAT (2,211 bytes) - DOS startup configuration

**Sync Logic Verified:**
- PULL: /data/test/TS-*/LOGS/*.DAT copied to AD2, then deleted from NAS
- PUSH: C:\Shares\test\_COMMON\ProdSW\* copied to /data/test/COMMON/ProdSW/
- No reverse flow in either direction (test data never returns to DOS)

**Junction Created:**
- Target: C:\Shares\test\COMMON → C:\Shares\test\_COMMON
- Eliminates duplicate file maintenance
- Backup saved to C:\Shares\test\COMMON.backup

## Files Modified
- DOS_DEPLOYMENT_GUIDE.md: Added automatic startup sequence
- docs/DEPLOYMENT_GUIDE.md: Updated post-reboot expectations
- docs/ENGINEER_HOWTO_GUIDE.md: Added MENUX menu loading step
- credentials.md: Documented startup sequence and MENUX interface
- session-logs/2026-01-19-session.md: Added startup documentation

## Files Added
- 8 PowerShell deployment/verification scripts
- 3 HTML documentation exports
- TS-4R complete backup (not committed to git)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-20 16:03:00 -07:00

441 lines
14 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DOS Update System - Technical Documentation</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;0,700;1,400&family=Raleway:wght@400;600;700;800&family=Fira+Mono:wght@400;500&display=swap" rel="stylesheet">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--color-primary: #1e3a8a;
--color-secondary: #3b82f6;
--color-text: #1f2937;
--color-text-light: #4b5563;
--color-border: #d1d5db;
--color-bg-code: #f9fafb;
--color-bg-highlight: #eff6ff;
--font-body: 'Lora', Georgia, serif;
--font-heading: 'Raleway', -apple-system, sans-serif;
--font-mono: 'Fira Mono', 'Consolas', monospace;
}
body {
font-family: var(--font-body);
font-size: 11pt;
line-height: 1.7;
color: var(--color-text);
background: white;
max-width: 210mm;
margin: 0 auto;
padding: 20mm;
}
h1, h2, h3, h4, h5, h6 {
font-family: var(--font-heading);
font-weight: 700;
line-height: 1.3;
margin-top: 2em;
margin-bottom: 0.75em;
color: var(--color-primary);
}
h1 {
font-size: 28pt;
font-weight: 800;
margin-top: 0;
margin-bottom: 0.5em;
padding-bottom: 0.3em;
border-bottom: 3px solid var(--color-primary);
}
h2 {
font-size: 18pt;
margin-top: 1.5em;
padding-bottom: 0.2em;
border-bottom: 2px solid var(--color-border);
}
h3 {
font-size: 14pt;
color: var(--color-secondary);
}
h4 {
font-size: 12pt;
font-weight: 600;
}
p {
margin-bottom: 1em;
}
strong {
font-weight: 700;
color: var(--color-text);
}
em {
font-style: italic;
}
ul, ol {
margin-left: 1.5em;
margin-bottom: 1em;
}
li {
margin-bottom: 0.5em;
}
pre {
background: var(--color-bg-code);
border: 1px solid var(--color-border);
border-left: 4px solid var(--color-secondary);
padding: 1em;
margin: 1em 0;
overflow-x: auto;
font-family: var(--font-mono);
font-size: 9pt;
line-height: 1.5;
border-radius: 4px;
}
code {
font-family: var(--font-mono);
font-size: 9.5pt;
background: var(--color-bg-code);
padding: 0.15em 0.4em;
border-radius: 3px;
border: 1px solid #e5e7eb;
}
pre code {
background: none;
border: none;
padding: 0;
}
table {
width: 100%;
border-collapse: collapse;
margin: 1.5em 0;
font-size: 10pt;
}
th, td {
border: 1px solid var(--color-border);
padding: 0.75em;
text-align: left;
}
th {
background: var(--color-primary);
color: white;
font-family: var(--font-heading);
font-weight: 600;
}
tr:nth-child(even) {
background: var(--color-bg-code);
}
.metadata {
background: var(--color-bg-highlight);
border-left: 4px solid var(--color-secondary);
padding: 1em;
margin-bottom: 2em;
font-size: 10pt;
}
.metadata p {
margin-bottom: 0.25em;
}
.divider {
border: none;
border-top: 1px solid var(--color-border);
margin: 2em 0;
}
.diagram {
background: var(--color-bg-code);
border: 2px solid var(--color-border);
padding: 1.5em;
margin: 1.5em 0;
font-family: var(--font-mono);
font-size: 9pt;
line-height: 1.4;
white-space: pre;
overflow-x: auto;
}
@media print {
body {
max-width: 100%;
padding: 15mm;
}
h1 {
page-break-before: auto;
page-break-after: avoid;
}
h2, h3, h4 {
page-break-after: avoid;
}
pre, table, .diagram {
page-break-inside: avoid;
}
a {
color: inherit;
text-decoration: none;
}
@page {
margin: 20mm;
@bottom-center {
content: "Page " counter(page);
font-family: var(--font-heading);
font-size: 9pt;
color: var(--color-text-light);
}
@bottom-right {
content: "DOS Update System - Technical Documentation";
font-family: var(--font-heading);
font-size: 8pt;
color: var(--color-text-light);
}
}
}
</style>
</head>
<body>
<h1>DOS Update System - Technical Documentation</h1>
<div class="metadata">
<p><strong>Document Version:</strong> 1.0</p>
<p><strong>Date:</strong> January 19, 2026</p>
<p><strong>Audience:</strong> Engineers and System Administrators</p>
</div>
<hr class="divider">
<h2>System Overview</h2>
<p>The DOS Update System automatically downloads software updates and uploads test data on every machine boot. No manual intervention required.</p>
<p><strong>Key Features:</strong></p>
<ul>
<li>Automatic updates on boot</li>
<li>Centralized file management on AD2</li>
<li>15-minute sync interval to NAS</li>
<li>DOS 6.22 compatible</li>
</ul>
<hr class="divider">
<h2>System Architecture</h2>
<h3>File Flow</h3>
<div class="diagram">┌─────────────────────────────────────────────────────────────────┐
│ AD2 Server (192.168.0.6) │
│ C:\Shares\test\COMMON\ProdSW\ │
│ │
│ Engineers place files here (via \\AD2\test\COMMON\ProdSW\) │
└──────────────────────┬──────────────────────────────────────────┘
│ Automatic Sync (every 15 minutes)
┌─────────────────────────────────────────────────────────────────┐
│ D2TESTNAS (192.168.0.9) │
│ /data/test/COMMON/ProdSW/ │
│ │
│ DOS machines access via T:\COMMON\ProdSW\ (SMB1) │
└──────────────────────┬──────────────────────────────────────────┘
│ NWTOC.BAT downloads updates
┌─────────────────────────────────────────────────────────────────┐
│ DOS Machines (~30 units: TS-01 through TS-30) │
│ C:\BAT\ and C:\ATE\ │
│ │
│ AUTOEXEC.BAT runs NWTOC + CTONW automatically on boot │
└─────────────────────────────────────────────────────────────────┘</div>
<hr class="divider">
<h2>System Components</h2>
<h3>AUTOEXEC.BAT</h3>
<p><strong>Location:</strong> C:\AUTOEXEC.BAT on each DOS machine<br>
<strong>Function:</strong> Machine startup configuration</p>
<p><strong>Executes on boot:</strong></p>
<ol>
<li>Sets machine identity (SET MACHINE=TS-XX)</li>
<li>Starts network client</li>
<li>Calls NWTOC.BAT (downloads updates)</li>
<li>Calls CTONW.BAT (uploads test data)</li>
</ol>
<hr class="divider">
<h3>NWTOC.BAT (Network to Computer)</h3>
<p><strong>Location:</strong> C:\BAT\NWTOC.BAT<br>
<strong>Function:</strong> Downloads software updates from network</p>
<p><strong>Download paths:</strong></p>
<ul>
<li>T:\COMMON\ProdSW\*.BAT → C:\BAT\</li>
<li>T:\COMMON\ProdSW\*.EXE → C:\ATE\</li>
<li>T:\TS-XX\ProdSW\*.* → C:\BAT\ and C:\ATE\</li>
<li>T:\COMMON\DOS\*.NEW → Staged for reboot</li>
</ul>
<p><strong>Features:</strong></p>
<ul>
<li>Only downloads newer files (XCOPY /D flag)</li>
<li>Creates .BAK backups before overwriting</li>
<li>Handles system file staging (AUTOEXEC.NEW, CONFIG.NEW)</li>
</ul>
<hr class="divider">
<h3>CTONW.BAT (Computer to Network)</h3>
<p><strong>Location:</strong> C:\BAT\CTONW.BAT<br>
<strong>Function:</strong> Uploads test data and programs to network</p>
<p><strong>Upload paths:</strong></p>
<ul>
<li>C:\BAT\*.BAT → T:\TS-XX\ProdSW\</li>
<li>C:\ATE\*.EXE, *.CFG → T:\TS-XX\ProdSW\</li>
<li>C:\ATE\*DATA\*.DAT → T:\TS-XX\LOGS\*LOG\</li>
</ul>
<p><strong>Data routing:</strong></p>
<ul>
<li>Programs → ProdSW (for distribution)</li>
<li>Test data → LOGS (for database import)</li>
</ul>
<hr class="divider">
<h3>DEPLOY.BAT</h3>
<p><strong>Location:</strong> T:\COMMON\ProdSW\DEPLOY.BAT<br>
<strong>Function:</strong> Initial machine deployment<br>
<strong>Usage:</strong> <code>T:\UPDATE.BAT TS-XX</code> (one-time setup)</p>
<p><strong>Deployment steps:</strong></p>
<ol>
<li>Creates C:\BAT\ directory</li>
<li>Copies all batch files to C:\BAT\</li>
<li>Installs AUTOEXEC.BAT with machine name</li>
<li>Creates network backup folder T:\TS-XX\</li>
</ol>
<hr class="divider">
<h3>UPDATE.BAT (Root Redirect)</h3>
<p><strong>Location:</strong> T:\UPDATE.BAT<br>
<strong>Function:</strong> Shortcut to DEPLOY.BAT<br>
<strong>Usage:</strong> <code>T:\UPDATE.BAT TS-XX</code></p>
<pre><code>@ECHO OFF
REM UPDATE.BAT - Redirect to DEPLOY.BAT in proper location
REM Usage: UPDATE.BAT machine-name
REM Example: UPDATE.BAT TS-4R
CALL T:\COMMON\ProdSW\DEPLOY.BAT %1</code></pre>
<hr class="divider">
<h2>Automatic Workflow</h2>
<ol>
<li>DOS machine boots</li>
<li>Network starts (C:\NET\STARTNET.BAT)</li>
<li>NWTOC runs automatically (downloads updates)</li>
<li>CTONW runs automatically (uploads test data)</li>
<li>System ready for testing</li>
</ol>
<p><strong>User actions required:</strong> None</p>
<hr class="divider">
<h2>Deployment Status</h2>
<h3>Files on AD2:</h3>
<ul>
<li>Location: <code>C:\Shares\test\COMMON\ProdSW\</code></li>
<li>Access: <code>\\AD2\test\COMMON\ProdSW\</code></li>
</ul>
<h3>Sync to NAS:</h3>
<ul>
<li>Frequency: Every 15 minutes</li>
<li>Destination: <code>/data/test/COMMON/ProdSW/</code></li>
<li>DOS Access: <code>T:\COMMON\ProdSW\</code></li>
</ul>
<hr class="divider">
<h2>DOS 6.22 Compatibility</h2>
<p><strong>Directory testing:</strong> Uses <code>*.*</code> wildcard instead of NUL device</p>
<pre><code>IF NOT EXIST C:\BAT\*.* MD C:\BAT</code></pre>
<p><strong>Pipe operations:</strong> Single pipes with temp files instead of multi-pipe chains</p>
<pre><code>TYPE C:\AUTOEXEC.TM1 | FIND /V "REM Dataforth" > C:\AUTOEXEC.TM2
TYPE C:\AUTOEXEC.TM2 | FIND /V "REM Automatically" > C:\AUTOEXEC.TM3</code></pre>
<hr class="divider">
<h2>File List</h2>
<h3>Core Files:</h3>
<ul>
<li>AUTOEXEC.BAT (82 lines)</li>
<li>NWTOC.BAT (221 lines)</li>
<li>CTONW.BAT (272 lines)</li>
<li>DEPLOY.BAT (188 lines)</li>
<li>UPDATE.BAT (5 lines)</li>
</ul>
<h3>Utility Files:</h3>
<ul>
<li>CHECKUPD.BAT - Check available updates</li>
<li>STAGE.BAT - System file staging</li>
<li>REBOOT.BAT - Apply staged updates</li>
</ul>
<hr class="divider">
<h2>Support</h2>
<p><strong>Documentation:</strong></p>
<ul>
<li>ENGINEER_HOWTO_GUIDE.md - Engineer procedures</li>
<li>DEPLOYMENT_GUIDE.md - Test staff procedures</li>
</ul>
<p><strong>Emergency Contact:</strong></p>
<ul>
<li>System Down: Contact IT immediately</li>
<li>Rollback Required: See git history</li>
</ul>
</body>
</html>