Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare FAT, Drive_IO Error #5

Closed
shidel opened this issue Aug 16, 2024 · 5 comments
Closed

Prepare FAT, Drive_IO Error #5

shidel opened this issue Aug 16, 2024 · 5 comments

Comments

@shidel
Copy link

shidel commented Aug 16, 2024

This test consisted of 6 diskettes.
(Complete log below, attached version is color html version.)

  • 2 good with files
  • 1 possibly ailing
  • 1 very bad
  • 2 recently formatted good blank diskettes.

On initial system boot and simply trying to format the 6 diskettes, every disk generates a Disk_IO error after formatting when attempting to prepare the FAT. FORMAT then terminates with error 129.

After the first pass through those floppies. I performed a simple DIR A:. And performed a second pass on the same floppies in the same order. The Disk_IO error no longer occurs after that point.

So, it appears that FORMAT is relying on some DOS/Kernel generated data that does not get initialized until after the drive is accessed by the kernel during the directory listing.

fmt.htm.zip

JemmEx v5.84 [02/12/24]
JemmEx loaded

Message Logger v1.00 (c) 2023, Jerome Shidel, BSD 3-Clause License
8192KB of XMS memory allocated for color logging.
mTCP NetDrive (Jun 16 2024) by M Brutman (C) 2023-2024 (www.brutman.com/mTCP)
  First network drive is I:, Number of drives: 1
NANSI.sys 4.0d: New ANSI driver. Copyright 1986-2007 Daniel Kegel and others
        http://www.kegel.com/nansi/  <dank at kegel.com>
        This is free software.  It comes with ABSOLUTELY NO WARRANTY.
        You are welcome to redistribute it under the terms of the
        GNU Public License; see http://www.gnu.org/ for details.
Kernel: allocated 46 Diskbuffers = 24472 Bytes in HMA

FreeCom version 0.85a - WATCOMC - XMS_Swap [Jul 10 2021 19:28:06]

Using custom packet driver settings in FDNETPD.BAT


3Com EtherLink PCI Bus Master Packet Driver v5.2.6
(C) Copyright 1999 3Com Corp.  All rights reserved.


Attempting to auto detect media.......


NIC Type:                3Com Etherlink 100 PCI NIC
Bus Type:                PCI
Slot:                    9 (0x9)
BusNo:                   0 (0x0)
I/O base:                31872 (0x7C80)
Interrupt:               9 (0x9)
Transceiver:             Twisted Pair (10BaseT)
Ethernet Address:        00:50:04:6E:01:2F
Packet Driver Interrupt: 96 (0x60)
mTCP DHCP Client by M Brutman (mbbrutman@gmail.com) (C)opyright 2008-2020
Version: Mar  7 2020

Timeout per request: 10 seconds, Retry attempts: 3
Sending DHCP requests, Press [ESC] to abort.

DHCP request sent, attempt 1: Offer received, Acknowledged

Good news everyone!

IPADDR 192.168.1.159
NETMASK 255.255.255.0
GATEWAY 192.168.1.1
NAMESERVER 192.168.1.1
LEASE_TIME 79185 seconds

Settings written to 'C:\FreeDOS\MTCP.CFG'

Performing action: APMDOS
If APMDOS slows down any app, use ADV:REG instead.
Going resident.
DOSLFN 0.41f (haftmann#software & jmh 4/2022): highloaded consuming 11824 bytes.


CuteMouse v2.1 beta4 [FreeDOS]
Installed at PS/2 port (wheel present)

CD-ROM initialization.
attempting to use the UDVD2 CD driver, success
attempting to load SHSUCDX CD extenstions, success
successfully started the CD driver and extensions for drive J: (FDCDX001)

Creative Plug and Play Configuration Manager (v1.06)
Copyright (C) Creative Technology Ltd., 1995-1996. All rights reserved.

    Found Creative Plug and Play card : Creative SB AWE64 Gold

Successfully configured 3 of 3 Creative Plug and Play devices.
BLASTER environment is set at: A220 I5 D1 H5 P330 E620 T6

 BLASTER environment is set at: A220 I5 D1 H5 P330 E620 T6
 SYSTEM.INI updated.

AWEUTIL TSR   Version 1.35
Copyright (c) Creative Technology Ltd, 1994-96. All rights reserved.

Reverb:  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
Chorus:  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

Creative Plug and Play Configuration Utility Version 1.07
Copyright(c) Creative Technology Ltd., 1995-1996. All rights reserved.

CD-ROM configured as J: drive (FDCDX001)

Done processing startup files C:\FDCONFIG.SYS and C:\FDAUTO.BAT

Type HELP to get support on commands and navigation.

Welcome to the FreeDOS 1.3 operating system (http://www.freedos.org)

C:\>format a: /u
 Insert new diskette for drive A:
 Press ENTER when the right disk is in drive...
Using drive default: 1440k (Cyl=80 Head=2 Sec=18)
Please enter volume label (max. 11 chars):
No label, disk will have no creation timestamp.
 Full Formatting (wiping all data)
100 percent completed.
 Preparing FAT area...
Drive_IO(WRITE 1, count 1 ) [FAT12/16] [drive A*]

 Critical error during DOS disk access
 DOS driver error (hex): 01
   Description: unknown unit for driver
 Program terminated.
 [Error 129]
C:\>format a: /u
 Insert new diskette for drive A:
 Press ENTER when the right disk is in drive...
Using drive default: 1440k (Cyl=80 Head=2 Sec=18)
Please enter volume label (max. 11 chars):
No label, disk will have no creation timestamp.
 Full Formatting (wiping all data)
100 percent completed.
 Preparing FAT area...
Drive_IO(WRITE 1, count 1 ) [FAT12/16] [drive A*]

 Critical error during DOS disk access
 DOS driver error (hex): 01
   Description: unknown unit for driver
 Program terminated.
 [Error 129]
C:\>format a: /u
 Insert new diskette for drive A:
 Press ENTER when the right disk is in drive...
Using drive default: 1440k (Cyl=80 Head=2 Sec=18)
Please enter volume label (max. 11 chars):
No label, disk will have no creation timestamp.
 Full Formatting (wiping all data)
100 percent completed.
 Preparing FAT area...
Drive_IO(WRITE 1, count 1 ) [FAT12/16] [drive A*]

 Critical error during DOS disk access
 DOS driver error (hex): 01
   Description: unknown unit for driver
 Program terminated.
 [Error 129]
C:\>format a: /u
 Insert new diskette for drive A:
 Press ENTER when the right disk is in drive...
Using drive default: 1440k (Cyl=80 Head=2 Sec=18)
Please enter volume label (max. 11 chars):
No label, disk will have no creation timestamp.
 Full Formatting (wiping all data)
Sector  845 CHS=[23:0:18] bad
Sector  863 CHS=[23:1:18] bad
Sector  899 CHS=[24:1:18] bad
Sector  917 CHS=[25:0:18] bad
Sector  935 CHS=[25:1:18] bad
Sector  953 CHS=[26:0:18] bad
Sector  971 CHS=[26:1:18] bad
Sector 1007 CHS=[27:1:18] bad
Sector 1169 CHS=[32:0:18] bad
Sector 1205 CHS=[33:0:18] bad
Sector 1241 CHS=[34:0:18] bad
Sector 1277 CHS=[35:0:18] bad
100 percent completed.
Found 12 bad sectors during formatting.
 Preparing FAT area...
Drive_IO(WRITE 1, count 1 ) [FAT12/16] [drive A*]

 Critical error during DOS disk access
 DOS driver error (hex): 01
   Description: unknown unit for driver
 Program terminated.
 [Error 129]
C:\>format a: /u
 Insert new diskette for drive A:
 Press ENTER when the right disk is in drive...
Using drive default: 1440k (Cyl=80 Head=2 Sec=18)
Please enter volume label (max. 11 chars):
No label, disk will have no creation timestamp.
 Full Formatting (wiping all data)
100 percent completed.
 Preparing FAT area...
Drive_IO(WRITE 1, count 1 ) [FAT12/16] [drive A*]

 Critical error during DOS disk access
 DOS driver error (hex): 01
   Description: unknown unit for driver
 Program terminated.
 [Error 129]
C:\>format a: /u
 Insert new diskette for drive A:
 Press ENTER when the right disk is in drive...
Using drive default: 1440k (Cyl=80 Head=2 Sec=18)
Please enter volume label (max. 11 chars):
No label, disk will have no creation timestamp.
 Full Formatting (wiping all data)
100 percent completed.
 Preparing FAT area...
Drive_IO(WRITE 1, count 1 ) [FAT12/16] [drive A*]

 Critical error during DOS disk access
 DOS driver error (hex): 01
   Description: unknown unit for driver
 Program terminated.
 [Error 129]
C:\>dir a:
 Volume in drive A has no label
 Volume Serial Number is 2A4E-0E1D
File not found.
C:\>format a: /u
 Insert new diskette for drive A:
 Press ENTER when the right disk is in drive...
Using drive default: 1440k (Cyl=80 Head=2 Sec=18)
Please enter volume label (max. 11 chars):
No label, disk will have no creation timestamp.
 Full Formatting (wiping all data)
100 percent completed.
 Preparing FAT area...
100 percent completed.

Format complete.

     1,474,560  bytes total disk space (disk size)
     1,457,664  bytes available on disk (free clusters)

           512  bytes in each allocation unit.
         2,847 allocation units on disk.

 Volume Serial Number is 0D60-0EED

Format another floppy (y/n)?
C:\>format a: /u
 Insert new diskette for drive A:
 Press ENTER when the right disk is in drive...
Using drive default: 1440k (Cyl=80 Head=2 Sec=18)
Please enter volume label (max. 11 chars):
No label, disk will have no creation timestamp.
 Full Formatting (wiping all data)
100 percent completed.
 Preparing FAT area...
100 percent completed.

Format complete.

     1,474,560  bytes total disk space (disk size)
     1,457,664  bytes available on disk (free clusters)

           512  bytes in each allocation unit.
         2,847 allocation units on disk.

 Volume Serial Number is 362F-0EEE

Format another floppy (y/n)?
C:\>format a: /u
 Insert new diskette for drive A:
 Press ENTER when the right disk is in drive...
Using drive default: 1440k (Cyl=80 Head=2 Sec=18)
Please enter volume label (max. 11 chars):
No label, disk will have no creation timestamp.
 Full Formatting (wiping all data)
Sector 2872 CHS=[79:1:11] bad
100 percent completed.
Found 1 bad sectors during formatting.
 Preparing FAT area...
100 percent completed.

Format complete.

     1,474,560  bytes total disk space (disk size)
           512  bytes in bad sectors
        17,408  bytes in clusters with bad sectors
     1,457,152  bytes available on disk (free clusters)

           512  bytes in each allocation unit.
         2,847 allocation units on disk.
             1 of the allocation units marked as bad

 Volume Serial Number is 282B-0EF0

Format another floppy (y/n)?
C:\>format a: /u
 Insert new diskette for drive A:
 Press ENTER when the right disk is in drive...
Using drive default: 1440k (Cyl=80 Head=2 Sec=18)
Please enter volume label (max. 11 chars):
No label, disk will have no creation timestamp.
 Full Formatting (wiping all data)
Sector 1169 CHS=[32:0:18] bad
Sector 1205 CHS=[33:0:18] bad
Sector 1241 CHS=[34:0:18] bad
100 percent completed.
Found 3 bad sectors during formatting.
 Preparing FAT area...
100 percent completed.

Format complete.

     1,474,560  bytes total disk space (disk size)
         1,536  bytes in bad sectors
        18,432  bytes in clusters with bad sectors
     1,456,128  bytes available on disk (free clusters)

           512  bytes in each allocation unit.
         2,847 allocation units on disk.
             3 of the allocation units marked as bad

 Volume Serial Number is 1A11-0EF4

Format another floppy (y/n)?
C:\>format a: /u
 Insert new diskette for drive A:
 Press ENTER when the right disk is in drive...
Using drive default: 1440k (Cyl=80 Head=2 Sec=18)
Please enter volume label (max. 11 chars):
No label, disk will have no creation timestamp.
 Full Formatting (wiping all data)
100 percent completed.
 Preparing FAT area...
100 percent completed.

Format complete.

     1,474,560  bytes total disk space (disk size)
     1,457,664  bytes available on disk (free clusters)

           512  bytes in each allocation unit.
         2,847 allocation units on disk.

 Volume Serial Number is 3721-0EF7

Format another floppy (y/n)?
C:\>format a: /u
 Insert new diskette for drive A:
 Press ENTER when the right disk is in drive...
Using drive default: 1440k (Cyl=80 Head=2 Sec=18)
Please enter volume label (max. 11 chars):
No label, disk will have no creation timestamp.
 Full Formatting (wiping all data)
100 percent completed.
 Preparing FAT area...
100 percent completed.

Format complete.

     1,474,560  bytes total disk space (disk size)
     1,457,664  bytes available on disk (free clusters)

           512  bytes in each allocation unit.
         2,847 allocation units on disk.

 Volume Serial Number is 2734-0EF9

Format another floppy (y/n)?
C:\>logger p>d:fmt.log
@PerditionC
Copy link
Contributor

I will have to look if format needs to do something or kernel does.

@PerditionC PerditionC added the bug label Aug 16, 2024
@boeckmann
Copy link
Contributor

Maybe related to FDOS/kernel#144 and FDOS/kernel@c08313a.

PerditionC added a commit that referenced this issue Aug 29, 2024
Note: we only do this for floppy disks to try and avoid sharing issue that caused this to be commented out in the first place.  The condition may need further refining to avoid sharing violation, but not sure what conditions actually caused the sharing violation to occur.  Or we may need to do a different call to force kernel to reload its idea of what the drive geometry is.
@PerditionC
Copy link
Contributor

can you try test release (see releases https://github.com/FDOS/format/releases/download/v0.92/format-092a-test.zip ). I re-enabled some commented out code, but gated it to only do so on floppy disks. I may need to further limit this to when the format changes and/or rework how the kernel is notified to refresh its idea of the disk's geometry. This fixes an error I was able to produce by using a zeroed 720KB image, but it wasn't the same error, though I believe the cause & fix are the same.

@shidel
Copy link
Author

shidel commented Sep 1, 2024

Sorry that I did not chance to test this until now...

  • power on
  • format a: /u
  • [error 129]
  • replace old format 0.92 with 0.92a
  • power cycle
  • format a: /u
  • format successful, no error. :-)

I also tried a couple variants like with /Q and /S. Plus known bad floppies. Each from a cold boot. All seemed as it should.

I think the changes you made fixed the problem. It no longer generates the [error 129] when formatting a floppy on cold boot when the diskette has yet to be read by DOS.

:-)

@PerditionC
Copy link
Contributor

new version with fix will be posted once translation work reasonably ready

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants