[comp.os.minix] Minix-386 HELP!!

hp@vmars.tuwien.ac.at (Peter Holzer) (11/27/90)

Hi, Minix-Gurus!

Last Weekend I tried to install Bruce Evans Minix-386 patches. 
I followed John Nall's tutorial step by step, checked the CRCs
which all matched and came finally to the point of making a
bootable disk with shoelace. 

When I booted the disk, shoelace printed its sign on the screen,
the parameters, its own load address and segment sizes and,
while making horrible noises with my disk drive continued to
load the kernel, mm, fs and init. After this it said "Starting
Minix", cleared the screen, told me how much memory the computer
has, Minix needs, etc. and then -- nothing.

The kernel is obviously running, because I get characters I type
echoed, but I do not get a login prompt. When I type F1, all the
tasks and MM and FS (both waiting for ANY) are displayed, but no
init! 

There are three clues that may point to the error though I don't
yet know how (or else I wouldn't post this):

1. John wrote in his tutorial that the linker complained about
   duplicates at the kernel and fs, but he said nothing about
   init. Yet I get some duplicates with init.

2. The base addresses that shoelace displays and those I get by
   pressing F1 don't match. Shoelace says the MM is loaded at 
   1C100 (112.25k) and FS at 2EC00 (187k), but with F1 I get 87k
   for MM and 112k for FS.

3. When I get into shoelace's command interpreter and tell it to
   use /dev/ram as root partition, FS panicks with the message:
   'cannot report to MM' (That may be because I have not enough
   memory for a 1.2Meg RAM disk, it would leave only 400k for
   Minix and programs)


Has anybody had similar problems and solved them? 
Any ideas what could be wrong are welcome.

Thanx in advance,
	Peter.
--
|    _  | Peter J. Holzer                       | Think of it   |
| |_|_) | Technical University Vienna           | as evolution  |
| | |   | Dept. for Real-Time Systems           | in action!    |
| __/   | hp@vmars.tuwien.ac.at                 |     Tony Rand |

cechew@bruce.cs.monash.OZ.AU (Earl Chew) (11/28/90)

In <2176@tuvie> hp@vmars.tuwien.ac.at (Peter Holzer) writes:

>which all matched and came finally to the point of making a
>bootable disk with shoelace. 

Did you follow the shoelace documentation when you came to this part?

>When I booted the disk, shoelace printed its sign on the screen,
>the parameters, its own load address and segment sizes and,
>while making horrible noises with my disk drive continued to
>load the kernel, mm, fs and init. After this it said "Starting
>Minix", cleared the screen, told me how much memory the computer

This is good. At least shoelace appears to be working. What you haven't said is
how you've set up /etc/config. This is important. In particular, where is your
root directory going to be after Minix starts, how big is your ram disk, and
where is your ram disk image kept.

>has, Minix needs, etc. and then -- nothing.

>The kernel is obviously running, because I get characters I type
>echoed, but I do not get a login prompt. When I type F1, all the
>tasks and MM and FS (both waiting for ANY) are displayed, but no
>init! 

Ensure that /etc/ttys, /bin/login, /etc/getty, /etc/gettytab, /etc/rc,
/etc/passwd and /bin/sh are present on the boot floppy (you can leave
out getty* if you don't need it). Trying to make a minimal boot disk is
an interesting process :-( You will find that if one component is
missing, the system will freeze after printing that Minix is loaded.
You *must* have /etc/rc, even if it is empty! The reason you don't see
init is that it probably choked and died (because one of the above was
missing) --- someone ought to fix it before 1.6.

>2. The base addresses that shoelace displays and those I get by
>   pressing F1 don't match. Shoelace says the MM is loaded at 
>   1C100 (112.25k) and FS at 2EC00 (187k), but with F1 I get 87k
>   for MM and 112k for FS.

Shoelace doesn't lie (at least I don't think so). You should chase this one.

>3. When I get into shoelace's command interpreter and tell it to
>   use /dev/ram as root partition, FS panicks with the message:
>   'cannot report to MM' (That may be because I have not enough
>   memory for a 1.2Meg RAM disk, it would leave only 400k for
>   Minix and programs)

If you've elected to use a 1.2Mb floppy and initialised it with
mkfs /dev/at0 1200, and you're using this to initalise the ram disk (either
because ram disk is root or you're wanting to initialise the ram disk) then
you'd better have enough *physical* memory.

Earl
-- 
Earl Chew, Dept of Computer Science, Monash University, Australia 3168
EMAIL: cechew@bruce.cs.monash.edu.au PHONE: 03 5655447 FAX: 03 5655146
----------------------------------------------------------------------

nall@sun8.scri.fsu.edu (John Nall) (11/28/90)

In article <3402@bruce.cs.monash.OZ.AU> cechew@bruce.cs.monash.OZ.AU (Earl Chew) writes:
>In <2176@tuvie> hp@vmars.tuwien.ac.at (Peter Holzer) writes:
>
>>The kernel is obviously running, because I get characters I type
>>echoed, but I do not get a login prompt. When I type F1, all the
>>tasks and MM and FS (both waiting for ANY) are displayed, but no
>>init! 
>
>Ensure that /etc/ttys, /bin/login, /etc/getty, /etc/gettytab, /etc/rc,
>/etc/passwd and /bin/sh are present on the boot floppy (you can leave
>out getty* if you don't need it). Trying to make a minimal boot disk is
>an interesting process :-( You will find that if one component is
>missing, the system will freeze after printing that Minix is loaded.
>You *must* have /etc/rc, even if it is empty! The reason you don't see
>init is that it probably choked and died (because one of the above was
>missing) --- someone ought to fix it before 1.6.

	I agree that is probably the problem.  Also, if one of those 
routines is there, but is a 16-bit binary rather than a 32-bit binary,
that will cause a problem.

>>2. The base addresses that shoelace displays and those I get by
>>   pressing F1 don't match. Shoelace says the MM is loaded at 
>>   1C100 (112.25k) and FS at 2EC00 (187k), but with F1 I get 87k
>>   for MM and 112k for FS.
>
>Shoelace doesn't lie (at least I don't think so). You should chase this one.

	Assuming that Peter meant F2 rather than F1, the information which
Shoelace prints out, and the information under the "TEXT" column of the
information produced by pressing the F2 key should be the same.  They are
on my system (I just checked it to be sure).

>If you've elected to use a 1.2Mb floppy and initialised it with
>mkfs /dev/at0 1200, and you're using this to initalise the ram disk (either
>because ram disk is root or you're wanting to initialise the ram disk) then
>you'd better have enough *physical* memory.

	Yes, I think that I point this out in the tutorial, but in case I
didn't it obviously needs to be emphasized.  I have eight megs on my 386,
so have no way of knowing what the minimum would be.  However, I would guess
that unless one has about 4 megs, there may be some problems with using a
RAM disk.

>Earl

John

p.s.  Certainly glad to have SOME feedback on the tutorial (even if it is a
little bit negative :-< ) since there has been a deafening silence.  There
was also a deafening silence from the alpha-test volunteers.  But the day
was saved by the comments which Bruce Evans made on the draft version.

--
John W. Nall		| Supercomputation Computations Research Institute
nall@sun8.scri.fsu.edu  | Florida State University, Tallahassee, FL 32306
   WB4LOQ (why? I dunno....everyone else seems to be doing it.  _._)

cechew@bruce.cs.monash.OZ.AU (Earl Chew) (11/28/90)

In <1469@sun13.scri.fsu.edu> nall@sun8.scri.fsu.edu (John Nall) writes:

>	I agree that is probably the problem.  Also, if one of those 
>routines is there, but is a 16-bit binary rather than a 32-bit binary,
>that will cause a problem.

Urk. I'd forgotten about that one. I wonder how bulletproof Bruce's makelib
script is against such problems. I use makelib and have not yet managed to
produce an inconsistent library, but then again...

>	Assuming that Peter meant F2 rather than F1, the information which
>Shoelace prints out, and the information under the "TEXT" column of the
>information produced by pressing the F2 key should be the same.  They are
>on my system (I just checked it to be sure).

Which means that if you think that the information is wrong, you'd better find
out why before you use it with your hard disk. Otherwise, you might then find
yourself in the position to be able to experience the joys of bring an
Minix up from scratch :-(

>	Yes, I think that I point this out in the tutorial, but in case I
>didn't it obviously needs to be emphasized.  I have eight megs on my 386,
>so have no way of knowing what the minimum would be.  However, I would guess
>that unless one has about 4 megs, there may be some problems with using a
>RAM disk.

With shoelace, I find that it is probably better not to use a ram disk. With my
minimal emergency boot floppy, I leave /dev/at0 as the root device. This leaves
lots of memory to run processes. The penalty is that accessing the file system
is a lot slower, but loading the ram disk takes less time :-)

Earl
-- 
Earl Chew, Dept of Computer Science, Monash University, Australia 3168
EMAIL: cechew@bruce.cs.monash.edu.au PHONE: 03 5655447 FAX: 03 5655146
----------------------------------------------------------------------

obrien@torolab2.iinus1.ibm.com (Kevin O'Brien) (11/29/90)

Peter Holzer says,
>load the kernel, mm, fs and init. After this it said "Starting
>Minix", cleared the screen, told me how much memory the computer
>has, Minix needs, etc. and then -- nothing.

I also had this problem. After spending some time with db, and putting
print statements in fs and mm, I discovered that init was using more
stack space than the 0x1c bytes that INIT_STK (I think thats the name)
was defined as. It got a segmentation error and was killed. This is why,
at least in my case, init doesn't appear when you hit F1. I made the
initial stack for init very large (by changing the constant mentioned
above, my first attempt, doing a chmem, had no effect - init is special!)
and after rebuilding init worked like a charm.

I should probably also mention the next problem I ran into. After init
started, my system still didn't come up. I discovered that after forking,
process 3 tried to read /etc/rc without success, although the file was
present on my shoelace diskette. After debuggin for several days, I found
that the root directory which was read in at fs init time had garbage
in it. The fix to this was to change the shoelace config file to say
that the root device was my hard disk partition. Now I get minix to
boot, run login and so on. I haven't run the test cases yet, but all the
commands I have tried work, so far. One thing which doesn't work is
emacs, it gets a memory fault and core dumps on startup.

Oh, I should mention that I was booting from a 1.44meg drive. I am
assuming that this early, something doesn't know how to handle this.

To John Nall, Sorry about the deafening silence John! I was planning to
let you know how things went when I had sorted all this stuff out.

                              Kevin O'Brien

tvf@cci632.UUCP (Tom Frauenhofer) (11/29/90)

In article <37483@nigel.ee.udel.edu> obrien@torolab2.iinus1.ibm.com (Kevin O'Brien) writes:
>Peter Holzer says,
>>load the kernel, mm, fs and init. After this it said "Starting
>>Minix", cleared the screen, told me how much memory the computer
>>has, Minix needs, etc. and then -- nothing.
>
>I also had this problem. After spending some time with db, and putting
>print statements in fs and mm, I discovered that init was using more
>stack space than the 0x1c bytes that INIT_STK (I think thats the name)
>was defined as.

I had a similar problem, mine was that in non-386 mode I was using the
virtual console version (with a /etc/ttys defined for this) and I
stoo-pidly copied over the files from my /etc directory (replacing the
non-386 executables with 386 executables, of course).  I fixed this
file, booted like a champ, I'm now cruising.

FYI, I'm using the NEATsx motherboard (386sx at 16 Mhz), 2 Meg of SIPP
memory, Everex EV-332 hard/floppy controller, 2 serial ports, CGA graphics
(gotta replace this).  I've since gotten virtual consoles to work, and I've
compiled U-Mail, W-Mail, and Microwalt UUCP (with my mods, which I should
send back One Of These Days...).  If anything the system is more reliable
that the non-386 version...
-- 
Thomas V. Frauenhofer, WA2YYW, tvf@cci.com   | Q: What did the mortuary staff sing
{uupsi,ccicpg}!cci632!tvf@uunet.uu.net       |    when Yul Brenner was cremated?
tvf@frau.UUCP                                | A: See the blazing Yul before us!
tvf1477@ma.cs.rit.edu                        | (From _Incredibly_Tasteless_Jokes_)