Subject: Boot Sequence, partitions, labels, etc.
To: None <port-i386@netbsd.org>
From: K. Richard Pixley <K.Richard.Pixley@nominum.com>
List: port-i386
Date: 07/15/2003 10:32:20
I'm confused about the boot sequence, disk partitions, labels, etc.
So before I go digging through code I have some questions. If these
are answered elsewhere, I'll be happy to follow any pointers offered.
1) Aside from the "hard partition" type being now obsolete, (ie, we're
using NetBSD now rather than 386BSD), is this old post still pretty
current?
http://mail-index.netbsd.org/port-i386/1995/07/20/0002.html
2) The above post suggests that the bsd disklabel is ordinarily stored
in the NetBSD slice, unless the disk is completely devoted to
NetBSD, in which case it's at the beginning of the disk. I
couldn't find any other statements about this in any of the other
doc.
Where is the bsd disklabel stored? Is it at the beginning of the
disk? At the beginning of the NetBSD "slice" in the MBR/dos
partition table? Somewhere else?
3) All the netbsd doc I could find, as well as the above post, refer
to "the netbsd" slice or hard partition. I'm guessing that they
really mean, "the first netbsd" slice in the MBR. Am I guessing
correctly?
4) It appears as though that assumption, "the first netbsd" slice,
implies that while there's room for a second bsd disklabel on a
second netbsd slice, it could never be read. Is this correct?
5) As far as I can tell, the MBR partition table is used for two
things. First, to find the secondary boot block. And second, to
find the bsd disklabel. This implies that the size and ending
location of the netbsd slice are largely irrelevant, yes?
6) As I understand it, the "a" partition must be root and root must be
on the "a" partition in order to boot. Furthermore, the "a"
partition must start at the beginning of the netbsd slice.
Is this a requirement of the netbsd kernel? Or only of the
standard primary and secondary boot blocks?
Put another way, can I duck this requirement if I use an alternate
boot loader like grub?
What I'm trying to accomplish is several, alternately bootable, netbsd
root filesystems on the same disk.
--rich