Help regarding the second stage loader
Peter Grehan
grehan at freebsd.org
Tue Apr 10 17:28:03 UTC 2007
Hi Philip,
> You can load and start the kernel directly from Open
> Firmware since it's an ELF file. However, that only works if the kernel
> resides on a filesystem the Open Firmware implementation understands and
> if you don't need to set any boot flags. Unfortunately, the
> implementation found on Apples computers does not know UFS(2). So a
> different approach (and I think that one is recommended) is to start the
> loader which will be able load the kernel, also from the / filesystem,
> and set boot flags (verbose boot, boot to single user, etc.).
That's right. Booting the kernel directly from OpenFirmware happens to
work, mainly because that's the boot path used with gdb/psim. The big
downside is that there is no metadata, so things like boot flags, the
root mount, modules, ramdisks and other goodies enabled by the loader
can't be used.
> So in short: There is no second stage bootloader, only the loader and
> the kernel. Someone please correct me if I'm wrong.
Depends on terminology :) If you count OpenFirmware as the first-stage
bootloader then the FreeBSD loader is a second-stage loader, though it's
the first in the FreeBSD boot process.
later,
Peter.
More information about the freebsd-ppc
mailing list