blog:pushbx:2025:0824_more_work_on_partition_scanning
Table of Contents
More work on partition scanning
2025-08-17
This blog post is a week late, albeit I did prepare it as usual. This happened due to personal reasons.
patchini
- Copy patchdeb.c source text file to patchsca.c
- Add patchsca.exe to mak.sh
- Add display of extnames to command help of patchsca
- Display current mode as a decimal and hexadecimal number
scanptab
- Split scanptab.mac with the mode equates from the main source file.
- Fix a bug where scan_subsequent_primary incorrectly checked the piBoot flag when it just wanted to detect the first (lowest) primary partition, eg when the priority active mode was not enabled. This came up during testing of the lDOS kernel.
lDebug
- Empty commit to cause rebuild of chstool.eld after the scanptab bugfix.
bootimg
- Add another example to the partdisk.asm usage comment, with an extended partition containing a logical partition, a nested extended partition, and finally a second logical partition. This is useful to test that the traditional order of logical partitions or ignoring subsequent logical partitions (after a nested extended partition) work as intended.
lDOS / lMS-DOS
- Add scanptab files to the lDOS source tree.
- Use scanptab scanner to replace the DOHARD and DoMini scanners in msbio/msinit.nas
- Add lDOS scan mode field to lCFG block, to be written by patchini/patchsca utility.
- Optimise handle_each_partition: Push registers after load_is_known indicates success.
- Reject attempts to log in duplicate drives on the same partition, displaying an error. (This would have been activated by the scanptab bug.)
- Display scan errors as "Boot error:" rather than "Boot failure:"
- Use DOSENTRY:DiskSector for reading partition tables, eliminating the sector allocated for Init_BootSeg.
- Update the error message for read error during partition table read, and drop unused message.
- In load_is_known do not set up di to point to the UPB template, directly address it.
- Ignore type 15 (0Fh) extended partitions if no LBA access is supported. I'm not entirely happy with this yet but for now it is done this way. This allows to exactly emulate the lDOS 2024 behaviour using the scan mode variable.
- Fix ZR check for partition ending at the end of the (32-bit) address space. This is pretty useless, likely a holdover from the MS-DOS v3.30 and lower kernels that only supported a 16-bit address space for block devices.
- Delete several variables no longer used, and comment on the dynamic configuration. The latter only knows two different end addresses for the resident DOSENTRY section now.
- Correct a typo (Waring instead of Warning) on the ENDATROM label.
- Drop obsolete extern directive, setting DS before SYSIN that's redundant, and a comment on moving the DOS.
- Start to update doc/ksection.txt file for new section layout.
- Move init_cmdline_terminators and parse_config into the DOSENTRY section. This is in preparation to allowing overriding the CheckDebugger variable from the kernel command line, before the debugger check happens.
- Fix unknown command display to not repeat the first text byte.
- Add function pointers (in DOSENTRY) to the command line name table. Also add the names for CHECKDEBUGGER and SCANMODE, which are no-ops as yet.
- Add number parsing from x2b2 repo to msbio/msinit.nas
- Implement the CHECKDEBUGGER and SCANMODE commands for the kernel command line, allowing to override their respective lCFG variables.
- doc: List the lzexedat utility as a possible packer for inicomp use.
- Fix cmdline_scanmode.clr to use a NOT on the whole of DX, not only DL.
- doc: Update manual on patchini tools, their supported values, and the two new kernel command line commands to override patchdeb and patchsca fields. Also change supported file systems to list the new default scan mode (multiple primary, extended, and logical partitions supported).
You could leave a comment if you were logged in.
blog/pushbx/2025/0824_more_work_on_partition_scanning.txt · Last modified: by ecm
