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 that is 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.
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.
To create the new boot environment, type:
# lucreate [-A 'BE_description'] -c BE_name \ -m mountpoint:device[,metadevice]:fs_options [-m ...] -n BE_name
(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.
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 OS 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.
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 /dev/dsk/c1t1d1s1 -n newbe -m /:/dev/dsk/c1t1d1s1:ufs ERROR: current boot environment name is c0t0d0s0: cannot change name using <-c c1t1d1s1>
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 volume. The swap mount point must be a – (hyphen).
For file systems that are logical devices (mirrors), several keywords specify actions to be applied to the file systems. These keywords can create a logical device, change the configuration of a logical device, or delete a logical device. For a description of these keywords, see To Create a Boot Environment With RAID-1 Volumes (Mirrors).
The name of the boot environment to be created. BE_name must be unique on the system.
When creation of the new boot environment is complete, it can be upgraded and can be activated (made bootable). See Chapter 5, Upgrading With Solaris Live Upgrade (Tasks).
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