vms-7b15: OVMX/VAX boots from a SINGLE VMB-bootable disk (browser-demo artifact + boot simplification) - #758
Merged
Merged
Conversation
…(ODS-2 partition on the boot disk) The Files-11 ODS-2 ACP's SYS$DISK (DKA0:) resolve now carries a NULL-terminated list of candidate backing devices, tried in order, first that opens wins: 1. /dev/ra1c -- two-disk layout (ODS-2 = whole separate MSCP disk on rq1) 2. /dev/ra0e -- single-disk layout (ODS-2 = partition 'e' of the boot disk) Order is zero-regression for the two-disk proof: with rq1 attached, ra1c opens and ra0e is never reached. In the single-disk boot rq1 is absent, so the ra1c open fails honestly (ENXIO) and the resolve falls through to the ODS-2 partition on the boot disk. A candidate binds only if its real block open succeeds (INV-6 / Rule 9). VAX substrate only (src/kernel-netbsd/); not the 3-way convergence gate. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…im mk_single_disk Adds the SLIM single-disk artifact path to the lab-vax boot harness: - drive_boot_vax.py: assemble-single mode (boot the shared NetBSD disk, resize_ffs the target root FFS, MAKEDEV ra0 so /dev/ra0e exists, swap in the ra0e-aware vms.kmod) and sysboot-single mode (boot ONE disk, no rq1, as a custom-sized RAUSER MSCP disk; require DKA0: -> ra0e + the full gate/PROVISION/Username: pass bar). - mk_single_disk.py: host-side NetBSD disklabel rewrite (shrink 'a', add the ODS-2 partition 'e', slim geometry: whole-disk 'c' + secperunit + drop the off-disk swap), inject the mastered ODS-2 system volume into 'e', truncate to the slim size. Validated: checksum matches, geometry consistent. - run-boot.sh: sysboot-single mode orchestrating build_single_disk + run_sysboot_single, with sha256 before/after INV-6 write teeth. Slim target: root FFS 200 MiB (resize_ffs) + ODS-2 64 MiB on a RAUSER=280 (~267 MiB) disk, vs the 2 GiB two-disk RA92 install. Two-disk path untouched. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The ODS-2 partition node /dev/ra0e is a block special (brw-, major 9) opened via vn_bdev_openpath; the assemble-single verification used test -c (char) and spuriously failed after MAKEDEV ra0 correctly created it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…root lacks it) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…hrink, 256 MiB root
The single-disk boot failed with 'exec /sbin/init: error 22' for every init
binary. Root cause: resize_ffs was OOM-killed ('UVM: ... out of swap') on the
32 MB VAX (single-user enables no swap), its failure masked by a '| tail'
pipe, so the FFS was never shrunk — then host-side truncation cut a full-size
filesystem down to the slim size, corrupting it.
Fixes in do_assemble_single:
- enable a 384 MiB swap FILE on the (writable) shared root before resize_ffs;
- run resize_ffs with NO pipe so run()'s marker captures its REAL exit code,
and require RESIZE_EXIT=0;
- after mounting, VERIFY via df that the FFS is actually <= the target size —
refuse to build (and later truncate) a disk that did not shrink;
- clean up the swap file afterward.
Also give resize_ffs comfortable headroom: root FFS 256 MiB (was 200), slim
disk RAUSER=340 (324 MiB) — still ~6x smaller than the 2 GiB two-disk image.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Consolidates the two-disk VAX boot (NetBSD FFS boot disk + separate raw ODS-2 volume) onto ONE labeled VMB-bootable disk — the single-artifact foundation for the PCjs browser demo, and a general boot simplification.
What
aVMB-boots the NetBSD root (kernel + /boot + /sbin/init=ovmx_init + vms.kmod/vmsfs.kmod + libc/ld.elf_so) and partitionecarries the raw OVMX ODS-2 system volume; the executive mountsDKA0:from partitione.src/kernel-netbsd/vms_blockdev_netbsd.c, VAX substrate only):DKA0:/DUA0:now carry a NULL-terminated candidate list{/dev/ra1c, /dev/ra0e}, first that opens wins. Strictly additive + backward-compatible —/dev/ra1cis still first, so the existing two-disk boot bindsra1cand never reachesra0e; single-disk falls through tora0eonly whenrq1is absent.tests/lab-vax/run-boot.sh sysboot-singlemode (+mk_single_disk.py) that assembles the slim single disk (resize_ffs the root down, inject ODS-2 into partitione, rewrite the disklabel/geometry). Existingsysboot/gate/negctlmodes untouched.Proof (real SIMH, one
attach rq0, no rq1)sha256 changed across the boot (real ODS-2 writes on partition
e, INV-6 teeth). Zero%OVMX-W-OWNERwarnings.Size
340,152,320 bytes (324 MiB) raw, ~53 MiB gzip'd — 6.3× smaller than the two-disk RA92 layout. Slim-sized to fit (256 MiB FFS + 64 MiB ODS-2).
VAX-substrate only (
src/kernel-netbsd) — does NOT ride the 3-way gate; the kmod cross-compiles clean. Two real bugs found+fixed en route (atest -cvs-bnode check; a maskedresize_ffsOOM-kill on the 32 MB VAX). Note: the boot images here are DYNAMIC (ld.elf_so); the-staticfast version is vms-0ab.