[comp.os.minix] Multiformat floppies Was: ST Minix 1.5 floppy driver and serial...

archer%segin4.segin.fr@relay.prime.com (Vincent Archer) (01/10/91)

Klamer Schutte -- Universiteit Twente <klamer@mi.eltn.utwente.nl> said:
> ta_cook@eisvxe.moundst.mn.org (Thomas A. Cook) writes:
> >Awhile back I remember some discussion about Minix for the ST being able to read
> >the disk label to determine the size of the disk and the ablility to read 800Kb
> >formatted (vs the 720Kb standard formatted) disks.
>
> >Am I remembering this correctly or not.  If there is such a patch available
> >where can I find it (non-FTP)?
>
> There is such a patch for minix 1.1. But this one does not patch cleanly
> to 1.5.

The patch 3 to 1.5.10 does exactly this. I still haven't read a non-standard
floppy with it, because everytime I use /dev/fd0 rather than sd0 or dd0, I get
a nice "kernel panic:" :-(
Something still wrong, I think :-)

> But there is a problem with this approach. You are creating a device which
> can be resized according to the data you write to it.
> (Suppose you have a 820k floppy. You write a tar file to the device /dev/dd0.
> Now you have a tar file at the 82/10/2 style floppy. But...
>  Next time you open the device, its bootblock( phys. block 0 ) will be
>  corrupted (i.e. it will be the tar file header). So you can't read your
>  information anymore)

Correct. It was pointed out in the doc with the above-mentionned patch.

> Make several minor devices point to several physical layouts. This will
> ensure that the problem above will not occur.

Aiieee. Not this again... The PC guys have the same thing, with /dev/at0,
/dev/fd0 and all kinds of nice floppy devices, depending on the kind of floppy
you use. And nobody ever knows how to read back the correct disks. :-)

> PS with a 82/10/2 floppy i mean 82 tracks, 10 sectors and 2 sides.
>    I think this is the biggest safe size on a standard ST.

It's not safe. My floppy drive doesn't seek past track 81 (i.e. trying to write
track 82 overwrites the previously written 81), so the only safe format for me
is 81/10/2 (some guys even have 83/11/2... Don't deny it, I've seen it once)





	Vincent Archer
	Email: archer%segin4.segin.fr@relay.prime.com

Thou shalt run lint frequently and study its pronouncements with care, for
verily its perception and judgement oft exceed thine.
  -- 1st commandment for C programmers

joerg@mwtech.UUCP (Joerg Werner) (01/15/91)

In article <41322@nigel.ee.udel.edu> archer%segin4.segin.fr@relay.prime.com (Vincent Archer) writes:
<Klamer Schutte -- Universiteit Twente <klamer@mi.eltn.utwente.nl> said:
<> ta_cook@eisvxe.moundst.mn.org (Thomas A. Cook) writes:
<> >Awhile back I remember some discussion about Minix for the ST being able to read
<> >the disk label to determine the size of the disk and the ablility to read 800Kb
<> >formatted (vs the 720Kb standard formatted) disks.
<>
[stuff deleted]
<
<The patch 3 to 1.5.10 does exactly this. I still haven't read a non-standard
<floppy with it, because everytime I use /dev/fd0 rather than sd0 or dd0, I get
<a nice "kernel panic:" :-(
<Something still wrong, I think :-)

Try a single side disk. This will (maybe:-) work. There is a little bug
inside the driver:-(. The number of cylinders isn't calculate correctly. It
must be divided by the number of heads!!


<> But there is a problem with this approach. You are creating a device which
<> can be resized according to the data you write to it.
<> (Suppose you have a 820k floppy. You write a tar file to the device /dev/dd0.
<> Now you have a tar file at the 82/10/2 style floppy. But...
<>  Next time you open the device, its bootblock( phys. block 0 ) will be
<>  corrupted (i.e. it will be the tar file header). So you can't read your
<>  information anymore)
<
<Correct. It was pointed out in the doc with the above-mentionned patch.
<

But such a device is very useful to read/write TOS-disks. I named it
/dev/a: and I call the tos-command with this name, i.e `tosdir -lR a:'.
The tos- command doesn't overwrite the bootblock, but recognizes all
(or may I say many) TOS-formats - no problems :-).


-- 
Joerg Werner, email: joerg@mwtech.UUCP, voice: 49-(0)6151-37 33 66