<?Pub UDT _bookmark _target?><?Pub UDT __target_1 _target?><?Pub UDT registeredtm trademark?><?Pub CX solbook(?><chapter id="archive-123"><?Pub Tag atict:info tracking="on" ref="0"?><?Pub Tag atict:user user="sk23612" fullname="Juanita Heieck"?><?Pub Tag atict:user
user="jonj" fullname="Juanita Heieck"?><?Pub Tag atict:user user="kathys"
fullname="Kathy Slattery"?><?Pub Tag atict:user user="cathleen" fullname=""?><?Pub Tag
atict:user user="eb151805" fullname="Juanita Heieck"?><?Pub Tag atict:user
user="jh118764" fullname="Juanita Heieck"?><?Pub Tag atict:user user="lh136763"
fullname="Laura Hartman"?><title>Managing the Solaris Boot Archives (Tasks)</title><indexterm><primary>managing the boot archives</primary><secondary>tasks</secondary>
</indexterm><indexterm><primary>boot archives</primary><secondary>managing</secondary>
</indexterm><indexterm><primary><command>bootadm</command> command</primary><secondary>using to manage the boot archives</secondary>
</indexterm><highlights><para>This chapter describes boot archive management in the Solaris OS. Procedures
for using the <command>bootadm</command> command are described
in detail.</para><itemizedlist><para>The following is a list of the information in this chapter:</para><listitem><para><olink targetptr="gglbi" remap="internal">Managing the Solaris Boot Archives
(Task Map)</olink></para>
</listitem><listitem><para><olink targetptr="ggnke" remap="internal">Description of the Solaris Boot Archives</olink></para>
</listitem><listitem><para><olink targetptr="ggngq" remap="internal">Managing the boot-archive Service</olink></para>
</listitem><listitem><para><olink targetptr="gglaj" remap="internal">Using the bootadm Command to Manage
the Boot Archives</olink></para>
</listitem>
</itemizedlist><para>For overview information about the boot process, see <olink targetptr="hboverview-25463" remap="internal">Chapter&nbsp;9, Shutting Down and Booting a System
(Overview)</olink>. For step-by-step instructions on booting a system, see <olink targetptr="hbsparcboot-79782" remap="internal">Chapter&nbsp;12, Booting a Solaris System (Tasks)</olink>.</para>
</highlights><sect1 id="gglbi"><title>Managing the Solaris Boot Archives (Task Map)</title><indexterm><primary>boot archives, managing</primary><secondary>booting the failsafe archive</secondary>
</indexterm><indexterm><primary>failsafe archives</primary><secondary>booting</secondary>
</indexterm><table frame="all" id="gglbe"><title>Solaris Boot Archive Management: Task
Map</title><tgroup cols="3" colsep="1" rowsep="1"><colspec colwidth="28.81*"/><colspec colwidth="37.51*"/><colspec colwidth="32.69*"/><thead><row><entry><para>Task</para>
</entry><entry><para>Description</para>
</entry><entry><para>For Information</para>
</entry>
</row>
</thead><tbody><row><entry><para>Manage the <command>boot-archive</command> service.</para>
</entry><entry><para>The <filename>boot-archive</filename> service is controlled by the Service
Management Facilty (SMF). Use the <command>svcadm</command> command to enable
and disable services. Use the <command>svcs</command> command to verify whether
the <command>boot-archive</command> service is running.</para>
</entry><entry><para><olink targetptr="ggngq" remap="internal">Managing the boot-archive Service</olink></para>
</entry>
</row><row><?PubTbl row rht="1.80in"?><entry><para>Clear the <command>boot-archive</command> service.</para>
</entry><entry><para>Use this procedure as an alternate to booting the failsafe archive.
After the <command>boot-archive</command> service is cleared, the <command>bootadm</command> command runs silently to update the boot archives.</para>
</entry><entry><para><olink targetptr="gglbw" remap="internal">How to Update an Inconsistent Boot Archive
by Clearing the boot-archive Service</olink></para>
</entry>
</row><row><entry><para>Update the boot archives by using the <command>bootadm</command> command.</para>
</entry><entry><para>Use the <command>bootadm update-archive</command> command to manually
update the boot archive.</para>
</entry><entry><para><olink targetptr="ggmxa" remap="internal">How to Manually Update the Boot Archive</olink></para>
</entry>
</row><row><entry><para>Manually update the boot archive for a mirrored root (<filename>/</filename>)
partition.</para>
</entry><entry><para>On systems that use a metadevice mirror for the root (<filename>/</filename>)
partition, booting the failsafe archive and running the <command>bootadm update-archive</command> command to manually update the boot archive fails. This problem
occurs because the mirror is a metadevice. Consequently, you must manually
update the boot archive.</para>
</entry><entry><para><olink targetptr="ghgnq" remap="internal">How to Manually Update the Boot Archive on
a RAID-1 (Mirror) Volume</olink></para>
</entry>
</row><row><entry><para>List the contents of the boot archives by using the <command>bootadm</command> command.</para>
</entry><entry><para>Use the <command>bootadm list-archive</command> command to list the
contents of the boot archive.</para>
</entry><entry><para><olink targetptr="ggmsw" remap="internal">How to List Contents of the Boot Archive</olink></para>
</entry>
</row><row><entry><para><emphasis role="strong">x86 only:</emphasis> Locate the active GRUB
menu by using the <command>bootadm</command> command.</para>
</entry><entry><para>Use the <command>bootadm list-menu</command> command to determine the
location of the active GRUB menu.</para>
</entry><entry><para><olink targetptr="ggmvk" remap="internal">How to Locate the Active GRUB Menu and List
Current Menu Entries</olink></para>
</entry>
</row><row><entry><para><emphasis role="strong">x86 only:</emphasis> Set the default boot entry
in the GRUB menu by using the <command>bootadm</command> command.</para>
</entry><entry><para>Use the <command>bootadm set-menu</command> command to set the default
boot entry in the GRUB menu.</para>
</entry><entry><para><olink targetptr="ggmsm" remap="internal">How to Set the Default Boot Entry for the Active
GRUB Menu</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</table>
</sect1><sect1 id="ggnke"><title>Description of the Solaris Boot Archives</title><para>When you install the Solaris OS on a system, the <command>bootadm</command> command
creates one primary boot archive and one failsafe archive.</para><para>A <emphasis>primary boot archive</emphasis> is a subset of a root (<filename>/</filename>) file system. This boot archive contains all of the kernel modules, <filename>driver.conf</filename> files, in addition to a few configuration files. These
files are located in the <filename>/etc</filename> directory. The files in
the boot archive are read by the kernel before the root (<filename>/</filename>)
file system is mounted. After the root (<filename>/</filename>) file system
is mounted, the boot archive is discarded by the kernel from memory. Then,
file I/O is performed against the root device.</para><note><para>If
you are running a Solaris Express release on an x86 based system, two primary
boot archives (one 32-bit archive and one 64-bit archive) are created at installation
time. The 32-bit archive is located in <filename>/platform/i86pc/boot_archive</filename>.
The 64-bit archive is located in <filename>/platform/i86pc/amd64/boot_archive</filename>.</para>
</note><para>The files that make up the SPARC boot archives are located in  the <filename>/platform</filename> directory.</para><itemizedlist><para>The contents of this directory are divided into three groups of files:</para><listitem><para>Files that are required for a <literal>sun4u</literal> boot
archive</para>
</listitem><listitem><para>Files that are required for a <literal>sun4v</literal> boot
archive</para>
</listitem><listitem><para>Files that are required for a <literal>sun4us</literal> boot
archive</para>
</listitem>
</itemizedlist><para>The files that make up the x86 boot archives are located in  the <filename>/platform/i86pc</filename> directory.</para><itemizedlist><para>If you are running the Solaris Express release, the contents of this
directory are divided into two groups of files:</para><listitem><para>32-bit boot archive files, which are located in <filename>/platform/i86pc/boot_archive</filename></para>
</listitem><listitem><para>64-bit boot archive files, which are located in <filename>/platform/i86pc/amd64/boot_archive</filename></para>
</listitem>
</itemizedlist><para>To list the files and directories that are included in the boot archives,
use the <command>bootadm list-archive</command> command.</para><para>If any files in the archive are updated, the boot archive must be rebuilt.
For modifications to take effect, the rebuild of the archive must take place
before the next system reboot</para><para>The <emphasis>failsafe</emphasis> boot archive is the second type of
archive that is created when you install the Solaris OS.</para><itemizedlist><para>A failsafe boot archive has the following benefits and characteristics:</para><listitem><para>Is self-sufficient</para>
</listitem><listitem><para>Can boot on its own</para>
</listitem><listitem><para>Is created by default during installation of the OS</para>
</listitem><listitem><para>Requires no maintenance</para>
</listitem>
</itemizedlist><para>For more information about booting a system in failsafe mode, see <olink targetptr="ggqqq" remap="internal">Booting the Failsafe Archive on a SPARC Based System</olink> and <olink targetptr="ggqdn" remap="internal">Booting the Failsafe Archive on an x86 Based System</olink>.</para>
</sect1><sect1 id="ggngq"><title>Managing the <command>boot-archive</command> Service</title><indexterm><primary>managing the <command>boot-archive</command> service</primary>
</indexterm><indexterm><primary>boot archives</primary><secondary>managing</secondary>
</indexterm><indexterm><primary><command>bootadm</command> command</primary><secondary>using to manage boot archives</secondary>
</indexterm><para>The <filename>boot-archive</filename> service is controlled by the Service
Management Facility (SMF). The boot-archive service instance is <filename>svc:/system/boot-archive:default</filename>. The <command>svcadm</command> command is used to enable and disable
services.</para><para>To verify whether the <command>boot-archive</command> service is running,
use the <command>svcs</command> command.</para><para>For more information, see the <olink targetdoc="group-refman" targetptr="svcadm-1m" remap="external"><citerefentry><refentrytitle>svcadm</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> and the <olink targetdoc="group-refman" targetptr="svcs-1" remap="external"><citerefentry><refentrytitle>svcs</refentrytitle><manvolnum>1</manvolnum></citerefentry></olink> man pages.</para><task id="ggnih"><title>How to Enable or Disable the <command>boot-archive</command> Service</title><procedure><step><para>Become superuser or assume an equivalent role.</para>
</step><step><para>To enable or disable the <command>boot-archive</command> service,
type:</para><screen># <userinput>svcadm enable | disable system/boot-archive</userinput></screen>
</step><step><para>To verify the state of the <command>boot-archive</command> service,
type:</para><screen>% <command>svcs boot-archive</command></screen><para>If the service is running, the output displays an online service state.</para><screen>STATE          STIME    FMRI
online          9:02:38 svc:/system/boot-archive:default</screen><para>If the service is not running, the output indicates the service is offline.</para>
</step>
</procedure><taskrelated role="troubleshooting"><para>For information about updating the boot archive by clearing the <command>boot-archive</command> service, see <olink targetptr="gglbw" remap="internal">How to Update an Inconsistent
Boot Archive by Clearing the boot-archive Service</olink>.</para>
</taskrelated>
</task><task id="gglbw"><title>How to Update an Inconsistent Boot Archive by Clearing
the <command>boot-archive</command> Service</title><tasksummary><para>The boot-archive service, <filename>svc:/system/boot-archive</filename>,
is managed by SMF. This procedure shows how to update the boot archive when
an inconsistent archive is detected during the boot process. Clearing the
service works the same as running the <command>boot</command> <option>F</option> <command>failsafe</command> command. Note that when you use this method to update the
boot archives, there is no need to boot the failsafe archive or run the <command>bootadm update-archive</command> command. This command runs silently after
the boot-archive service has been cleared.</para><caution><para>The preferred method for correcting an inconsistent boot archive
is to boot the system in failsafe mode. See the following references for instructions
on booting the failsafe archive:</para><para>For SPARC based systems, see <olink targetptr="hbsparcboot-60" remap="internal">Booting a SPARC Based System From the Network</olink>.</para><para>For x86 based systems, see <olink targetptr="ggqdn" remap="internal">Booting the
Failsafe Archive on an x86 Based System</olink>.</para>
</caution>
</tasksummary><procedure><step><para>During the process of booting the system, if a warning similar
to the following is displayed, ignore the warning.</para><screen>WARNING: The following files in / differ from the boot archive:

    changed <replaceable>file-name</replaceable></screen><para>The system will enter system maintenance mode.</para>
</step><step><para>Clear the boot-archive service by typing the following command:</para><screen># <userinput>svcadm clear system/boot-archive</userinput></screen><para>After this command is run, the <command>bootadm update-archive</command> command
runs silently. If the boot archive is updated successfully, the system is
rebooted.</para>
</step><step><para>Verify the service is running.</para><screen># <userinput>svcs boot-archive</userinput>
STATE          STIME    FMRI
online          9:02:38 svc:/system/boot-archive:default</screen>
</step>
</procedure><example id="gglcq" arch="sparc"><title>Updating an inconsistent Boot Archive by Clearing the Boot-Archive
Service</title><screen>screen not found.
Can't open input device.
Keyboard not present.  Using ttya for input and output.

Sun Enterprise 220R (2 X UltraSPARC-II 450MHz), No Keyboard
OpenBoot 3.23, 1024 MB memory installed, Serial #13116682.
Ethernet address 8:0:20:c8:25:a, Host ID: 80c8250a.



Rebooting with command: boot                                          
Boot device: /pci@1f,4000/scsi@3/disk@1,0:a  File and args: 
SunOS Release 5.10 64-bit
Copyright 1983-2007 Sun Microsystems, Inc.  All rights reserved.
Use is subject to license terms.
DEBUG enabled
misc/forthdebug (507204 bytes) loaded
Hostname: marnie

WARNING: The following files in / differ from the boot archive:

    changed /kernel/drv/sd.conf

The recommended action is to reboot to the failsafe archive to correct
the above inconsistency. To accomplish this, on a GRUB-based platform,
reboot and select the "Solaris failsafe" option from the boot menu.
On an OBP-based platform, reboot then type "boot -F failsafe". Then
follow the prompts to update the boot archive. Alternately, to continue
booting at your own risk, you may clear the service by running:
"svcadm clear system/boot-archive"

Nov 21 15:47:20 svc.startd[100004]: svc:/system/boot-archive:default: Method 
"/lib/svc/method/boot-archive" failed with exit status 95.
Nov 21 15:47:20 svc.startd[100004]: system/boot-archive:default failed fatally: 
transitioned to maintenance (see 'svcs -xv' for details)
Requesting System Maintenance Mode
(See /lib/svc/share/README for more information.)
Console login service(s) cannot run

Root password for system maintenance (control-d to bypass): 
single-user privilege assigned to /dev/console.
Entering System Maintenance Mode

Nov 21 15:48:36 su: 'su root' succeeded for root on /dev/console
Sun Microsystems Inc.   SunOS 5.10, 
2007
.
.
.# 
# 
# <userinput>svcadm clear system/boot-archive</userinput>
# 
# NIS domain name is mpklab.sfbay.sun.com
/dev/rdsk/c0t1d0s5 is clean
Reading ZFS config: done.
#
# bootadm update-archive
# <userinput>svcs boot-archive</userinput>
STATE          STIME    FMRI
online          9:02:38 svc:/system/boot-archive:default</screen>
</example>
</task>
</sect1><sect1 id="gglaj"><title>Using the <command>bootadm</command> Command to Manage
the Boot Archives</title><itemizedlist><para>The <command>/sbin/bootadm</command> command enables you to perform
the following tasks:</para><listitem><para>Manually update the current boot archives on a system.</para>
</listitem><listitem><para>List the files and directories that are included in the boot
archives on a system.</para>
</listitem><listitem><para><emphasis role="strong">x86 only:</emphasis> Maintain the
GRUB menu.</para>
</listitem><listitem><para><emphasis role="strong">x86 only:</emphasis> Locate the active
GRUB menu,  as well as the current GRUB menu entries. </para>
</listitem>
</itemizedlist><para>The syntax of the command is as follows:</para><screen><userinput>/sbin/bootadm [<replaceable>subcommand</replaceable>] [-<replaceable>option</replaceable>] [-R <replaceable>altroot</replaceable>]</userinput></screen><para>For more information about the <command>bootadm</command> command, see
the <olink targetdoc="group-refman" targetptr="bootadm-1m" remap="external"><citerefentry><refentrytitle>bootadm</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man
page.</para><task id="ggmxa"><title>How to Manually Update the Boot Archive</title><procedure><step><para>Become superuser or assume an equivalent role.</para><para>Roles
contain authorizations and privileged commands. For more information about
roles, see <olink targetdoc="sysadv6" targetptr="rbactask-15" remap="external"><citetitle remap="section">Configuring RBAC (Task Map)</citetitle> in <citetitle remap="book">System Administration Guide: Security Services</citetitle></olink>.</para>
</step><step><para>To update the current boot archive, type:</para><screen># <userinput>bootadm update-archive</userinput></screen><variablelist><varlistentry><term><command>bootadm</command></term><listitem><para>Manages the boot archives on a system.</para>
</listitem>
</varlistentry><varlistentry><term><command>update-archive</command></term><listitem><para>Updates the current boot archive, if required. Applies to
both SPARC and x86 based systems.</para>
</listitem>
</varlistentry>
</variablelist><stepalternatives><step><para>To update the boot archive on an alternate root, type:</para><screen># <userinput>bootadm update-archive -R /a</userinput></screen><variablelist><varlistentry><term><option>R</option> <replaceable>altroot</replaceable></term><listitem><para>Specifies an alternate <filename>root</filename> path to apply
to the <command>update-archive</command> subcommand.</para><note><para>The root (<filename>/</filename>) file system of any non-global
 zone must not be referenced with the <option>R</option> 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 <olink targetdoc="group-refman" targetptr="zones-5" remap="external"><citerefentry><refentrytitle>zones</refentrytitle><manvolnum>5</manvolnum></citerefentry></olink> man page.</para>
</note>
</listitem>
</varlistentry>
</variablelist>
</step>
</stepalternatives>
</step>
</procedure>
</task><task id="ghgnq"><title>How to Manually Update the Boot Archive on a RAID-1
(Mirror) Volume</title><indexterm><primary>mirrored root (<filename>/</filename>) partition</primary><secondary>updating the boot archives</secondary>
</indexterm><indexterm><primary>updating the boot archives</primary><secondary>mirrored root partition</secondary>
</indexterm><indexterm><primary><command>bootadm update-archive</command></primary><secondary>updating boot archive on root (<filename>/</filename>) mirror.</secondary>
</indexterm><indexterm><primary>manually update the boot archives</primary><secondary>systems with mirrored root (<filename>/</filename>) partitions</secondary>
</indexterm><indexterm><primary>SMV mirrored root (<filename>/</filename>) metadevice</primary><secondary>updating the boot archive</secondary>
</indexterm><tasksummary><note><para>This procedure applies to updating the boot archive on RAID-1
(mirror) volumes that are created and maintained by using Solaris Volume Manager
(SVM).</para>
</note><para>If the boot archive and the root (<filename>/</filename>) file system
become inconsistent, an error message is displayed when you boot the system.
Typically, the recommended action is to boot the system in failsafe mode,
then run the <command>bootadm update-archive</command> command to update the
boot archives. However, if the root (<filename>/</filename>) file system is
a mirrored metadevice (RAID-1 volume), this method fails to successfully update
the boot archive.</para><para>When you boot the system in failsafe mode, a message similar to the
following is displayed:</para><screen>Searching for installed OS instances...
/dev/dsk/c0t0d0s0 is under md control, skipping.
/dev/dsk/c1t3d0s0 is under md control, skipping.
No installed OS instance found.</screen><para>This message indicates the metadevice was skipped. To manually update
the boot archives, follow the steps that are described in the following procedure.</para>
</tasksummary><procedure><step><para>On the system that has an inconsistent boot archive, become superuser
or assume an equivalent role.</para>
</step><step><para>Boot the failsafe archive.</para><stepalternatives><step><para>On a SPARC based system, type:</para><screen># <userinput>reboot -- "-F failsafe"</userinput></screen><para>To boot the failsafe archive from the <literal>ok</literal> prompt,
type:</para><screen>ok <userinput>boot -F failsafe</userinput></screen><para>For more information, see <olink targetptr="ggqgc" remap="internal">How to Boot the Failsafe
Archive on a SPARC Based System</olink>.</para>
</step><step><para>On an x86 based system, boot the system, then select the failsafe
boot entry in the GRUB menu.</para><para>For more information, see <olink targetptr="fvznb" remap="internal">How to Boot the Failsafe Archive on an x86 Based System
by Using GRUB</olink>.</para>
</step>
</stepalternatives><para>The system boots in failsafe mode, searches for installed OS instances,
then returns the message previously described, &ldquo;No installed OS instance
found&rdquo;. After the boot sequence completes, the command prompt is displayed.</para>
</step><step><para>Use the <command>metastat</command> command to determine the primary
submirror.</para><screen># <userinput>metastat -p</userinput></screen><variablelist><varlistentry><term><option>p</option></term><listitem><para>Displays a list of active metadevices and hot spare pools.</para><para>The  <option>p</option> output is designed for taking a snapshot of
the configuration for later recovery or setup.</para>
</listitem>
</varlistentry>
</variablelist><para>For example:</para><screen># <userinput>metastat -p</userinput>
d10 -m d0 d1 1
d0 1 1 c0t0d0s0
d1 1 1 c1t3d0s0</screen><para>In the previous output, <literal>d0</literal> and <literal>d1</literal> are
submirrors of <literal>d10</literal>. The primary submirror, which is typically
listed first, is <literal>d0</literal>.</para>
</step><step><para>Mount the primary submirror.</para><para>For example:</para><screen># <userinput>mount /dev/dsk/c0t0d0s0 /a</userinput></screen>
</step><step><para>Temporarily update the <filename>/etc/vfstab</filename> file to
use a single root (<filename>/</filename>) partition.</para><substeps><step><para>Make a copy of the original <filename>vfstab</filename> file.</para><screen># <userinput>cp /a/etc/vfstab /a/etc/vfstab.orig</userinput></screen>
</step><step><para>Using a text editor, edit the <filename>vfstab</filename> file
as follows:</para><substeps><step><para>Comment out the line for the root (<filename>/</filename>) mirror
metadevice.</para><screen>#device        device        mount        FS    fsck    mount    mount
#to mount	to fsck        point        type    pass    at boot    options
#
.
.
.
#/dev/md/dsk/d10    	/dev/md/rdsk/d10    /     ufs    1    no    -</screen><para>In the previous example, the line, <literal>/dev/md/dsk/d10</literal>,
was commented out.</para>
</step><step><para>Add a new line for the disk device of the primary submirror.</para><screen>#device        device        mount        FS    fsck    mount    mount
#to mount	to fsck        point        type    pass    at boot    options
#
.
.
.
#/dev/md/dsk/d10	/dev/md/rdsk/d10    /     ufs    1    no    -
/dev/dsk/c0t0d0s0	/dev/rdsk/c0t0d0s0  /     ufs    1    no    -
.
.
.</screen><para>In the previous example, a new line for the disk device of the primary
submirror, <filename>/dev/dsk/c0t0d0s0</filename>, was added.</para>
</step>
</substeps>
</step><step><para>Save the changes.</para>
</step>
</substeps>
</step><step><para>To prevent the system from attempting to boot from the metadevice,
temporarily update the <filename>/etc/system</filename> file as follows:</para><substeps><step><para>Make a copy of the original <filename>/etc/system</filename> file.</para><screen># <userinput>cp /a/etc/system /a/etc/system.orig</userinput></screen>
</step><step><para>Using a text editor, edit the <filename>/etc/system</filename> file,
commenting out the <literal>rootdev</literal> line. This line is located between
the <literal>Begin MDD root</literal> and the <literal>End MDD root</literal> lines.</para><screen>* Begin MDD root info (do not edit)
# rootdev:/pseudo/md@0:0,0,blk
* End MDD root info (do not edit)</screen>
</step><step><para>Save the changes.</para>
</step>
</substeps>
</step><step><para>Run the command to update the boot archive.</para><screen># <userinput>bootadm update-archive -R /a</userinput></screen>
</step><step><para>Unmount the primary submirror, then reboot the system.</para><screen># <userinput>umount /a</userinput>
# <userinput>shutdown -i 6</userinput></screen><stepalternatives><step><para>If the system still does not boot normally, reboot the failsafe
archive and check the <filename>/etc/vfstab</filename> and the <filename>/etc/system</filename> files to make sure the information is correct.</para>
</step>
</stepalternatives>
</step><step><para>After the system has successfully rebooted, rebuild the metadevice:</para><substeps><step><para>Identify the name of the root (<filename>/</filename>) mirror
metadevice from the <filename>vfstab</filename> file.</para><para>The name
of the metadevice is the line that was commented out in Step 5.</para>
</step><step><para>Display the components of the mirror by using the <command>metastat</command> command.</para><para>For example:</para><screen># <userinput>metastat -p</userinput>
d10 -m d0 d1 1
d0 1 1 c0t0d0s0
d1 1 1 c1t3d0s0</screen>
</step><step><para>Detach the faulty submirror.</para><screen># <userinput>metadetach <replaceable>mirror</replaceable> <replaceable>submirror</replaceable></userinput></screen><para>For example:</para><screen># <userinput>metadetach d10 d1</userinput></screen>
</step><step><para>Replace the existing copy of the <filename>/etc/vfstab</filename> file
with the original file.</para><screen># <userinput>cp /a/etc/vfstab.orig /a/etc/vfstab</userinput></screen>
</step><step><para>Replace the existing copy of the <filename>/etc/system</filename> file
with the original file.</para><screen># <userinput>cp /a/etc/system.orig /a/etc/system</userinput></screen>
</step><step><para>Reboot the system.</para><screen># <userinput>shutdown -i 6</userinput></screen>
</step>
</substeps><para>After the system reboots, the mirrored root (<filename>/</filename>)
partition is restored on the metadevice.</para>
</step><step><para>Reattach the submirror that was detached in the previous step.</para><screen># <userinput>metattach <replaceable>mirror</replaceable> <replaceable>submirror</replaceable></userinput></screen><para>For example:</para><screen># <userinput>metattach d10 d1</userinput></screen><para>The mirror resynchronization begins.</para>
</step><step><para>To check the status of the resynchronization process, use the <command>metastat</command> command:</para><screen># <userinput>metastat | grep `Resync in progress'</userinput></screen><para>When no output is returned, the process is finished.</para>
</step>
</procedure><example id="ghjiu" arch="sparc"><title>Manually Updating the Boot Archive on a RAID-1 (Mirror) Volume</title><para>This example shows the steps for manually updating the boot archive
on a system with an SVM root (<filename>/</filename>) mirrored metadevice.
The system that was used for this example is a SPARC based system running
the Solaris 10 10/08 FCS release.</para><screen>SunOS Release 5.10 Version Generic_137137-09 64-bit
Copyright 1983-2008 Sun Microsystems, Inc.  All rights reserved.
Use is subject to license terms.
WARNING: Unexpected EOF on line 14 of /kernel/drv/md.conf
Hostname: pilgrim1

WARNING: The following files in / differ from the boot archive:

    changed /kernel/drv/md.conf

The recommended action is to reboot to the failsafe archive to correct
the above inconsistency. To accomplish this, on a GRUB-based platform,
reboot and select the "Solaris failsafe" option from the boot menu.
On an OBP-based platform, reboot then type "boot -F failsafe". Then
follow the prompts to update the boot archive. Alternately, to continue
booting at your own risk, you may clear the service by running:
"svcadm clear system/boot-archive"

Sep 18 15:22:06 svc.startd[7]: svc:/system/boot-archive:default: 
Method "/lib/svc/method/boot-archive" failed with exit status 95.
Sep 18 15:22:06 svc.startd[7]: system/boot-archive:default
failed fatally: transitioned to maintenance (see 'svcs -xv' for details)
Requesting System Maintenance Mode
(See /lib/svc/share/README for more information.)
Console login service(s) cannot run

Root password for system maintenance (control-d to bypass):
single-user privilege assigned to /dev/console.
Entering System Maintenance Mode

Sep 18 15:22:18 su: 'su root' succeeded for root on /dev/console
Sun Microsystems Inc.    SunOS 5.10  Generic  January 2005
# <userinput>reboot -- "-F failsafe"</userinput>
syncing file systems... done
rebooting...
Resetting ...
Rebooting with command: boot -F failsafe
Boot device: /pci@1f,4000/scsi@3/disk@0,0:a  File and args: -F failsafe
SunOS Release 5.10 Version Generic_137137-08	 64-bit
Copyright 1983-2008 Sun Microsystems, Inc.  All rights reserved.
Use is subject to license terms.
Configuring devices.
Searching for installed OS instances...
/dev/dsk/c0t0d0s0 is under md control, skipping.
/dev/dsk/c1t3d0s0 is under md control, skipping.
No installed OS instance found.

Starting shell.

pilgrim1# <userinput>metastat -p</userinput>
d10 -m d0 d1 1
d0 1 1 c0t0d0s0
d1 1 1 c1t3d0s0

# <userinput>mount /dev/dsk/c0t0d0s0 /a</userinput>
# <userinput>cp /a/etc/vfstab /a/etc/vfstab.orig</userinput>
# <userinput>vi /a/etc/vfstab</userinput>

&lt;&lt; input changes to vfstab file, then save changes &gt;&gt;

# <userinput>cp /a/etc/system /a/etc/system.orig</userinput>
# <userinput>vi /a/etc/system</userinput>

&lt;&lt; input changes to /etc/system file, then save changes &gt;&gt;

# <userinput>bootadm update-archive -R /a</userinput>
Creating boot_archive for /a
updating /a/platform/sun4u/boot_archive
15+0 records in
15+0 records out
# <userinput>umount /a</userinput>
# <userinput>shutdown -i 6</userinput>

&lt;&lt; reboot the system &gt;&gt;

Rebooting with command: boot
Boot device: /pci@1f,4000/scsi@3/disk@0,0:a  File and args:
SunOS Release 5.10 Version Generic_137137-08  64-bit
Copyright 1983-2008 Sun Microsystems, Inc.  All rights reserved.
Use is subject to license terms.
[...]
# <userinput>metastat -p d10</userinput>
# <userinput>metadetach d10 d1</userinput>
# cp <userinput>/a/etc/vfstab.orig /a/etc/vfstab</userinput>
# cp /<userinput>a/etc/system.orig /a/etc/system</userinput>
# <userinput>shutdown -i 6</userinput>

&lt;&lt; reboot the system &gt;&gt;

Rebooting with command: boot
Boot device: /pci@1f,4000/scsi@3/disk@0,0:a  File and args:
SunOS Release 5.10 Version Generic_137137-08 64-bit
Copyright 1983-2008 Sun Microsystems, Inc.  All rights reserved.
Use is subject to license terms.
[...]
# <userinput>metattach d10 d1</userinput>
# <userinput>metastat | grep 'Resync in progress'</userinput>
    Resync in progress: 4 % done
# <userinput>metastat | grep 'Resync in progress'</userinput></screen>
</example>
</task><task id="ggmsw"><title>How to List Contents of the Boot Archive</title><procedure><step><para>Become superuser or assume an equivalent role.</para><para>Roles
contain authorizations and privileged commands. For more information about
roles, see <olink targetdoc="sysadv6" targetptr="rbactask-15" remap="external"><citetitle remap="section">Configuring RBAC (Task Map)</citetitle> in <citetitle remap="book">System Administration Guide: Security Services</citetitle></olink>.</para>
</step><step><para>To list the files and directories that are included in the boot
archive, type:</para><screen># <userinput>bootadm list-archive</userinput></screen><variablelist><varlistentry><term><command>list-archive</command></term><listitem><para>Lists the files and directories that are included in the boot
archive or archives. Applies to both SPARC and x86 based systems.</para>
</listitem>
</varlistentry>
</variablelist>
</step>
</procedure>
</task><task id="ggmvk" arch="x86"><title>How to Locate the Active GRUB Menu and
List Current Menu Entries</title><tasksummary><para>Use this procedure to determine the location of the active GRUB menu
and to list current GRUB menu entries.</para>
</tasksummary><procedure><step><para>Become superuser or assume an equivalent role.</para><para>Roles
contain authorizations and privileged commands. For more information about
roles, see <olink targetdoc="sysadv6" targetptr="rbactask-15" remap="external"><citetitle remap="section">Configuring RBAC (Task Map)</citetitle> in <citetitle remap="book">System Administration Guide: Security Services</citetitle></olink>.</para>
</step><step><para>To list the location of the active GRUB menu and current GRUB
menu entries, type:</para><screen># <userinput>bootadm list-menu</userinput></screen><variablelist><varlistentry><term><command>list-menu</command></term><listitem><para>Lists the location of the active GRUB menu,  as well as the
current GRUB menu entries.  Information about the <literal>autoboot-timeout</literal>,
the default entry number, and the title of each entry is included in this
listing. Applies to x86 based systems <emphasis>only</emphasis>.</para>
</listitem>
</varlistentry>
</variablelist>
</step>
</procedure><example id="ggmua"><title>Listing the Location of the Active GRUB Menu and Current GRUB Menu
Entries</title><screen># <userinput>bootadm list-menu</userinput>
The location for the active GRUB menu is: /stubboot/boot/grub/menu.lst
default=0
timeout=10
(0) Solaris10
(1) Solaris10 Failsafe
(2) Linux</screen>
</example>
</task><task id="ggmsm" arch="x86"><title>How to Set the Default Boot Entry for the
Active GRUB Menu</title><procedure><step><para>Become superuser or assume an equivalent role.</para><para>Roles
contain authorizations and privileged commands. For more information about
roles, see <olink targetdoc="sysadv6" targetptr="rbactask-15" remap="external"><citetitle remap="section">Configuring RBAC (Task Map)</citetitle> in <citetitle remap="book">System Administration Guide: Security Services</citetitle></olink>.</para>
</step><step><para> To set the default boot entry in the active GRUB menu, type:</para><screen># <userinput>bootadm set-menu <replaceable>menu-entry</replaceable></userinput></screen><variablelist><varlistentry><term><command>set-menu</command></term><listitem><para>Maintains the GRUB menu. The location of the active GRUB menu
is <command>boot/grub/menu.lst</command>. Applies to x86 bases systems <emphasis>only</emphasis>.</para>
</listitem>
</varlistentry><varlistentry><term><replaceable>menu-entry</replaceable></term><listitem><para>Specifies the GRUB menu entry to set as the default.</para>
</listitem>
</varlistentry>
</variablelist>
</step><step><para>To verify default menu entry has been changed, type:</para><screen># <userinput>bootadm list-menu</userinput></screen><para>The new default menu entry should be displayed.</para>
</step>
</procedure><example id="ggmvc"><title>Switching the GRUB Default Menu Entry</title><para> 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. </para><screen># <userinput>bootadm set-menu default=2</userinput></screen>
</example><taskrelated role="see-also"><para>For a description of the <filename>menu.lst</filename> file in each
GRUB implementation, see <olink targetptr="getnk" remap="internal">Supported GRUB Implementations</olink>.</para>
</taskrelated>
</task>
</sect1>
</chapter><?Pub *0000037562 0?>