Hi 大内義隆, Roy,

> I try some case.

Thanks :-)

> case1. DR-DOS 7.01.07 WIP (24.11.2004)
>  -> no problem
> case2. DR-DOS 8.0
>  -> no problem
> case3. Windows ME boot disk
>  -> no problem

All with the same FreeDOS FORMAT tool?
Then it might indeed be kernel-related.

>> If you do DIR B: before format, what will happen?
>> Is the disk already formatted before you format it?
> [Unformatted]
> A:\>dir b:
>   Volume in drive B has no label
>   Volume Serial Number is EF27-3654
> File not found.

I would assume that an unformatted disk
has to give some error for DIR if you
use it before formatting. On the other
hand, QEMU probably only simulates the
normal contents of a disk and not the
unformatted state of it.

That said, FORMAT /Q /U might suit the
QEMU environment better anyway: Quick
unconditional but not low-level format.

Looking at your log file:

> A:\>format b: /u /d
> 
> [DEBUG]  FORMAT 0.91v, selected drive B:
> [DEBUG]  Sector buffer at 2D52:6770, track buffer at 2D52:6B70
> [DEBUG]  Skipped ASSIGN check for diskette drive.
> [DEBUG]  DOS 7+, LOCKing drive
>  Insert new diskette for drive B:
>  Press ENTER when the right disk is in drive...
> [DEBUG]  DOS 7+, FORMAT-LOCKing drive
> [DEBUG]  Current Disk Drive Parameter Table Values at 0070:0119:
> [DEBUG]  [DDPT] Step Rate:   0 msec  Head Unload:   256 msec  DMA Flag Bit:  0
> [DEBUG]  [DDPT] Head Load:   0 msec  Post Rotate:   440 msec  Sector Size: 512
> [DEBUG]  [DDPT] SECTORS PER TRACK:  18  (Gap:   0  Data:   9  Format Gap:   0)
> [DEBUG]  [DDPT] Fill Char: 0x00  Head Settle: 0 msec  Motor Start: 1250 msec
> Using drive default: 1440k (Cyl=80 Head=2 Sec=18)
> [DEBUG]  Setting geometry with int 13h ah=18h: tracks=80 sectors=18
> [DEBUG] Updated INT 1E (DDPT) data at: 0070:0119.

...

> [DEBUG]  Configured Disk Drive Parameter Table Values at 0070:0119:
> [DEBUG]  [DDPT] Sector size: code 0x023  Fill char: 0x08
> [DEBUG]  Controller setup  0:  500 kbps (HD 1xx0k)
> -- press ENTER to format disk (ESCAPE to abort) --
> Please enter volume label (max. 11 chars):
> No label, disk will have no creation timestamp.
>  Full Formatting (wiping all data)
> [DEBUG]  Formatting: Cylinder:  0  Head:  0  Sectors: 18
> [DEBUG]  Formatting: Cylinder:  0  Head:  1  Sectors: 18

...

> [DEBUG]  Formatting: Cylinder: 79  Head:  0  Sectors: 18
> [DEBUG]  Formatting: Cylinder: 79  Head:  1  Sectors: 18

(here progress reaches 100%)

> [DEBUG]  File System Creation
> [DEBUG]  Boot Sector -> 0
> [DEBUG]  FAT Sectors: 1 to 18 ->
>   0% +**Drive_IO(WRITE 1, count 1 ) [FAT12/16] [drive B*]
> 
>  Critical error during DOS disk access
>  DOS driver error (hex): 01
>    Description: unknown unit for driver

Here FORMAT tries to write data to the second sector of
drive B: but fails. Writing the boot sector had worked,

Interestingly, a commented out piece of createfs.c says
that between Write_Boot_Sectors() and Write_FAT_Tables()
there was a Force_Drive_Recheck() in older versions J/P,
but that that would cause a "sharing violation". This is
int 21 function 0d (reset disk system and flush buffers)
followed by function 32 (force re-read of boot sector).
When formatting FAT32 drives, it finally calls func 7304.

>  Program terminated.
> [DEBUG]  DOS 7+, UNLOCKing drive (by one level)
> [DEBUG]  DOS 7+, UNLOCKing drive (by one level)
> 
> A:\>

The point that doing a DIR B: even on the "unformatted"
disk before formatting avoids the problem might be some
hint that the kernel does not setup some information on
drive B: until you first READ it. As format only WRITES
the disk in /U mode, this info might still be unset here.

Maybe some experienced kernel people can think about the
log and tell me what FORMAT or the kernel does wrong. If
the same FORMAT tool indeed works with DR DOS 7.0 and 8.0
and WinME DOS, maybe those are more foolproof and FORMAT
misbehaves a bit or the FreeDOS kernel is a bit foolish
(in particular when used inside QEMU) :-)

Regards, Eric



------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
Freedos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to