Subject: Re: 1.6 miniroot won't boot
To: None <bouyer@antioche.lip6.fr, eeh@netbsd.org>
From: None <eeh@netbsd.org>
List: port-sparc64
Date: 06/10/2002 17:57:04
| On Mon, Jun 10, 2002 at 04:34:55PM -0000, eeh@netbsd.org wrote:
| > 
| > | Well, this doesn't seem to be an issue with ofwboot itself. I newfs'd
| > | /dev/rwd0b, extracted the instfs.tgz here, installed netbsd.INSTALL.gz,
| > | and ran binstall from instfs.tgz, and I can boot from wd0b.
| > 
| > I know it's not an ofwboot issue since the bootblock does not even
| > manage to read the root directory.
|
| Ha OK, so the first stage boot knows how to read FFS. I though it was
| hard-coded blocks numbers.

Not on sparc64.

| > | Maybe it's an issue with the cross tool (cross-endian or 32/64 bit
| > | issues).
| > 
| > I would not be surprised.  Could you try taking different bootblk
| > binaries and inserting them in the miniroot so we could determine
| > if that's corrupted?  (I'd do it except my swap happens to be at
| > block 0 for hysterical reasons and so installing a miniroot is
| > painful.)
| > 
| > To install a bootblock:  
| > 
| > 	dd if=bootblk of=/dev/<whatever> bs=512 seek=1 count=15
|
| This gives:
| java# dd if=bootblk of=/dev/rwd0b bs=512 seek=1 count=15
| dd: /dev/rwd0b: Invalid argument
| 9+1 records in
| 9+0 records out
| 4608 bytes transferred in 0.030 secs (153600 bytes/sec)
|
| so I added conv=sync
|
| However this still doesn't give me a bootable miniroot.
| The miniroot I'm using now has been built natively on sparc64.
| fsck doesn't complain about it and I can mount it R/W without troubles.


| > Basically we need to isolate the cause of these failures, 
| > which could be:
| > 
| > 	1) Corrupt bootblk due to endian/bitsize issues in fgen
|
| Shouldn't be. The same bootblk installed on disk:b fail, installed
| on disk:d can properly load the /ofwboot from this partition. Both
| bootblk installed with the same dd command as above.
|
| > 
| > 	2) Disklabel issues
|
| I don't think because if I manually newfs disk:b copy a kernel and run
| binstall, I can boot from disk:b
|
| > 
| > 	3) Filesystem issues from makefs not being completely
| > 	compatible with the bootblock.
|
| This looks like the problem. But I can fsck and mount the miniroot
| properly. Also I'm now testing on a U5, so it's not an issue with OFW versions.

Hm.  Let me see if I fully understand what's going on:

1) the bootblock fails on the miniroot (partition `b') but not
a normal root (partition `d').

2) If you mount partition `b', run newfs, untar, installboot, etc.
you can boot from it.

3) In both instances the disklabel has partition `b' labelled as
`swap'.

O.K.  That definitely sounds like an incompatibility between
the bootblock and makefs.  I will need to look into this some
more to see what the difference is between something generated
by vnd/newfs and makefs.

Eduardo