From 0d2e1adbad834083bfea06e9ef0e520afbca9319 Mon Sep 17 00:00:00 2001 From: Howard Enos Date: Tue, 2 Jun 2026 10:59:27 -0700 Subject: [PATCH] sync: auto-sync from HOWARD-HOME at 2026-06-02 10:59:15 Author: Howard Enos Machine: HOWARD-HOME Timestamp: 2026-06-02 10:59:15 --- .../howard-bootstrap/claude-laptop-setup.bat | 168 ++++++++++++++++++ session-logs/2026-06-02-session.md | 31 ++++ 2 files changed, 199 insertions(+) create mode 100644 projects/msp-tools/howard-bootstrap/claude-laptop-setup.bat diff --git a/projects/msp-tools/howard-bootstrap/claude-laptop-setup.bat b/projects/msp-tools/howard-bootstrap/claude-laptop-setup.bat new file mode 100644 index 0000000..117b7e3 --- /dev/null +++ b/projects/msp-tools/howard-bootstrap/claude-laptop-setup.bat @@ -0,0 +1,168 @@ +@echo off +setlocal EnableExtensions +title AZ Computer Guru - ClaudeTools Laptop Fix +color 0B + +rem ============================================================ +rem ClaudeTools - Laptop Fix (Howard) +rem ------------------------------------------------------------ +rem 1) Installs the programs Claude needs (git, node, claude, +rem python, sops). +rem 2) Stops the "Claude hangs then closes when opened from the +rem claudetools folder" bug by disabling the grepai MCP +rem server (its binary, grepai.exe, is missing on this PC). +rem 3) Makes a desktop launcher that stays open on errors. +rem +rem Safe to run more than once. Targets C:\claudetools. +rem ============================================================ + +set "BASE=C:\claudetools" +set "SCRIPT_DIR=%~dp0" +set "NEEDS_RESTART=0" + +echo ============================================ +echo ClaudeTools - Laptop Fix +echo ============================================ +echo. +echo Installs required programs and stops the +echo hang-then-close problem when opening Claude. +echo. +echo Press any key to start, or close to cancel. +pause >nul + +echo. +echo [1/4] Installing required programs... + +where winget >nul 2>&1 +if errorlevel 1 echo [WARNING] winget missing. Install "App Installer" from the Microsoft Store, then re-run. + +rem --- git (also provides Git Bash, used by the repo) --- +where git >nul 2>&1 +if errorlevel 1 ( + echo [..] installing git... + winget install --id Git.Git -e --accept-package-agreements --accept-source-agreements + set "NEEDS_RESTART=1" +) else ( + echo [OK] git +) + +rem --- node (Claude Code runs on Node) --- +where node >nul 2>&1 +if errorlevel 1 ( + echo [..] installing Node.js LTS... + winget install --id OpenJS.NodeJS.LTS -e --accept-package-agreements --accept-source-agreements + set "NEEDS_RESTART=1" +) else ( + echo [OK] node +) + +rem --- python --- +where py >nul 2>&1 +if errorlevel 1 ( + where python >nul 2>&1 + if errorlevel 1 ( + echo [..] installing Python... + winget install --id Python.Python.3.12 -e --accept-package-agreements --accept-source-agreements + set "NEEDS_RESTART=1" + ) else ( + echo [OK] python + ) +) else ( + echo [OK] python +) + +rem --- sops (vault decryption) --- +where sops >nul 2>&1 +if errorlevel 1 ( + echo [..] installing SOPS... + winget install --id Mozilla.sops -e --accept-package-agreements --accept-source-agreements +) else ( + echo [OK] sops +) + +if "%NEEDS_RESTART%"=="1" ( + echo. + echo ============================================ + echo New programs were installed. CLOSE this + echo window and RUN THIS SCRIPT AGAIN so they + echo are on PATH. The second run finishes up. + echo ============================================ + echo. + pause + exit /b 0 +) + +echo. +echo [2/4] Installing / updating Claude Code... +call npm install -g @anthropic-ai/claude-code +if errorlevel 1 ( + echo [WARNING] Claude Code install reported an error - continuing. +) else ( + echo [OK] Claude Code installed/updated +) + +echo. +echo [3/4] Installing grepai + configuring MCP ^(stops the hang^)... +if not exist "%BASE%" ( + echo [WARNING] %BASE% not found. Make sure ClaudeTools is at %BASE%, then re-run. + goto :launcher +) + +rem --- install grepai.exe shipped alongside this script --- +if exist "%SCRIPT_DIR%grepai.exe" ( + copy /Y "%SCRIPT_DIR%grepai.exe" "%BASE%\grepai.exe" >nul + echo [OK] grepai.exe copied to %BASE% +) else ( + echo [..] grepai.exe not in this package - will disable the MCP server instead +) + +if not exist "%BASE%\.claude" ( + echo [WARNING] %BASE%\.claude not found. + echo Make sure ClaudeTools is at %BASE%, then re-run. + goto :launcher +) + +set "SL=%BASE%\.claude\settings.local.json" +if exist "%SL%" copy /Y "%SL%" "%SL%.bak" >nul + +if exist "%BASE%\grepai.exe" ( + > "%SL%" echo { + >>"%SL%" echo "env": { "CLAUDETOOLS_ROOT": "C:/claudetools" } + >>"%SL%" echo } + echo [OK] grepai.exe present - left enabled +) else ( + > "%SL%" echo { + >>"%SL%" echo "env": { "CLAUDETOOLS_ROOT": "C:/claudetools" }, + >>"%SL%" echo "disabledMcpjsonServers": ["grepai"] + >>"%SL%" echo } + echo [OK] grepai MCP server disabled - Claude will no longer hang +) +if exist "%SL%.bak" echo ^(old settings backed up to settings.local.json.bak^) + +:launcher +echo. +echo [4/4] Creating desktop launcher... +set "SHORTCUT=%USERPROFILE%\Desktop\ClaudeTools.bat" +> "%SHORTCUT%" echo @echo off +>>"%SHORTCUT%" echo title ClaudeTools - AZ Computer Guru +>>"%SHORTCUT%" echo cd /d C:\claudetools +>>"%SHORTCUT%" echo claude %%* +>>"%SHORTCUT%" echo if errorlevel 1 ( +>>"%SHORTCUT%" echo echo. +>>"%SHORTCUT%" echo echo [WARNING] Claude exited with an error - window kept open so you can read it. +>>"%SHORTCUT%" echo pause +>>"%SHORTCUT%" echo ^) +echo [OK] created %SHORTCUT% + +echo. +echo ============================================ +echo Done +echo ============================================ +echo. +where claude >nul 2>&1 && claude --version || echo [WARNING] claude not on PATH yet - open a NEW window. +echo. +echo Open a NEW window, then double-click "ClaudeTools" +echo on your Desktop. It should open without hanging. +echo. +pause +endlocal diff --git a/session-logs/2026-06-02-session.md b/session-logs/2026-06-02-session.md index c9335bb..7f30247 100644 --- a/session-logs/2026-06-02-session.md +++ b/session-logs/2026-06-02-session.md @@ -165,3 +165,34 @@ Attempted to forward the email to howard@azcomputerguru.com via Graph `/messages ### Reference (this update) - M365 tenant azcomputerguru.com (ce61461e-81a0-4c84-bb4a-7b354a9a356d); GuruProtect/INKY (shared.outlook.inky.com) behind Outlook SafeLinks (nam11.safelinks.protection.outlook.com). - /mailbox skill; vault msp-tools/claude-msp-access-graph-api.sops.yaml; related security todo 10536f07. + +## Update: 17:58 PT — Unraid bzfirmware checksum boot failure (infra) + +### Session Summary +Howard brought in an Unraid server (Dell-monitored box, Generic 8GB USB flash boot) that halts at boot with `bzfirmware checksum error - press ENTER key to reboot...`. Reviewed a photo of the console (Image #5). Diagnosed the failure: Unraid verifies each boot file (bzimage, bzroot, bzroot-gui, bzmodules, bzfirmware) against a stored SHA256 before mounting the OS. bzimage/bzroot/bzroot-gui/bzmodules all passed; only `bzfirmware` failed its checksum, so the OS never loads and the box reboots in a loop. + +Confirmed the flash drive itself is healthy at the filesystem layer: console shows `/dev/sda1` detected with label UNRAID, and `fsck.fat 4.2` ran clean (758 files, no FAT errors). The corruption is isolated to the bytes of the `bzfirmware` file, not the FAT structure. Pressing ENTER only reboots into the same error — it does not self-heal. + +Provided the remediation procedure: power off, pull USB, back up the entire stick on a Windows PC (critical: the `config/` folder holding super.dat disk assignments, the *.key license, shares, and network settings), download the exact matching Unraid version zip from unraid.net, then overwrite only the `bz*` files (+ their `.sha256`) on the USB while leaving `config/` untouched. Boot should then verify and the array should come up with existing assignments intact. + +Flagged that a single corrupt file on a cheap 8GB generic stick is a common early sign of a failing flash drive (the #1 wear item on Unraid). If the error recurs, plan a USB migration to a quality stick (new GUID requires a free self-service license transfer/replacement key at unraid.net, allowed once per 12 months). + +### Key Decisions +- Replace all `bz*` OS files rather than just `bzfirmware`, to guarantee version consistency and avoid kernel/module/firmware mismatch. +- Preserve the existing `config/` folder verbatim — only the OS files are refreshed, so disk assignments and license survive without a license transfer. +- Match the downloaded zip to the exact installed Unraid version before proceeding (asked Howard to confirm server/client/version so we grab the right release). + +### Problems Encountered +- bzfirmware checksum mismatch on the Unraid boot USB → fix by overwriting the corrupt `bz*` files from a matching-version Unraid zip; back up `config/` first. + +### Configuration Changes +- `.claude/current-mode` set to `infra`. + +### Pending / Incomplete Tasks +- Confirm which client/server this Unraid box belongs to and the exact installed Unraid version, then download the matching zip and refresh the `bz*` files. +- Watch for recurrence — if bzfirmware corrupts again, migrate to a new USB and process a license transfer. + +### Reference Information +- Boot device: /dev/sda1, label UNRAID, Generic Flash Disk 8GB (8.05 GB / 7.50 GiB). +- Unraid downloads: https://unraid.net (current + previous releases). +- Files to refresh on USB: bzimage, bzroot, bzroot-gui, bzmodules, bzfirmware (+ matching .sha256 each). Do NOT touch config/.