[comp.os.minix] Minx ST BUg

paone@topaz.rutgers.edu (Phil Paone) (11/07/88)

I found what appears to be a bug with the tos command  and hard disks.  I get the
file starting after the firt few lines and then a get the beginning of
the next file on the disk at the end.  So, the byte count is right,
but I am getting parts of two files.  I works fine on the floppy drive
though. 

I will look at the source code eventually and report if I find
anything else.  Does anyone else have this problem?
-- 
Phil Paone
paone@topaz.rutgers.edu
!rutgers.edu!topaz.edu!ppaone

hcj@lzaz.ATT.COM (HC Johnson) (11/07/88)

tos.c contains several bugs.

1. only 127 clusters can be written correctly on a hard disk
   fix: on lines 1102 and 1103, remove the (char)

2. depending on the size of the hard disk partition, writing
   will both damage files and the start of a new file will be missing.

   This is due to the number of directory blocks (which are scaled to the 
   file system size.

   fix: change lines 339-343 to +FAT_START ));

3. Very large (16mb tos file systems) don't work at all.
   
   This is due to the fat size being > 32k, and sbrk, and read using signed
   integers.
   I have fixed it, but its too complicated for this posting.

4. PLEASE note.  The effect of error 1., is to permanently damage the tos
   file system.  I was using an empty one, so fixing just required 
   using dd to copy blocks of 0's over the fats and dir.  This is DANGEROUS!

johan@nlgvax.UUCP (Johan Stevenson) (11/09/88)

In article <Nov.7.08.05.51.1988.23172@topaz.rutgers.edu> paone@topaz.rutgers.edu (Phil Paone) writes:
>
>I found what appears to be a bug with the tos command  and hard disks.  I get the
>file starting after the firt few lines and then a get the beginning of
>the next file on the disk at the end.  So, the byte count is right,
>but I am getting parts of two files.  I works fine on the floppy drive
>though. 
>
>I will look at the source code eventually and report if I find
>anything else.  Does anyone else have this problem?
>-- 
>Phil Paone
>paone@topaz.rutgers.edu
>!rutgers.edu!topaz.edu!ppaone

Since already some other users have reported similar problems
I must conclude that something is wrong here.
I consider this a rather serious problem, since it might corrupt
your TOS volumes (I do not say it does, but chances are...).
So, please avoid the use of the tos(1) command on hard disks until
the problems are located and fixed.

If some MINIX-ST users have time to dig into this problem I would
ver much appreciate that. Since I haven't looked into the tos(1)
program myself before, I can offer no immediate help right now,
except for putting it very high on priority list.
Let us use the power of the user community (not too bg right now,
but hopefully growing fast).

Please report any progress to me (or to this newsgroup), so that
I can sanction a solution as the "official" one, much like
Andy Tanenbaum does for MINIX-PC.

A note on my mail address: in the announcement of MINIX-ST
Andy Tanenbaum mentioned johan@nlgvax.nl as my e-mail address.
This is incorrect. It is either
	...!mcvax!nlgvax!johan
or
	johan@nlgvax.uucp
or, preferably,
	johan@pcg.philips.nl
Sorry for the confusion.

				Johan W. Stevenson,
				Philips Research Laboratories,
				Project Centre Geldrop,
				Building XR, Room 15,
				Willem Alexanderlaan 7B,
				5664 AN Geldrop, The Netherlands.
				phone: +31 40 892205
				email: johan@pcg.philips.nl