Solaris 9 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). The content and sequence of instructions for the CUI and CLI are generally the same. 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. See Chapter 36, Solaris Live Upgrade (Command Reference) for a list of commands and also see the appropriate, associated man pages, which more fully document features.

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 Solaris 2.6, Solaris 7, or Solaris 8 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 9 DVD or Solaris 9 Software 2 of 2 CD.

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

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


      # cd /cdrom/cdrom0/Solaris_9/Tool/Installers
      # ./liveupgrade20
      

      The Solaris Web Start installer is displayed.

    • If you are using the Solaris 9 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

You can use Solaris Live Upgrade with menus or the command-line interface (CLI). Procedures are documented for both interfaces. These procedures do not exhaust the possibilities for using Solaris Live Upgrade. For more information about commands, see Chapter 36, Solaris Live Upgrade (Command Reference) and the appropriate man pages, which more fully document the CLI.

Creating a boot environment provides a method of copying critical file systems from the active boot environment to a new boot environment. The Create menu, Configuration submenu, and 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 Creating a Boot Environment Overview.

This section contains the following procedures:

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:    solaris8
    Name of New Boot Environment:   solaris9 
    
  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/cnumdnumtnumsnum.

      • 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 Creating a Boot Environment Overview.

    • 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:fs_type [-m mountpoint:device:fs_type] -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 required only when the first boot environment is created. If you run lucreate for the first time and you omit -c, you are prompted to name the active boot environment. If you use the -c option after the first boot environment creation, you receive an error message.

    -m mountpoint:device:fs_type [-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/cnumdnumtnumsnum

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

    -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, Solaris 9 test Jan. 2001, 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 'Solaris 9 test Jan 2001' -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:fs_type \
    [[-m mountpoint:device:fs_type]] -m mountpoint:merged:fs_type -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:fs_type [-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/cnumdnumtnumsnum

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

    -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, Solaris 9 test Jan. 2001, is associated with the name second_disk.


    # lucreate -A 'Solaris 9 test Jan 2001' -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:fs_type \
    [[-m mountpoint:device:fs_type]] -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:fs_type [-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/cnumdnumtnumsnum

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

    -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, Solaris 9 test Jan. 2001, is associated with the boot environment name second_disk.


    # lucreate -A 'Solaris 9 test Jan 2001' -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:fs_type \
    -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:fs_type [-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/cnumdnumtnumsnum

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

    -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, Solaris 9 test Jan. 2001, is associated with the boot environment name second_disk.


    # lucreate -A 'Solaris 9 test Jan 2001' -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 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 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:fs_type \
     -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:fs_type [-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/cnumdnumtnumsnum

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

    -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, Solaris 9 test Jan. 2001, is associated with the name second_disk.


    # lucreate -A 'Solaris 9 test Jan 2001' -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:fs_type \
    [[-m ]]mountpoint:device:fs_type  -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:fs_type [-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/cnumdnumtnumsnum

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

    -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, Solaris 9 test Jan. 2001, is associated with the boot environment name second_disk.


    # lucreate -A 'Solaris 9 test Jan 2001' -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:fs_type -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:fs_type [-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/cnumdnumtnumsnum

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

    -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, Solaris 9 test Jan. 2001, is associated with the new boot environment named second_disk.


    # lucreate -A 'Solaris 9 test Jan 2001' -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 a Boot Environment for a Flash Archive (Command-Line Interface)

The lucreate command creates a boot environment that is based on the file systems in the active boot environment. The lucreate command with the -s - option creates an empty boot environment very quickly that could be used to install a Flash archive.

  1. Log in as superuser.

  2. Create the empty boot environment.


    # lucreate -A 'BE_name' -s - \
    -m mountpoint:device:fs_type -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:fs_type [-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/cnumdnumtnumsnum

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

    -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, Solaris 9 test Jan. 2001, is associated with the new boot environment that is named second_disk.


    # lucreate -A 'Solaris 9 test Jan 2001' -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).