[comp.os.minix] mkfs 1.2 problem

wee@iris (Chris Wee) (05/03/88)

I have tried to use mkfs in minix to construct a file system  us-
ing  a proto file -- it does not work for me.  Is anyone aware of
any problems with mkfs?  Even the examples in the  text  and  the
example files on the master distribution do not work.

I get an "unexpected end of file" error on line #4.  It is always
line #4, no matter what file is being used.

The command line I use is,
	# mkfs /dev/at0 proto
just like it says in the MINIX book.

Please, if anyone can help, send mail directly me.
Thanks in advance :-).

Chris Wee	wee@iris.ucdavis.edu

driscoll@eecae.UUCP (Mike Driscoll) (05/03/88)

in article <1867@ucdavis.ucdavis.edu>, wee@iris (Chris Wee) says:
> 
> I have tried to use mkfs in minix to construct a file system  us-
> ing  a proto file -- it does not work for me.  Is anyone aware of
> any problems with mkfs?  Even the examples in the  text  and  the
> example files on the master distribution do not work.
> 
> I get an "unexpected end of file" error on line #4.  It is always
> line #4, no matter what file is being used.
> 
> The command line I use is,
> 	# mkfs /dev/at0 proto
> just like it says in the MINIX book.
> 
> Please, if anyone can help, send mail directly me.
> Thanks in advance :-).
> 
> Chris Wee	wee@iris.ucdavis.edu


   Sorry to post, but I couldn't find a valid path to Andy.  I have just
had the same problem.  I have a copy of the 640K PC distribution, that
I want to get up and running on my 512K AT.  I will need to remake the
kernel at some point to use at_wini.c.  As a first step I proceeded to
create the AT disk set from the proto files in the proto.a archive on
the tools diskette and mkfs (running under MINIX).  I get precisely
the same error as Chris no matter what proto file is used.  Even a
minimal proto file (e.g. only a root directory and an empty
subdirectory) creates only the root directory before giving the error
message.  I then made an empty root file system using the mkfs option
on the startup menu and copied the neccesary files to create a 
root file system of the correct size.  But, as pointed out in the 
READ_ME file in the distribution, since mknod cannot add sizes to the
special files it creates, all the files in /dev have size 0, instead
of 512 (for mem, kmem, etc.), 1200 for at0, at1, and so on.

  Is there a fix?

Thanks,
Mike


-- 
Michael A. Driscoll              UUCP: ...ihnp4!msudoc!eecae!driscoll
Dept. of Electrical Engineering  ARPA: driscoll@eecae.ee.msu.edu  (35.8.8.151)
Michigan State University        Office: (517) 353-5337
E. Lansing, MI, 48824

lmjm@doc.ic.ac.uk (Lee McLoughlin) (05/05/88)

I too was unable to use mkfs with a proto type file.  The ``fix'' is to
rebuild it and reinstall it.  Worked for me.

	Lee.

hall@nosc.NOSC.MIL (Robert R. Hall) (05/05/88)

The problem isn't with your proto file but with mkfs.  I replaced mine
with version 1.0 which worked fine.  Then I put the 1.2 upgrades
in , recompiled all my library element, then compiled and
relinked mkfs.  After all this it now works fine.  Sorry I can't
tell you which of all my changes corrected the problem.

				    Robert R. Hall
				    hall@nosc.mil

br@laura.UUCP (Bodo Rueskamp) (05/06/88)

The mkfs binary of the Minix 1.2 640k PC distribution is bad.
After compiling the source, mkfs works now without errors.

--
Bodo Rueskamp
br@unido.uucp

baumann@hope.UUCP (Michael Baumann) (05/06/88)

In article <7930@eecae.UUCP> driscoll@eecae.UUCP (Mike Driscoll) writes:
>in article <1867@ucdavis.ucdavis.edu>, wee@iris (Chris Wee) says:
>> 
>> I have tried to use mkfs in minix to construct a file system  us-
>> ing  a proto file -- it does not work for me.  Is anyone aware of
>> any problems with mkfs?  Even the examples in the  text  and  the
>> example files on the master distribution do not work.
>> 
>> I get an "unexpected end of file" error on line #4.  It is always
>> line #4, no matter what file is being used.
>> 
stuff deleted

>the tools diskette and mkfs (running under MINIX).  I get precisely
>the same error as Chris no matter what proto file is used.  Even a
>
>  Is there a fix?
You bet there is, and you're gonna kick yourself when you hear it
(I know, 'cause we did :-)). On page 387 of The Book it says,
 " If the compiler (or, in fact, almost any program) begins acting 
 strange, it is almost always due to its running out of space,..."
The solution is to use chmem on mkfs. I can't remember what the correct
value is supposed to be, look in the file changemem, I think it's in
the tools directory. I don't know why but just about everything was 
correct in the allocation of stack but this one. In truth, since it is
unlikely that you will be running anything else when you do mkfs, I'd just
give it the maximum stack it will take: chmem =64000 mkfs.
this should solve your problem.


-----------------------------------------------------------------------------
"Life is full of little suprises." -- Pandora  (as quoted by Robert Asprin)
UUCP:   {ucbvax!ucdavis,ucsd,ucivax}!ucrmath!hope!baumann
				or !ucrmath!jinx!baumann

ast@cs.vu.nl (Andy Tanenbaum) (05/08/88)

In article <7930@eecae.UUCP> driscoll@eecae.UUCP (Mike Driscoll) writes:
>in article <1867@ucdavis.ucdavis.edu>, wee@iris (Chris Wee) says:
>> 
>> I have tried to use mkfs in minix to construct a file system  us-
>> ing  a proto file -- it does not work for me.  Is anyone aware of
>> any problems with mkfs?  Even the examples in the  text  and  the
>> example files on the master distribution do not work.

The only thing I can think of, is give mkfs more stack space with chmem.
For example, chmem =40000 /usr/bin/mkfs.  Many weird problems are caused by
not having enough stack space. 

Andy Tanenbaum (ast@cs.vu.nl)

driscoll@eecae.UUCP (Mike Driscoll) (05/08/88)

in article <701@ast.cs.vu.nl>, ast@cs.vu.nl (Andy Tanenbaum) says:
> 
> In article <7930@eecae.UUCP> driscoll@eecae.UUCP (Mike Driscoll) writes:
>>in article <1867@ucdavis.ucdavis.edu>, wee@iris (Chris Wee) says:

[ Problem using mkfs with proto files is described.  ]

> 
> The only thing I can think of, is give mkfs more stack space with chmem.
> For example, chmem =40000 /usr/bin/mkfs.  Many weird problems are caused by
> not having enough stack space. 
> 
> Andy Tanenbaum (ast@cs.vu.nl)

  As several people pointed out, this does fix the problem.  I used
chmem =20000 mkfs and it worked fine.  The commands makefile uses
chmem =2048 for whatever command you are making.  This is obviously 
not correct for mkfs.  The book says that whenever something
acts funny, try chmem.  So, of course, I didn't try that until 
someone told me to :-)  Thanks for the help, everyone!

Mike


-- 
Michael A. Driscoll              UUCP: ...ihnp4!msudoc!eecae!driscoll
Dept. of Electrical Engineering  ARPA: driscoll@eecae.ee.msu.edu  (35.8.8.151)
Michigan State University        Office: (517) 353-5337
E. Lansing, MI, 48824

frank@morgan.com (Frank Wortner) (05/09/88)

Mike Driscoll writes:
>  As several people pointed out, this does fix the problem.  I used
>chmem =20000 mkfs and it worked fine.  The commands makefile uses
>chmem =2048 for whatever command you are making.  This is obviously 
>not correct for mkfs.  The book says that whenever something
>acts funny, try chmem.

One thing the book doesn't tell you about is the "changemem" shell script
in the distribution.  It contains suggested chmem commands for many commands
which need more than a miserly 2048 bytes.  I've found that it pays to
update, improve, and use this script.

					Frank