From owner-freebsd-questions@FreeBSD.ORG Sat Jun 25 19:33:01 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 173BF16A41C for ; Sat, 25 Jun 2005 19:33:01 +0000 (GMT) (envelope-from frank@knobbe.us) Received: from mail.praemunio.com (mail.praemunio.com [66.179.47.216]) by mx1.FreeBSD.org (Postfix) with SMTP id C850843D1F for ; Sat, 25 Jun 2005 19:33:00 +0000 (GMT) (envelope-from frank@knobbe.us) Received: from localhost (HELO mail.knobbe.us) by localhost with SMTP; 25 Jun 2005 14:32:59 -0500 Received: from localhost by localhost with SMTP; 25 Jun 2005 14:32:58 -0500 From: Frank Knobbe To: Wojciech Puchar In-Reply-To: References: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-zy67Uu0E6URyzdwLxIVi" Date: Sat, 25 Jun 2005 14:32:55 -0500 Message-Id: <1119727975.20856.13.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 FreeBSD GNOME Team Port Cc: freebsd-questions@freebsd.org Subject: Re: simpler boot loader X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Jun 2005 19:33:01 -0000 --=-zy67Uu0E6URyzdwLxIVi Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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=20 > all. >=20 > 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 --=-zy67Uu0E6URyzdwLxIVi Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iD8DBQBCvbFnwBQKb2zelzoRAgkkAJ43lXLdez2YEymQDnsCyFnw12NBmQCg2rtm JRtApFBav6cGu3IXd1dc83Y= =JUMd -----END PGP SIGNATURE----- --=-zy67Uu0E6URyzdwLxIVi--