Subject: Re: dd: /dev/rsd0b: Read-only file system
To: None <port-sparc@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: port-sparc
Date: 12/14/1999 17:23:59
>>> Installboot man page [for sparc] tells that the first-stage
>>> bootprogram is written into the superblock,
>> This is slightly incorrect; the boot program is never written into
>> the superblock.  One boot program exists in the first 8K of the
>> disk, just past the label in sector zero;
> Actually, boot-strap code can be installed in any partition

Yes.  My apologies for any confusion here; I should have said
"partition" rather than "disk".

> and installboot(8) is mostly correct in stating that the first-stage
> boot program goes into the superblock, where `superblock' here is
> understood to be the first 8K of the partition.

Yes, if you redefine `superblock' that way, you are correct.  I assumed
that `superblock' was referring to what the filesystem code calls the
superblock, which is at offset SBLOCK - which is 8K, unless you've done
something unusual to <ufs/ffs/fs.h>.

> Of course, you should be careful not to dump your bootstrap code into
> the first 512 bytes of the superblock where the `struct fs' (or
> equivalent) is.

What sort of SPARC do you see this on?  Whenever I've looked at the
beginning of a "normal" boot disk (one with the boot/root partition at
offset zero), I've seen a Sun-compatible label in the first 512 bytes,
boot code in (some of) the next 7.5K, and a "struct fs" following that.
If you see something different, as I say, I'd be very interested to
hear what sort of machine it's on.  If the root filesystem is ffs, I'd
also be curious to know how you got it to put the superblock (what the
*filesystem* calls the superblock) at offset zero rather than the usual
SBLOCK...and what that does to attempts to mount ffs filesystems
created elsewhere, with the superblock at sector 16.

					der Mouse

			       mouse@rodents.montreal.qc.ca
		     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B