With a Mac it is easy to pass boot arguments to the system at boot time, on most systems you can hold specific keys down after the startup chime to accomplish different things. Holding C boots from the optical drive, Option key allows access to the startup manager to boot from Windows or an external drive, T starts in Target Disk Mode, command-V starts in verbose mode so you can see all the boot messages, and command-S starts up in single user mode giving you a text console for various purposes.

Thats all well and good, but i can’t do any of those things, plus i hate holding keys at startup. Why can’t I? Because this Apple aluminum keyboard does not work, at all, on this early 2006 Intel Mini, until the XNU kernel takes over. There is no fix, nothing to change or install, the keyboard simply does not get power until the kernel loads, and because of that, startup keys don’t work. I suspect Apple may have fixed this problem with a newer version of the keyboard but who knows, they do know about the problem though.

Anyhow, thankfully there is a way to set your Mac to ALWAYS boot using specific arguments. There is storage set aside in all modern Macs to store things the system needs in order to boot. Apple calls it NVRAM but who knows what is actually doing the storage on the logic board. Regardless of that, it is used for a number of different things by Apple as shown here:

<blockquote>
[[code]]czo1MzY6XCINCjxzdHJvbmc+TWluaTp+IFN0ZXZlJDwvc3Ryb25nPiBudnJhbSAtcA0KU3lzdGVtQXVkaW9Wb2x1bWUJeQ0KZWZpLWJ7WyYqJl19b290LWRldmljZS1kYXRhDQolMDIlMDElMGMlMDAlZDBBJTAzJTBhJTAwJTAwJTAwJTAwJTAxJTAxDQolMDYlMDAlMDIlMWYlMDMlMHtbJiomXX0xJTA4JTAwJTAwJTAxJTAwJTAwJTA0JQ0KMDEqJTAwJTAyJTAwJTAwJTAwKEAlMDYlMDAlMDAlMDAlMDAlMDAgJTENCjklMTIlMWQle1smKiZdfTAwJTAwJTAwJTAwJWI2OyVkNSVlZCAlMTIlMDFBJThhJQ0KZjklZTYsJWRkRCVjYkUlMDIlMDIlN2YlZmYlMDQlMDANCnBsYXRmb3J7WyYqJl19bS11dWlkCSUwMCUwMCUwMCUwMCUwMCUwMCUxMCUwMCU4MCUwMCUwMCUxNiVjYiVhMmV6DQpwcm80LXNhdmVuYW1lCW1pbmkNCnByZXtbJiomXX12LWxhbmc6a2JkCWVuOjANCmJvb3QtYXJncw0KZWZpLWJvb3QtZGV2aWNlDQpJT01hdGNoDQpJT1Byb3ZpZGVyQ2xhc3MNCklPTWVke1smKiZdfWlhDQpJT1Byb3BlcnR5TWF0Y2gNClVVSUQgRURENTNCQjYtMTIyMC00MTAxLThBRjktRTYyQ0RENDRDQjQ1DQpCTExhc3RCU0ROYW17WyYqJl19ZSBkaXNrMHMyDQpcIjt7WyYqJl19[[/code]]</blockquote>

You can see Apple uses it to store some EFI data, as well as the current boot volume (this is what the StartupDisk preference pane changes). In mine the boot-args variable was empty, so i changed it to include both verbose and single user mode like this:
[[code]]czo5MjpcIg0KPGJsb2NrcXVvdGU+DQo8c3Ryb25nPk1pbmk6fiBTdGV2ZSQ8L3N0cm9uZz4gc3VkbyBudnJhbSBib290LWFyZ3M9XFxcIntbJiomXX0tdiAtc1xcXCI8L2Jsb2NrcXVvdGU+DQpcIjt7WyYqJl19[[/code]]

The result is that whenever the system boots, i see all the kernel messages and the system boots into single user mode, with root mounted read only. From here you can run fsck or remount root as writable, directions for this are on screen. From there you can do anything you want, I have been using this setup to test some things for an upcoming article about encrypting individual system folders at boot time, but single user mode is also useful to diagnose and correct boot problems.

From single user mode you can continue the boot process by simply typing exit, the system will continue to boot into the graphical environment like normal. Note however that because this setting is stored in hardware it will persist regardless of which boot volume you choose, and will persist across a reinstallation of OS X. You can undo it easily from inside single user mode by issuing the following command:

<strong>Mini:~ Steve$</strong> nvram boot-args=""