Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Log in or create an account to edit The Apple Wiki.

Boot-command (iBoot variable)

From The Apple Wiki

The boot-command is an iBoot variable used to boot the device into an operating system on the device. There are multiple boot commands in iBoot which allow the device to choose from a safe method of starting up the operating system.


boot-commands for iBoot

As of the 2018 iBoot Source Code Leak, in /apps/iBoot/main.c, the function "do_iboot_autoboot" defines the boot commands within the function. The commands functions are also defined, as they can be used in the command prompt depending on the type of iBoot being used.

These commands are:

  • fsboot (mount_and_boot_system)
  • diags (boot_diagnostics)
  • upgrade (mount_and_upgrade_system)
  • script (boot_script, ONLY IF IT'S A DEBUG BUILD)

Although bootx is another boot command, it is not allowed in the list of commands for iBoot.

boot-commands for iBEC

The boot-commands are the same thing as the iBoot boot-commands, instead there is only one command used. The upgrade command is the only allowed boot-command used in iBEC, as it cannot boot into the operating system during an upgrade (see Upgrade Mode).

If another boot command is used, iBEC will return an error saying that the command used is not supported, such as "boot-command 'fsboot' not supported" and enter Recovery Mode.

boot-command usage in the NVRAM

In the NVRAM of the NAND, the boot-command is defined. When you run printenv in the command prompt, you will see "boot-command" at the top of the list.