[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Minixfs protection



Wonder if anyone has any ideas to shed some light on a long running problem
with minixfs (or more correctly hard disk software/minixfs): protection.
        I'll summarise what I'm currently doing and give a bit of backround.
Protection in this sense is how to stop TOS without Mint and minixfs accessing
and more importantly *writing* to a minix partition and trashing it.
        I currently use two methods.

1. Null disk. This is a method that fools TOS into thinking it's root directory 
is full (full of volume labels) and thus preventing access. The disk looks like
this:

Boot sector
Pseudo FAT sector.
Super block (copy of Pseudo fat sector)
Root dir ...
Rest of minix partition ...

The root directory is squeezed into the free sector following the super block.
The boot sector is set up for 1 sector FAT and 1 root dir sector. This is fine
except if the sector size is bigger than 512 bytes the FAT's and root dir
end up inside the minix partition: hence this method only works for 512 byte
sectors.

2. Partially zeroed BPB. Certain boot sector BPB entries are zeroed namely
number of FAT copies, number of root dir entries and sectors per FAT. This is 
the method Minix itself uses but it has a snag: AHDI does some sanity checking 
of the boot sector and complains, resulting in a zero return from Getbpb and
non-access.

        For AHDI, option 1. is all I can currently do. If the sector size is
bigger than 512 bytes this doesn't work at all. What I need is a general
solution that will work for all logical sector sizes and hard disk software
and is automatic.

        So the question is this: is there any 'official' way to do this? I
can think of all manner of possibilities e.g. setting up the boot sector so
the root dir is outside the partition boundary but that may cause problems of
its own.

Steve.