Subject: Re: NetBSD <-> Solaris 8 disklabel compatibility?
To: None <port-sparc@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: port-sparc
Date: 05/12/2002 12:43:21
>> This is one of the problems with the NetBSD "feature" of putting a
>> BSD disklabel into spare space in the Sun disklabel.
> Would that be 'BSD disklabel' or 'boot code'?  The disk in question
> ia s bootable NetBSD/sparc disk.

Disklabel.  The first-stage boot code lives in the spare 8K at the
beginning of the boot partition, with the second-stage boot code living
wherever the first-stage boot-code looks for it (usually in a file
whose block numbers are wired into the first-sgae boot when it's
installed with installboot.

>> Is Solaris completely ignoring the NetBSD-created label, or is it
>> just failing to see the partitions that don't match the Sun
>> constraints?

> [hauke@pizza] ~ # fdisk /dev/rdsk/c1t2d0s2

Solaris/sparc uses _fdisk_??  Ugh.  Are you sure you should be using
fdisk for SCSI disks on Solaris?  I'd expect it to be only for IDE
drives (Solaris/sparc does run on some machines with IDE drives).

Does Solaris have a "format" command?  (That's what SunOS and older
Solaris used.)  Does it understand that disk?

>> In any case, you may want to grab a copy of sunlabel (and possibly
>> bsdlabel) so that you can set up the partition tables exactly the
>> way you want them.
> Cool!  I have read of your sunlabel tool before but hadn't thought of
> it in this context.

Well, it may not be what you need, but it also may help.

> I understand that this gives me a disklabel acceptable to both
> Solaris and NetBSD.

Well, sunlabel does.

> Can the tools also re-write an existing NetBSD disklabel so that it
> becomes acceptable to Solaris without losing the NetBSD
> functionality?

Only in some cases, at best - we don't know what it is about the NetBSD
label that's upsetting Solaris.  If the NetBSD label conforms entirely
to the Sun constraints, I think the only difference will be the
embedded BSD label in the "spare space".  If that is what's making
Solaris unhappy, then reading the label with sunlable and writing it
back will fix it because it will clear that spare space.  If not, it
may not, and I'm not sure what it's going to take.

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B