]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
This is a new CD bootstrap utility designed to replace cdldr. According
authorjhb <jhb@FreeBSD.org>
Sun, 4 Nov 2001 03:24:16 +0000 (03:24 +0000)
committerjhb <jhb@FreeBSD.org>
Sun, 4 Nov 2001 03:24:16 +0000 (03:24 +0000)
commit2515f1090236a26c8e32f71ec1ec6d0ff1f217af
tree02f944b560fe945f42f6cca15ca0014ec56021ff
parentc22f597592f03e8421e5f1bf38a19abc5ee12daf
This is a new CD bootstrap utility designed to replace cdldr.  According
to the El Torito standard for CD booting, a CD may boot in "No emulation"
mode without using a floppy image.  In this mode, the BIOS loads a program
off of the CD into memory and creates a BIOS device using 2048 byte sectors
for the CD.  According to the standard, this program can be up to 0xFFFF
virtual (512-byte) sectors long.  The old cdldr depended on this by having
the BIOS load the entire loader and the small cdldr stub as one binary
similar to pxeboot so that cdldr didn't have to read the CD to find the
loader.  However, the NT no emulation loader just uses 1 disk sector
(4 virtual sectors), so it seems that at least some BIOS writers just did
enough to get NT to boot by only loading 1 sector and ignoring the sector
count.  Thus, while cdldr should have worked in theory, it doesn't in
practice.  This replacment fits entirely in 1 sector and includes simple
ISO 9660 support.  It looks for /boot/loader on the CD and loads it up
using the BIOS.  This allows us to not have to depend on the limited size
of floppy images but use a full GENERIC kernel for CD-ROM installs in the
future, among other things.

This version of cdboot is a bit bloated as it includes some useful
debugging routines that people can pull to use in other x86 assembly
modules.  Even with all the debugging cruft, we still have 272 bytes to
spare.
sys/boot/i386/cdboot/Makefile
sys/boot/i386/cdboot/cdboot.s