Solaris 9 12/03 Installation Guide

Chapter 32 Using Solaris Live Upgrade to Create a Boot Environment (Tasks)

This chapter explains how to install Solaris Live Upgrade, use the menus, and to create a boot environment. This chapter contains the following sections:

About Solaris Live Upgrade Interfaces

You can run Solaris Live Upgrade with a character user interface (CUI) or the command-line interface (CLI). Procedures for both the CUI and CLI are provided in the following sections. The CUI does not provide access to all features of Solaris Live Upgrade. The CLI procedures in this document cover the basic uses of the Solaris Live Upgrade commands. See Chapter 36, Solaris Live Upgrade (Command Reference) for a list of commands and also see the appropriate, associated man pages, for more options to use with these commands.

The CUI does not run in multibyte locales and 8–bit locales.

Using Solaris Live Upgrade Menus

Figure 32–1 Solaris Live Upgrade Main Menu

The screen capture shows Solaris Live Upgrade tasks and the Enter and Help keys.

Navigation through the menus of the Solaris Live Upgrade character user interface requires that you use arrow keys and function keys. Use arrow keys to navigate up and down before making a selection or to place the cursor in a field. To perform a task, use the function keys. At the bottom of the menu, you see black rectangles that represent function keys on the keyboard. The first black rectangle represents F1, the second F2, and so on. Rectangles that are active contain a word that represents a task such as Save. The Configuration menu notes the function key number plus the task, rather than a rectangle.

In the following procedures, you might be asked to press a function key. If your function keys do not properly map to the function keys on the Solaris Live Upgrade menus, use Control-F plus the appropriate number.

Task Map: Installing Solaris Live Upgrade and Creating Boot Environments

Table 32–1 Task Map: Using Solaris Live Upgrade

Task  

Description 

For Instructions 

Install Solaris Live Upgrade packages 

Install packages on your operating environment 

Installing Solaris Live Upgrade

Start Solaris Live Upgrade 

Start the Solaris Live Upgrade main menu 

Starting and Stopping Solaris Live Upgrade (Character Interface)

Create a boot environment 

Copy and reconfigure file systems to an inactive boot environment 

Creating a New Boot Environment

Installing Solaris Live Upgrade

If you are upgrading from a Solaris 2.6, Solaris 7, or Solaris 8 operating environment, you need to install the Solaris Live Upgrade packages on your current operating environment.

To Install Solaris Live Upgrade

  1. Insert the Solaris DVD or Solaris Software 2 of 2 CD.

  2. Run the installer for the media you are using.

    • If you are using the Solaris DVD, change directories to the installer and run the installer.


      # cd /cdrom/cdrom0/Solaris_9/Tools/installers
      # ./liveupgrade20
      

      The Solaris Web Start installer is displayed.

    • If you are using the Solaris Software 2 of 2 CD, run the installer.


      % ./installer
      

      The Solaris Web Start installer is displayed.

  3. From the Select Type of Install panel, click Custom.

  4. On the Locale Selection panel, click the language to be installed.

  5. Choose the software to install.

    • For DVD, on the Component Selection panel, click Next to install the packages.

    • For CD, on the Product Selection panel, click Default Install for Solaris Live Upgrade and click on the other software choices to deselect them.

  6. Follow the directions on the Solaris Web Start installer panels to install the software.

Starting and Stopping Solaris Live Upgrade (Character Interface)

This procedure starts and stops the Solaris Live Upgrade menu program.

To Start Solaris Live Upgrade Menus


Note –

When viewing the character interface remotely, such as over a tip line, you might need to set the TERM environment variable to VT220. Also, when using the Common Desktop Environment (CDE), set the value of the TERM variable to dtterm, rather than xterm.


  1. Log in as superuser.

  2. Type:


    # /usr/sbin/lu
    

    The Solaris Live Upgrade main menu is displayed.

    Figure 32–2 Solaris Live Upgrade Main Menu

    The screen capture shows Solaris Live Upgrade tasks and the Enter and Help keys.

To Stop Solaris Live Upgrade Menus

  1. From the main menu, select Exit.

Creating a New Boot Environment

Creating a boot environment provides a method of copying critical file systems from the active boot environment to a new boot environment. The CUI's Create menu and Configuration submenu, and the lucreate command enable reorganizing a disk if necessary, customizing file systems, and copying the critical file systems to the new boot environment.

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 File System Types.

To Create a Boot Environment (Character Interface)

  1. From the main menu, select Create.

    The system displays the Create a Boot Environment submenu.

  2. Type the name of the active boot environment (if necessary) and the new boot environment and confirm. You are only required to type the name of the active boot environment the first time you create a boot environment.

    The boot environment name can be no longer than 30 characters, can contain only alphanumeric characters, and can contain no multibyte characters.


    Name of Current Boot Environment:    solaris_8
    Name of New Boot Environment:   Solaris_9 
    
  3. To save your changes, press F3.

    The configuration menu appears.

    Figure 32–3 Solaris Live Upgrade Configuration Menu

    The context describes the screen capture.

    The Configuration menu contains the following parts:

    • The original boot environment is located at the top of the screen. The boot environment to be created is at the bottom.

    • The Device field contains the following information.

      • The name of a disk device is in the form /dev/dsk/cwtxdysz.

      • The name of a Solaris Volume Manager metadevice, of the form /dev/md/dsk/dnum.

      • The name of a Veritas Volume Manager volume, of the form /dev/vx/dsk/volume_name.

      • The area for selecting a critical file system is blank until you select a critical file system. The critical file systems such as /usr, /var, or /opt can be split or merged with the root (/) file system.

      • Shareable file systems such as /export or swap are displayed in the Device field. These file systems contain the same mount point in both the source and target boot environments. Swap is shared by default, but you can also split and merge (add and remove) swap slices.

        For an overview of critical and shareable file systems, see File System Types.

    • The FS_Type field enables you to change file system type. The file system type can be one of the following:

      • vxfs, which indicates a Veritas file system

      • swap, which indicates a swap file system

      • ufs, which indicates a UFS file system

  4. (Optional) The following tasks can be done at any time:

    • To print the information on-screen to an ASCII file, press F5.

    • To scroll through the file system list, press Control-X.

      You can then switch between the file systems of the active and new boot environment and scroll.

    • To exit the Configuration menu at any time, press F6.

      • If you are in the Configuration menu, changes are not saved and file systems are not altered.

      • If you are in a Configuration submenu, you return to the Configuration menu.

  5. Select an available slice by pressing F2.

    The Choices menu displays available slices on the system for the field where the cursor is placed. The menu displays a Slice field and a file system FS_Type field.

    1. Use the arrow keys to place the cursor in a field to select a slice or file system type.

      • When you place your cursor in the Slice field, all free slices are displayed. For root (/), Choices only displays free slices that meet the root (/) file system limitations. See Guidelines for Selecting a Slice for the root (/) File System.

      • When you place your cursor in the FS_Type field, all available file system types are displayed.

      • Slices in bold can be selected for the current file system. The size of the slice is estimated by adding the size of the file system plus 30 percent to accommodate an upgrade.

      • Slices not in bold are too small to support the given file system. To reslice a disk, see Step 6.

    2. Press Return to choose a slice.

      The slice appears in the Slice field or the file system type changes in the FS_Type field.

  6. (Optional) If available slices do not meet the minimum requirements, to reslice any available disks, press F4.

    The Solaris Live Upgrade Slice Configuration menu appears.

    The format command runs, which enables you to create new slices. Follow the screen to create a new slice. For information on the format command, see the format man page.

    To navigate through this menu, use the arrow keys to move between the Device field and FS_Type field. The Size (Mbytes) field is automatically completed as the devices are selected.

    1. To free a device, press Control-D.

      The slice is now available and appears on the Choices menu.

    2. To return to the Configuration menu, press F3.

  7. (Optional) Splitting critical file systems puts the file systems on separate mount points. To split a file system, do the following:

    (To merge file systems, see Step 8).

    1. Select the file system to split.

      You can split or exclude file systems such as /usr, /var, or /opt from their parent directory.


      Note –

      When creating file systems for a boot environment, the rules are identical to the rules for creating file systems for the Solaris operating environment. Solaris Live Upgrade cannot prevent you from making invalid configurations on critical file systems. For example, you could enter a lucreate command that would create separate file systems for root (/) and /kernel—an invalid division of root (/).


    2. Press F8.

    3. Type the file system name for the new boot environment, for example:


      Enter the directory that will be a separate file system 
      on the new boot environment: /opt
      

      When the new file system is verified, a new line is added to the screen.

    4. To return to the Configuration menu, press F3.

      The Configuration menu is displayed.

  8. (Optional) Merging puts the file systems on the same mount point. To merge a file system into its parent directory:

    (To split file systems, see Step 7.)

    1. Select the file system to merge.

      You can merge file systems such as /usr, /var, or /opt into their parent directory.

    2. Press F9.

      The file systems that will be combined are displayed, for example:


      /opt will be merged into /. 
    3. Press Return.

    4. To return to the Configuration menu, press F3.

      The Configuration menu is displayed.

  9. (Optional) Decide if you want to add or remove swap slices.

    • If you want to split a swap slice and put swap on a new slice, continue with Step 10.

    • If you want to remove a swap slice, continue with Step 11.

  10. (Optional) To split a swap slice, do the following:

    1. In the Device field, select the swap slice that you want to split.

    2. Press F8.

    3. At the prompt, type:


      Enter the directory that will be a separate filesystem on 
      the new BE: swap
      
    4. Press F2 Choice.

      The Choice menu lists the available slices for swap.

    5. Select the slice to put swap on.

      The slice appears in the Device field and you have a new slice for swap.

  11. (Optional) To remove a swap slice, do the following:

    1. In the Device field, select the swap slice that you are removing.

    2. Press F9.

    3. At the prompt, type y.


      Slice /dev/dsk/c0t4d0s0 will not be swap partition. 
      Please confirm? [y, n]: y
      

      The swap slice no longer exists.

  12. Decide if you want to create the boot environment now or schedule the creation for later:

    • Press F3 to create the new boot environment now.

      The configuration is saved and you exit the configuration screen. The file systems are copied, the boot environment is made bootable, and an inactive boot environment is created.

      Creating a boot environment might take an hour or more, depending on your system configuration. The Solaris Live Upgrade main menu is then displayed.

    • If you want to schedule the creation for a later time, type y, then the start time, and an email address, as in this example.


      Do you want to schedule the copy? y
      Enter the time in 'at' format to schedule create: 8:15 PM
      Enter the address to which the copy log should be mailed: someone@anywhere.com

      You are notified of the completion by email.

      For information on time formats, see the at(1) man page.

      You can schedule only one job at a time.

    After the creation is complete, the inactive boot environment is ready to be upgraded. See Chapter 33, Upgrading With Solaris Live Upgrade (Tasks).

To Create a Boot Environment for the First Time (Command-Line Interface)

The lucreate command that is used with the -m 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 -m 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 specified by the -m option. If you specify the -m option twice, you create two file systems. When using the -m option to create file systems, follow these guidelines:

  1. Log in as superuser.

  2. To create the new boot environment, type:


    # lucreate [-A 'BE_description'] -c BE_name \
    -m mountpoint:device[,metadevice]:fs_options  [-m ...] -n BE_name
    
    -A 'BE_description'

    (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.

    -c BE_name

    Assigns the name BE_name to the active boot environment. This option is not required and is only used when the first boot environment is created. If you run lucreate for the first time and you omit the -c option, the software creates a default name for you.

    The default name is chosen according to the following criteria:

    • 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.

      For example, if the physical boot device is /dev/dsk/c0t0d0s0, then the current boot environment is given the name c0t0d0s0.

    • If the physical boot device cannot be determined, then names from the uname command with the -s and -r options are combined to produce the name.

      For example, if the uname -s returns the operating environment name of SunOS and the uname -r returns the release name of 5.9, then the name SunOS5.9 is given to the current boot environment.

    • If both of the above cannot determine the name, then the name current is used to name the current boot environment.


    Note –

    If you use the -c option after the first boot environment creation, the option is ignored or an error message is displayed.

    • If the name specified is the same as the current boot environment name, the option is ignored.

    • 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.


      # lucurr 
      c0t0d0s0
      # lucreate -c c1t1d1s1 -n newbe -m /:c1t1d1s1:ufs
      ERROR: current boot environment name is c0t0d0s0: cannot change name 
      using <-c c1t1d1s1>

    -m mountpoint:device[,metadevice]:fs_options [-m ...]

    Specifies the file systems' configuration of the new boot environment in the vfstab. The file systems that are specified as arguments to -m 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.

    • mountpoint can be any valid mount point or (hyphen), indicating a swap partition.

    • device field can be one of the following:

      • The name of a disk device, of the form /dev/dsk/cwtxdysz

      • The name of a Solaris Volume Manager volume, of the form /dev/md/dsk/dnum

      • The name of a Veritas Volume Manager volume, of the form /dev/md/vxfs/dsk/dnum

      • The keyword merged, indicating that the file system at the specified mount point is to be merged with its parent

    • fs_options field can be one of the following:

      • ufs, which indicates a UFS file system.

      • vxfs, which indicates a Veritas file system.

      • swap, which indicates a swap file system. The swap mount point must be a (hyphen).

      • For file systems that are logical devices (mirrors), several keywords specify actions to be taken on 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 To Create a Boot Environment With RAID-1 Volumes (Mirrors) (Command-Line Interface).

    -n BE_name

    The name of the boot environment to be created. BE_name must be unique on the system.


    Example 32–1 Creating a Boot Environment (Command Line)

    In this example, the active boot environment is named first_disk. The mount points for the file systems are noted by using the -m option. Two file systems are created, root (/) and /usr. The new boot environment is named second_disk. A description, mydescription, is associated with the name second_disk. Swap, in the new boot environment second_disk, is automatically shared from the source, first_disk.


    # lucreate -A 'mydescription' -c first_disk 
    -m /:/dev/dsk/c0t4d0s0:ufs -m /usr:/dev/dsk/c0t4d0s3:ufs \
    -n second_disk
    

    When creation of the new boot environment is complete, it can be upgraded and can be activated (made bootable). See Chapter 33, Upgrading With Solaris Live Upgrade (Tasks).

To Create a Boot Environment and Merge File Systems (Command-Line Interface)


Note –

The lucreate command used with the -m 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 -m 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 -m option twice, you create two file systems.


  1. Log in as superuser.

  2. Type:


    # lucreate  [[-A 'BE_description']] \
    -m mountpoint:device[,metadevice]:fs_options \
    [[-m [...]]] -m mountpoint:merged:fs_options -n BE_name
    
    -A BE_description

    (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.

    -m mountpoint:device[,metadevice]:fs_options [-m...]

    Specifies the file systems' configuration of the new boot environment. The file systems that are specified as arguments to -m 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.

    • mountpoint can be any valid mount point or (hyphen), indicating a swap partition.

    • device field can be one of the following:

      • The name of a disk device, of the form /dev/dsk/cwtxdysz

      • The name of a Solaris Volume Manager metadevice, of the form /dev/md/dsk/dnum

      • The name of a Veritas Volume Manager volume, of the form /dev/vx/dsk/volume_name

      • The keyword merged, indicating that the file system at the specified mount point is to be merged with its parent

    • fs_options field can be one of the following:

      • ufs, which indicates a UFS file system.

      • vxfs, which indicates a Veritas file system.

      • swap, which indicates a swap file system. The swap mount point must be a (hyphen).

      • For file systems that are logical devices (mirrors), several keywords specify actions to be taken on 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 To Create a Boot Environment With RAID-1 Volumes (Mirrors) (Command-Line Interface).

    -n BE_name

    The name of the boot environment to be created. BE_name must be unique on the system.


    Example 32–2 Creating a Boot Environment and Merge File Systems (Command-Line Interface)

    In this example, the file systems on the current boot environment are root (/), /usr, and /opt. The /opt file system is combined with its parent file system /usr. The new boot environment is named second_disk. A description, mydescription, is associated with the name second_disk.


    # 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
    

    When creation of the new boot environment is complete, it can be upgraded and activated (made bootable). See Chapter 33, Upgrading With Solaris Live Upgrade (Tasks).


To Create a Boot Environment and Split File Systems (Command-Line Interface)


Note –

When creating file systems for a boot environment, the rules are identical to the rules for creating file systems for the Solaris operating environment. Solaris Live Upgrade cannot prevent you from making invalid configurations on critical file systems. For example, you could enter an lucreate command that would create separate file systems for root (/) and /kernel—an invalid division of root (/).


When splitting a directory into multiple mount points, hard links are not maintained across file systems. For example, if /usr/stuff1/file is hard linked to /usr/stuff2/file, and /usr/stuff1 and /usr/stuff2 are split into separate file systems, the link between the files no longer exists. lucreate issues a warning message and a symbolic link is created to replace the lost hard link.

  1. Log in as superuser.

  2. Type:


    # lucreate [-A 'BE_description'] \
    -m mountpoint:device[,metadevice]:fs_options \
    [[-m mountpoint:device[,metadevice]:fs_options]] -n new_BE
    
    -A 'BE_description'

    (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.

    -m mountpoint:device[,metadevice]:fs_options [-m...]

    Specifies the file systems' configuration of the new boot environment. The file systems that are specified as arguments to -m 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.

    • mountpoint can be any valid mount point or (hyphen), indicating a swap partition.

    • device field can be one of the following:

      • The name of a disk device, of the form /dev/dsk/cwtxdysz

      • The name of a Solaris Volume Manager metadevice, of the form /dev/md/dsk/dnum

      • The name of a Veritas Volume Manager volume, of the form /dev/vx/dsk/volume_name

      • The keyword merged, indicating that the file system at the specified mount point is to be merged with its parent

    • fs_options field can be one of the following:

      • ufs, which indicates a UFS file system.

      • vxfs, which indicates a Veritas file system.

      • swap, which indicates a swap file system. The swap mount point must be a (hyphen).

      • For file systems that are logical devices (mirrors), several keywords specify actions to be taken on 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 To Create a Boot Environment With RAID-1 Volumes (Mirrors) (Command-Line Interface).

    -n BE_name

    The name of the boot environment to be created. BE_name must be unique on the system.


    Example 32–3 Creating a Boot Environment and Splitting File Systems (Command-Line Interface)

    In this example, the preceding command splits the root (/) file system over multiple disk slices in the new boot environment. Assume a source boot environment that has /usr, /var, and /opt on root (/): /dev/dsk/c0t0d0s0 /.

    On the new boot environment, separate /usr, /var, and /opt, mounting these file systems on their own slices, as follows:

    /dev/dsk/c0t1d0s0 /

    /dev/dsk/c0t1d0s1 /var

    /dev/dsk/c0t1d0s7 /usr

    /dev/dsk/c0t1d0s5 /opt

    A description, mydescription, is associated with the boot environment name second_disk.


    # 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
    

    When creation of the new boot environment is complete, it can be upgraded and activated (made bootable). See Chapter 33, Upgrading With Solaris Live Upgrade (Tasks).


To Create a Boot Environment and Reconfigure Swap (Command-Line Interface)

Swap slices are shared between boot environments by default. By not specifying swap with the -m 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 -m option to add or remove swap slices in the new boot environment.


Note –

The swap slice cannot be in use by any boot environment except the current boot environment or if the -s 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.

You can create a boot environment with the existing swap slices and then edit the vfstab file after the creation.


  1. Log in as superuser.

  2. Type:


    # lucreate  [-A 'BE_description'] \
    -m mountpoint:device[,metadevice]:fs_options \
    -m -:device:swap -n BE_name
    
    -A 'BE_description'

    (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.

    -m mountpoint:device[,metadevice]:fs_options [-m...]

    Specifies the file systems' configuration of the new boot environment. The file systems that are specified as arguments to -m 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.

    • mountpoint can be any valid mount point or (hyphen), indicating a swap partition.

    • device field can be one of the following:

      • The name of a disk device, of the form /dev/dsk/cwtxdysz

      • The name of a Solaris Volume Manager metadevice, of the form /dev/md/dsk/dnum

      • The name of a Veritas Volume Manager volume, of the form /dev/vx/dsk/volume_name

      • The keyword merged, indicating that the file system at the specified mount point is to be merged with its parent

    • fs_options field can be one of the following:

      • ufs, which indicates a UFS file system.

      • vxfs, which indicates a Veritas file system.

      • swap, which indicates a swap file system. The swap mount point must be a (hyphen).

      • For file systems that are logical devices (mirrors), several keywords specify actions to be taken on 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 To Create a Boot Environment With RAID-1 Volumes (Mirrors) (Command-Line Interface).

    -n BE_name

    The name of the boot environment to be created. BE_name must be unique.

    The new boot environment is created with swap moved to a different slice or device.


    Example 32–4 Creating a Boot Environment and Reconfigure Swap (Command-Line Interface)

    In this example, the current boot environment contains root (/) on /dev/dsk/c0t0d0s0 and swap is on /dev/dsk/c0t0d0s1. The new boot environment copies root (/) to /dev/dsk/c0t4d0s0 and uses both /dev/dsk/c0t0d0s1 and /dev/dsk/c0t4d0s1 as swap slices. A description, mydescription, is associated with the boot environment name second_disk.


    # lucreate -A 'mydescription' -c first_disk \
    -m /:/dev/dsk/c0t4d0s0:ufs -m -:/dev/dsk/c0t0d0s1:swap \
    -m -:/dev/dsk/c0t4d0s1:swap -n second_disk 
    

    These swap assignments are effective only after booting from second_disk. If you have a long list of swap slices, use the -M option. See To Create a Boot Environment and Reconfigure Swap By Using a List (Command-Line Interface).

    When creation of the new boot environment is complete, it can be upgraded and can be activated (made bootable). See Chapter 33, Upgrading With Solaris Live Upgrade (Tasks).


To Create a Boot Environment and Reconfigure Swap By Using a List (Command-Line Interface)

If you have a long list of swap slices, create a swap list. lucreate uses this list for the swap slices in the new boot environment.


Note –

The swap slice cannot be in use by any boot environment except the current boot environment or if the -s 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.


  1. 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 /etc/lu/swapslices file is a list of devices and slices:


    -:/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
  2. Type:


    # lucreate  [-A 'BE_description'] \
    -m mountpoint:device[,metadevice]:fs_options \
     -M slice_list  -n BE_name
    
    -A 'BE_description'

    (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.

    -m mountpoint:device[,metadevice]:fs_options [-m...]

    Specifies the file systems' configuration of the new boot environment. The file systems that are specified as arguments to -m 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.

    • mountpoint can be any valid mount point or (hyphen), indicating a swap partition.

    • device field can be one of the following:

      • The name of a disk device, of the form /dev/dsk/cwtxdysz

      • The name of a Solaris Volume Manager metadevice, of the form /dev/md/dsk/dnum

      • The name of a Veritas Volume Manager volume, of the form /dev/vx/dsk/volume_name

      • The keyword merged, indicating that the file system at the specified mount point is to be merged with its parent

    • fs_options field can be one of the following:

      • ufs, which indicates a UFS file system.

      • vxfs, which indicates a Veritas file system.

      • swap, which indicates a swap file system. The swap mount point must be a (hyphen).

      • For file systems that are logical devices (mirrors), several keywords specify actions to be taken on 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 To Create a Boot Environment With RAID-1 Volumes (Mirrors) (Command-Line Interface).

    -M slice_list

    List of -m options, which are collected in the file slice_list. Specify these arguments in the format that is specified for -m. Comment lines, which begin with a hash mark (#), are ignored. The -M option is useful when you have a long list of file systems for a boot environment. Note that you can combine -m and -M options. For example, you can store swap slices in slice_list and specify root (/) and /usr slices with -m.

    The -m and -M options support the listing of multiple slices for a particular mount point. In processing these slices, lucreate skips any unavailable slices and selects the first available slice.

    -n BE_name

    The name of the boot environment to be created. BE_name must be unique.


    Example 32–5 Create a Boot Environment and Reconfigure Swap Using a List (Command-Line Interface)

    In this example, swap in the new boot environment is the list of slices that are noted in the /etc/lu/swapslices file. A description, mydescription, is associated with the name second_disk.


    # lucreate -A 'mydescription' -c first_disk \
    -m /:/dev/dsk/c02t4d0s0:ufs -m /usr:/dev/dsk/c02t4d0s1:ufs \
    -M /etc/lu/swapslices -n second_disk 
    

    When creation of the new boot environment is complete, it can be upgraded and can be activated (made bootable). See Chapter 33, Upgrading With Solaris Live Upgrade (Tasks).


To Create a Boot Environment and Copy a Shareable File System (Command-Line Interface)

If you want a shareable file system to be copied to the new boot environment, specify the mount point to be copied with the -m option. Otherwise, shareable file systems are shared by default, and maintain the same mount point in the vfstab file. Any updating that is applied to the shareable file system is available to both boot environments.

  1. Log in as superuser.

  2. Create the boot environment.


    # lucreate [-A 'BE_description'] \
    -m mountpoint:device[,metadevice]:fs_options \
    [[-m ]]mountpoint:device[,metadevice]:fs_options  -n BE_name
    
    -A 'BE_description'

    (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.

    -m mountpoint:device[,metadevice]:fs_options [-m...]

    Specifies the file systems' configuration of the new boot environment. The file systems that are specified as arguments to -m 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.

    • mountpoint can be any valid mount point or (hyphen), indicating a swap partition.

    • device field can be one of the following:

      • The name of a disk device, of the form /dev/dsk/cwtxdysz

      • The name of a Solaris Volume Manager metadevice, of the form /dev/md/dsk/dnum

      • The name of a Veritas Volume Manager volume, of the form /dev/vx/dsk/volume_name

      • The keyword merged, indicating that the file system at the specified mount point is to be merged with its parent

    • fs_options field can be one of the following:

      • ufs, which indicates a UFS file system.

      • vxfs, which indicates a Veritas file system.

      • swap, which indicates a swap file system. The swap mount point must be a (hyphen).

      • For file systems that are logical devices (mirrors), several keywords specify actions to be taken on 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 To Create a Boot Environment With RAID-1 Volumes (Mirrors) (Command-Line Interface).

    -n BE_name

    The name of the boot environment to be created. BE_name must be unique.


    Example 32–6 Creating a Boot Environment and Copying a Shareable File System (Command-Line Interface)

    In this example, the current boot environment contains two file systems, root (/) and /home. In the new boot environment, root (/) is split into two file systems, root (/) and /usr. The /home file system is copied to the new boot environment. A description, mydescription, is associated with the boot environment name second_disk.


    # 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
    

    When creation of the new boot environment is complete, it can be upgraded and activated (made bootable). See Chapter 33, Upgrading With Solaris Live Upgrade (Tasks).


To Create a Boot Environment From a Different Source (Command-Line Interface)

The lucreate 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 lucreate with the -s option.


Note –

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.


  1. Log in as superuser.

  2. Create the boot environment.


    # lucreate [-A 'BE_description'] -s source_BE_name
    -m mountpoint:device[,metadevice]:fs_options -n BE_name
    
    -A 'BE_description'

    (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.

    -s source_BE_name

    Specifies the source boot environment for the new boot environment. The source would not be the active boot environment.

    -m mountpoint:device[,metadevice]:fs_options [-m...]

    Specifies the file systems' configuration of the new boot environment. The file systems that are specified as arguments to -m 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.

    • mountpoint can be any valid mount point or (hyphen), indicating a swap partition.

    • device field can be one of the following:

      • The name of a disk device, of the form /dev/dsk/cwtxdysz

      • The name of a Solaris Volume Manager metadevice, of the form /dev/md/dsk/dnum

      • The name of a Veritas Volume Manager volume, of the form /dev/vx/dsk/volume_name

      • The keyword merged, indicating that the file system at the specified mount point is to be merged with its parent

    • fs_options field can be one of the following:

      • ufs, which indicates a UFS file system.

      • vxfs, which indicates a Veritas file system.

      • swap, which indicates a swap file system. The swap mount point must be a (hyphen).

      • For file systems that are logical devices (mirrors), several keywords specify actions to be taken on 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 To Create a Boot Environment With RAID-1 Volumes (Mirrors) (Command-Line Interface).

    -n BE_name

    The name of the boot environment to be created. BE_name must be unique on the system.


    Example 32–7 Creating a Boot Environment From a Different Source (Command-Line Interface)

    In this example, a boot environment is created based on the root (/) file system in the source boot environment named third_disk. Third_disk is not the active boot environment. A description, mydescription, is associated with the new boot environment named second_disk.


    # lucreate -A 'mydescription' -s third_disk \
    -m /:/dev/dsk/c0t4d0s0:ufs  -n second_disk
    

    When creation of the new boot environment is complete, it can be upgraded and activated (made bootable). See Chapter 33, Upgrading With Solaris Live Upgrade (Tasks).


To Create an Empty Boot Environment for a Flash Archive (Command-Line Interface)

When using most of the options with the lucreate command, the command creates a boot environment that is based on the file systems in the active boot environment. When using the lucreate command with the -s - option, lucreate quickly creates an empty boot environment. This new boot environment could then be installed with a Solaris Flash archive. Only configuration information is saved for the new boot environment. The boot environment is not actually created until populated with an archive.

  1. Log in as superuser.

  2. Create the empty boot environment.


    # lucreate -A 'BE_name' -s - \
    -m mountpoint:device[,metadevice]:fs_options -n BE_name
    
    -A 'BE_description'

    (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.

    -s -

    Specifies that an empty boot environment be created.

    -m mountpoint:device[,metadevice]:fs_options [-m...]

    Specifies the file systems' configuration of the new boot environment. The file systems that are specified as arguments to -m 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.

    • mountpoint can be any valid mount point or (hyphen), indicating a swap partition.

    • device field can be one of the following:

      • The name of a disk device, of the form /dev/dsk/cwtxdysz

      • The name of a Solaris Volume Manager metadevice, of the form /dev/md/dsk/dnum

      • The name of a Veritas Volume Manager volume, of the form /dev/vx/dsk/volume_name

      • The keyword merged, indicating that the file system at the specified mount point is to be merged with its parent

    • fs_options field can be one of the following:

      • ufs, which indicates a UFS file system.

      • vxfs, which indicates a Veritas file system.

      • swap, which indicates a swap file system. The swap mount point must be a (hyphen).

      • For file systems that are logical devices (mirrors), several keywords specify actions to be taken on 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 To Create a Boot Environment With RAID-1 Volumes (Mirrors) (Command-Line Interface).

    -n BE_name

    The name of the boot environment to be created. BE_name must be unique on the system.


    Example 32–8 Creating a Boot Environment for a Flash Archive (Command-Line Interface)

    In this example, a boot environment is created but contains no file systems. A description, mydescription, is associated with the new boot environment that is named second_disk.


    # lucreate -A 'mydescription' -s - \
    -m /:/dev/dsk/c0t4d0s0:ufs  -n second_disk
    

    When creation of the empty boot environment is complete, a flash archive can be installed and can be activated (made bootable). See Chapter 33, Upgrading With Solaris Live Upgrade (Tasks).


To Create a Boot Environment With RAID-1 Volumes (Mirrors) (Command-Line Interface)

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.

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 on disk about the state of your Solaris Volume Manager configuration.

  1. Log in as superuser.

  2. To create the new boot environment, type:


    # lucreate [-A 'BE_description']  \
    -m mountpoint:device[,metadevice]:fs_options [-m...] \
    -n BE_name
    
    -A 'BE_description'

    (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.

    -m mountpoint:device[,metadevice]:fs_options [-m...]

    Specifies the file systems' configuration of the new boot environment in the vfstab. The file systems that are specified as arguments to -m 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.

    • mountpoint can be any valid mount point or (hyphen), indicating a swap partition.

    • device field can be one of the following:

      • The name of a disk device, of the form /dev/dsk/cwtxdysz

      • The name of a Solaris Volume Manager volume, of the form /dev/md/dsk/dnum

      • The name of a Veritas Volume Manager volume, of the form /dev/md/vxfs/dsk/dnum

      • The keyword merged, indicating that the file system at the specified mount point is to be merged with its parent

    • fs_options field can be one of the following types of file systems and keywords:

      • ufs, which indicates a UFS file system.

      • vxfs, which indicates a Veritas file system.

      • swap, which indicates a swap file system. The swap mount point must be a (hyphen).

      • For file systems that are logical devices (mirrors), several keywords specify actions to be taken on the file systems. These keywords can create a logical device, change the configuration of a logical device, or delete a logical device.

        • mirror creates a RAID–1 volume or mirror on the specified device. In subsequent -m options, you must specify attach to attach at least one concatenation to the new mirror. The specified device must be correctly named. For example, a logical device name of /dev/md/dsk/d10 or the short name of d10 can serve as a mirror name. For more information about naming devices, see “Overview of Solaris Volume Manager Components” in Solaris Volume Manager Administration Guide.

        • detach removes a concatenation from a volume that is associated with a specified mount point. The volume does not need to be specified.

        • attach 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, lucreate selects a free volume for the concatenation.

          lucreate 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.

        • preserve saves the existing file system and its contents. This keyword enables you to bypass the copying process that copies the contents of the source boot environment. Saving the contents enables a quick creation of the new boot environment. For a particular mount point, you can use preserve with only one physical device. When you use preserve, lucreate checks that the device's contents are suitable for a specified file system. This check is limited and cannot guarantee suitability.

          The preserve keyword can be used with both a physical slice and Solaris Volume Manager volume.

          • If you use the preserve keyword when the UFS file system is on a physical slice, the contents of the UFS file system is saved on the slice. In the following example of the -m option, the preserve keyword saves the contents of the physical device c0t0d0s0 as the file system for the mount point for the root (/) file system.


            -m /:c0t0d0s0:preserve,ufs 
            
          • If you use the preserve keyword when the UFS file system is on a volume, the contents of the UFS file system is saved on the volume.

            In the following example of the -m option, the preserve keyword saves the contents of the RAID-1 volume (mirror) d10 as the file system for the mount point for the root (/) file system.


            -m /:d10:preserve,ufs
            

            In the following example of the -m option, a RAID-1 volume (mirror) d10 is configured as the file system for the mount point for the root (/) file system. The single-slice concatenation d20 is detached from its current mirror. d20 is attached to mirror d10. The root (/) file system is preserved on submirror d20.


            -m /:d10:mirror,ufs -m /:d20:detach,attach,preserve 
            
    -n BE_name

    The name of the boot environment to be created. BE_name must be unique on the system.

    When the creation of the new boot environment is complete, it can be upgraded and can be activated (made bootable). See Chapter 33, Upgrading With Solaris Live Upgrade (Tasks).


    Example 32–9 Creating a Boot Environment With a Mirror and Specifying Devices (Command Line)

    In this example, the mount points for the file systems are specified by using the -m option.

    • A description, mydescription, is associated with the name another_disk.

    • lucreate configures a UFS file system for the mount point root (/). A mirror, d10, is created. This mirror is the receptacle for the current boot environment's root (/) file system that is copied to the mirror d10. All data on the mirror d10 is overwritten.

    • Two slices, c0t0d0s0 and c0t1d0s0, are submirrors, d1 and d2. These two submirrors are added to mirror d10.

    • The new boot environment is named another_disk.


    # lucreate -A 'mydescription' \
    -m /:/dev/md/dsk/d10:ufs,mirror \
    -m /:/dev/dsk/c0t0d0s0,d1:attach \
    -m /:/dev/dsk/c0t1c0s0,d2:attach -n another_disk
    

    When the creation of the new boot environment is complete, it can be upgraded and can be activated (made bootable). See Chapter 33, Upgrading With Solaris Live Upgrade (Tasks).


    Example 32–10 Creating a Boot Environment With a Mirror and Not Specifying a Submirror Name (Command Line)

    In this example, the mount points for the file systems are specified by using the -m option.

    • A description, mydescription, is associated with the name another_disk.

    • lucreate configures a UFS file system for the mount point root (/). A mirror, d10, is created. This mirror is the receptacle for the current boot environment's root (/) file system that is copied to the mirror d10. All data on the mirror d10 is overwritten.

    • Two slices, c0t0d0s0 and c0t1d0s0, are specified to be used as submirrors. The submirrors are not specified, but the lucreate command chooses names from a list of available volume names. These two submirrors are attached to mirror d10.

    • The new boot environment is named another_disk.


    # lucreate -A 'mydescription' \
    -m /:/dev/md/dsk/d10:ufs,mirror \
    -m /:/dev/dsk/c0t0d0s0:attach \
    -m /:/dev/dsk/c0t1d0s0:attach -n another_disk
    

    When the creation of the new boot environment is complete, it can be upgraded and can be activated (made bootable). See Chapter 33, Upgrading With Solaris Live Upgrade (Tasks).


    Example 32–11 Creating a Boot Environment and Detaching a Submirror (Command Line)

    In this example, the mount points for the file systems are specified by using the -m option.

    • A description, mydescription, is associated with the name another_disk.

    • lucreate configures a UFS file system for the mount point root (/). A mirror, d10, is created.

    • Slice c0t0d0s0 is removed from its current mirror. The slice is specified to be submirror d1 and is added to mirror d10. The contents of the submirror, the root (/) file system, are saved and no copy occurs. Slice c0t1d0s0 is submirror d2 and is added to mirror d10.

    • The new boot environment is named another_disk.


    # lucreate -A 'mydescription' \
    -m /:/dev/md/dsk/d10:ufs,mirror \
    -m /:/dev/dsk/c0t0d0s0,d1:detach,attach,preserve \
    -m /:/dev/dsk/c0t1d0s0,d2:attach -n another_disk
    

    This example can be abbreviated as in the following example. The physical and logical device names are shortened. The specifiers for the submirrors d1 and d2 are omitted.


    # lucreate -A 'mydescription' \
    -m /:d10:ufs,mirror \
    -m /:c0t0d0s0:detach,attach,preserve \
    -m /:c0t1d0s0:attach -n another_disk
    

    When the creation of the new boot environment is complete, it can be upgraded and can be activated (made bootable). See Chapter 33, Upgrading With Solaris Live Upgrade (Tasks).


    Example 32–12 Creating a Boot Environment, Detaching a Submirror, and Saving Its Contents (Command Line)

    In this example, the mount points for the file systems are specified by using the -m option.

    • A description, mydescription, is associated with the name another_disk.

    • lucreate configures a UFS file system for the mount point root (/). A mirror, d20, is created.

    • Slice c0t0d0s0 is removed from its current mirror and added to the mirror d20. The name of the submirror is not specified. The contents of the submirror, the root (/) file system, are saved and no copy occurs.

    • The new boot environment is named another_disk.


    # lucreate -A 'mydescription' \
    -m /:/dev/md/dsk/d20:ufs,mirror \
    -m /:/dev/dsk/c0t0d0s0:detach,attach,preserve \
    -n another_disk
    

    When the creation of the new boot environment is complete, the boot environment can be upgraded and can be activated (made bootable). See Chapter 33, Upgrading With Solaris Live Upgrade (Tasks).


    Example 32–13 Creating a Boot Environment With Two Mirrors (Command Line)

    In this example, the mount points for the file systems are specified by using the -m option.

    • A description, mydescription, is associated with the name another_disk.

    • lucreate configures a UFS file system for the mount point root (/). A mirror, d10, is created. This mirror is the receptacle for the current boot environment's root (/) file system that is copied to the mirror d10. All data on the mirror d10 is overwritten.

    • Two slices, c0t0d0s0 and c0t1d0s0, are submirrors, d1 and d2. These two submirrors are added to mirror d10.

    • lucreate configures UFS file system for the mount point /opt. A mirror, d11, is created. This mirror is the receptacle for the current boot environment's /opt file system that is copied to the mirror d11. All data on the mirror d11 is overwritten.

    • Two slices, c2t0d0s1 and c3t1d0s1, are submirrors, d3 and d4. These two submirrors are added to mirror d11.

    • The new boot environment is named another_disk.


    # lucreate -A 'mydescription' \
    -m /:/dev/md/dsk/d10:ufs,mirror \
    -m /:/dev/dsk/c0t0d0s0,d1:attach \
    -m /:/dev/dsk/c0t1d0s0,d2:attach \
    -m /opt:/dev/md/dsk/d11:ufs,mirror \
    -m /opt:/dev/dsk/c2t0d0s1,d3:attach \
    -m /opt:/dev/dsk/c3t1d0s1,d4:attach -n another_disk
    

    When the creation of the new boot environment is complete, it can be upgraded and can be activated (made bootable). See Chapter 33, Upgrading With Solaris Live Upgrade (Tasks).

To Create a Boot Environment and Customize the Content (Command-Line Interface)

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.

  1. Log in as superuser.

  2. To create the new boot environment, type:


    # lucreate -m mountpoint:device[,metadevice]:fs_options  [-m ...]  \
    [-x exclude_dir] [-y include] [-Y include_list_file] [-f exclude_list_file]\
     [-z filter_list] [-I] -n BE_name
    
    -m mountpoint:device[,metadevice]:fs_options [-m ...]

    Specifies the file systems' configuration of the new boot environment in the vfstab. The file systems that are specified as arguments to -m 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.

    • mountpoint can be any valid mount point or (hyphen), indicating a swap partition.

    • device field can be one of the following:

      • The name of a disk device, of the form /dev/dsk/cwtxdysz

      • The name of a Solaris Volume Manager volume, of the form /dev/md/dsk/dnum

      • The name of a Veritas Volume Manager volume, of the form /dev/md/vxfs/dsk/dnum

      • The keyword merged, indicating that the file system at the specified mount point is to be merged with its parent

    • fs_options field can be one of the following:

      • ufs, which indicates a UFS file system.

      • vxfs, which indicates a Veritas file system.

      • swap, which indicates a swap file system. The swap mount point must be a (hyphen).

      • For file systems that are logical devices (mirrors), several keywords specify actions to be taken on 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 To Create a Boot Environment With RAID-1 Volumes (Mirrors) (Command-Line Interface).

    -x exclude_dir

    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.

    exclude_dir is the name of the directory or file.

    -y include_dir

    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.

    include_dir is the name of the subdirectory or file to be included.

    -Y list_filename

    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.

    • list_filename is the full path to a file that contains a list.

    • The list_filename file must contain one file per line.

    • 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.

    -f list_filename

    Uses a list to exclude directories and files by not copying them to the new boot environment.

    • list_filename is the full path to a file that contains a list.

    • The list_filename file must contain one file per line.

    -z list_filename

    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 “+” or minus “-”. A plus indicates an included file or directory and the minus indicates an excluded file or directory.

    • list_filename is the full path to a file that contains a list.

    • The list_filename file must contain one file per line. A space must follow the plus or minus before the file name.

    • 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.

    -I

    Overrides the integrity check of system files. Use this option with caution.

    To prevent you from removing important system files from an boot environment, lucreate 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.

    -n BE_name

    The name of the boot environment to be created. BE_name must be unique on the system.


    Example 32–14 Creating a Boot Environment and Excluding Files (Command Line)

    In this example, the new boot environment is named second_disk. The source boot environment contains one file system, root (/). In the new boot environment, the /var file system is split from root (/) and put on another slice. The lucreate command configures a UFS file system for the mount points root (/) and /var. Also, two /var mail files, root and staff are not copied to the new boot environment. Swap is automatically shared between the source and the new boot environment.


    # lucreate -n second_disk \
    -m /:/dev/dsk/c0t1d0s0:ufs -m /var/mail:c0t2d0s0:ufs  \
     -x /var/mail/root -x /var/mail/staff
    


    Example 32–15 Creating a Boot Environment and Excluding and Including Files (Command Line)

    In this example, the new boot environment is named second_disk. The source boot environment contains one file system for the operating environment, root (/). The source also contains a file system that is named /mystuff. lucreate configures a UFS file system for the mount points root (/) and /mystuff. Only two directories in /mystuff are copied to the new boot environment, /latest and /backup. Swap is automatically shared between the source and the new boot environment.


    # lucreate -n second_disk \
    -m /:/dev/dsk/c01t0d0s0:ufs -m /mystuff:c1t1d0s0:ufs  \
     -x /mystuff -y /mystuff/latest -y /mystuff/backup
    

    When creation of the new boot environment is complete, it can be upgraded and can be activated (made bootable). See Chapter 33, Upgrading With Solaris Live Upgrade (Tasks).