Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In OS X you can set boot parameters with

nvram boot-args=[options]

Where the options I know about -v (verbose) -x (safe mode) and arch=x86_64 (boot into 64 bit kernel on 64 bit capable machines).

Are there any others? There doesn't seem to be any documentation.

share|improve this question
up vote 7 down vote accepted

Googling for boot-args gives some good resources.

cpus=1 forces the system to only use a single CPU core.
srv=1 is set on Xserves and machines that have Mac OS X Server installed, and supposedly changes some kernel tuning parameters for server-friendly operation.
_panicd_ip=a.b.c.d Lets you specify the IP address of a panic debug server to write kernel core dumps to.
debug=0xH (Where H is a 1-4 digit hexadecimal number) Lets you set kernel debugging flags from this list:

DB_HALT   0x01 Halt at boot-time and wait for debugger attach (gdb).  
DB_PRT    0x02 Send kernel debugging printf output to console.  
DB_NMI    0x04 Drop into debugger on NMI (Command–Power, Command-Option-Control-Shift-Escape, or interrupt switch).  
DB_KPRT   0x08 Send kernel debugging kprintf output to serial port.  
DB_KDB    0x10 Make ddb (kdb) the default debugger (requires a custom kernel).  
DB_SLOG   0x20 Output certain diagnostic info to the system log.  
DB_ARP    0x40 Allow debugger to ARP and route (allows debugging across routers and removes the need for a permanent ARP entry, but is a potential security hole)—not available in all kernels.  
DB_KDP_BP_DIS  0x80 Support old versions of gdb on newer systems.  
DB_LOG_PI_SCRN 0x100 Disable graphical panic dialog.  
DB_KERN_DUMP_ON_PANIC   0x0400  Causes the kernel to core dump when the system panics.  
DB_KERN_DUMP_ON_NMI 0x0800  Causes the kernel to core dump when the user triggers an NMI.  
DB_DBG_POST_CORE    0x1000  Controls the kernel's behavior after dumping core in response to an NMI (DB_KERN_DUMP_ON_NMI). If the user triggers an NMI and this flag is clear, the kernel will dump core and then continue. Conversely, if this flag is set the kernel will dump core and then wait for a debugger connection.  
DB_PANICLOG_DUMP    0x2000  Controls whether the kernel dumps a full core (if the flag is clear) or simply a panic log (if the flag is set).  
share|improve this answer
static void parse_bsd_args(void)… – Denji May 22 '15 at 16:35
void i386_init(void)… – Denji May 22 '15 at 16:36
void gzalloc_configure(void)… – Denji May 22 '15 at 16:37

Here are some more:

-f                            Force rebuild extensions cache
-v                            Verbose booting shows debug information
-s                            Boots into single user mode (means only terminal based mode)
-x                            Boots into safe mode
-legacy                       Boots into 32bit instead of 64bit mode
rd=disk0s1                    Force to boot a specific partition on a specific drive (BSD drive notation, means disk0 = physical disk 1). Here disk1 partition 1 is forced to be booted.
Graphics Mode=1024x768x32@75  Forces to boot with a resolution of 1024 x 768 with 32bit colors at 75Hz
Kernel=mach_kernel            Forces to load a specific kernel, helpful for testing of new kernels.
cpus=1                        Force using only 1 CPU core, may help addressing issues
idlehalt=0                    May solve stuttering and shuttering on dualcore CPUs
platform=X86PC                Forces to not use powermanagement (disables ACPI)
platform=ACPI                 Forces to use powermanagement (enables ACPI, but may crash your system)
share|improve this answer
Just a plain link isn't very helpful. Please expand your answer to actually contain a list of some of the options, like other posts here have done. – nhinkle Mar 10 '11 at 2:56
@nhinkle: Done. I originally did not do so becuase StackExchange's lack of table support makes it hard to list them in a way that's not painfully ugly. But I suppose ugly information is better than no information. :-) – Patches Mar 10 '11 at 3:04
Thanks for the update, @Patches. That's much more helpful now, +1! – nhinkle Mar 10 '11 at 3:13

The darwin kernel is called "xnu", the best I could do was to grep the source code for what was being looked for.

Example: OS X 10.8.5


Go here (or your OS X version)

Download XNU tarball, extract, grep for "parse_boot"

cd xnu; grep -iRn parse_boot .

share|improve this answer
Great links - thanks! Knowing that the relevant function is PE_parse_boot* is so much more useful than regurgitating a static and unavoidably stale list of options. – Ted Middleton Mar 3 at 18:46

Apple doesn't seem to provide a comprehensive list. Googling for a few known options and doesn't yield any results. Reducing the list of options finds articles like this one and some source code parsing these arguments, but nothing comprehensive.

You could also search for PE_parse_boot_arg, a function that, well, parses boot arguments.

That being said, there are a few third party pages on the web where the users provide the most comprehensive information I could find, but it might be out of date:

share|improve this answer

Not to forget the immensely useful (if you updated to Lion and want to use your mac in 'closed clamshell mode' with your lid open)

sudo nvram boot-args="iog=0x0"

kudos to: chenga.8

What bothers me, however, is that I find no explanation for that. Why 0x0? Why not 0x1? What does 'iog' stand for anyways?

I should point out that on my macbook it does not work.

share|improve this answer
0x0 is the first hex decimal period. – Trevor Rudolph Jun 7 '12 at 22:58
It worked for me on both 10.7 and 10.8, but you have to restart, and then close and open the lid after starting up. – user495470 Jan 21 '13 at 21:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .