Mac OS X Boot Process

macOS Stuck on Checking for Updates? 4 Solutions

You can translate the content of this page by selecting a language in the select box.

Pass the AWS Certified Machine Learning Specialty Exam with Flying Colors AI Unraveled: Demystifying Frequently Asked Questions on Artificial Intelligence

What is Mac OS X Boot Process:

The Mac OS X boot process involves several stages, in which the operating system performs various tasks to prepare the system for use.

  1. When the Mac is powered on, the firmware (a low-level software that controls the hardware) performs a power-on self-test (POST) to check the hardware components.
  2. The firmware loads the bootloader, which is responsible for loading the operating system kernel and transferring control to it. In Mac OS X, the bootloader is called the boot.efi file.
  3. The operating system kernel, which is the core of the operating system, initializes the system and starts the system services.
  4. The system services, such as the device drivers, are loaded and initialized.
  5. The operating system loads the user profile and starts the user interface, such as the desktop or the login screen.
  6. The user can log in and start using the system.

This is a general overview of the Mac OS X boot process. The exact sequence of events may vary depending on the specific version of Mac OS X and the hardware configuration of the system.

Achieve AWS Solutions Architect Associate Certification with Confidence: Master SAA Exam with the Latest Practice Tests and Quizzes illustrated

Boot ROM Firmware. Part of Hardware system
BootROM firmware is activated
POST Power-On Self Test
initializes some hardware interfaces and verifies that sufficient memory is available and in a good state.
EFI Extensible Firmware Interface
EFI does basic hardware initialization and selects which operating system to use.
BOOTX boot.efi boot loader
load the kernel environment
Rooting/Kernel The init routine of the kernel is executed
boot loader starts the kernel’s initialization procedure
Various Mach/BSD data structures are initialized by the kernel.
The I/O Kit is initialized.
The kernel starts /sbin/mach_init
Run Level mach_init starts /sbin/init
init determines the runlevel, and runs /etc/rc.boot, which sets up the machine enough to run single-user.
rc.boot figures out the type of boot (Multi-User, Safe, CD-ROM, Network etc.)




    • Power is turned on.
    • Open Firmware code is executed.
    • Hardware information is collected and hardware is initialized.
    • Something (usually the OS, but also things like the Apple Hardware Test, etc.) is selected to boot. The user may be prompted to select what to boot.
    • Control passes to /System/Library/CoreServices/BootX, the boot loader. BootX loads the kernel and also draws the OS badges, if any.
    • BootX tries to load a previously cached list of device drivers (created/updated by /usr/sbin/kextcache). Such a cache is of the type mkext and contains the info dictionaries and binary files for multiple kernel extensions. Note that if the mkext cache is corrupt or missing, BootX would look in /System/Library/Extensions for extensions that are needed in the current scenario (as determined by the value of the OSBundleRequired property in the Info.plist file of the extension’s bundle.
    • The init routine of the kernel is executed. The root device of the booting system is determined. At this point, Open Firmware is not accessible any more.
    • Various Mach/BSD data structures are initialized by the kernel.
    • The I/O Kit is initialized.
    • The kernel starts /sbin/mach_init, the Mach service naming (bootstrap) daemon. mach_init maintains mappings between service names and the Mach ports that provide access to those services.

From here on, the startup becomes user-level:

    • mach_init starts /sbin/init, the traditional BSD init process. init determines the runlevel, and runs /etc/rc.boot, which sets up the machine enough to run single-user.
    • rc.boot figures out the type of boot (Multi-User, Safe, CD-ROM, Network etc.). In case of a network boot (the sysctl variable kern.netboot will be set to 1 in which case), it runs /etc/rc.netboot with a start argument.

Source: http://osxbook.com/book/bonus/ancient/whatismacosx/arch_startup.html

Linux Boot process

You can translate the content of this page by selecting a language in the select box.

Pass the AWS Certified Machine Learning Specialty Exam with Flying Colors AI Unraveled: Demystifying Frequently Asked Questions on Artificial Intelligence

Let’s describe Linux Boot Process:

The Linux boot process involves several stages, in which the operating system performs various tasks to prepare the system for use.

  1. When the system is powered on, the BIOS (Basic Input/Output System) or the UEFI (Unified Extensible Firmware Interface) performs a power-on self-test (POST) to check the hardware components and to load the bootloader.
  2. The bootloader, such as GRUB (GRand Unified Bootloader), is responsible for loading the operating system kernel and transferring control to it.
  3. The operating system kernel, which is the core of the operating system, initializes the system and starts the system services.
  4. The system services, such as the device drivers, are loaded and initialized.
  5. The operating system loads the user profile and starts the user interface, such as the desktop or the login screen.
  6. The user can log in and start using the system.

This is a general overview of the Linux boot process. The exact sequence of events may vary depending on the specific distribution of Linux and the hardware configuration of the system.

Achieve AWS Solutions Architect Associate Certification with Confidence: Master SAA Exam with the Latest Practice Tests and Quizzes illustrated

BIOS Basic INPUT/OUTPUT System.
Executes MBR
MBR Master Boot Record
Executes GRUB
GRUB Grand Unified Bootloader
Executes kernel
KERNEL Kernel
Executes /sbin/init
INIT Init
Executes Run level programs
Run Level Run Level Programs are executed from /etc/rc.d/rc*.d/
  • As power comes up the BIOS is given control
  • BIOS runs self tests, usually including cursory memory tests.
  • The BIOS then loads the first sector of the disk to be used for booting and transfers control to it.
  • The MBR code varies. One version will chain to the code in the first sector of the boot partition (Windows), another will load a bootloader. Windows boot proceeds from code and information in the boot partition.
  • The bootloader chooses kernel location and version
  • The bootloader prepares kernel and initrd image in memory, transfers control to kernel
  • Loading kernel modules
  • Discovering hardware and load additional kernel modules to support it
  • Looking for disks
  • R/O mount of / partition so that it can potentially be checked and repaired
  • init process spawn
  • /etc/inittab read and executing
  • Mounting all FSes from /etc/fstab
  • runlevels running (based on default runlevel in /etc/inittab) or another init method such as systemd or upstart
  • rc.local
  • login prompt

Source:

    1. http://unix.stackexchange.com/questions/27034/discribe-in-details-tha-boot-process-of-any-linux-system
    1. http://www.thegeekstuff.com/2011/02/linux-boot-process/
  1. Watch video here
  2. http://www.slideshare.net/dominiquec/understanding-the-boot-process
error: Content is protected !!