Subject: Re: Pre-installation question
To: NetBSD mailing list <port-atari@NetBSD.ORG>
From: Waldi Ravens <waldi@moacs.indiv.nl.net>
List: port-atari
Date: 05/05/1995 02:54:00
Hallo Leo,

> 	I am lucky I'm dutch

Prima, gaan we toch in het Nederlands verder. ,-)
 
> so I am able to understand some german :-)
> But I would kindly request you to switch to english on a international
> mailing list :-)

A mailing list can only be truely international if it is multilangual,
just look at Atarix for a good example of a truely international list
(warning: this is written by one of the virtual fathers of Atarix). :-)

Well, I was just being lazy. English is such a difficult language
to write in, compared to dutch, german or french.

> > > (btw: what stands ufs for?):
> > Wie waer's mit unix filesystem?
> Mmmmm, I was just thinking about 'the Ulimate File System' :-)

Certainly an appropriate name, but what would the next
filesystem generation be called, uufs? :-)

> The problems with the MESSDOS compatible filesystems is probably with
> Atari. I already had mycroft release the checking on some of the boot
> block (so it works an all _my_ DOS partitions) but this obviously was
> not enough. It seems that Atari is making a mess of the boot-block.
> The current checks are:
>     	pmp->pm_BytesPerSec != 0

It might be more secure to check for a multiple of the physical sector
size, that would always be true. In fact the multiple must be a power
of 2.

>       pmp->pm_SectPerClust != 0

SPC is also garanteed to be a power of 2.

> 	   Heads <= 255

This check must not be made. This value is only used (by TOS) for floppy
disks. In the bootsector of a GEMDOS filesystem on a hardisk partition
the NSIDES location contains no valid information.

> 	   SecPerTrack <= 63

Same story here. SPT contains only information on floppy disks, on a
harddisk partition this location must be ignored.

> If these conditions are not met, the kernel refuses to mount it. I think
> we should find out what's wrong and maybe suggest a machine compatible hook
> to check the boot-block.

The following locations in the bootsector of a GEMDOS filesytem on a harddisk
partition contain valid information: BPS, SPC, RES, NFATS, NDIRS, NSECTS, SPF.

It can be argued that NFATS must always be 2 (this could be checked for extra
security). It is guaranteed that NSECTS >= 1 and RES >= 1. And off course the
number of reserved, FAT and rootdir. sectors may not exceed NSECTS.

A very important check is: the logical sector size multiplied by the number
of logical sectors must be <= the number of physical sectors in the partition
description (in the root- or auxilary root sector) multiplied by the physical
sector size.


Waldi