[comp.os.minix] HD problem finally fixed! and HD boot question

allbery@ncoast.UUCP (Brandon S. Allbery) (08/23/87)

I have finally gotten a chance to install the 1.2 patches.  Actually, at
present it's only the new klib88.s and xt_wini.c installed as yet, but the
rest is ready to install.  Some comments:

(1) I finally convinced Minix to access the rest of my ST225.  I don's know
if this is an ITT XTRA BIOS bug or what, but when I gave up before I mentioned
that Minix was acting as if I only had a 10MB hard drive.  Guess what!  That
was EXACTLY the problem -- for some reason, it thinks I have a 10MB primary
hard drive and a 20MB secondary.  I swapped around the parameter tables after
loading, and also altered the write precomp value (it said 128, my stuff says
256), both in wini.c (as opposed to xt_wini.c) and now have a 10MB partition
for Minix to supplement the 5MB one.

(2) I just looked at cal.c from the net a few months ago:  at first glance, it
didn't work because the stdio buffers weren't being flushed.  I'll test it
tomorrow and report back...

(3) Speaking of which: why are the following not in the 1.2 commands package?

	cal	cdiff	ed	expr	test

All of them were posted on the net.

(4) What, officially, is the status of "patch"?  I have successfully gotten
it to run under Minix, via the patches posted to the net some time ago.
"Fix" is OK unless you make changes to stuff on your own (such as my wini.c
fixes...)

(5) I still have plans to redo the tty stuff.  It occurs to me that the changes
to FS as proposed in an earlier fix may be a good idea; the current setup is
stylistically nice but worthless as a useful construct.  It teaches the use
of message passing, but not how to write an OS that is actually useful.  I
*don't* have plans to work on that problem, though.

(6) And, the biggie:

Recently, Andy Tanenbaum posted a patch to Minix to load the root filesystem
from the hard disk.  This is nice, but I'd like to know if there will ever
be an official way to have the root filesystem be ON the hard disk:  a larger
filesystem and more free memory are nice incentives.  (Note that the ITT XTRA
is an 8088 machine, not an 80286.)

One thught I've had is to write a more conventional bootstrap loader, i.e.:

<ctrl/alt/del>
Minix 1.2 boot
: =hd(0,2)minix
Loading hd(0,2)minix
...

The '=' flags a boot command and allows the Olivetti M24 test; the rest tells
the loader where to look for the program.  Supported commands would be
something like:

	=spec
		spec is:
		fd(n,n)file
		hd(n,n)file
			as "minix" or "msdos" ("ibmbio"?)
			or "ccpm" or etc., default extensions
			of "com" or "sys" (or none) --
			where (n,n) is device and partition;
			for floppies the partition must be 0
		dos
			boot the first bootable DOS partition
		minix
			boot the first unknown-type partition
			as Minix
		cpm
			boot from a partition of type 240
			(CP/M-86, CCP/M, Concurrent DOS in
			native mode)

	m	do an INT 18 (monitor under ITT XTRA, BASIC elsewhere)
	f	fsck
	p	fdisk

This would be stored in a special partition consisting of a bootblock, a table
of programs, and the programs themselves; the bootblock loads the first
program, which is the actual loader.  Any thoughts?
-- 
 Brandon S. Allbery, moderator of comp.sources.misc and comp.binaries.ibm.pc
  {{harvard,mit-eddie}!necntc,well!hoptoad,sun!mandrill!hal}!ncoast!allbery
ARPA: necntc!ncoast!allbery@harvard.harvard.edu  Fido: 157/502  MCI: BALLBERY
   <<ncoast Public Access UNIX: +1 216 781 6201 24hrs. 300/1200/2400 baud>>
** Site "cwruecmp" is changing its name to "mandrill".  Please re-address **
*** all mail to ncoast to pass through "mandrill" instead of "cwruecuecuom	le

ast@cs.vu.nl (Andy Tanenbaum) (08/26/87)

In article <4240@ncoast.UUCP> allbery@ncoast.UUCP (Brandon S. Allbery) writes:
Wwhy are the following not in the 1.2 commands package?
>
>	cal	cdiff	ed	expr	test
>
Cal.c, expr.c, and test.c are in the 1.2 distribution.  I found and
fixed the bug in cal.c.  Ed is not there because it is large and I didn't
have time to test it out thoroughly yet.  It will be in 1.3 (sigh).  I
didn't include cdiff because (1) there were various fixes floating around
from various people, and I sort of lost track of the "definitive" version.
If someone will send that to me, I can include it in 1.3.  That incidentally,
won't be for many moons.  I have other fish to fry in the meantime.

> What, officially, is the status of "patch"? 
I didn't include it because it is so large.  I have been trying hard to
minimize the number of distribution diskettes, because the price P-H has
to charge is related to their manufacturing cost.  Also, patch belongs to
Larry Wall, so I have to discuss that with him at some point.

> I still have plans to redo the tty stuff.  It occurs to me that the changes
>to FS as proposed in an earlier fix may be a good idea; the current setup is
>stylistically nice but worthless as a useful construct.  
Please see if you can make a tty driver that only changes the tty.c file and
closely related files (klib88.s, mpx88.s).  The previously posted versions
have (1) had bugs and (2) required a major overhaul to the whole system,
which I haven't had the time to do.  (I have this fear that if I change
10 files at once, obscure bugs will crop up and I will have no idea where to
look.)
As to the splitting of FS into a separate module, it is very useful for
portability.  The Atari port, for example, changed virtually nothing in
FS.  If FS were integrated with the kernel, the port would have been
MUCH harder.  As to the performance of message passing, I have been using
a Zenith Z-248 AT clone.  I can now compile the "Hello world" program
in 10 seconds.  I am not displeased.  I'll post more statistics later.


>Recently, Andy Tanenbaum posted a patch to Minix to load the root filesystem
>from the hard disk.  This is nice, but I'd like to know if there will ever
>be an official way to have the root filesystem be ON the hard disk.
Probably not an "official" version.  I never really had problems on a PC
with 640K, and with 512K AT and extended memory, it really flies.

[Re: bootstrap loaded].  I am not especially interested, but if you are,
by all means do it and post it.  One of the advantages of booting MINIX from
floppy is that you can have an active hard disk partition for DOS, so that
to boot DOS, you don't use the floppy, and to boot MINIX, you do. Personally
I find that easy enough.

I have recently included soft scrolling in tty.c for the benefit of
EGA users with nonstandard cards (the regular 1.2 version works fine on
IBM EGA cards and true compatibles).  I'll post the new tty.c/klib88.s
when I have time.  (Having time is a recurrent theme with me).

Andy Tanenbaum (ast@cs.vu.nl)