Subject: Re: Two NetBSDs on one (i386) drive
To: Andrew Cagney <>
From: Robert Elz <kre@munnari.OZ.AU>
List: tech-kern
Date: 12/20/2001 22:53:32
    Date:        Thu, 20 Dec 2001 14:57:06 +0000
    From:        Andrew Cagney <>
    Message-ID:  <>

  | I guess the NetBSD partition table is 
  | always at the start of the first dos partition.

It is at the start of the first NetBSD type dos partition (it wouldn't
fit very well in a FAT filesystem...)

  | NetBSD partition tables in other dos partitions would be ignored.

... in other NetBSD partitions are ignored, yes.   What I was asking for was
for the "first" above to change to "booted" instead, where a booted NetBSD
partition exists, and otherwise, no change.  In effect, other NetBSD
labels wouldn't always be ignored any more.

  | Sorry, I'm lost.  The raw disk is partitioned according to the dos 
  | partitioning schema so presumably there is a dos disk label on the disk 
  | somewhere?

Yes, that's at the very start of the drive (sector 0).

  | I would like to be able to manipulate a disk according to 
  | the dos and not the netbsd partition schema.

There's an obvious answer to that, that I will leave for someone else...


ps: after references to bootinfo in this thread, I did some more looking.
It appears that the boot code already sets labelsector in bootinfo (currently
to the first NetBSD partition's label) - but the kernel seems to take no
notice of the work boot has done, and goes hunting for the label again.
Is there a reason for that?   If not, a useful first step would be to have
the kernel use the info from boot, if it exists (and hunt otherwise).