Subject: Re: Why not change disk naming?
To: None <>
From: Andrew Gillham <>
List: current-users
Date: 12/30/2001 02:41:38
On Sun, Dec 30, 2001 at 11:28:33AM +0100, Julio Merino wrote:
> You are forgetting that FreeBSD is on disk wd0 and NetBSD on wd1. And I've
> checked and both OS'es have their MBR slice type setup properly. Remember
> that I don't have a NetBSD disklabel on the first disk, nor a FreeBSD
> disklabel on the second one (though FreeBSD is able to read NetBSD
> partitions...)
> Any help will be appreciated! ;)

Aha!  You are getting bit by the fact that NetBSD is able to use a partition
of type '165' for compatibility.  Since there is no "native" NetBSD
partition type on wd0, it is falling back to the '165' partition, which is
the FreeBSD one.  So it does not build the fake in core label correctly,
and is trying to use the FreeBSD disklabel.  So when you ran mbrlabel on
wd0 it worked ok for the in core label, but ended up trashing the on disk
label when you asked it to. :)  (e.g. the FreeBSD label on wd0 was trashed)

The short term solution is to not write to the on disk label on wd0.  Just
run mbrlabel at each boot with 'mbrlabel -w wd0'  and the in core label
with be updated.

If you want to permanently write this label to disk you will need to create
a NetBSD partition (type '169') on wd0, it can be tiny (e.g. < 1MB) as it
just needs to hold the NetBSD disklabel.  Once you have a partition type
of '169' on wd0, NetBSD will ignore the FreeBSD partition.

And it is late, so I might be all wrong, but it seems logical. :-)