BootX

When BootROM (or the user) selects Mac OS X as the operating system to boot, control passes to BootX (located in /System/Library/CoreServices). BootX’s principal duty is to load the kernel environment. As it does this, BootX draws the “booting” image on the screen.

When loading the kernel environment, BootX first attempts to load a previously cached set of device drivers (called an mkext cache) for hardware that is involved in the boot process. If this cache is missing or corrupt, BootX searches /System/Library/Extensions for drivers and other kernel extensions whose OSBundle Required property is set to a value appropriate to the type of boot (for example, local or network boot). See the kernel developer documentation for more information on the OSBundle Required key and the loading of device drivers during booting.

Once the kernel and all drivers necessary for booting are loaded, BootX starts the kernel’s initialization procedure. At this point, enough drivers are loaded for the kernel to find the root device. Also from this point, Open Firmware is no longer accessible.

Once the root file system is mounted, the kextd daemon is started during system initialization (see “System Initialization,” below). Kextd examines all the drivers available on the system and unloads any unnecessary drivers, freeing memory. From this point onward, kextd attempts to fulfill any requests for loading kernel extensions.