To diagnose and troubleshoot getting started (vs. Linux)
This article describes the boot-up process on MacOS vs. Linux so you can better diagnose and troubleshoot issues.
Immediately after pressing the power button on your Mac:
- Hold down the start (power) button for a hard reset when the keyboard and mouse are not responsive.
While pressing the power/start:
- Hold down C to boot from CD.
- Hold down N to boot from network (do a NetBoot from a network server).
- Hold down option (alt) key for the Mac's Startup Manager to select a (USB) startup disk.
- Hold down shift key to boot in Safe Mode (which does not load start-up items).
- Hold down ⌘ (command) + R for the Recovery menu.
- Hold down ⌘ (command) + option + P + R to reset Parameter RAM (PRAM).
By contrast, to get the GRUB menu on Linux machines, hold down the power button for 5 seconds or repeatedly pressing the Shift key during bootup.
After powering up your Mac, a folder with a question mark means that a boot folder (described below) was not found on the hard disk.
If pressing the start button does not work:
- Unplug the magsafe power cable.
- Hold down the power button for about 10 seconds and keeping pressing.
- While still holding the power button down, insert the magsafe power cable and hold it for another 10 sec.
- Release the power button and make a "normal" press as if you would normally turn on your computer.
If that doesn’t work then try to remove one RAM memory chip and switch places before repeating the above.
Prior to OS X Lion in 2011, one had to insert an OS X DVD or USB installer. That was a hassle.
With Lion onwards, Apple added a 2GB hidden recovery partition on the Mac’s hard drive to boot up in Recovery Mode.
“macOS Utilities” appears:
Open a Terminal by clicking “Utilities” menu item:
Also, OS X Internet Recovery loads the recovery information directly from Apple’s servers.
Boot loader on Mac
MacOS does not use the GRUB boot loader other Linux machines store in the /boot folder.
MacOS machines boots from the boot.efi binary file within folder
on Intel Macs. Older PowerPC Macs (and an old enough version of OS X) boots from file BootX.
The MacOS kernel, as of Yosemite (version 10.10), is at
but was just
/mach_kernel in older versions.
Apple-supplied loadable kernel modules (known as kernel extensions or kexts) are found in
Third-party extensions are in
Bootable from CD
You’ll be glad you have a bootable CD or USB drive when you are installing macOS Mojave onto multiple Macs and would rather not wait to download the installer on a secondary machine (which you may not have).
So be prepared and do what this says:
Create a bootable installer for macOS for each version of MacOS.
The macOS Mojave installer software is just over 6GB, For Mojave, the link is https://apps.apple.com/us/app/macos-mojave/id1398502828?mt=12
The macOS Mojave installer software is just over 6GB,
The download goes into the
MacOS provices its launchctl utility for interaction with the OS X init script system deamon launchd which controls the services that start up on boot.
List what launch scripts are currently loaded:
launchctl list | wc -l
375 shows up. Remove the “| wc -l” to see the list.
Launchd scripts are stored in several folders:
To stop and unload running scripts:
sudo launchctl unload [path/to/script] -w
The -w flag removes the script permanently from your boot sequence.
I like to run this one on all the auto-update “ helpers”=”” created=”” by=”” adobe=”” apps=”” and=”” microsoft=”” office.<=”” p=””>
To see what goes into a launch agent or daemon, there’s a great blog post that walks you through the file format at:
“I particularly like the idea of using QueueDirectories to monitor and act upon files dropped into a directory, without having to run any extra daemons. The files could be uploaded to S3, transcoded to a different video format, gzipped… anything.”
If you’d prefer a GUI rather than using the command line, buy the $10 Lingon app from:
Consider setting up bash scripts to run periodically or at timed intervals in the background, similar to cron jobs on Linux. For example, to start the Apache web server start automatically when you turn on your Mac:
sudo launchctl load -w /System/Library/LaunchDaemons/org.apache.httpd.plist
Plist files are how Macs define services.
Linux launches a root shell session with this line:
More on OSX
This is one of a series on Mac OSX:
- MacOS Hardware and accessories
- MacOS Boot-up
- MacOS Terminal Tips and Tricks
- MacOS Keyboard tricks
- Text editors and IDEs on MacOS
- MacOS Setup automation
- MacOS Homebrew installers
- Manage Disk Space on MacOS
- Data Backups on MacOS
- Ports open
- Applications on MacOS
- Windows on Apple MacOS
- Packer create Vagrant Windows image
- Python on MacOS
- Maven on MacOS
- Ruby on MacOS
- Java on MacOS
- Node on MacOS installation
- PHP on MacOS
- Scala ecosystem