<chapter id="lucreate-1"><title>Using Solaris Live Upgrade to Create a
Boot Environment (Tasks)</title><highlights><para>This chapter explains how to install Solaris Live Upgrade, use the menus,
and to create a boot environment. This chapter contains the following sections:</para><itemizedlist><listitem><para><olink targetptr="lucreate-7" remap="internal">Task Map: Installing Solaris
Live Upgrade and Creating Boot Environments</olink></para>
</listitem><listitem><para><olink targetptr="lucreate-8" remap="internal">Installing Solaris Live Upgrade</olink></para>
</listitem><listitem><para><olink targetptr="chapter-33" remap="internal">Creating a New Boot Environment</olink></para>
</listitem>
</itemizedlist>
</highlights><sect1 id="lucreate-7"><title>Task Map: Installing Solaris Live Upgrade and
Creating Boot Environments</title><table frame="all" id="upgrade-tbl-159"><title>Task Map: Using Solaris Live
Upgrade</title><tgroup cols="3" colsep="0" rowsep="0"><colspec colname="colspec3" colwidth="33*"/><colspec colname="colspec4" colwidth="33*"/><colspec colname="colspec5" colwidth="33*"/><thead><row rowsep="1"><entry colsep="1" rowsep="1"><para>Task </para>
</entry><entry colsep="1" rowsep="1"><para>Description</para>
</entry><entry colsep="1" rowsep="1"><para>For Instructions</para>
</entry>
</row>
</thead><tbody><row><entry colsep="1" rowsep="1"><para>Install Solaris Live Upgrade packages</para>
</entry><entry colsep="1" rowsep="1"><para>Install packages on your OS</para>
</entry><entry colsep="1" rowsep="1"><para><olink targetptr="lucreate-8" remap="internal">Installing Solaris Live Upgrade</olink></para>
</entry>
</row><row><entry colsep="1" rowsep="1"><para>Create a boot environment</para>
</entry><entry colsep="1" rowsep="1"><para>Copy and reconfigure file systems to an inactive boot environment</para>
</entry><entry colsep="1" rowsep="1"><para><olink targetptr="chapter-33" remap="internal">Creating a New Boot Environment</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</table>
</sect1><sect1 id="lucreate-8"><title>Installing Solaris Live Upgrade</title><para>You need to install the Solaris Live Upgrade packages on your
current OS. The release of the Solaris Live Upgrade packages must match the
release of the OS you are upgrading to. For example, if your current OS is
the Solaris 9 release and you want to upgrade to the Solaris Express 5/07 release,
you need to install the Solaris Live Upgrade packages from the Solaris Express 5/07 release.</para><para>Installing Solaris Live Upgrade involves either
installing by using the pkgadd command or by using the installer.</para><itemizedlist><listitem><para><olink targetptr="lucreate-3" remap="internal">To Install Solaris Live Upgrade
With the pkgadd Command</olink></para>
</listitem><listitem><para><olink targetptr="luupgrade-1" remap="internal">To Install Solaris Live Upgrade
With the Solaris Installation Program</olink></para>
</listitem>
</itemizedlist><task id="lucreate-3"><title>To Install Solaris Live Upgrade With the <command>pkgadd</command> Command</title><procedure>&suStepA;<step><para>Install the packages in the following order.</para><screen># <userinput>pkgadd -d <replaceable>path_to_packages</replaceable> SUNWlucfg SUNWlur SUNWluu</userinput>   </screen><variablelist><varlistentry><term><replaceable>path_to_packages</replaceable></term><listitem><para>Specifies the absolute path to the software packages. </para>
</listitem>
</varlistentry>
</variablelist>
</step><step id="lucreate-step-6"><para>Verify that the package has been installed
successfully.</para><screen># <userinput>pkgchk -v SUNWlucfg SUNWlur SUNWluu</userinput></screen>
</step>
</procedure>
</task><task id="luupgrade-1"><title>To Install Solaris Live Upgrade With the Solaris
Installation Program</title><tasksummary><note><para>This procedure assumes that the
system is running removable media services. If you have questions about removable
media services that manage discs, refer to <olink targetdoc="sagdfs" remap="external"><citetitle remap="book">System Administration Guide: Devices and File Systems</citetitle></olink> for
detailed information.</para>
</note>
</tasksummary><procedure><step id="lucreate-step-17"><para>Insert the Solaris Operating System DVD or Solaris Software - 2 CD. </para>
</step>&suStepA;<step id="lucreate-step-35"><para>Run the installer for the media you are
using.</para><itemizedlist><listitem><para>If you are using the Solaris Operating System DVD, change directories to the
installer and run the installer.</para><itemizedlist><listitem><para><emphasis role="strong">For SPARC based systems</emphasis>:</para><screen># <userinput>cd /media/cdrom/s0/Solaris_11/Tools/Installers</userinput>
# <userinput>./liveupgrade20</userinput></screen>
</listitem><listitem><para><emphasis role="strong">For x86 based systems</emphasis>:</para><screen># <userinput>cd /media/cdrom/Solaris_11/Tools/Installers</userinput>
# <userinput>./liveupgrade20</userinput></screen>
</listitem>
</itemizedlist><para>The Solaris installation program GUI is displayed.</para>
</listitem><listitem><para>If you are using the Solaris Software - 2 CD, run the installer. </para><screen>% <userinput>./installer</userinput></screen><para>The Solaris installation program GUI  is displayed.</para>
</listitem>
</itemizedlist>
</step><step id="lucreate-step-36"><para>From the Select Type of Install panel, click
Custom.</para>
</step><step id="lucreate-step-37"><para>On the Locale Selection panel, click the
language to be installed.</para>
</step><step id="lucreate-step-38"><para>Choose the software to install.</para><itemizedlist><listitem><para>For DVD, on the Component Selection panel, click Next to install
the packages.</para>
</listitem><listitem><para>For CD, on the Product Selection panel, click Default Install
for Solaris Live Upgrade and click on the other software choices to deselect
them.</para>
</listitem>
</itemizedlist>
</step><step id="luupgrade-step-80"><para>Follow the directions on the Solaris installation
program panels to install the software.</para>
</step>
</procedure>
</task>
</sect1><sect1 id="chapter-33"><title>Creating a New Boot Environment</title><para>Creating a boot environment provides a method
of copying critical file systems from the active boot environment to a new
boot environment. The <command>lucreate</command> command enables reorganizing
a disk if necessary, customizing file systems, and copying the critical file
systems to the new boot environment. </para><para>Before file systems are copied to the new boot environment, they can
be customized so that critical file system directories are either merged into
their parent directory or split from their parent directory. User-defined
(shareable) file systems are shared between boot environments by default.
But shareable file systems can be copied if needed. Swap, which is a shareable
file system, can be split and merged also. For an overview of critical and
shareable file systems, see <olink targetptr="luoverview-13" remap="internal">File System Types</olink>.</para><task id="lucreate-16"><title>To Create a Boot Environment for the First Time</title><tasksummary><para>The <command>lucreate</command> command that is used with the <option>m</option> option
specifies which file systems and the number of file systems to be created
in the new boot environment. You must specify the exact number of file systems
you want to create by repeating this option. For example, a single use of
the <option>m</option> option specifies where to put all the file systems.
You merge all the file systems from the original boot environment into  the
one file system that is specified by the <option>m</option> option. If you
specify the <option>m</option> option twice, you create two file systems.
When using the <option>m</option> option to create file systems, follow these
guidelines:</para><itemizedlist><listitem><para>You must specify one <option>m</option> option for the root
(<filename>/</filename>) file system for the new boot environment. If you
run <command>lucreate</command> without the <option>m</option> option, the
Configuration menu is displayed. The Configuration menu enables you to customize
the new boot environment by redirecting files onto new mount points.</para>
</listitem><listitem><para>Any critical file systems that exist in the current boot environment
and are not specified in a <option>m</option> option are merged into the next
highest-level file system created.</para>
</listitem><listitem><para>Only the file systems that are specified by the <option>m</option> option
are created on the new boot environment. If your current boot environment
contains multiple file systems, and you want to have the same number of file
systems in the new boot environment created, you must specify one <option>m</option> option
for each file system to be created. For example, if you have file systems
for root (<filename>/</filename>), <filename>/opt</filename>, and <filename>/var</filename>,
you would use one <option>m</option> option for each file system on the new
boot environment.</para>
</listitem><listitem><para>Do not duplicate a mount point. For example, you cannot have
two root (/) file systems.</para>
</listitem>
</itemizedlist>
</tasksummary><procedure>&suStepA;<step id="lucreate-step-2200"><para>To create the new boot environment, type:</para><screen># <userinput>lucreate [-A '<replaceable>BE_description</replaceable>'] -c <replaceable>BE_name</replaceable> \
 -m <replaceable>mountpoint:device[,metadevice]:fs_options</replaceable> [-m ...] -n <replaceable>BE_name</replaceable></userinput></screen><variablelist><varlistentry><term><option>A</option> '<replaceable>BE_description</replaceable>'</term><listitem><para>(Optional) Enables the creation of a boot environment description
that is associated with the boot environment name (BE_name). The description
can be any length and can contain any characters.</para>
</listitem>
</varlistentry><varlistentry><term><option>c</option> <replaceable>BE_name</replaceable></term><listitem><para>Assigns the name <replaceable>BE_name</replaceable> to the
active boot environment. This option is not required and is only used when
the first boot environment is created. If you run <command>lucreate</command> for
the first time and you omit the <option>c</option> option, the software creates
a default name for you. </para><para>The default name is chosen according to the following criteria:</para><itemizedlist><listitem><para>If the physical boot device can be determined, then the base
name of the physical boot device is used to name the current boot environment.
 </para><para>For example, if the physical boot device is <filename>/dev/dsk/c0t0d0s0</filename>, then the current boot environment is given the name <filename>c0t0d0s0</filename>. </para>
</listitem><listitem><para>If the physical boot device cannot be determined, then names
from the <command>uname</command> command with the <option>s</option> and <option>r</option> options are combined to produce the name.  </para><para>For example,
if the <command>uname</command> <option>s</option> returns the OS name of
SunOS and the <command>uname</command> <option>r</option> returns the release
name of 5.9, then the name <literal>SunOS5.9</literal> is given to the current
boot environment. </para>
</listitem><listitem><para>If both of the above cannot determine the name, then the name <literal>current</literal> is  used to name the current boot environment.</para>
</listitem>
</itemizedlist><note><para>If you use the <option>c</option> option after the first boot
environment creation, the option is ignored or an error message is displayed.</para><itemizedlist><listitem><para>If the name specified is the same as the current boot environment
name, the option is ignored.</para>
</listitem><listitem><para>If the name specified is different than the current boot environment
name, then an error message is displayed and the creation fails. The following
example shows a boot environment name that causes an error message.</para><screen># <userinput>lucurr</userinput> 
c0t0d0s0
# <userinput>lucreate -c /dev/dsk/c1t1d1s1 -n newbe -m /:/dev/dsk/c1t1d1s1:ufs</userinput>
ERROR: current boot environment name is c0t0d0s0: cannot change
name using &lt;-c c1t1d1s1></screen>
</listitem>
</itemizedlist>
</note>
</listitem>
</varlistentry><varlistentry><term><option>m</option> <replaceable>mountpoint:device[,metadevice]:fs_options</replaceable> [<option>m</option> ...]</term><listitem><para>Specifies the file systems' configuration of the new boot
environment in the <filename>vfstab</filename>. The file systems that are
specified as arguments to <option>m</option> can be on the same disk or they
can be spread across multiple disks. Use this option as many times as needed
to create the number of file systems that are needed. </para><itemizedlist><listitem><para><replaceable>mountpoint</replaceable>  can be any valid mount
point or <literal>&ndash;</literal> (hyphen), indicating a swap partition.</para>
</listitem><listitem><para><replaceable>device</replaceable> field can be one of the
following:</para><itemizedlist><listitem><para>The name of a disk device, of the form <filename>/dev/dsk/c<replaceable>w</replaceable>t<replaceable>x</replaceable>d<replaceable>y</replaceable>s<replaceable>z</replaceable></filename></para>
</listitem><listitem><para>The name of  a Solaris Volume Manager volume, of the form
/dev/md/dsk/d<replaceable>num</replaceable></para>
</listitem><listitem><para>The name of  a Veritas  Volume Manager volume, of the form
/dev/md/vxfs/dsk/d<replaceable>num</replaceable></para>
</listitem><listitem><para>The keyword <literal>merged</literal>, indicating that the
file system at the specified mount point is to be merged with its parent</para>
</listitem>
</itemizedlist>
</listitem><listitem><para><replaceable>fs_options</replaceable> field can be one of
the following: </para><itemizedlist><listitem><para><literal>ufs</literal>, which  indicates a UFS file system.</para>
</listitem><listitem><para><literal>vxfs</literal>, which  indicates a Veritas file system.</para>
</listitem><listitem><para><literal>swap</literal>, which  indicates a swap file system.
The swap mount point must be a <literal>&ndash;</literal> (hyphen).</para>
</listitem><listitem><para>For file systems that are logical devices (mirrors), several
keywords specify actions to be applied to the file systems. These keywords
can create a logical device, change the configuration of a logical device,
or delete a logical device. For a description of these keywords, see  <olink targetptr="lucreate-1000" remap="internal">To Create a Boot Environment With RAID-1 Volumes
(Mirrors)</olink>.</para>
</listitem>
</itemizedlist>
</listitem>
</itemizedlist>
</listitem>
</varlistentry><varlistentry><term><option>n</option> <replaceable>BE_name</replaceable></term><listitem><para>The name of the boot environment to be created. <replaceable>BE_name</replaceable> must be unique on the system.</para>
</listitem>
</varlistentry>
</variablelist><para>When creation of the new boot environment is complete, it can be upgraded
and can be activated (made bootable). See <olink targetptr="liveupgrade-1" remap="internal">Chapter&nbsp;5,
Upgrading With Solaris Live Upgrade (Tasks)</olink>.</para>
</step>
</procedure><example id="lucreate-ex-1"><title>Creating a Boot Environment</title><para>In this example, the active boot environment is named first_disk. The
mount points for the file systems are noted by using the <option>m</option> option.
Two file systems are created, root (<filename>/</filename>) and <filename>/usr</filename>.
The new boot environment is named second_disk. A description, <literal>mydescription</literal>, is associated with the name second_disk. Swap, in the new boot
environment second_disk, is automatically shared from the source, first_disk.</para><screen># <userinput>lucreate -A 'mydescription' -c first_disk  -m /:/dev/dsk/c0t4d0s0:ufs \
-m /usr:/dev/dsk/c0t4d0s3:ufs  -n second_disk</userinput></screen>
</example>
</task><task id="lucreate-15"><title>To Create a Boot Environment and Merge File
Systems </title><tasksummary><note><para>You can use the <command>lucreate</command> command
with the <option>m</option> option to specify which file systems and the number
of file systems to be created in the new boot environment. You must specify
the exact number of file systems you want to create by repeating this option.
For example, a single use of the <option>m</option> option specifies where
to put all the file systems. You merge all the file systems from the original
boot environment into one file system. If you specify the <option>m</option> option
twice, you create two file systems. </para>
</note>
</tasksummary><procedure>&suStepA;<step id="lucreate-step-23"><para>Type:</para><screen># <userinput>lucreate  -A '<replaceable>BE_description</replaceable>' \ 
-m <replaceable>mountpoint:device[,metadevice]:fs_options</replaceable> \ 
-m [...] -m <replaceable>mountpoint</replaceable>:merged:<replaceable>fs_options</replaceable> -n <replaceable>BE_name</replaceable></userinput></screen><variablelist><varlistentry><term><option>A</option> <replaceable>BE_description</replaceable></term><listitem><para>(Optional) Enables the creation of a boot environment description
that is associated with the boot environment name (BE_name). The description
can be any length and can contain any characters.</para>
</listitem>
</varlistentry><varlistentry><term><option>m</option> <replaceable>mountpoint:device[,metadevice]:fs_options</replaceable> [<option>m</option>...]</term><listitem><para>Specifies the file systems' configuration of the new boot
environment. The file systems that are specified as arguments to <option>m</option> can
be on the same disk or they can be spread across multiple disks. Use this
option as many times as needed to create the number of file systems that are
needed. </para><itemizedlist><listitem><para><replaceable>mountpoint</replaceable>  can be any valid mount
point or <literal>&ndash;</literal> (hyphen), indicating a swap partition.</para>
</listitem><listitem><para><replaceable>device</replaceable> field can be one of the
following:</para><itemizedlist><listitem><para>The name of a disk device, of the form <filename>/dev/dsk/c<replaceable>w</replaceable>t<replaceable>x</replaceable>d<replaceable>y</replaceable>s<replaceable>z</replaceable></filename></para>
</listitem><listitem><para>The name of  a Solaris Volume Manager metadevice, of the form
/dev/md/dsk/d<replaceable>num</replaceable></para>
</listitem><listitem><para>The name of  a Veritas  Volume Manager volume, of the form
/dev/vx/dsk/<replaceable>volume_name</replaceable></para>
</listitem><listitem><para>The keyword <literal>merged</literal>, indicating that the
file system at the specified mount point is to be merged with its parent</para>
</listitem>
</itemizedlist>
</listitem><listitem><para><replaceable>fs_options</replaceable> field can be one of
the following: </para><itemizedlist><listitem><para><literal>ufs</literal>, which  indicates a UFS file system.</para>
</listitem><listitem><para><literal>vxfs</literal>, which  indicates a Veritas file system.</para>
</listitem><listitem><para><literal>swap</literal>, which  indicates a swap file system.
The swap mount point must be a <literal>&ndash;</literal> (hyphen).</para>
</listitem><listitem><para>For file systems that are logical devices (mirrors), several
keywords specify actions to be applied to the file systems. These keywords
can create a logical device, change the configuration of a logical device,
or delete a logical device. For a description of these keywords, see <olink targetptr="lucreate-1000" remap="internal">To Create a Boot Environment With RAID-1 Volumes
(Mirrors)</olink>.</para>
</listitem>
</itemizedlist>
</listitem>
</itemizedlist>
</listitem>
</varlistentry><varlistentry><term><option>n</option> <replaceable>BE_name</replaceable></term><listitem><para>The name of the boot environment to be created. <replaceable>BE_name</replaceable> must be unique on the system.</para>
</listitem>
</varlistentry>
</variablelist><para>When creation of the new boot environment is complete, it can be upgraded
and activated (made bootable). See <olink targetptr="liveupgrade-1" remap="internal">Chapter&nbsp;5,
Upgrading With Solaris Live Upgrade (Tasks)</olink>.</para>
</step>
</procedure><example id="lucreate-ex-2"><title>Creating a Boot Environment and Merging File Systems</title><para>In this example, the file systems on the current boot environment are
root (<filename>/</filename>), <filename>/usr</filename>, and <filename>/opt</filename>.
The <filename>/opt</filename> file system is combined with its parent file
system <filename>/usr</filename>. The new boot environment is named second_disk.
A description, <literal>mydescription</literal>, is associated with the name
second_disk.</para><screen># <userinput>lucreate -A 'mydescription' -c first_disk \
 -m /:/dev/dsk/c0t4d0s0:ufs -m /usr:/dev/dsk/c0t4d0s1:ufs \
 -m /usr/opt:merged:ufs -n second_disk</userinput></screen>
</example>
</task><task id="lucreate-14"><title>To Create a Boot Environment and Split File
Systems</title><tasksummary><note><para>When creating file systems for a boot environment,
the rules are identical to the rules for creating file systems for the Solaris
OS. Solaris Live Upgrade cannot prevent you from making invalid configurations
on critical file systems. For example, you could enter an <command>lucreate</command> command
that would create separate file systems for root (<filename>/</filename>)
and <filename>/kernel</filename>, which is an an invalid division of the root
(<filename>/</filename>) file system. </para>
</note><para>When splitting a directory into multiple mount points, hard links are
not maintained across file systems. For example, if <filename>/usr/stuff1/file</filename> is
hard linked to <filename>/usr/stuff2/file</filename>, and <filename>/usr/stuff1</filename> and <filename>/usr/stuff2</filename> are split into separate file systems, the link between
the files no longer exists. <command>lucreate</command> issues a warning message
and a symbolic link is created to replace the lost hard link.</para>
</tasksummary><procedure>&suStepA;<step id="luupgrade-step-54"><para>Type:</para><screen># <userinput>lucreate [-A '<replaceable>BE_description</replaceable>'] \
 -m <replaceable>mountpoint</replaceable>:<replaceable>device</replaceable>[,<replaceable>metadevice</replaceable>]:<replaceable>fs_options</replaceable> \ 
-m <replaceable>mountpoint</replaceable>:<replaceable>device</replaceable>[,<replaceable>metadevice</replaceable>]:<replaceable>fs_options</replaceable> -n <replaceable>new_BE</replaceable></userinput></screen><variablelist><varlistentry><term><option>A</option> '<replaceable>BE_description</replaceable>'</term><listitem><para>(Optional) Enables the creation of a boot environment description
that is associated with the boot environment name (BE_name). The description
can be any length and contain any characters.</para>
</listitem>
</varlistentry><varlistentry><term><option>m</option> <replaceable>mountpoint:device[,metadevice]:fs_options</replaceable> [<option>m</option>...]</term><listitem><para>Specifies the file systems' configuration of the new boot
environment. The file systems that are specified as arguments to <option>m</option> can
be on the same disk or they can be spread across multiple disks. Use this
option as many times as needed to create the number of file systems that are
needed. </para><itemizedlist><listitem><para><replaceable>mountpoint</replaceable>  can be any valid mount
point or <literal>&ndash;</literal> (hyphen), indicating a swap partition.</para>
</listitem><listitem><para><replaceable>device</replaceable> field can be one of the
following:</para><itemizedlist><listitem><para>The name of a disk device, of the form <filename>/dev/dsk/c<replaceable>w</replaceable>t<replaceable>x</replaceable>d<replaceable>y</replaceable>s<replaceable>z</replaceable></filename></para>
</listitem><listitem><para>The name of  a Solaris Volume Manager metadevice, of the form
/dev/md/dsk/d<replaceable>num</replaceable></para>
</listitem><listitem><para>The name of  a Veritas  Volume Manager volume, of the form
/dev/vx/dsk/<replaceable>volume_name</replaceable></para>
</listitem><listitem><para>The keyword <literal>merged</literal>, indicating that the
file system at the specified mount point is to be merged with its parent</para>
</listitem>
</itemizedlist>
</listitem><listitem><para><replaceable>fs_options</replaceable> field can be one of
the following: </para><itemizedlist><listitem><para><literal>ufs</literal>, which  indicates a UFS file system.</para>
</listitem><listitem><para><literal>vxfs</literal>, which  indicates a Veritas file system.</para>
</listitem><listitem><para><literal>swap</literal>, which  indicates a swap file system.
The swap mount point must be a <literal>&ndash;</literal> (hyphen).</para>
</listitem><listitem><para>For file systems that are logical devices (mirrors), several
keywords specify actions to be applied to the file systems. These keywords
can create a logical device, change the configuration of a logical device,
or delete a logical device. For a description of these keywords, see <olink targetptr="lucreate-1000" remap="internal">To Create a Boot Environment With RAID-1 Volumes
(Mirrors)</olink>.</para>
</listitem>
</itemizedlist>
</listitem>
</itemizedlist>
</listitem>
</varlistentry><varlistentry><term><option>n</option> <replaceable>BE_name</replaceable></term><listitem><para>The name of the boot environment to be created. <replaceable>BE_name</replaceable> must be unique on the system.</para>
</listitem>
</varlistentry>
</variablelist>
</step>
</procedure><example id="lucreate-ex-3"><title>Creating a Boot Environment and Splitting File Systems</title><para>In this example, the preceding command splits the root (<filename>/</filename>)
file system over multiple disk slices in the new boot environment. Assume
a source boot environment that has <filename>/usr</filename>, <filename>/var</filename>,
and <filename>/opt</filename>  on root (<filename>/</filename>): <filename>/dev/dsk/c0t0d0s0
/</filename>.</para><para>On the new boot environment, separate <filename>/usr,</filename> <filename>/var</filename>, and <filename>/opt</filename>, mounting these file systems
on their own slices, as follows:  </para><para><filename>/dev/dsk/c0t1d0s0          /</filename></para><para><filename>/dev/dsk/c0t1d0s1          /var</filename></para><para><filename>/dev/dsk/c0t1d0s7          /usr</filename></para><para><filename>/dev/dsk/c0t1d0s5          /opt</filename></para><para>A description, <literal>mydescription</literal>, is associated with
the boot environment name second_disk.</para><screen># <userinput>lucreate -A 'mydescription' -c first_disk \
 -m /:/dev/dsk/c0t1d0s0:ufs -m /usr:/dev/dsk/c0t1d0s7:ufs  \ 
-m /var:/dev/dsk/c0t1d0s1:ufs -m /opt:/dev/dsk/c0t1d0s5:ufs \ 
-n second_disk</userinput></screen><para>When creation of the new boot environment is complete, it can be upgraded
and activated (made bootable). See <olink targetptr="liveupgrade-1" remap="internal">Chapter&nbsp;5,
Upgrading With Solaris Live Upgrade (Tasks)</olink>.</para>
</example>
</task><task id="lucreate-13"><title>To Create a Boot Environment and Reconfiguring
Swap</title><tasksummary><para>Swap slices are shared between boot environments by default. By <emphasis>not</emphasis> specifying swap with the <option>m</option> option, your current
and new boot environment share the same swap slices. If you want to reconfigure
the new boot environment's swap, use the <option>m</option> option to add
or remove swap slices in the new boot environment. </para><note><para>The swap slice cannot be in use by any boot environment except
the current boot environment or if the <option>s</option> option is used,
the source boot environment. The boot environment creation fails if the swap
slice is being used by any other boot environment, whether it is a swap, UFS,
or any other file system.</para><para>You can create a boot environment with
the existing swap slices and then edit the <filename>vfstab</filename> file
after the creation. </para>
</note>
</tasksummary><procedure>&suStepA;<step id="luupgrade-step-76"><para>Type:</para><screen># <userinput>lucreate  [-A '<replaceable>BE_description</replaceable>'] \
 -m <replaceable>mountpoint:device[,metadevice]:fs_options</replaceable> \ 
-m <replaceable>-:device</replaceable>:swap -n <replaceable>BE_name</replaceable></userinput></screen><variablelist><varlistentry><term><option>A</option> '<replaceable>BE_description</replaceable>'</term><listitem><para>(Optional) Enables the creation of a boot environment description
that is associated with the boot environment name (BE_name). The description
can be any length and can contain any characters.</para>
</listitem>
</varlistentry><varlistentry><term><option>m</option> <replaceable>mountpoint:device[,metadevice]:fs_options</replaceable> [<option>m</option>...]</term><listitem><para>Specifies the file systems' configuration of the new boot
environment. The file systems that are specified as arguments to <option>m</option> can
be on the same disk or they can be spread across multiple disks. Use this
option as many times as needed to create the number of file systems that are
needed. </para><itemizedlist><listitem><para><replaceable>mountpoint</replaceable>  can be any valid mount
point or <literal>&ndash;</literal> (hyphen), indicating a swap partition.</para>
</listitem><listitem><para><replaceable>device</replaceable> field can be one of the
following:</para><itemizedlist><listitem><para>The name of a disk device, of the form <filename>/dev/dsk/c<replaceable>w</replaceable>t<replaceable>x</replaceable>d<replaceable>y</replaceable>s<replaceable>z</replaceable></filename></para>
</listitem><listitem><para>The name of  a Solaris Volume Manager metadevice, of the form
/dev/md/dsk/d<replaceable>num</replaceable></para>
</listitem><listitem><para>The name of  a Veritas  Volume Manager volume, of the form
/dev/vx/dsk/<replaceable>volume_name</replaceable></para>
</listitem><listitem><para>The keyword <literal>merged</literal>, indicating that the
file system at the specified mount point is to be merged with its parent</para>
</listitem>
</itemizedlist>
</listitem><listitem><para><replaceable>fs_options</replaceable> field can be one of
the following: </para><itemizedlist><listitem><para><literal>ufs</literal>, which  indicates a UFS file system.</para>
</listitem><listitem><para><literal>vxfs</literal>, which  indicates a Veritas file system.</para>
</listitem><listitem><para><literal>swap</literal>, which  indicates a swap file system.
The swap mount point must be a <literal>&ndash;</literal> (hyphen).</para>
</listitem><listitem><para>For file systems that are logical devices (mirrors), several
keywords specify actions to be applied to the file systems. These keywords
can create a logical device, change the configuration of a logical device,
or delete a logical device. For a description of these keywords, see <olink targetptr="lucreate-1000" remap="internal">To Create a Boot Environment With RAID-1 Volumes
(Mirrors)</olink>.</para>
</listitem>
</itemizedlist>
</listitem>
</itemizedlist>
</listitem>
</varlistentry><varlistentry><term><option>n</option> <replaceable>BE_name</replaceable></term><listitem><para>The name of the boot environment to be created. <replaceable>BE_name</replaceable> must be unique.</para>
</listitem>
</varlistentry>
</variablelist><para>The new boot environment is created with swap moved to a different slice
or device.</para><para>When creation of the new boot environment is complete,
it can be upgraded and can be activated (made bootable). See <olink targetptr="liveupgrade-1" remap="internal">Chapter&nbsp;5, Upgrading With Solaris Live Upgrade
(Tasks)</olink>.</para>
</step>
</procedure><example id="lucreate-ex-4"><title>Creating a Boot Environment and Reconfiguring Swap</title><para>In this example, the current boot environment contains root (<filename>/</filename>)
on <filename>/dev/dsk/c0t0d0s0</filename> and swap is on <filename>/dev/dsk/c0t0d0s1</filename>. The new boot environment copies root (<filename>/</filename>)
to <filename>/dev/dsk/c0t4d0s0</filename> and uses both <filename>/dev/dsk/c0t0d0s1</filename> and <filename>/dev/dsk/c0t4d0s1</filename> as swap slices. A description, <literal>mydescription</literal>, is associated with the boot environment name second_disk.</para><screen># <userinput>lucreate -A 'mydescription' -c first_disk \ 
-m /:/dev/dsk/c0t4d0s0:ufs -m -:/dev/dsk/c0t0d0s1:swap \ 
-m -:/dev/dsk/c0t4d0s1:swap -n second_disk</userinput> </screen><para>These swap assignments are effective only after booting from <literal>second_disk</literal>. If you have a long list of swap slices,  use the <option>M</option> option.
See <olink targetptr="lucreate-12" remap="internal">To Create a Boot Environment and Reconfigure
Swap by Using a List</olink>.</para>
</example>
</task><task id="lucreate-12"><title>To Create a Boot Environment and Reconfigure
Swap by Using a List</title><tasksummary><para>If you have a long list of swap slices, create a swap list. <command>lucreate</command> uses this list for the swap slices in the new boot environment.</para><note><para>The swap slice cannot be in use by any boot environment except
the current boot environment or if the <option>s</option> option is used,
the source boot environment. The boot environment creation fails if the swap
slice is being used by any other boot environment, whether the swap slice
contains a swap, UFS, or any other file system. </para>
</note>
</tasksummary><procedure><step id="lucreate-step-25"><para>Create a list of swap slices to be used
in the new boot environment. The location and name of this file is user defined.
In this example, the content of the <filename>/etc/lu/swapslices</filename> file
is a list of devices and slices:</para><screen>-:/dev/dsk/c0t3d0s2:swap
-:/dev/dsk/c0t3d0s2:swap
-:/dev/dsk/c0t4d0s2:swap
-:/dev/dsk/c0t5d0s2:swap
-:/dev/dsk/c1t3d0s2:swap
-:/dev/dsk/c1t4d0s2:swap
-:/dev/dsk/c1t5d0s2:swap</screen>
</step><step id="luupgrade-step-78"><para>Type:</para><screen># <userinput>lucreate  [-A '<replaceable>BE_description</replaceable>'] \
 -m <replaceable>mountpoint:device[,metadevice]:fs_options</replaceable></userinput> \
<option>M</option> <userinput><replaceable>slice_list</replaceable>  -n <replaceable>BE_name</replaceable></userinput></screen><variablelist><varlistentry><term><option>A</option> '<replaceable>BE_description</replaceable>'</term><listitem><para>(Optional) Enables the creation of a boot environment description
that is associated with the boot environment name (BE_name). The description
can be any length and can contain any characters.</para>
</listitem>
</varlistentry><varlistentry><term><option>m</option> <replaceable>mountpoint:device[,metadevice]:fs_options</replaceable> [<option>m</option>...]</term><listitem><para>Specifies the file systems' configuration of the new boot
environment. The file systems that are specified as arguments to <option>m</option> can
be on the same disk or they can be spread across multiple disks. Use this
option as many times as needed to create the number of file systems that are
needed. </para><itemizedlist><listitem><para><replaceable>mountpoint</replaceable>  can be any valid mount
point or <literal>&ndash;</literal> (hyphen), indicating a swap partition.</para>
</listitem><listitem><para><replaceable>device</replaceable> field can be one of the
following:</para><itemizedlist><listitem><para>The name of a disk device, of the form <filename>/dev/dsk/c<replaceable>w</replaceable>t<replaceable>x</replaceable>d<replaceable>y</replaceable>s<replaceable>z</replaceable></filename></para>
</listitem><listitem><para>The name of  a Solaris Volume Manager metadevice, of the form
/dev/md/dsk/d<replaceable>num</replaceable></para>
</listitem><listitem><para>The name of  a Veritas  Volume Manager volume, of the form
/dev/vx/dsk/<replaceable>volume_name</replaceable></para>
</listitem><listitem><para>The keyword <literal>merged</literal>, indicating that the
file system at the specified mount point is to be merged with its parent</para>
</listitem>
</itemizedlist>
</listitem><listitem><para><replaceable>fs_options</replaceable> field can be one of
the following: </para><itemizedlist><listitem><para><literal>ufs</literal>, which  indicates a UFS file system.</para>
</listitem><listitem><para><literal>vxfs</literal>, which  indicates a Veritas file system.</para>
</listitem><listitem><para><literal>swap</literal>, which  indicates a swap file system.
The swap mount point must be a <literal>&ndash;</literal> (hyphen).</para>
</listitem><listitem><para>For file systems that are logical devices (mirrors), several
keywords specify actions to be applied to the file systems. These keywords
can create a logical device, change the configuration of a logical device,
or delete a logical device. For a description of these keywords, see <olink targetptr="lucreate-1000" remap="internal">To Create a Boot Environment With RAID-1 Volumes
(Mirrors)</olink>.</para>
</listitem>
</itemizedlist>
</listitem>
</itemizedlist>
</listitem>
</varlistentry><varlistentry><term><option>M</option> <replaceable>slice_list</replaceable></term><listitem><para>List of <option>m</option> options, which are collected in
the file <replaceable>slice_list</replaceable>. Specify these arguments in
the format that is specified for <option>m</option>. Comment lines, which
begin with a hash mark (<literal>#</literal>), are ignored. The <option>M</option> option
is useful when you have a long list of file systems for a boot environment.
Note that you can combine <option>m</option> and <option>M</option> options.
For example, you can store swap slices in <replaceable>slice_list</replaceable> and
specify root (<filename>/</filename>) and <filename>/usr</filename> slices
with <option>m</option>.</para><para>The <option>m</option> and <option>M</option> options support the listing
of multiple slices for a particular mount point. In processing these slices, <command>lucreate</command> skips any unavailable slices and selects the first available
slice. </para>
</listitem>
</varlistentry><varlistentry><term><option>n</option> <replaceable>BE_name</replaceable></term><listitem><para>The name of the boot environment to be created. <replaceable>BE_name</replaceable> must be unique.</para>
</listitem>
</varlistentry>
</variablelist><para>When creation of the new boot environment is complete, it can be upgraded
and can be activated (made bootable). See <olink targetptr="liveupgrade-1" remap="internal">Chapter&nbsp;5,
Upgrading With Solaris Live Upgrade (Tasks)</olink>.</para>
</step>
</procedure><example id="lucreate-ex-5"><title>Create a Boot Environment and Reconfiguring Swap By Using a List</title><para>In this example, swap in the new boot environment is the list of slices
that are noted in the <filename>/etc/lu/swapslices</filename> file. A description, <literal>mydescription</literal>, is associated with the name second_disk.</para><screen># <userinput>lucreate -A 'mydescription' -c first_disk \ 
-m /:/dev/dsk/c02t4d0s0:ufs -m /usr:/dev/dsk/c02t4d0s1:ufs \ 
-M /etc/lu/swapslices -n second_disk</userinput> </screen>
</example>
</task><task id="lucreate-11"><title>To Create a Boot Environment and Copy a Shareable
File System</title><tasksummary><para>If you want a shareable file system to be copied to the new boot environment,
specify the mount point to be copied with the <option>m</option> option. Otherwise,
shareable file systems are shared by default, and maintain the same mount
point in the <filename>vfstab</filename> file. Any updating that is applied
to the shareable file system is available to both boot environments.</para>
</tasksummary><procedure>&suStepA;<step id="lucreate-step-26"><para>Create the boot environment.</para><screen># <userinput>lucreate [-A '<replaceable>BE_description</replaceable>'] \ 
-m <replaceable>mountpoint:device[,metadevice]:fs_options</replaceable> \ 
-m <replaceable>mountpoint:device[,metadevice]:fs_options</replaceable>  -n <replaceable>BE_name</replaceable></userinput></screen><variablelist><varlistentry><term><option>A</option> '<replaceable>BE_description</replaceable>'</term><listitem><para>(Optional) Enables the creation of a boot environment description
that is associated with the boot environment name (BE_name). The description
can be any length and can contain any characters.</para>
</listitem>
</varlistentry><varlistentry><term><option>m</option> <replaceable>mountpoint:device[,metadevice]:fs_options</replaceable> [<option>m</option>...]</term><listitem><para>Specifies the file systems' configuration of the new boot
environment. The file systems that are specified as arguments to <option>m</option> can
be on the same disk or they can be spread across multiple disks. Use this
option as many times as needed to create the number of file systems that are
needed. </para><itemizedlist><listitem><para><replaceable>mountpoint</replaceable>  can be any valid mount
point or <literal>&ndash;</literal> (hyphen), indicating a swap partition.</para>
</listitem><listitem><para><replaceable>device</replaceable> field can be one of the
following:</para><itemizedlist><listitem><para>The name of a disk device, of the form <filename>/dev/dsk/c<replaceable>w</replaceable>t<replaceable>x</replaceable>d<replaceable>y</replaceable>s<replaceable>z</replaceable></filename></para>
</listitem><listitem><para>The name of  a Solaris Volume Manager metadevice, of the form
/dev/md/dsk/d<replaceable>num</replaceable></para>
</listitem><listitem><para>The name of  a Veritas  Volume Manager volume, of the form
/dev/vx/dsk/<replaceable>volume_name</replaceable></para>
</listitem><listitem><para>The keyword <literal>merged</literal>, indicating that the
file system at the specified mount point is to be merged with its parent</para>
</listitem>
</itemizedlist>
</listitem><listitem><para><replaceable>fs_options</replaceable> field can be one of
the following: </para><itemizedlist><listitem><para><literal>ufs</literal>, which  indicates a UFS file system.</para>
</listitem><listitem><para><literal>vxfs</literal>, which  indicates a Veritas file system.</para>
</listitem><listitem><para><literal>swap</literal>, which  indicates a swap file system.
The swap mount point must be a <literal>&ndash;</literal> (hyphen).</para>
</listitem><listitem><para>For file systems that are logical devices (mirrors), several
keywords specify actions to be applied to the file systems. These keywords
can create a logical device, change the configuration of a logical device,
or delete a logical device. For a description of these keywords, see <olink targetptr="lucreate-1000" remap="internal">To Create a Boot Environment With RAID-1 Volumes
(Mirrors)</olink>.</para>
</listitem>
</itemizedlist>
</listitem>
</itemizedlist>
</listitem>
</varlistentry><varlistentry><term><option>n</option> <replaceable>BE_name</replaceable></term><listitem><para>The name of the boot environment to be created. <replaceable>BE_name</replaceable> must be unique.</para>
</listitem>
</varlistentry>
</variablelist><para>When creation of the new boot environment is complete, it can be upgraded
and activated (made bootable). See <olink targetptr="liveupgrade-1" remap="internal">Chapter&nbsp;5,
Upgrading With Solaris Live Upgrade (Tasks)</olink>.</para>
</step>
</procedure><example id="lucreate-ex-6"><title>Creating a Boot Environment and Copying a Shareable File System</title><para>In this example, the current boot environment contains two file systems,
root (<filename>/</filename>) and <filename>/home</filename>. In the new boot
environment, the root (<filename>/</filename>) file system is split into two
file systems, root (<filename>/</filename>) and <filename>/usr</filename>.
The <filename>/home</filename> file system is copied to the new boot environment.
A description, <literal>mydescription</literal>, is associated with the boot
environment name second_disk.</para><screen># <userinput>lucreate -A 'mydescription' -c first_disk \ 
-m /:/dev/dsk/c0t4d0s0:ufs -m /usr:/dev/dsk/c0t4d0s3:ufs \
-m /home:/dev/dsk/c0t4d0s4:ufs -n second_disk</userinput></screen>
</example>
</task><task id="lucreate-27"><title>To Create a Boot Environment From a Different
Source</title><tasksummary><para>The <command>lucreate</command> command creates a boot environment that
is based on the file systems in the active boot environment. If you want to
create a boot environment based on a boot environment other than the active
boot environment, use <command>lucreate</command> with the <option>s</option> option.</para><note><para>If you activate the new boot environment and need to fall back,
you boot back to the boot environment that was last active, not the source
boot environment.</para>
</note>
</tasksummary><procedure>&suStepA;<step id="lucreate-step-31"><para>Create the boot environment.</para><screen># <userinput>lucreate [-A '<replaceable>BE_description</replaceable>'] -s <replaceable>source_BE_name</replaceable> 
-m <replaceable>mountpoint:device[,metadevice]:fs_options</replaceable> -n <replaceable>BE_name</replaceable></userinput></screen><variablelist><varlistentry><term><option>A</option> '<replaceable>BE_description</replaceable>'</term><listitem><para>(Optional) Enables the creation of a boot environment description
that is associated with the boot environment name (BE_name). The description
can be any length and can contain any characters.</para>
</listitem>
</varlistentry><varlistentry><term><option>s</option> <replaceable>source_BE_name</replaceable></term><listitem><para>Specifies the source boot environment for the new boot environment.
The source would not be the active boot environment.</para>
</listitem>
</varlistentry><varlistentry><term><option>m</option> <replaceable>mountpoint:device[,metadevice]:fs_options</replaceable> [<option>m</option>...]</term><listitem><para>Specifies the file systems' configuration of the new boot
environment. The file systems that are specified as arguments to <option>m</option> can
be on the same disk or they can be spread across multiple disks. Use this
option as many times as needed to create the number of file systems that are
needed. </para><itemizedlist><listitem><para><replaceable>mountpoint</replaceable>  can be any valid mount
point or <literal>&ndash;</literal> (hyphen), indicating a swap partition.</para>
</listitem><listitem><para><replaceable>device</replaceable> field can be one of the
following:</para><itemizedlist><listitem><para>The name of a disk device, of the form <filename>/dev/dsk/c<replaceable>w</replaceable>t<replaceable>x</replaceable>d<replaceable>y</replaceable>s<replaceable>z</replaceable></filename></para>
</listitem><listitem><para>The name of  a Solaris Volume Manager metadevice, of the form
/dev/md/dsk/d<replaceable>num</replaceable></para>
</listitem><listitem><para>The name of  a Veritas  Volume Manager volume, of the form
/dev/vx/dsk/<replaceable>volume_name</replaceable></para>
</listitem><listitem><para>The keyword <literal>merged</literal>, indicating that the
file system at the specified mount point is to be merged with its parent</para>
</listitem>
</itemizedlist>
</listitem><listitem><para><replaceable>fs_options</replaceable> field can be one of
the following: </para><itemizedlist><listitem><para><literal>ufs</literal>, which  indicates a UFS file system.</para>
</listitem><listitem><para><literal>vxfs</literal>, which  indicates a Veritas file system.</para>
</listitem><listitem><para><literal>swap</literal>, which  indicates a swap file system.
The swap mount point must be a <literal>&ndash;</literal> (hyphen).</para>
</listitem><listitem><para>For file systems that are logical devices (mirrors), several
keywords specify actions to be applied to the file systems. These keywords
can create a logical device, change the configuration of a logical device,
or delete a logical device. For a description of these keywords, see <olink targetptr="lucreate-1000" remap="internal">To Create a Boot Environment With RAID-1 Volumes
(Mirrors)</olink>.</para>
</listitem>
</itemizedlist>
</listitem>
</itemizedlist>
</listitem>
</varlistentry><varlistentry><term><option>n</option> <replaceable>BE_name</replaceable></term><listitem><para>The name of the boot environment to be created. <replaceable>BE_name</replaceable> must be unique on the system.</para>
</listitem>
</varlistentry>
</variablelist><para>When creation of the new boot environment is complete, it can be upgraded
and activated (made bootable). See <olink targetptr="liveupgrade-1" remap="internal">Chapter&nbsp;5,
Upgrading With Solaris Live Upgrade (Tasks)</olink>.</para>
</step>
</procedure><example id="lucreate-ex-33"><title>Creating a Boot Environment From a Different Source</title><para>In this example, a boot environment is created that is based on the
root (<filename>/</filename>) file system in the source boot environment named <literal>third_disk.</literal> <literal>Third_disk</literal> is not the active boot
environment. A description, <literal>mydescription</literal>, is associated
with the new boot environment named <literal>second_disk.</literal></para><screen># <userinput>lucreate -A 'mydescription' -s third_disk \ 
-m /:/dev/dsk/c0t4d0s0:ufs  -n second_disk</userinput></screen>
</example>
</task><task id="lucreate-28"><title>To Create an Empty Boot Environment for a  Solaris Flash Archive</title><tasksummary><para>The <command>lucreate</command> command
creates a boot environment that is based on the file systems in the active
boot environment. When using the <command>lucreate</command> command with
the <option>s</option> - option, <command>lucreate</command> quickly creates
an empty boot environment. The slices are reserved for the file systems that
are specified, but no file systems are copied. The boot environment is named,
but not actually created until installed with a Solaris Flash archive.
When the empty boot environment is installed with an archive, file systems
are installed on the reserved slices. </para>
</tasksummary><procedure>&suStepA;<step id="lucreate-step-32"><para>Create the empty boot environment.</para><screen># <userinput>lucreate -A '<replaceable>BE_name</replaceable>' -s - \ 
-m <replaceable>mountpoint:device[,metadevice]:fs_options</replaceable> -n <replaceable>BE_name</replaceable></userinput></screen><variablelist><varlistentry><term><option>A</option> '<replaceable>BE_description</replaceable>'</term><listitem><para>(Optional) Enables the creation of a boot environment description
that is associated with the boot environment name (BE_name). The description
can be any length and can contain any characters.</para>
</listitem>
</varlistentry><varlistentry><term><option>s</option> -</term><listitem><para>Specifies that an empty boot environment be created.</para>
</listitem>
</varlistentry><varlistentry><term><option>m</option> <replaceable>mountpoint:device[,metadevice]:fs_options</replaceable> [<option>m</option>...]</term><listitem><para>Specifies the file systems' configuration of the new boot
environment. The file systems that are specified as arguments to <option>m</option> can
be on the same disk or they can be spread across multiple disks. Use this
option as many times as needed to create the number of file systems that are
needed. </para><itemizedlist><listitem><para><replaceable>mountpoint</replaceable>  can be any valid mount
point or <literal>&ndash;</literal> (hyphen), indicating a swap partition.</para>
</listitem><listitem><para><replaceable>device</replaceable> field can be one of the
following:</para><itemizedlist><listitem><para>The name of a disk device, of the form <filename>/dev/dsk/c<replaceable>w</replaceable>t<replaceable>x</replaceable>d<replaceable>y</replaceable>s<replaceable>z</replaceable></filename></para>
</listitem><listitem><para>The name of  a Solaris Volume Manager metadevice, of the form
/dev/md/dsk/d<replaceable>num</replaceable></para>
</listitem><listitem><para>The name of  a Veritas  Volume Manager volume, of the form
/dev/vx/dsk/<replaceable>volume_name</replaceable></para>
</listitem><listitem><para>The keyword <literal>merged</literal>, indicating that the
file system at the specified mount point is to be merged with its parent</para>
</listitem>
</itemizedlist>
</listitem><listitem><para><replaceable>fs_options</replaceable> field can be one of
the following: </para><itemizedlist><listitem><para><literal>ufs</literal>, which  indicates a UFS file system.</para>
</listitem><listitem><para><literal>vxfs</literal>, which  indicates a Veritas file system.</para>
</listitem><listitem><para><literal>swap</literal>, which  indicates a swap file system.
The swap mount point must be a <literal>&ndash;</literal> (hyphen).</para>
</listitem><listitem><para>For file systems that are logical devices (mirrors), several
keywords specify actions to be applied to the file systems. These keywords
can create a logical device, change the configuration of a logical device,
or delete a logical device. For a description of these keywords, see <olink targetptr="lucreate-1000" remap="internal">To Create a Boot Environment With RAID-1 Volumes
(Mirrors)</olink>.</para>
</listitem>
</itemizedlist>
</listitem>
</itemizedlist>
</listitem>
</varlistentry><varlistentry><term><option>n</option> <replaceable>BE_name</replaceable></term><listitem><para>The name of the boot environment to be created. <replaceable>BE_name</replaceable> must be unique on the system.</para>
</listitem>
</varlistentry>
</variablelist>
</step>
</procedure><example id="lucreate-ex-34"><title>Creating an Empty Boot Environment for a Solaris Flash Archive</title><para>In this example, a boot environment is created but contains no file
systems. A description, <literal>mydescription</literal>, is associated with
the new boot environment that is named second_disk.</para><screen># <userinput>lucreate -A 'mydescription' -s - \ 
-m /:/dev/dsk/c0t1d0s0:ufs  -n second_disk</userinput></screen><para>When creation of the empty boot environment is complete, a flash archive
can be installed and can be activated (made bootable). See <olink targetptr="liveupgrade-1" remap="internal">Chapter&nbsp;5, Upgrading With Solaris Live Upgrade
(Tasks)</olink>.</para><para>For an example of creating and populating an empty boot environment,
see <olink targetptr="luexample-28" remap="internal">Example of Creating an Empty Boot Environment
and Installing a Solaris Flash Archive</olink>.</para><para>The following image shows the creation of an empty boot environment. </para><mediaobject><imageobject><imagedata entityref="lu-empty-boot-env"/>
</imageobject><textobject><simpara>The context describes the illustration.</simpara>
</textobject>
</mediaobject>
</example>
</task><task id="lucreate-1000"><title>To Create a Boot Environment With RAID-1 Volumes
(Mirrors)</title><tasksummary><para>When you create a boot environment, Solaris Live Upgrade uses Solaris
Volume Manager technology to create RAID-1 volumes. When creating a boot environment,
you can use Solaris Live Upgrade to manage the following tasks.</para><itemizedlist><listitem><para>Remove a single-slice concatenation (submirror) from a RAID-1
volume (mirror). The contents can be saved to become the content of the new
boot environment if necessary. Because the contents are not copied, the new
boot environment can be quickly created. After the submirror is detached from
a mirror, it is no longer part of the original mirror. Reads and writes to
the submirror are no longer performed through the mirror.</para>
</listitem><listitem><para>Create a boot environment that contains a mirror.</para>
</listitem><listitem><para>Attach a single-slice concatenation to the newly created mirror.</para>
</listitem>
</itemizedlist>
</tasksummary><taskprerequisites><para>To use the mirroring capabilities of Solaris Live Upgrade, you must
create a state database and a state database replica. A state database stores
information about disk about the state of your Solaris Volume Manager configuration.</para><itemizedlist><listitem><para>For information about creating a state database, see <olink targetdoc="logvolmgradmin" targetptr="about-state-db-replicas-1" remap="external">Chapter 6, <citetitle remap="chapter">State Database (Overview),</citetitle> in <citetitle remap="book">Solaris Volume Manager Administration Guide</citetitle></olink>.</para>
</listitem><listitem><para>For an overview of Solaris Volume Manager and the tasks that
Solaris Live Upgrade can provide, see <olink targetptr="luoverview-7" remap="internal">Creating
a Boot Environment With RAID-1 Volume File Systems</olink>. </para>
</listitem><listitem><para>For in-depth information about complex Solaris Volume Manager
configurations that are not allowed when using Solaris Live Upgrade, see <olink targetdoc="logvolmgradmin" targetptr="storage-overview-1" remap="external">Chapter 2, <citetitle remap="chapter">Storage Management Concepts,</citetitle> in <citetitle remap="book">Solaris Volume Manager Administration Guide</citetitle></olink>.</para>
</listitem>
</itemizedlist>
</taskprerequisites><procedure>&suStepA;<step id="lucreate-step-22"><para>To create the new boot environment, type:</para><screen># <userinput>lucreate [-A '<replaceable>BE_description</replaceable>']  \ 
-m <replaceable>mountpoint:device[,metadevice]:fs_options</replaceable> [-m...] \ 
-n <replaceable>BE_name</replaceable></userinput></screen><variablelist><varlistentry><term><option>A</option> '<replaceable>BE_description</replaceable>'</term><listitem><para>(Optional) Enables the creation of a boot environment description
that is associated with the boot environment name <replaceable>BE_name</replaceable>.
The description can be any length and can contain any characters.</para>
</listitem>
</varlistentry><varlistentry><term><option>m</option> <replaceable>mountpoint:device[,metadevice]:fs_options</replaceable> [<option>m</option>...]</term><listitem><para>Specifies the file systems' configuration of the new boot
environment in the <filename>vfstab</filename>. The file systems that are
specified as arguments to <option>m</option> can be on the same disk or they
can be spread across multiple disks. Use this option as many times as needed
to create the number of file systems that are needed. </para><itemizedlist><listitem><para><replaceable>mountpoint</replaceable>  can be any valid mount
point or <literal>&ndash;</literal> (hyphen), indicating a swap partition.</para>
</listitem><listitem><para><replaceable>device</replaceable> field can be one of the
following:</para><itemizedlist><listitem><para>The name of a disk device, of the form <filename>/dev/dsk/c<replaceable>w</replaceable>t<replaceable>x</replaceable>d<replaceable>y</replaceable>s<replaceable>z</replaceable></filename></para>
</listitem><listitem><para>The name of  a Solaris Volume Manager volume, of the form
/dev/md/dsk/d<replaceable>num</replaceable></para>
</listitem><listitem><para>The name of  a Veritas  Volume Manager volume, of the form
/dev/md/vxfs/dsk/d<replaceable>num</replaceable></para>
</listitem><listitem><para>The keyword <literal>merged</literal>, indicating that the
file system at the specified mount point is to be merged with its parent</para>
</listitem>
</itemizedlist>
</listitem><listitem><para><replaceable>fs_options</replaceable> field can be one of
the following types of file systems and keywords: </para><itemizedlist><listitem><para><literal>ufs</literal>, which  indicates a UFS file system.</para>
</listitem><listitem><para><literal>vxfs</literal>, which  indicates a Veritas file system.</para>
</listitem><listitem><para><literal>swap</literal>, which  indicates a swap file system.
The swap mount point must be a <literal>&ndash;</literal> (hyphen).</para>
</listitem><listitem><para>For file systems that are logical devices (mirrors), several
keywords specify actions to be applied to the file systems. These keywords
can create a logical device, change the configuration of a logical device,
or delete a logical device. </para><itemizedlist><listitem><para><literal>mirror</literal> creates a RAID&ndash;1 volume or mirror
on the specified device. In subsequent <option>m</option> options, you must
specify <literal>attach</literal> to attach at least one concatenation to
the new mirror.  The specified device must be correctly named. For example,
a logical device name of <filename>/dev/md/dsk/d10</filename> can serve as
a mirror name. For more information about naming devices, see <olink targetdoc="logvolmgradmin" targetptr="basics-42385" remap="external"><citetitle remap="section">Overview of Solaris Volume Manager Components</citetitle> in <citetitle remap="book">Solaris Volume Manager Administration Guide</citetitle></olink>.</para>
</listitem><listitem><para><literal>detach</literal> removes a concatenation from a volume
that is associated with a specified mount point. The volume does not need
to be specified.</para>
</listitem><listitem><para><literal>attach</literal> attaches a concatenation to the
mirror that is associated with a specified mount point. The physical disk
slice that is specified is made into a single device concatenation for attaching
to the mirror. To specify a concatenation to attach to a disk, you append
a comma and the name of that concatenation to the device name. If you omit
the comma and the concatenation name, <command>lucreate</command> selects
a free volume for the concatenation.</para><para><command>lucreate</command> allows
you to create only concatenations that contain a single physical slice. This
command allows you to attach up to three concatenations to a mirror.</para>
</listitem><listitem><para><literal>preserve</literal> saves the existing file system
and its content. This keyword enables you to bypass the copying process that
copies the content of the source boot environment. Saving the content enables
a quick creation of the new boot environment. For a particular mount point,
you can use <literal>preserve</literal> with only one physical device. When
you use <literal>preserve</literal>, <command>lucreate</command> checks that
the device's content is suitable for a specified file system. This check is
limited and cannot guarantee suitability.</para><para>The  <literal>preserve</literal> keyword
can be used with both a physical slice and a Solaris Volume Manager volume.</para><itemizedlist><listitem><para>If you use the <literal>preserve</literal> keyword when the
UFS file system is on a physical slice, the content of the UFS file system
is saved on the slice. In the following example of the <option>m</option> option,
the <literal>preserve</literal> keyword saves the content of the physical
device <literal>c0t0d0s0</literal> as the file system for the mount point
for the root (/) file system.</para><screen><userinput>-m /:/dev/dsk/c0t0d0s0:preserve,ufs</userinput></screen>
</listitem><listitem><para>If you use the <literal>preserve</literal> keyword when the
UFS file system is on a volume, the contents of the UFS file system are saved
on the volume.</para><para>In the following example of the <option>m</option> option,
the <literal>preserve</literal> keyword saves the contents of the RAID-1 volume
(mirror) <literal>d10</literal> as the file system for the mount point for
the root (<filename>/</filename>) file system.  </para><screen><userinput>-m /:/dev/md/dsk/d10:preserve,ufs</userinput></screen><para>In the following example of the <option>m</option> option, a RAID-1
volume (mirror) <literal>d10</literal> is configured as the file system for
the mount point for the root (<filename>/</filename>) file system. The single-slice
concatenation <literal>d20</literal> is detached from its current mirror. <literal>d20</literal> is attached to mirror <literal>d10</literal>. The root (/) file
system is preserved on submirror <literal>d20</literal>.</para><screen><userinput>-m /:/dev/md/dsk/d10:mirror,ufs -m /:/dev/md/dsk/d20:detach,attach,preserve</userinput></screen>
</listitem>
</itemizedlist>
</listitem>
</itemizedlist>
</listitem>
</itemizedlist>
</listitem>
</itemizedlist>
</listitem>
</varlistentry><varlistentry><term><option>n</option> <replaceable>BE_name</replaceable></term><listitem><para>The name of the boot environment to be created. <replaceable>BE_name</replaceable> must be unique on the system.</para>
</listitem>
</varlistentry>
</variablelist><para>When the creation of the new boot environment is complete, it can be
upgraded and can be activated (made bootable). See <olink targetptr="liveupgrade-1" remap="internal">Chapter&nbsp;5, Upgrading With Solaris Live Upgrade
(Tasks)</olink>. </para>
</step>
</procedure><example id="lucreate-ex-100"><title>Creating a Boot Environment With a Mirror and Specifying Devices</title><para>In this example, the mount points for the
file systems are specified by using the <option>m</option> option. </para><itemizedlist><listitem><para>A description, <literal>mydescription</literal>, is associated
with the name <literal>another_disk</literal>.</para>
</listitem><listitem><para><command>lucreate</command> configures a UFS file system for
the mount point root (<filename>/</filename>). A mirror, <filename>d10</filename>,
is created. This mirror is the receptacle for the current boot environment's
root (<filename>/</filename>) file system that is copied to the mirror <filename>d10</filename>. All data on the mirror <filename>d10</filename> is overwritten.</para>
</listitem><listitem><para>Two slices, <filename>c0t0d0s0</filename> and <filename>c0t1d0s0</filename>,
are submirrors, <filename>d1</filename> and <filename>d2</filename>. These
two submirrors are added to mirror <filename>d10</filename>. </para>
</listitem><listitem><para>The new boot environment is named <literal>another_disk</literal>. </para>
</listitem>
</itemizedlist><screen># <userinput>lucreate -A 'mydescription' \ 
-m /:/dev/md/dsk/d10:ufs,mirror \ 
-m /:/dev/dsk/c0t0d0s0,/dev/md/dsk/d1:attach \ 
-m /:/dev/dsk/c0t1c0s0,/dev/md/dsk/d2:attach -n another_disk</userinput></screen>
</example><example id="lucreate-ex-101"><title>Creating a Boot Environment With a Mirror and Not Specifying a Submirror
Name</title><para>In this example, the mount points for the
file systems are specified by using the <option>m</option> option.</para><itemizedlist><listitem><para>A description, <literal>mydescription</literal>, is associated
with the name <literal>another_disk</literal>.</para>
</listitem><listitem><para><command>lucreate</command> configures a UFS file system for
the mount point root (<filename>/</filename>). A mirror, <filename>d10</filename>,
is created. This mirror is the receptacle for the current boot environment's
root (<filename>/</filename>) file system that is copied to the mirror <filename>d10</filename>. All data on the mirror <filename>d10</filename> is overwritten.</para>
</listitem><listitem><para>Two slices, <filename>c0t0d0s0</filename> and <filename>c0t1d0s0</filename>,
are specified to be used as submirrors. The submirrors are not specified,
but the <command>lucreate</command> command chooses names from a list of available
volume names. These two submirrors are attached to mirror <filename>d10</filename>. </para>
</listitem><listitem><para>The new boot environment is named <literal>another_disk</literal>. </para>
</listitem>
</itemizedlist><screen># <userinput>lucreate -A 'mydescription' \ 
-m /:/dev/md/dsk/d10:ufs,mirror \ 
-m /:/dev/dsk/c0t0d0s0:attach \ 
-m /:/dev/dsk/c0t1d0s0:attach -n another_disk</userinput></screen><para>When the creation of the new boot environment is complete, it can be
upgraded and can be activated (made bootable). See <olink targetptr="liveupgrade-1" remap="internal">Chapter&nbsp;5, Upgrading With Solaris Live Upgrade
(Tasks)</olink>.</para>
</example><example id="lucreate-ex-102"><title>Creating a Boot Environment and Detaching a Submirror</title><para>In this example, the mount points for the
file systems are specified by using the <option>m</option> option.</para><itemizedlist><listitem><para>A description, <literal>mydescription</literal>, is associated
with the name <literal>another_disk</literal>.</para>
</listitem><listitem><para><command>lucreate</command> configures a UFS file system for
the mount point root (<filename>/</filename>). A mirror, <filename>d10</filename>,
is created.  </para>
</listitem><listitem><para>Slice <filename>c0t0d0s0</filename> is removed from its current
mirror. The slice is specified to be submirror <filename>d1</filename> and
is added to mirror d10. The contents of the submirror, the root (<filename>/</filename>)
file system, are saved and no copy occurs. Slice <filename>c0t1d0s0</filename> is
submirror <filename>d2</filename> and is added to mirror <filename>d10</filename>. </para>
</listitem><listitem><para>The new boot environment is named <literal>another_disk</literal>. </para>
</listitem>
</itemizedlist><screen># <userinput>lucreate -A 'mydescription' \ 
-m /:/dev/md/dsk/d10:ufs,mirror \ 
-m /:/dev/dsk/c0t0d0s0,/dev/md/dsk/d1:detach,attach,preserve \ 
-m /:/dev/dsk/c0t1d0s0,/dev/md/dsk/d2:attach -n another_disk</userinput></screen><para>When the creation of the new boot environment is complete, it can be
upgraded and can be activated (made bootable). See <olink targetptr="liveupgrade-1" remap="internal">Chapter&nbsp;5, Upgrading With Solaris Live Upgrade
(Tasks)</olink>.</para>
</example><example id="lucreate-ex-103"><title>Creating a Boot Environment, Detaching a Submirror, and Saving Its
Contents</title><para>In this example, the mount points for the
file systems are specified by using the <option>m</option> option.</para><itemizedlist><listitem><para>A description, <literal>mydescription</literal>, is associated
with the name <literal>another_disk</literal>.</para>
</listitem><listitem><para><command>lucreate</command> configures a UFS file system for
the mount point root (<filename>/</filename>). A mirror, <filename>d20</filename>,
is created. </para>
</listitem><listitem><para>Slice <filename>c0t0d0s0</filename> is removed from its current
mirror and added to the mirror <literal>d20</literal>. The name of the submirror
is not specified. The contents of the submirror, the root (<filename>/</filename>)
file system, are saved and no copy occurs. </para>
</listitem><listitem><para>The new boot environment is named <literal>another_disk</literal>. </para>
</listitem>
</itemizedlist><screen># <userinput>lucreate -A 'mydescription' \ 
-m /:/dev/md/dsk/d20:ufs,mirror \ 
-m /:/dev/dsk/c0t0d0s0:detach,attach,preserve \ 
-n another_disk</userinput></screen><para>When the creation of the new boot environment is complete, the boot
environment can be upgraded and can be activated (made bootable). See <olink targetptr="liveupgrade-1" remap="internal">Chapter&nbsp;5, Upgrading With Solaris Live Upgrade
(Tasks)</olink>.</para>
</example><example id="lucreate-ex-104"><title>Creating a Boot Environment With Two Mirrors</title><para>In this example, the mount points for the
file systems are specified by using the <option>m</option> option.</para><itemizedlist><listitem><para>A description, <literal>mydescription</literal>, is associated
with the name <literal>another_disk</literal>.</para>
</listitem><listitem><para><command>lucreate</command> configures a UFS file system for
the mount point root (<filename>/</filename>). A mirror, <filename>d10</filename>,
is created. This mirror is the receptacle for the current boot environment's
root (<filename>/</filename>) file system that is copied to the mirror <filename>d10</filename>. All data on the mirror <filename>d10</filename> is overwritten.</para>
</listitem><listitem><para>Two slices, <filename>c0t0d0s0</filename> and <filename>c0t1d0s0</filename>,
are submirrors <filename>d1</filename> and <filename>d2</filename>. These
two submirrors are added to mirror <filename>d10</filename>. </para>
</listitem><listitem><para><command>lucreate</command> configures UFS file system for
the mount point <filename>/opt</filename>. A mirror, <filename>d11</filename>,
is created. This mirror is the receptacle for the current boot environment's <filename>/opt</filename> file system that is copied to the mirror <filename>d11</filename>.
All data on the mirror <filename>d11</filename> is overwritten.</para>
</listitem><listitem><para>Two slices, <filename>c2t0d0s1</filename> and <filename>c3t1d0s1</filename>,
are submirrors <filename>d3</filename> and <filename>d4</filename>. These
two submirrors are added to mirror <filename>d11</filename>. </para>
</listitem><listitem><para>The new boot environment is named <literal>another_disk</literal>. </para>
</listitem>
</itemizedlist><screen># <userinput>lucreate -A 'mydescription' \ 
-m /:/dev/md/dsk/d10:ufs,mirror \ 
-m /:/dev/dsk/c0t0d0s0,/dev/md/dsk/d1:attach \ 
-m /:/dev/dsk/c0t1d0s0,/dev/md/dsk/d2:attach \ 
-m /opt:/dev/md/dsk/d11:ufs,mirror \ 
-m /opt:/dev/dsk/c2t0d0s1,/dev/md/dsk/d3:attach \ 
-m /opt:/dev/dsk/c3t1d0s1,/dev/md/dsk/d4:attach -n another_disk</userinput></screen><para>When the creation of the new boot environment is complete, it can be
upgraded and can be activated (made bootable). See <olink targetptr="liveupgrade-1" remap="internal">Chapter&nbsp;5, Upgrading With Solaris Live Upgrade
(Tasks)</olink>.</para>
</example>
</task><task id="lucreate-1601"><title>To Create a Boot Environment and Customize
the Content</title><tasksummary><para>The content of the file system on the new boot environment can be modified
by using the following options. Directories and files are not copied to the
new boot environment.</para>
</tasksummary><procedure>&suStepA;<step id="lucreate-step-2201"><para>To create the new boot environment, type:</para><screen># <userinput>lucreate -m <replaceable>mountpoint:device[,metadevice]:fs_options</replaceable> [-m ...]  \ 
[-x <replaceable>exclude_dir</replaceable>] [-y <replaceable>include</replaceable>] \
[-Y <replaceable>include_list_file</replaceable>] \
[-f <replaceable>exclude_list_file</replaceable>]\  
[-z <replaceable>filter_list</replaceable>] [-I] -n <replaceable>BE_name</replaceable></userinput></screen><variablelist termlength="wholeline"><varlistentry><term><option>m</option> <replaceable>mountpoint:device[,metadevice]:fs_options</replaceable> [<option>m</option> ...]</term><listitem><para>Specifies the file systems' configuration of the new boot
environment in the <filename>vfstab</filename>. The file systems that are
specified as arguments to <option>m</option> can be on the same disk or they
can be spread across multiple disks. Use this option as many times as needed
to create the number of file systems that are needed. </para><itemizedlist><listitem><para><replaceable>mountpoint</replaceable>  can be any valid mount
point or <literal>&ndash;</literal> (hyphen), indicating a swap partition.</para>
</listitem><listitem><para><replaceable>device</replaceable> field can be one of the
following:</para><itemizedlist><listitem><para>The name of a disk device, of the form <filename>/dev/dsk/c<replaceable>w</replaceable>t<replaceable>x</replaceable>d<replaceable>y</replaceable>s<replaceable>z</replaceable></filename></para>
</listitem><listitem><para>The name of  a Solaris Volume Manager volume, of the form
/dev/md/dsk/d<replaceable>num</replaceable></para>
</listitem><listitem><para>The name of  a Veritas  Volume Manager volume, of the form
/dev/md/vxfs/dsk/d<replaceable>num</replaceable></para>
</listitem><listitem><para>The keyword <literal>merged</literal>, indicating that the
file system at the specified mount point is to be merged with its parent</para>
</listitem>
</itemizedlist>
</listitem><listitem><para><replaceable>fs_options</replaceable> field can be one of
the following: </para><itemizedlist><listitem><para><literal>ufs</literal>, which  indicates a UFS file system.</para>
</listitem><listitem><para><literal>vxfs</literal>, which  indicates a Veritas file system.</para>
</listitem><listitem><para><literal>swap</literal>, which  indicates a swap file system.
The swap mount point must be a <literal>&ndash;</literal> (hyphen).</para>
</listitem><listitem><para>For file systems that are logical devices (mirrors), several
keywords specify actions to be applied to the file systems. These keywords
can create a logical device, change the configuration of a logical device,
or delete a logical device. For a description of these keywords,  see <olink targetptr="lucreate-1000" remap="internal">To Create a Boot Environment With RAID-1 Volumes
(Mirrors)</olink>.</para>
</listitem>
</itemizedlist>
</listitem>
</itemizedlist>
</listitem>
</varlistentry><varlistentry><term><option>x</option> <replaceable>exclude_dir</replaceable></term><listitem><para>Excludes files and directories by not copying them to the
new boot environment. You can use multiple instances of this option to exclude
more than one file or directory.</para><para><replaceable>exclude_dir</replaceable> is the name of the directory
or file. </para>
</listitem>
</varlistentry><varlistentry><term><option>y</option> <replaceable>include_dir</replaceable></term><listitem><para>Copies directories and files that are listed to the new boot
environment. This option is used when you have excluded a directory, but want
to restore individual subdirectories or files.</para><para><replaceable>include_dir</replaceable> is the name of the subdirectory
or file to be included. </para>
</listitem>
</varlistentry><varlistentry><term><option>Y</option> <replaceable>list_filename</replaceable></term><listitem><para>Copies directories and files from a list to the new boot environment.
This option is used when you have excluded a directory, but want to restore
individual subdirectories or files.</para><itemizedlist><listitem><para><replaceable>list_filename</replaceable> is the full path
to a file that contains a list. </para>
</listitem><listitem><para>The <replaceable>list_filename</replaceable> file must contain
one file per line. </para>
</listitem><listitem><para>If a line item is a directory, all subdirectories and files
beneath that directory are included. If a line item is a file, only that file
is included.</para>
</listitem>
</itemizedlist>
</listitem>
</varlistentry><varlistentry><term><option>f</option> <replaceable>list_filename</replaceable></term><listitem><para>Uses a list to exclude directories and files by not copying
them to the new boot environment. </para><itemizedlist><listitem><para><replaceable>list_filename</replaceable> is the full path
to a file that contains a list. </para>
</listitem><listitem><para>The <replaceable>list_filename</replaceable> file must contain
one file per line.  </para>
</listitem>
</itemizedlist>
</listitem>
</varlistentry><varlistentry><term><option>z</option> <replaceable>list_filename</replaceable></term><listitem><para>Uses a list to copy directories and files to the new boot
environment.  Each file or directory in the list is noted with a plus &ldquo;+&rdquo;
or minus &ldquo;-&rdquo;. A plus indicates an included file or directory and
the minus indicates an excluded file or directory.</para><itemizedlist><listitem><para><replaceable>list_filename</replaceable> is the full path
to a file that contains a list. </para>
</listitem><listitem><para>The <replaceable>list_filename</replaceable> file must contain
one file per line. A space must follow the plus or minus before the file name. </para>
</listitem><listitem><para>If a line item is a directory and is indicated with a + (plus),
all subdirectories and files beneath that directory are included. If a line
item is a file and is indicated with a + (plus), only that file is included.</para>
</listitem>
</itemizedlist>
</listitem>
</varlistentry><varlistentry><term><option>I</option></term><listitem><para>Overrides the integrity check of system files. Use this option
with caution.</para><para>To prevent you from removing important system files from a boot environment, <command>lucreate</command> runs an integrity check. This check examines all files
that are registered in the system package database and stops the boot environment
creation if any files are excluded. Use of this option overrides this integrity
check. This option creates the boot environment more quickly, but might not
detect problems.</para>
</listitem>
</varlistentry><varlistentry><term><option>n</option> <replaceable>BE_name</replaceable></term><listitem><para>The name of the boot environment to be created. <replaceable>BE_name</replaceable> must be unique on the system.</para>
</listitem>
</varlistentry>
</variablelist><para>When creation of the new boot environment is complete, it can be upgraded
and can be activated (made bootable). See <olink targetptr="liveupgrade-1" remap="internal">Chapter&nbsp;5,
Upgrading With Solaris Live Upgrade (Tasks)</olink>.</para>
</step>
</procedure><example id="lucreate-ex-1010"><title>Creating a Boot Environment and Excluding Files</title><para>In this example, the new boot environment is named <literal>second_disk</literal>. The source boot environment contains one file system, root (<filename>/</filename>). In the new boot environment, the <filename>/var</filename> file
system is split from the root (<filename>/</filename>) file system and put
on another slice. The <command>lucreate</command> command configures a UFS
file system for the mount points root (<filename>/</filename>) and <filename>/var</filename>. Also, two <filename>/var</filename> mail files, <filename>root</filename> and <filename>staff</filename> are not copied to the new boot environment. Swap is automatically
shared between the source and the new boot environment.</para><screen># <userinput>lucreate -n second_disk \ 
-m /:/dev/dsk/c0t1d0s0:ufs -m /var/mail:/dev/dsk/c0t2d0s0:ufs  \  
-x /var/mail/root -x /var/mail/staff</userinput></screen>
</example><example id="lucreate-ex-1011"><title>Creating a Boot Environment and Excluding and Including Files</title><para>In this example, the new boot environment is named <literal>second_disk</literal>. The source boot environment contains one file system for the OS,
root (<filename>/</filename>). The source also contains a file system that
is named <filename>/mystuff</filename>. <command>lucreate</command> configures
a UFS file system for the mount points root (<filename>/</filename>) and <filename>/mystuff</filename>. Only two directories in <filename>/mystuff</filename> are
copied to the new boot environment: <filename>/latest</filename> and <filename>/backup</filename>. Swap is automatically shared between the source and the new boot
environment.</para><screen># <userinput>lucreate -n second_disk \ 
-m /:/dev/dsk/c0t0d0s0:ufs -m /mystuff:/dev/dsk/c1t1d0s0:ufs  \  
-x /mystuff -y /mystuff/latest -y /mystuff/backup</userinput></screen>
</example>
</task>
</sect1>
</chapter>