System Administration Guide: Basic Administration

Procedurex86: How to Set the Default Boot Entry for the Active GRUB Menu

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. To set the default boot entry in the active GRUB menu, type:


    # bootadm set-menu menu-entry
    
    set-menu

    Maintains the GRUB menu. The location of the active GRUB menu is boot/grub/menu.lst. Applies to x86 bases systems only.

    menu-entry

    Specifies the GRUB menu entry to set as the default.

  3. To verify default menu entry has been changed, type:


    # bootadm list-menu
    

    The new default menu entry should be displayed.


Example 14–4 Switching the GRUB Default Menu Entry

This example shows how to switch the default GRUB menu to one of the menu entries that is displayed in the previous example. The menu entry that is selected is The Linux, menu entry 2.


# bootadm set-menu default=2

See Also

For a description of the menu.lst file in each GRUB implementation, see x86: Supported GRUB Implementations.