Description

The bootadm command manages the boot archive and, with x86 boot environments,
the GRUB (GRand Unified Bootloader) menu. The update–archive option provides a way
for user to update the boot archive as a preventative measure or
as part of a recovery procedure. The set-menu subcommand allows you to switch
the auto-boot timeout and default boot entry in the GRUB menu.

The list-menu subcommand displays the location of the GRUB menu and the
current GRUB menu entries. While the typical location of the GRUB menu
is /boot/grub/menu.lst, depending on the install method used the active GRUB menu
might be located somewhere else. Use the list-menu subcommand to locate the active
GRUB menu. For example, if a system was installed using Live Upgrade,
the GRUB menu might not be located in the current boot environment.
See the EXAMPLES section for typical output from the list-menu option.

Note that OpenBoot PROM (OBP)-based machines, such as SPARC systems, do not
use GRUB and have no boot menu manageable by bootadm.

The bootadm command determines dynamically the options supported by the image to
be managed, so that bootadm invoked on one platform can be used
to manage diskless clients of a different platform type.

SUBCOMMANDS

The bootadm command has the following subcommands:

update-archive

Updates current boot archive if required. Applies to both SPARC and x86 platforms.

list-archive

Lists the files and directories to be included in the boot archive. Applies to both SPARC and x86 platforms.

set-menu

Maintain the GRUB menu. The current GRUB menu is boot/grub/menu.lst, relative to root. Do not depend on this location, because it is subject to change. Applies to x86 platforms only.

list-menu

Lists the location of the active GRUB menu, as well as the current GRUB menu entries. This includes the autoboot-timeout, the default entry number, and the title of each entry. Applies to x86 platforms only.

Options

The bootadm command has the following options:

-v

In an update-archive operation, stale files are displayed on stderr.

-n

In an update-archive operation, archive content is checked but not updated.

-pplatform

The platform, or machine hardware class, of the client. The platform type can only be specified together with -R, and is generally useful only for managing a diskless client where the client is of a different platform class than the server. Platform must be one of i86pc, sun4u, or sun4v.

-Raltroot

Operation is applied to an alternate root path.

Note - The root file system of any non-global zones must not be referenced with the -R option. Doing so might damage the global zone's file system, might compromise the security of the global zone, and might damage the non-global zone's file system. See zones(5).

key=value

Possible values are:

default=entrynum

The item number (for example, 0, 1, or 2) in the GRUB menu designating the operating system to boot when the timer expires.

timeout=seconds

The number of seconds before the operating system designated by the default item number is booted. If the value is –1, auto boot is disabled.

Examples

Example 1 Updating the Current Boot Archive

The following command updates the current boot archive:

# bootadm update-archive

Example 2 Updating the Boot Archive on an Alternate Root

The following command updates the boot archive on an alternate root:

# bootadm update-archive -R /a

Example 3 Listing Installed OS Instances

The following command lists the installed operating system instances in a GRUB
menu: