From OSx86
(Redirected from Boot loader)
Jump to: navigation, search

The bootloader loads after the BIOS sets up the computer and tries to find an operating system to start. A bootloader can start different kinds of operating systems.

On a real mac the bootloader 'boot-132' is used.

Currently, Chameleon or PC EFI are used most. The GNU GRUB 2 should also be able to boot XNU from a GUID disk.

Bootloaders for OSX86 mainly emulate an EFI, but can also load up additional kexts or change the DSDT.

The whole boot-process can be seen in this PDF.


[edit] OS X boot process

A Darwin bootloader passes arguments to the XNU kernel in the struct boot_args. This structure is defined in the BootX project in the file boot_args.h .

struct boot_args {

unsigned short Revision; /* Revision of boot_args structure */
unsigned short Version; /* Version of boot_args structure */
char CommandLine[BOOT_LINE_LENGTH]; /* Passed in command line */
DRAMBank PhysicalDRAM[kMaxDRAMBanks]; /* base/range pairs for the 26 DRAM banks */
Boot_Video Video; /* Video Information */
unsigned long machineType; /* Machine Type (gestalt) */
void *deviceTreeP; /* Base of flattened device tree */
unsigned long deviceTreeLength; /* Length of flattened tree */
unsigned long topOfKernelData; /* Last address of kernel data area*/


[edit] OS X bootflags

The bootloader loads the kernel (default filename is mach_kernel), but also command line arguments (bootflags) can be posted to the kernel which change the way the kernel loads up.

  • CPUS=1
only one CPU is used
  • -s
OSX boots in single user mode, ie commandline for rescue usage
  • -v
OSX boots in verbose mode, which shows the kernel loading process
  • arch=i386
OSX boots in 32bit mode
  • -f
forces rebuilding of extensions cache mkext
  • "Graphics Mode"="1024x768x32"
change display resolution. For a permanent change see Technical_FAQ#How_to_change_display_resolution.3F
  • "rd=disk0s1"
boot from a certain partition specified in BSD format. Disk 0 specifies first HDD and s1 specifies first partition as 0 is the MBR.

[edit] Chameleon

[edit] AsereBLN Booter

[edit] PC EFI

[edit] Weblinks

This page was last modified on 24 November 2010, at 03:27.
This page has been accessed 87,712 times.
Powered by MediaWiki © 2021 OSx86 Project  |   InsanelyMac  |   Forum  |   OSx86 Wiki   |   Privacy policy   |   About OSx86   |   Disclaimers