Subject: Re: Having 2 NetBSD In The Same Disk
To: <>
From: David Laight <david@l8s.co.uk>
List: port-i386
Date: 01/09/2003 22:43:42
On Wed, Jan 08, 2003 at 01:40:14AM -0200, Daniel Bolgheroni wrote:
> Is it possible?

Not with the boot code available in netbsd [1].

> I'm trying to install 2 (two) NetBSD in the same disk, so I want choose
> one of then with bootmanager. This is because I want to play with
> -current, but I don't want to lose all data if I make a mistake.
> 
> So, I have on NetBSD partition and his labels, and I made another NetBSD
> partition with your labels too and installed the second NetBSD on it. The
> bootmanager was installed with no problem too.
> 
> But at the boot time, I have:
> 
> F1: NetBSD
> F2: -current
> 
> The F2 doesn't boot. It's something like, if I type F2, bootmanager stops,
> and F1 doesn't boot too. To boot F1, I must reset the machine and  type F1
> first (as I said, if I type F2 first, bootmanager stops).
> 
> What's wrong?

The basic problem is that the various stages of the boot sequence
do not pass the offset of the bios partition to the next layer.
The lower layers thus search for the first netbsd partition.

It is (almost) impossible to get 2 netbsd disklabels onto the
same disk volume - don't try too hard you are likely to badly
corrupt several filesystems, in any case the kernel will only
ever find one of them.

However the netbsd disklabel can reference any part of the disk,
so you can make (say) wd0h be the root partition for 'current'
(and share / separate everything else as required).
Interrupting the boot countdown and typing 'boot hd0h:' will
boot the second kernel and root filesystem.

[1] I have a version that will do this, however the source
is in a state of flux at the moment.

	David

-- 
David Laight: david@l8s.co.uk