Subject: Re: two NetBSD partitions
To: Feng Yu <>
From: None <>
List: tech-userlevel
Date: 12/20/2006 15:27:22
On Wed, Dec 20, 2006 at 01:27:21PM +0800, Feng Yu wrote:
> Hello tech-userlevel,
>      How to install two NetBSD into two partitions in one disk? When I try to make two NetBSD partions, sysinst can't find any one.

The layout of the disks may differ from one machine to another.

I will make the assumption that you are trying an install on some i386

The answer is then: you can't or, at least, you can not easily.

On i386, only one disklabel is used. If, with fdisk(8), you create
several slices flagged NetBSD, the disklabel will be put in the area of
the first NetBSD slice, and the code will use this one.

This means that you can't create two slices flagged NetBSD with fdisk(1)
and hope that they are really independant: they will share the
disklabel. Consequence: if you install a NetBSD into the second fdisk
slice flagged NetBSD and, later, decide to suppress the first one (where
you think nothing at all is installed), you may destroy the disklabel
that was indeed in the first slice.

Knowing this, you can install a second NetBSD, but this means
configuring a kernel with a root partition explicitely set to something
else than the 'a' partition (since there is only one disklabel used, the
'a' is probably not where you want a second install to have its root),
you have to put into the disklabel all the partitions of the second
slice, and you can probably not use normal install program since this is
definitively not a standard installation (and not the way partitionning
was intended: a slice dedicated to NetBSD, and only one slice).

This does not work the same as, say, Linux way of partitionning. And if
you do not understand all the implications, the safe way is not trying
to do this at all!

Thierry Laronde (Alceste) <tlaronde +AT+ polynum +dot+ com>
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C