Solaris 9 Installation Guide

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