Subject: newfs, libsa, ide and the Booter
To: None <port-mac68k@netbsd.org>
From: None <nigel@ind.tansu.com.au>
List: port-mac68k
Date: 02/18/2002 17:37:08
	I have a Booter problem that I cannot get my head around,
and would appreciate some suggestions. The actual problem is that
filesystems created on IDE disks are not recognised as UFS by the
Booter. Basically, the FS magic number is meant to be 72020, but
the Booter is getting the number 0.


	Now, at first I thought it was the old ufs_open() code in
the Booter, so over the weekend I replaced it with libsa/ufs.c.
No change.

	Then I thought it might be the type of filesystem.
(my testing was done on a PowerMac, and the partition was newfs'd
 from Mac OS X). So I tried newfs -O to create an "old style" UFS.
No change.


	This leaves me with three unlikely situations:

1) The ide_read code is bad.
   Unlikely because, if I comment out the magic-number check,
   ufs_open() reads and gets the diinodes, lists the files,
   and seems to have a good attempt at reading the file data.

2) The PowerMac is adding something strange to the equation.
   Unlikely, because Takeo-san's testing (a Quadra 630) seems
   to behave exactly the same as mine.

3) The new kernel parsing code (libsa/loadfile.c in Booter 2.*)
   has some nasty bugs.
   Unlikely, because Booter 1.11.5a3 exhibits the same problem.



	I am at a loss as to where to start tracking this one down.
Apart from generating lots of hex dumps of the filesystem data,
does anyone have any ideas?

-- 
| Nigel Pearson, nigel@ind.tansu.com.au    |    "Things  you  own        |
| Telstra iDevelopments, Sydney, Australia |     end up owning you"      |
|   Office: 9206 3468    Fax:  9212 6329   | "not a beautiful snowflake" |
|   Mobile: 0408 664435  Home: 9792 6998   |     Tyler - Fight Club      |