
	GROSS THINGS ABOUT FSCHECK AND HOW TO BUILD A DISK FILE

	Chris Zuleeg				3:58 am 2/28/86

GROSS THINGS ABOUT FSCHECK:

1) Start with a file full of 0's first; use 
   /user/zuleeg/xV/cmds/initfilesys/{m68k,vax}/initfilesys.{m68k,vax}
   to do this.
2) Run fscheck on a vax to initialize a filesystem to be used
   with the vax version of the storage server.  Likewise for m68k.
3) If you give a node a son and that son does not point to
   the designated father, then when you run the "t" command, it 
   goes into an infinite loop.
4) If you are in a node, say node 1, and you want to go to the
   top of the descriptor, don't do an "n 1" until you have
   saved the node with a "w" or else you will lose all of the
   information in the node.  Use "g name" instead to get the top.
5) What is a context?  There is a wierd problem where you do
   a "c" that works fine (i.e. no complaints) and a "w" fine,
   and then you go to another node, and then come back again.
   It will complain that the context is incorrect.  Just do ANOTHER
   "c" and "w", and it will be fine.
6) You must have paged output mode turned OFF or else it will 
   continually ask you to "Press space to continue".  This happens
   even when you are in inputting.  To do a "p" to see what a 
   descriptor contains, you must turn it back ON, or else it scrolls
   off your screen!

HOW TO BUILD A DISK FILE SYSTEM (i.e., a file system built inside of a
				 file that is simulating a disk device.)

1) Create the disk file space.
	See #1 above to create a file of x blocks of NULLs.  
	(Say it's called newfilesys.vax)

2) Start fscheck.
	Run the version of fscheck that is the same as the version of the 
	storage server you intend to use.  
	(Say, "fscheck.vax newfilesys.vax")

	Type "f" to the device/file question.

3) Build the fdfile file descriptor.
	type "n 1"
	for the following fields:	type the designated string:
	name				=fdfile
	son				=2
	permission			=65535
	time				=t
	eof_blk				=1
	ptr0				=0
	extent0				=1
	type "c"
	type "w"
	type "n 2"
	type "n 1"
	type "c"
	type "w"

4) Build the bitmap file descriptor.
	type "n 2"
	for the following fields:	type the designated string:
	name				=bitmap
	father				=1
	brother				=3
	permission			=65535
	time				=t
	eof_blk				=0
	eof_byte			=x/8,  (where x = # of blocks in
						the file system given as
						as arg to initfilesys.)
	ptr0				=1
	extent0				=1
	type "c"
	type "w"
	type "n 3"
	type "n 2"
	type "c"
	type "w"

5) Build the fstab file descriptor.
	type "n 3"
	for the following fields:	type the designated string:
	name				=fstab
	father				=1
	permission			=65535
	time				=t
	eof_blk				=1
	ptr0				=2
	extent0				=1
	type "c"
	type "w"
	type "n 4"
	type "n 3"
	type "c"
	type "w"

6) Initialize the file system.
	type "i"
	answer "1"
	answer "/ 0 40 x-40"	(where x is # blocks given in initfilesys.
				 eg. if x=1000, type "/ 0 40 960")
	type "a +r"		(reconstruct bitmap)
	type "t"		(check file system tree structure)

7) Deal with the new knowledge of the size of the file system.
	type "n 2"		(Go to the bitmap.  Should complain "bitmap
				 should be size x', not (x'+5)"  This is 
				 because it now knows the real file system
				 begins at 40, so the bitmap need only be
				 40/8=5 bytes less big than specified.)
	for the following field:	type the designated string:
	eof_byte			=x'
	type "c"
	type "w"
	type "n 3"
	type "n 2"
	type "c"
	type "w"

8) You're all done!  Wasn't that EASY!  Aren't user interfaces wonderful!?!
	type "q"

