JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
System Administration Guide: Basic Administration     Oracle Solaris 10 8/11 Information Library
search filter icon
search icon

Document Information

About This Book

1.  Oracle Solaris Management Tools (Road Map)

2.  Working With the Solaris Management Console (Tasks)

3.  Working With the Oracle Java Web Console (Tasks)

4.  Managing User Accounts and Groups (Overview)

5.  Managing User Accounts and Groups (Tasks)

6.  Managing Client-Server Support (Overview)

7.  Managing Diskless Clients (Tasks)

8.  Introduction to Shutting Down and Booting a System

9.  Shutting Down and Booting a System (Overview)

10.  Shutting Down a System (Tasks)

11.  Modifying Oracle Solaris Boot Behavior (Tasks)

12.  Booting an Oracle Solaris System (Tasks)

13.  Managing the Oracle Solaris Boot Archives (Tasks)

Managing the Oracle Solaris Boot Archives (Task Map)

Description of the Oracle Solaris Boot Archives

Managing the boot-archive Service

How to Enable or Disable the boot-archive Service

Automatic Boot Archive Recovery

x86: How to Clear Automatic Boot Archive Update Failures by Using the auto-reboot-safe Property

How to Clear Automatic Boot Archive Update Failures by Using the bootadm Command

Using the bootadm Command to Manage the Boot Archives

How to Manually Update the Boot Archive by Using the bootadm Command

How to Manually Update the Boot Archive on a Solaris Volume Manager RAID-1 (Mirrored) Root Partition

How to List Contents of the Boot Archive

x86: How to Locate the Active GRUB Menu and List Current Menu Entries

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

14.  Troubleshooting Booting an Oracle Solaris System (Tasks)

15.  x86: GRUB Based Booting (Reference)

16.  x86: Booting a System That Does Not Implement GRUB (Tasks)

17.  Working With the Oracle Solaris Auto Registration regadm Command (Tasks)

18.  Managing Services (Overview)

19.  Managing Services (Tasks)

20.  Managing Software (Overview)

21.  Managing Software With Oracle Solaris System Administration Tools (Tasks)

22.  Managing Software by Using Oracle Solaris Package Commands (Tasks)

23.  Managing Patches

A.  SMF Services

Index

Using the bootadm Command to Manage the Boot Archives

The /sbin/bootadm command enables you to perform the following tasks:

The syntax of the command is as follows:

/sbin/bootadm [subcommand] [-option] [-R altroot]

For more information about the bootadm command, see the bootadm(1M) man page.

How to Manually Update the Boot Archive by Using the bootadm Command

  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 update the boot archive, type:
    # bootadm update-archive
    bootadm

    Manages the boot archives on a system.

    update-archive

    Updates the current boot archive, if required. Applies to both SPARC and x86 based systems.

    • To update the boot archive on an alternate root, type:
      # bootadm update-archive -R /a
      -R altroot

      Specifies an alternate root path to apply to the update-archive subcommand.


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


  3. Reboot the system.
    # reboot

How to Manually Update the Boot Archive on a Solaris Volume Manager RAID-1 (Mirrored) Root Partition

The following procedure describes how to mount a mirrored metadevice during a failsafe boot. In this procedure, the root (/) file system that is used is /dev/dsk/c0t0d0s0.

  1. Boot the failsafe archive.

    Booting the system in failsafe mode produces the following output:

    Starting shell.
    #
  2. During the failsafe boot, when prompted by the system to select a device to mount, type q to indicate none.
    Please select a device to be mounted (q for none)[?,??,q]: q
  3. Temporarily mount a submirror of the root (/) file system as read-only on the /a directory.
    # mount -o ro /dev/dsk/c0t0d0s0 /a
  4. Copy the md.conf file to the /kernel/drv directory.
    # cp /a/kernel/drv/md.conf /kernel/drv/
  5. Unmount the /a directory.
    # umount /a
  6. Use the devfsadm command to load the md driver.
    # update_drv -f md

    Running this command causes the configuration to be read, and the necessary devices to be created.


    Note - Before proceeding to the next step, wait a few seconds to ensure that the md driver has had time to load.


  7. Use the metasync command to ensure that the root (/) file system is in sync. For example:
    # metasync d0
  8. Mount the root mirror metadevice on the /a directory.
    # mount /dev/md/dsk/d0 /a
  9. Update the boot archive of the device that you mounted in the previous step.
    # bootadm update-archive -v -R /a

    If the boot archive fails to be updated, or an error message is displayed, do the following:

    1. Update the timestamp on the md.conf file on the /a directory, which forces an update of the boot archive.
      # touch /a/kernel/drv/md.conf
    2. Update the boot archive by running the bootadm command.
      # bootadm update-archive -v -R /a

      The update of the boot archive takes a few minutes to complete. If the boot archive was updated successfully, a message similar to the following is displayed:

      changed /a/etc/system
         cannot find: /a/etc/cluster/nodeid: No such file or directory
         cannot find: /a/etc/devices/mdi_ib_cache: No such file or directory
         Creating ram disk on /a
         updating /a/platform/i86pc/boot_archive
  10. Unmount /a.
    # umount /a
  11. Reboot the system.

How to List Contents of the Boot Archive

  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 list the files and directories that are included in the boot archive, type:
    # bootadm list-archive
    list-archive

    Lists the files and directories that are included in the boot archive or archives. Applies to both SPARC and x86 based systems.

x86: How to Locate the Active GRUB Menu and List Current Menu Entries

Use this procedure to determine the location of the active GRUB menu and to list current GRUB menu entries.

  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 list the location of the active GRUB menu and current GRUB menu entries, type:
    # bootadm list-menu
    list-menu

    Lists the location of the active GRUB menu, as well as the current GRUB menu entries. Information about the autoboot-timeout, the default entry number, and the title of each entry is included in this listing. Applies to x86 based systems only.

Example 13-1 Listing the Location of the Active GRUB Menu and Current GRUB Menu Entries

# bootadm list-menu
The location for the active GRUB menu is: /stubboot/boot/grub/menu.lst
default=0
timeout=10
(0) Solaris10
(1) Solaris10 Failsafe
(2) Linux

x86: 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 13-2 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 Versions.