From 4ea992c71dd0cdcffe0f74216e748256bd700a31 Mon Sep 17 00:00:00 2001 From: salmonik Date: Sat, 1 Aug 2026 01:56:12 +0200 Subject: scripts: automate the data-disk workflow (mkdisk / sendkeys / test-disk) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - scripts/mkdisk.sh: create the FAT32 disk with mkfs.fat -C (the flag that actually creates the file — plain mkfs.fat fails on a missing path), accept M/G/K sizes, seed seed/ files via mtools; --fresh re-formats, --no-seed skips seeding - scripts/sendkeys.py: type lines into the guest via the QEMU monitor (US layout). Punctuation must use QEMU's named keys (minus, slash, dot, ...) — bare '-', '.', '/' are not valid sendkey names, and '-' is the modifier separator, so they were silently dropped before - scripts/test-disk.sh: full automated round trip — build, deploy, ensure image, boot headless QEMU, drive the shell (ls /disk, mkdir, echo >, cat, poweroff), then verify with fsck.fat (must be clean) and mtype (file content must have survived poweroff) - Makefile: make disk / disk-fresh / inspect / test-disk; run, run-gui and debug now auto-create a missing DISK_IMG; fix the stale comment (mkfs.fat without -C) - scripts/boot.sh: auto-create a missing DISK_IMG via mkdisk.sh - seed/: motd.txt + lines.txt seeded onto fresh images - Verified end to end: ./scripts/test-disk.sh --fresh passes --- seed/motd.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 seed/motd.txt (limited to 'seed/motd.txt') diff --git a/seed/motd.txt b/seed/motd.txt new file mode 100644 index 0000000..ac960fa --- /dev/null +++ b/seed/motd.txt @@ -0,0 +1,11 @@ +Welcome to rs-dos! + +This file lives on the FAT32 data disk (the one mounted at /disk). +The kernel mounts the first valid FAT32 volume it finds — create or +re-seed this image with: + + make disk # create if missing (default /tmp/disk.img) + make disk-fresh # re-format + re-seed from seed/ + +Everything written from the shell survives reboots: it's a real disk, +not RAM. -- cgit v1.2.3