Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Jul 2024 14:22:43 -0400
From:      Bryce <678yym@gmail.com>
To:        freebsd-fs@freebsd.org
Subject:   Kernel boot process and root fs in minimal systems
Message-ID:  <CADF3e167z4wtqvZtUEuyu7HVBwsj0aa55FrgyaKCRYMXdfEhVg@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
--000000000000f6d146061e2a99fc
Content-Type: text/plain; charset="UTF-8"

Hello list,

Ive been using FreeBSD for a few months now, and have been using Linux for
a few years. I've read some man pages and relevant sections of the manual.
I'm not opposed to RTFM, but please point to relevant sections.

So what I've gathered:

BSD has a 3 stage bootloader, stage 0 is obviously just for getting past
the one sector limit, stage 1 passes kernel configuration options(?) to
stage 3, which finds the kernel on the rootfs (which may be the network),
and passes stage 2 config onto the kernel (ie, what modules to load etc?).

Then, what I assume happens is that the kernel takes the config options
from stage 2 and mounts rootfs and then executes /init.

Is this correct, list? If so, is it possible to use a tmpfs-like filesystem
to mount rootfs in memory alone?

I know about md(4), and how it bakes the md image into the kernel. This is
what I'm looking for, but what about the bootloaders? do they need to be
configured to not look for rootfs on disk?

sorry if my questions are uninformed, I'm quite new. If somebody wants to
point me to the relevant sources in the source tree I'd be happy to read
them.

also, if this is the wrong list to be writing to, I apologize, I couldn't
find a more appropriate list.

thanks list.

--000000000000f6d146061e2a99fc
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto">Hello list,<div dir=3D"auto"><br></div><div dir=3D"auto">=
Ive been using FreeBSD for a few months now, and have been using Linux for =
a few years. I&#39;ve read some man pages and relevant sections of the manu=
al. I&#39;m not opposed to RTFM, but please point to relevant sections.</di=
v><div dir=3D"auto"><br></div><div dir=3D"auto">So what I&#39;ve gathered:<=
/div><div dir=3D"auto"><br></div><div dir=3D"auto">BSD has a 3 stage bootlo=
ader, stage 0 is obviously just for getting past the one sector limit, stag=
e 1 passes kernel configuration options(?) to stage 3, which finds the kern=
el on the rootfs (which may be the network), and passes stage 2 config onto=
 the kernel (ie, what modules to load etc?).</div><div dir=3D"auto"><br></d=
iv><div dir=3D"auto">Then, what I assume happens is that the kernel takes t=
he config options from stage 2 and mounts rootfs and then executes /init.</=
div><div dir=3D"auto"><br></div><div dir=3D"auto">Is this correct, list? If=
 so, is it possible to use a tmpfs-like filesystem to mount rootfs in memor=
y alone?</div><div dir=3D"auto"><br></div><div dir=3D"auto">I know about md=
(4), and how it bakes the md image into the kernel. This is what I&#39;m lo=
oking for, but what about the bootloaders? do they need to be configured to=
 not look for rootfs on disk?</div><div dir=3D"auto"><br></div><div dir=3D"=
auto">sorry if my questions are uninformed, I&#39;m quite new. If somebody =
wants to point me to the relevant sources in the source tree I&#39;d be hap=
py to read them.</div><div dir=3D"auto"><br></div><div dir=3D"auto">also, i=
f this is the wrong list to be writing to, I apologize, I couldn&#39;t find=
 a more appropriate list.</div><div dir=3D"auto"><br></div><div dir=3D"auto=
">thanks list.</div><div dir=3D"auto"><br></div></div>

--000000000000f6d146061e2a99fc--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADF3e167z4wtqvZtUEuyu7HVBwsj0aa55FrgyaKCRYMXdfEhVg>