[comp.sys.att] Minor fix to Mtools patch for 3.5" disks

gst@gnosys.UUCP (Gary S. Trujillo) (08/21/88)

In article <611@bacchus.UUCP> darren@bacchus.UUCP (Darren Friedlein) writes:
>...
>One thing I'd like to find is a program like MsdosF.sh that will format
>3.5" disks.  Anyone know how to do this?

For that matter, does anyone know how to format 5.25" floppies at 360K?
Far as I know, /usr/bin/MsdosF.sh will only format 320K (8-sector) disks.

-- 
Gary S. Trujillo			{ihnp4,linus,bbn,m2c}!spdcc!gnosys!gst
Somerville, Massachusetts		     {cirl,ima,stech,wjh12}!gnosys!gst

jbm@uncle.UUCP (John B. Milton) (08/25/88)

In article <56@gnosys.UUCP> gst@gnosys.UUCP (Gary S. Trujillo) writes:
>In article <611@bacchus.UUCP> darren@bacchus.UUCP (Darren Friedlein) writes:
>>...
>>One thing I'd like to find is a program like MsdosF.sh that will format
>>3.5" disks.  Anyone know how to do this?
>
>For that matter, does anyone know how to format 5.25" floppies at 360K?
>Far as I know, /usr/bin/MsdosF.sh will only format 320K (8-sector) disks.

Well, too bad. The UNIX driver will only format (or use) an even number of
sectors. One way is to format 10 sector and only use 9. You're right, some
times it won't work. In theory, one could be written since the ioctl level
of the floppy driver allow direct commands to the FDC chip. I will take a peak
at it tonight and post a followup.

What I do is just format a bunch of "fresh" (never EVER been formatted) disks
on an AT HD drive in low density. These can be read on an system, and written
just fine on the UNIXpc. If you need to write on the PC side, that's different.

Digression:
 Any time you write to a disk with a 48 tpi drive, you create a wide data track
 on the disk. As long as you never try to write thin (96 tpi) data into an area
 that already has ANY kind of wide (48 tpi) data, you're ok.

 Now everyone is going to post back to the net "well it works fine for me...".
 Well, DON'T! unless you have something significant to add or I goofed :)
 If it worked for you, you've just been lucky. 

If you are doing only 48tpi to 48tpi, never mind!

One thing that is missing (I am assuming now that EVERYONE has Emmet Gray's
mtools) is a command "minit" that will write an empty boot block, FAT (switch
for size code), DIR, and optional volume label. Once we have this tool, we can
convert any UNIXpc disk to an MS-DOS disk quickly. We can also fix one that
got trashed.

I'll get back.

John
-- 
John Bly Milton IV, jbm@uncle.UUCP, n8emr!uncle!jbm@osu-cis.cis.ohio-state.edu
home: (614) 294-4823, work: (614) 459-7641; CP/M to MP/M, MS-DOS to OS/2

les@chinet.UUCP (Leslie Mikesell) (08/25/88)

In article <320@uncle.UUCP> jbm@uncle.UUCP (John B. Milton) writes:
 
>One thing that is missing (I am assuming now that EVERYONE has Emmet Gray's
>mtools) is a command "minit" that will write an empty boot block, FAT (switch
>for size code), DIR, and optional volume label. Once we have this tool, we can
>convert any UNIXpc disk to an MS-DOS disk quickly. We can also fix one that
>got trashed.

Why not just "dd" an appropriate number of sectors from a freshly formatted
MSDOS disk into a unix file, then reverse the operation to create new
MSDOS disks?  (The real problem is the inability to write a 9-sector low-level
format in the first place, though).
I also found that you can do this on a 3B2 by first creating a 720K format
MSDOS disk with the last track contained in a hidden file.  Mtools works
fine (although it always sees the hidden file) and the disk can also be
used in a 6386WGS HD drive.  I haven't tried any other AT type drives
but I understand that some BIOS implementations have trouble with the
720K format and try to double-step.  Locking out the last track is necessary
on the 3B2 because it is used by the driver (perhaps to determine which of
the one possible formats are in use???).

Les Mikesell

gst@gnosys.UUCP (Gary S. Trujillo) (08/27/88)

In article <320@uncle.UUCP> jbm@uncle.UUCP (John B. Milton) writes:
>In article <56@gnosys.UUCP> gst@gnosys.UUCP (Gary S. Trujillo) writes:
>>In article <611@bacchus.UUCP> darren@bacchus.UUCP (Darren Friedlein) writes:
>>>...
>>>One thing I'd like to find is a program like MsdosF.sh that will format
>>>3.5" disks.  Anyone know how to do this?
>>
>>For that matter, does anyone know how to format 5.25" floppies at 360K?
>>Far as I know, /usr/bin/MsdosF.sh will only format 320K (8-sector) disks.
>
>Well, too bad. The UNIX driver will only format (or use) an even number of
>sectors...

But don't standard MS-DOS floppies have 9 sectors?  I can read and write
them fine using either mtools or the DOS-73 coprocessor.

Shortly after posting my question, I got a very detailed response from
Roger Abrahams at Marquette University, going into basic theory of operation
of floppy drives and what all is actually on a floppy disk besides the actual
data.  Not only did Roger point out that one could format a 10-sector disk
with nine sectors actually allocated, but gave the command for doing it:

	md_format -9 /dev/rfp020

("md_format" is normally called from /usr/bin/MsdosF.sh)

-- 
Gary S. Trujillo			      {linus,bbn,m2c}!spdcc!gnosys!gst
Somerville, Massachusetts		     {icus,ima,stech,wjh12}!gnosys!gst