[comp.os.minix] patches to 1.5.10

tasayco@phoenix.Princeton.EDU (Maria Tasayco) (09/24/90)

Hi! I just applied the patches (1 and 2) to the atari minix 1.5.10
and I am having some problems. I have my root device on /dev/hd3
(which gets copied to /dev/ram on boot-up) and the kernel does
recognize this but can't read /dev/hd4, where I have the /usr stuff.
It tells me that there is an error reading block 1 of /dev/hd4. Now, I
know that the recommended names for partitions changed (although I
don't quite agree with the change) but I can't believe that is the
problem, since the kernel does find and read /dev/hd3. Any help will
be appreciated. Thanks!

	Francisco Figueirido
	e-mail: tasayco@phoenix.princeton.edu

meulenbr@cst.philips.nl (Frans Meulenbroeks) (09/24/90)

tasayco@phoenix.Princeton.EDU (Maria Tasayco) writes:
>Hi! I just applied the patches (1 and 2) to the atari minix 1.5.10
>and I am having some problems. I have my root device on /dev/hd3
>(which gets copied to /dev/ram on boot-up) and the kernel does
>recognize this but can't read /dev/hd4, where I have the /usr stuff.
>It tells me that there is an error reading block 1 of /dev/hd4. Now, I
>know that the recommended names for partitions changed (although I
>don't quite agree with the change) but I can't believe that is the
>problem, since the kernel does find and read /dev/hd3. Any help will
>be appreciated. Thanks!

Yes. This problem has been brought to my attention before. 
Since other people might have the same problem, I'll answer it in
public.

Both the ST 1.1 and 1.5 documentation mention that you should not use
the last sector of the hard disk due to an error in HDX.PRG. 
After 1.5.10 in stwini.c a sanity check which checks if the end of a
partition is beyon the end of the disk is added. If this is the case
the partition is not recognized.

The check if around line 343 and goes:
                       /* some sanity checks */
                        if ((pi[minor].pi_start + pi[minor].pi_size - 1 >=
                               hi.hd_pi[r].pi_start + hi.hd_pi[r].pi_size) ||
                            (pi[minor].pi_start < hi.hd_pi[r].pi_start) ||
                            (pi[minor].pi_size < 0))
                                pi[minor].pi_flag = PI_INVALID;

So if the partition end is beyond the disk end, or the partition start is
before the disk start, or the partition size is < 0, the partition is not
recognized. 

Note that the >= in the first line refuses to mount the partition if the
last sector of the disk is part of the partition.

General cure: re-partition your disk so the last sector is not used.
If you have data which you don't want to loose you can also change the
test above.

Enjoy,
--
Frans Meulenbroeks        (meulenbr@cst.philips.nl)
	Centre for Software Technology
	( or try: ...!mcsun!phigate!prle!cst!meulenbr)

UPSYF173%DBIUNI11.BITNET@cunyvm.cuny.edu (Wolfgang Thiel) (09/24/90)

     Hi,
        Maybe your problem is the same as mine was:
My new minix.img would not boot out of the TOS AUTO directory. The
.img file has become so large that it overwrites parts of the start
program which has strange results. I think, at least. Anyway, I just
made the load program bigger (some long dummy array) and everything
works now.
                  Wolfgang