summaryrefslogtreecommitdiffstats
path: root/seed
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-08-01 01:56:12 +0200
committersalmonik <salmonik@tuta.io>2026-08-01 01:56:12 +0200
commit4ea992c71dd0cdcffe0f74216e748256bd700a31 (patch)
tree2992b0063f08fbf79586d35ad481539fd7ee9af4 /seed
parentahci: skip ATAPI ports and fast-fail on device abort (diff)
downloadrs-dos-4ea992c71dd0cdcffe0f74216e748256bd700a31.tar.gz
rs-dos-4ea992c71dd0cdcffe0f74216e748256bd700a31.zip
scripts: automate the data-disk workflow (mkdisk / sendkeys / test-disk)
- 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
Diffstat (limited to 'seed')
-rw-r--r--seed/lines.txt6
-rw-r--r--seed/motd.txt11
2 files changed, 17 insertions, 0 deletions
diff --git a/seed/lines.txt b/seed/lines.txt
new file mode 100644
index 0000000..719197f
--- /dev/null
+++ b/seed/lines.txt
@@ -0,0 +1,6 @@
1the quick brown fox jumps over the lazy dog
2the quick brown fox jumps over the lazy dog
3the quick brown fox jumps over the lazy dog
4line 4: a slightly longer line to exercise multi-cluster reads
5line 5: rs-dos persistence test — power off and back on
6line 6: hello from the disk
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 @@
1Welcome to rs-dos!
2
3This file lives on the FAT32 data disk (the one mounted at /disk).
4The kernel mounts the first valid FAT32 volume it finds — create or
5re-seed this image with:
6
7 make disk # create if missing (default /tmp/disk.img)
8 make disk-fresh # re-format + re-seed from seed/
9
10Everything written from the shell survives reboots: it's a real disk,
11not RAM.