Booting and Shutting Down Oracle® Solaris 11.2 Systems

Exit Print View

Updated: July 2014
 
 

x86: Administering the GRUB Configuration by Using the bootadm Command

On systems that support GRUB Legacy, the GRUB configuration and the GRUB menu is primarily managed by editing the menu.lst file. On systems that support GRUB 2, the grub.cfg file is used. However, this file is not manually edited. Instead, the file is managed by using the boot administration interface, bootadm. The bootadm command can be used to administer most of the tasks that were previously done by editing the menu.lst file. These tasks include administering boot loader settings, the GRUB menu, as well as individual attributes of a particular boot entry.


Note -  Because the grub.cfg file can be overwritten without notice whenever changes are made to the boot loader by using either the bootadm command or the beam command, this file should never be directly edited.

The following bootadm subcommands support the administration of the GRUB 2 configuration:

add-entry

Adds a boot entry to the GRUB menu.

change-entry

Changes the attributes of a specified boot entry in the GRUB menu.

generate-menu

Generates a new boot loader configuration file.

install-bootloader

Installs the system boot loader. This subcommand applies to both x86 and SPARC platforms.

list-menu

Displays the current boot entries in the GRUB menu.

The –P option supports displaying boot entries for a specified root pool.

View individual menu entries by title or entry number, as follows:

# bootadm list-menu -i 0
the location of the boot loader configuration files is: /rpool/boot/grub
     title: Oracle Solaris 11 FCS
     kernel: /platform/i86pc/kernel/$ISADIR/unix
     kernel arguments: -B $ZFS-BOOTFS -v
     boot archive: /platform/i86pc/$ISADIR/boot_archive
     ZFS root pool: rpool
remove-entry

Removes a boot entry from the GRUB menu.

set-menu

Maintains the GRUB menu. This subcommand is used to set a particular GRUB menu entry as the default and to set other menu options and boot loader options.

The –P option supports changing menus on multiple root pools.


Note - Because SPARC platforms do not use GRUB, there is no boot menu that requires management by using the bootadm command. However, the bootadm command can be used on SPARC based systems to list the contents of the boot archive, to manually update the boot archive, and to install the boot loader. See Managing the Oracle Solaris Boot Archives.

The following procedures describe how to use the bootadm command to manage the GRUB configuration and the GRUB menu. For more complete information, see the bootadm(1M) man page.