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 one 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:
You must specify one -m option for the root (/) file system for the new boot environment. If you run lucreate without the -m option, the Configuration menu is displayed. The Configuration menu enables you to customize the new boot environment by redirecting files onto new mount points.
Any critical file systems that exist in the current boot environment and are not specified in a -m option are merged into the next highest-level file system created.
Only the file systems that are specified by the -m option are created on the new boot environment. If your current boot environment contains multiple file systems, and you want to have the same number of file systems in the new boot environment created, you must specify one -m option for each file system to be created. For example, if you have file systems for root (/), /opt, and /var, you would use one -m option for each file system on the new boot environment.
Do not duplicate a mount point. For example, you cannot have two root (/) file systems.
Log in as superuser.
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 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.
Log in as superuser.
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.
Log in as superuser.
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 all 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).