mirror of
https://github.com/RhapsodiOS/RhapsodiOS.git
synced 2026-11-03 22:01:40 -07:00
[GH-ISSUE #36] sysinstall/instmedia: deferred minor review findings #29
Labels
No labels
bug
documentation
enhancement
enhancement
good first issue
help wanted
help wanted
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github-starred/RhapsodiOS#29
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @raynorpat on GitHub (Oct 6, 2026).
Original GitHub issue: https://github.com/RhapsodiOS/RhapsodiOS/issues/36
Minor findings the phase 5a reviews deferred (installer merged in
197a04b60; designdocs/superpowers/specs/2026-10-05-sysinstall-design.md, recorddocs/build/sysinstall.md). None blocks use.Disk layout (
layout.c)total > 63*255*1024branch, CHS at cylinder 1023 vs 1024, decoding a garbage signed MBR.layout_checkdoesn't refuse disks under 1 GB itself; onlylayout_autodoes.test_check_rulesasserts only non-NULL, not which rule fired.Sets and config (
sets.c,config.c)titleline after the first package line is read as a package named "title".:or newline (crypt output can't contain them).master.passwd,make_saltdeterminism, one set naming a package twice.driverDetectAuto Detect IDsvalues of 1024 bytes or more are skipped silently.Locationkey gets a secondLocationappended (untested)./usr/Devicesis missing; sysinstall can't tell that from "no cards".src/driverkit-3/PB.projectdoesn't listdriverDetect.mallocfor table names;t2leaks ifspewfails inwriteRoot.tests/fromSOURCEFILESand hardcodes i386 paths; the ppc slice was never compiled.readdirorder.replaceDisk,rootDisk, or the Boot/Active composition in-w.Write phase and screens (
steps.c,main.c,ui.c,disks.c)pclosestatus of the ESP stream is ignored, so a gzip failure reads as a size error.master.passwd's mode relies on the apk shipping 0600; an explicit chmod would be safer.boot0, the disk-name bound.int blocksin theDKIOCNUMBLKScall caps sizes at 1 TB.-1becomes 0xFF) and values over 0xFF.read_setsstops silently at 32 sets.driverDetectoutput tail may parse a partial first line as a bogus driver.Media builder (
vm/instmedia)parse_setdecodes ASCII, so a non-ASCII byte gives a bareUnicodeDecodeError.read_setsignores a symlinked set file.live.composeandbuild.buildeach rebuild a tree forread_sets.TABLEfixture is simpler than the real template, soset_keyis only tested against it.live.pydocstring says the overlay adds/private/Devices"only"; it's unconditional now.docs/superpowers/specs/2026-09-22-install-media-design.mdrow 7 still shows the two-runapk addflow.Harness (
vm/qemu_boot.py)--keep-hd0protects by real-path basename and location only; a hard link under another name would pass.check_keepable.--nicpins PCI slot 3, which--esp's unaddressed virtio disk would take first.Other
0xA7entry).Instance0-i386.tabletemplate comment says the booter probes NE2K by PCI IDs; the kernel'sPCIKernBusdoes.PCI_Maximums((/PCI_ConfigReg((names; DR2's answersPCIMaximums(/PCIConfigReg(.driverDetectworks around it with three spellings; the prefix table is likely a reconstruction slip.disk -ion the guest), sovm/rhap_image.pycan't read them.qemu_boot.py --typealways presses Return;--keystypes without it (added in phase 5a), so this only matters for menu-driving by habit.Phase 6 (bootable ISO, merged in
c6c392a00)Record:
docs/build/instmedia-cd.md, designdocs/superpowers/specs/2026-10-07-bootable-iso-design.md.bootefidisk.c's 18-sector read-ahead isn't clamped to the media end; on the CD the live UFS runs to the last block, so a file in the last ~9 KB would fail to read. ClampnblockstoMedia->LastBlock.(UINTN)nblocks * CD_BLOCKcan wrap on IA32; usenblocks > sizeof(bounce) / CD_BLOCK. Unreachable today (requests are at most 18 sectors).efi_cd_label_sector(block_size)ignores its argument.nsecs == 0, the 32-bit wrap or reads at the media end; the reversed El Torito disk-select test case was never seen RED on its own.efi_console.c'sgets()stub comment says it is never exercised, but stringTable's Query prompt can reach it.bootefishows no missing-boot-driver notice (boot2 does).boot-2 cleanup
errorslike the removed prompt did, so an unrelated earlier error skips its BOOT_TIMEOUT pause when a driver is also missing. Saving and restoring the value would be tidier.drivers.cdeclaresextern BOOL errorswhile bootefi definesint errors(pre-existing; the low byte is cleared).src/system_config-1/i386/Instance0.networkstill sets "Ask For Drivers", "Prompt For Driver Disk" andDRIVER_ASK_3;boot-2/reconstruction/vbe/divergences.md,saio.def(not built) and a FLOPPY note in boot2's Makefile header; the BootHelpfd()example and unused driver-disk strings.Builder (
vm/instmedia)compose(preinstalled=True, form="cd")ignoresform, and an unknown form string is treated as disk (buildrefuses the bad combinations).test_cd_label_fieldsdoesn't assert ntracks/nsectors/ncylinders/d_type or partition a's fsize/bsize/cpg;cd_labelhas a redundantlbl = …; return lbl.test_boot_image_ends_on_a_cylindercompares againstbui._part_entryitself; literal CHS bytes would be stronger.boot_image'sfs_sectorsis only an upper bound (the UFS fills the partition) — worth a docstring line.iso.write_isore-runslayout()and doesn't assertBOOT.CAT's LBA equalscatalog_lbabefore writing (onlycheck_isoafter);total_sectorsisn't checked against the layout end.build.py's boot-imagefs_sectorsruns outside the NoSpace→BuildError try;release_linedecodessoftware_versionas ASCII only.Harness (
vm/qemu_boot.py)--keep-hd0same-file check leaves out--cdrom, so an ISO underwork/pN-*passed as both IMAGE and--cdromwould be written through hd0.--cdrom, hd0 gets no fallbackbootindex; worth a help-text line.run()'s signature and two test kwargs lines.Drivers and templates
Instance0-i386.tabletemplate comment still describes the old Boot Drivers list (and says the booter probes NE2K; the kernel does).disk.tproj/disk.ckeeps its floppydo_boot1machinery, now a silent no-op unless-B1is given.@raynorpat commented on GitHub (Oct 7, 2026):
disk.tproj/disk.c: removed the floppy do_boot1 no-op machinery in commit
240802e8d