Subject: Re: NetBSD <-> Solaris 8 disklabel compatibility?
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
List: port-sparc
Date: 05/12/2002 16:06:08
At 23:29 Uhr -0400 10.5.2002, der Mouse wrote:
>> Unfortunately, while NetBSD has no problem reading the partition
>> table aka disklabel created by Solaris, Solaris 8 pretends not to see
>> the NetBSD created disklabel.
>
>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.

>I can think of two possible failure modes here: either Solaris is
>getting upset over seeing non-0x00 in that spare space, or you're
>setting partitions that don't conform to the Sun constraints and thus
>they aren't showing up in the Sun-compatible label.  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
WARNING: Device /dev/rdsk/c1t2d0s2:
Unable to find a volume table of contents.
Cannot verify the device encompasses the full PHYSICAL disk.
Fdisk is normally used with the device that represents the entire fixed disk.
(For example, /dev/rdsk/c0d0p0 on x86 or /dev/rdsk/c0t5d0s2 on sparc).
Are you sure you want to continue? (y/n) n
[hauke@pizza] ~ #

>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.

>This brings up an issue with sunlabel that I hadn't
>thought of before; I'll try to fix it soon.
>
>Look in ftp.netbsd.org:/pub/NetBSD/misc/mouse/hacks/ and fetch the
>*label* files.  Unfortunately no bsdlabel.doc exists yet, but its
>builtin help and the sunlabel.doc file should get you most of the way
>there.

I understand that this gives me a disklabel acceptable to both Solaris and
NetBSD. Can the tools also re-write an existing NetBSD disklabel so that it
becomes acceptable to Solaris without losing the NetBSD functionality?

	hauke


--
/~\  The ASCII Ribbon Campaign       "They that can give up essential liberty
\ /    No HTML/RTF in email          to obtain a little temporary safety
 X     No Word docs in email         deserve neither liberty nor safety."
/ \  Respect for open standards                    -- Benjamin Franklin, 1759