Closed boeckmann closed 2 months ago
Addition: I used format /F:720 flag to make sure if formats to the right size.
Nope, seems to be similar under the FreeDOS kernel. Do I something wrong here? Steps to reproduce:
MAC> dd if=/dev/zero of=test720.img count=1440 bs=512
DOS> format a: /f:720 /d
It may be that the DOS kernel is informed too late about the changed disk geometry while formatting. There is a Force_Drive_Recheck() call after the Create_File_System(), forcing DOS to rebuild its DDT (FreeDOS) / UDSC (EDR). But Create_File_System already fails. Create_File_System seems to use DOS absolute disk reads and writes, I guess with 1.44 disk geometry in use on a 720K floppy, because it fails on sector 9 (which might be the 10th?). That should indeed fail on a 720K. Would at least explain why this works if a previously formatted 720K is re-formatted.
Someone commented out the Force_Drive_Recheck() following the bootsector write. But I think this had some side-effects leading to this trouble. I re-enable this and check again.
https://github.com/FDOS/format/blob/9fe81f425f63615587e625701213025a0a08224c/createfs.c#L167-L169
Can you try test release of format - https://github.com/FDOS/format/releases/download/v0.92/format-092a-test.zip It re-enabled the Force_Drive_Recheck(), but only for floppies.
When I made this change myself a few days ago (without the floppy test) this worked. Do you want me to nevertheless test your test release? Will do it on weekend then...
fixed as of FORMAT 0.92
When I format a WIPED! 720K floppy in a 1.44M drive, or a wiped 360K diskette in a 1.2M drive, format fails.
I will consider this a kernel bug unless proved not to be.This also occurs under the FreeDOS kernel. Seems not to occur if the floppy contains a valid BPB before formatting.