simpler boot loader

Frank Knobbe frank at knobbe.us
Sat Jun 25 19:33:01 GMT 2005


On Sun, 2005-06-05 at 13:39 +0200, Wojciech Puchar wrote:
> something like for NetBSD - just load one ELF file from disk and that's 
> all.
> 
> FreeBSD /boot/loader and it's script are overcomplicated.

What complicates the normal boot process is that the kernel requires a
pre-boot environment to be set up. That's what the various loader steps
do, mainly loader.

About a year ago I tried to hack a Cobalt RAQ so that it would boot the
BSD kernel. The problem is that the Cobalt has Linux in the BIOS... it
boots straight into a Linux boot loader which then loads the Linux
kernel (in ELF format I believe). Replacing that Linux kernel with the
FreeBSD kernel does not work. I had tried to hack boot2 and loader so
that it can be run from the Linux loader (in ELF format) and then set up
the pre-boot environment and load and execute the kernel. However, my
x86 assembler skills suck (in a previous life I did 65xx and 68xxx, but
not x86). The loader segfaults every time and I had tabled the project.

The interim solution for me was to have the Cobalt boot into VMware
which then run FreeBSD. The performance kinda sucks and I would prefer
to run BSD directly, so eventually I'd like to revisit that.

In closing, I'm not aware of an easy way (without major hacks) to boot
the FreeBSD kernel as a single file. You can try to look at the code for
boot2 and loader write an ELF binary that does the same and loads
FreeBSD. If you get something together, *please* let me know.

Cheers,
Frank

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20050625/3b5d910d/attachment.bin


More information about the freebsd-questions mailing list