Subject: Re: Annoying problems with root partition...
To: None <jwfogt@midway.uchicago.edu>
From: Bill Studenmund <wrstuden@loki.stanford.edu>
List: port-mac68k
Date: 10/10/1996 15:41:30
> 	I made two new partions on the 1 G drive one for swap and one for
> the new root partion.  I then moved the 1G drive to the internal bay, and
> changed its SCSI id to 0.  I also updated /etc/fstab and such.  The 1 Gig
> drive now has partitions that look like this:
> 
> 	sd0a   ~300M  /misc
> 	sd0b   ~60M   swap
> 	sd0c   unused
> 	sd0d   ~200M  MacOS Partition
> 	sd0e   ~250M  /usr
> 	sd0f   ~50M   /
> 	sd0g   ~250M  /var

Is that how it looks when NetBSD starts up, or is that the ordering of
the partitions on the drive? From your mentioning of partition #'s,
I suspect the latter.

Partition numbering DOES NOT MATTER (other than the partitions are in
the first 32 or so; we only check so far).

> The problem lies in getting this all to work.  The booter (I have tried
> both 1.9 and 1.9.4) seems to not recognize sd0a (which my partitioning
> software tells me is partion #0).  Thus, it tries to boot off of sd0f,
> which is fine, and what I really wish it would do.  However, the kernal
> (and I have even compiled a custom kernal where I specify that the root
> partion is on sd0f), wants to change the root partion to sd0a.  This is
> very annoying.  In order to get the system to work, I essentially have to
> have a copy of the root partion (or at least a minimal one) on both /sd0f
> and /sd0a.  This is far from optimal.  Could someone either tell me how to
> get the booter to recognize sd0a (partion #0) or to set the root partion
> as sd0f ?  Either one of these solutions would be greatly appreciated.  I
> have pounded my head up against the wall several times on this one with no
> success, so even if you can offer minimal help, it would be greatly
> appreciated.

Why have root on sd0f? It should be on sd0a. But sd0a does NOT have to be
partition #0. It isn't on my system. :-)

Basically the disklabel routine looks through the partitions, and looks
for the one with the "root" partition bit set, and which has the name
you passed in from the booter. The name only matters if there is more
than one "root" partition. It could be partition #25, and it will still
be sd0a.

Just use a kernel which expects root on sd0a, and you'll be fine.

To confirm things, boot in single-user, and look at the output from
disklabel /dev/sd0c. I bet your "/" partition will be sd0a.

Also, if your /usr partition has the "usr" bit set, it will show up as
sd0g. Also  regardless of where it is in the table (and on disk).

Hope this helps.

Take care,

Bill