This chapter explains various maintenance tasks such as keeping a boot environment file system up to date or deleting a boot environment. This chapter contains the following sections:
Use the Status menu or the lustatus command to display the information about the boot environment. If no boot environment is specified, the status information for all boot environments on the system is displayed.
The following details for each boot environment are displayed:
Name – Name of each boot environment.
Complete – Indicates that no copy or create operations are in progress. Also, the boot environment can be booted. Any current activity or failure in a create or upgrade operation causes a boot environment to be incomplete. For example, if a copy operation is in process or scheduled for a boot environment, that boot environment is considered incomplete.
Active – Indicates if this is the active boot environment.
ActiveOnReboot – Indicates if the boot environment becomes active on next reboot of the system.
CopyStatus – Indicates if the creation or copy of the boot environment is scheduled, active, or in the process of being upgraded. A status of SCHEDULED prevents you from performing live upgrade copy, rename, or upgrade operations.
From the main menu, select Status.
A table that is similar to the following is displayed:
boot environment Is Active Active Can Copy Name Complete Now OnReboot Delete Status ------------------------------------------------------------------------ disk_a_S9 yes yes yes no - disk_b_S10database yes no no yes COPYING disk_b_S9a no no no yes - |
In this example, you could not perform copy, rename, or upgrade operations on disk_b_S9a because it is not complete, nor on disk_b_S10database, because a live upgrade operation is in progress.
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.
Type:
# lustatus BE_name |
Specifies the name of the inactive boot environment to view status. If BE_name is omitted, lustatus displays status for all boot environments in the system.
In this example, the status for all boot environments is displayed.
# lustatus boot environment Is Active Active Can Copy Name Complete Now OnReboot Delete Status ------------------------------------------------------------------------ disk_a_S9 yes yes yes no - disk_b_S10database yes no no yes COPYING disk_b_S9a no no no yes - |
You could not perform copy, rename, or upgrade operations on disk_b_S9a because it is not complete, nor on disk_b_S10database because a live upgrade operation is in progress.
You can update the contents of a previously configured boot environment with the Copy menu or the lumake command. File Systems from the active (source) boot environment are copied to the target boot environment. The data on the target is also destroyed. A boot environment must have the status “complete” before you can copy from it. See Displaying the Status of All Boot Environments to determine a boot environment's status.
The copy job can be scheduled for a later time, and only one job can be scheduled at a time. To cancel a scheduled copy, see Canceling a Scheduled Create, Upgrade, or Copy Job.
From the main menu, select Copy.
Type the name of the inactive boot environment to update:
Name of Target Boot Environment: solaris8 |
Continue or schedule the copy to occur later:
To continue with the copy, press Return.
The inactive boot environment is updated.
To schedule the copy for later, type y, a time (by using the at command format), and the email address to which to send the results:
Do you want to schedule the copy? y Enter the time in 'at' format to schedule copy: 8:15 PM Enter the address to which the copy log should be mailed: someone@anywhere.com |
For information about time formats, see the at(1) man page.
The inactive boot environment is updated.
To cancel a scheduled copy, see Canceling a Scheduled Create, Upgrade, or Copy Job.
This procedure copies source files over outdated files on a boot environment that was previously created.
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.
Type:
# lumake -n BE_name [-s source_BE] [-t time] [-m email_address] |
Specifies the name of the boot environment that has file systems that are to be replaced.
(Optional) Specifies the name of the source boot environment that contains the file systems to be copied to the target boot environment. If you omit this option, lumake uses the current boot environment as the source.
(Optional) Set up a batch job to copy over file systems on a specified boot environment at a specified time. The time is given in the format that is specified by the man page, at(1).
(Optional) Enables you to send an email of the lumake output to a specified address on command completion. email_address is not checked. You can use this option only in conjunction with -t.
In this example, file systems from first_disk are copied to second_disk. When the job is completed, an email is sent to Joe at anywhere.com.
# lumake -n second_disk -s first_disk -m joe@anywhere.com |
The files on first_disk are copied to second_disk and email is sent for notification. To cancel a scheduled copy, see Canceling a Scheduled Create, Upgrade, or Copy Job.
A boot environment's scheduled creation, upgrade, or copy job can be canceled just prior to the time the job starts. A job can be scheduled for a specific time either in the GUI with the Create a Boot Environment, Upgrade a Boot Environment, or Copy a Boot Environment menus. In the CLI, the job can be scheduled by the lumake command. At any time, only one job can be scheduled on a system.
From the main menu, select Cancel.
To view a list of boot environments that is available for canceling, press F2.
Select the boot environment to cancel.
The job no longer executes at the time specified.
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.
Type:
# lucancel |
The job no longer executes at the time that is specified.
Use the Compare menu or lucompare to check for differences between the active boot environment and other boot environments. To make a comparison, the inactive boot environment must be in a complete state and cannot have a copy job that is pending. See Displaying the Status of All Boot Environments.
The specified boot environment cannot have any partitions that are mounted with lumount or mount.
From the main menu, select Compare.
Select either Compare to Original or Compare to an Active Boot Environment.
Press F3.
Type the names of the original (active) boot environment, the inactive boot environment, and the path to a file:
Name of Parent: solaris8 Name of Child: solaris8-1 Full Pathname of the file to Store Output: /tmp/compare |
To save to the file, press F3.
The Compare menu displays the following file attributes:
Mode.
Number of links.
Owner.
Group.
Checksum – Computes checksums only if the file in the specified boot environment matches its counterpart on the active boot environment in all of the fields that are described previously. If everything matches but the checksums differ, the differing checksums are appended to the entries for the compared files.
Size.
Existence of files in only one boot environment.
To return to the Compare menu, press F3.
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.
Type:
# /usr/sbin/lucompare -i infile (or) -t -o outfile BE_name |
Compare files that are listed in infile. The files to be compared should have absolute file names. If the entry in the file is a directory, then comparison is recursive to the directory. Use either this option or -t, not both.
Compare only nonbinary files. This comparison uses the file(1) command on each file to determine if the file is a text file. Use either this option or -i, not both.
Redirect the output of differences to outfile.
Specifies the name of the boot environment that is compared to the active boot environment.
In this example, first_disk boot environment (source) is compared to second_disk boot environment and the results are sent to a file.
# /usr/sbin/lucompare -i /etc/lu/compare/ \ -o /var/tmp/compare.out second_disk |
Use either the Delete menu or the ludelete command to remove a boot environment. Note the following limitations.
You cannot delete the active boot environment or the boot environment that is activated on the next reboot.
The boot environment to be deleted must be complete. A complete boot environment is not participating in an operation that will change its status. Use Displaying the Status of All Boot Environments to determine a boot environment's status.
You cannot delete a boot environment that has file systems mounted with lumount.
x86 only: Starting with the Solaris 10 1/06 release, you cannot delete a boot environment that contains the active GRUB menu. Use the lumake or luupgrade commands to reuse the boot environment. To determine which boot environment contains the active GRUB menu, see x86: Locating the GRUB Menu's menu.lst File (Tasks).
From the main menu, select Delete.
Type the name of the inactive boot environment you want to delete:
Name of boot environment: solaris8 |
The inactive boot environment is deleted.
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.
Type:
# ludelete BE_name |
Specifies the name of the inactive boot environment that is to be deleted
In this example, the boot environment, second_disk, is deleted.
# ludelete second_disk |
Use the Current menu or the lucurr command to display the name of the currently running boot environment. If no boot environments are configured on the system, the message “No Boot Environments are defined” is displayed. Note that lucurr reports only the name of the current boot environment, not the boot environment that is active on the next reboot. See Displaying the Status of All Boot Environments to determine a boot environment's status.
From the main menu, select Current.
The active boot environment's name or the message “No Boot Environments are defined” is displayed.
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.
Type:
# /usr/sbin/lucurr |
In this example, the name of the current boot environment is displayed.
# /usr/sbin/lucurr solaris8 |
Renaming a boot environment is often useful when you upgrade the boot environment from one Solaris release to another release. For example, following an operating system upgrade, you might rename the boot environment solaris8 to solaris10.
Use the Rename menu or lurename command to change the inactive boot environment's name.
Starting with the Solaris 10 1/06 release, the GRUB menu is automatically updated when you use the Rename menu or lurename command. The updated GRUB menu displays the boot environment's name in the list of boot entries. For more information about the GRUB menu, see x86: Activating a Boot Environment With the GRUB Menu.
To determine the location of the GRUB menu's menu.lst file, see x86: Locating the GRUB Menu's menu.lst File (Tasks).
Limitation |
For Instructions |
---|---|
The name must not exceed 30 characters in length. | |
The name can consist only of alphanumeric characters and other ASCII characters that are not special to the UNIX shell. |
See the “Quoting” section of sh(1). |
The name can contain only single-byte, 8-bit characters. | |
The name must be unique on the system. | |
A boot environment must have the status “complete” before you rename it. |
See Displaying the Status of All Boot Environments to determine a boot environment's status. |
You cannot rename a boot environment that has file systems mounted with lumount or mount. |
From the main menu, select Rename.
Type the boot environment to rename and then the new name.
To save your changes, press F3.
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.
Type:
# lurename -e BE_name -n new_name |
Specifies the inactive boot environment name to be changed
Specifies the new name of the inactive boot environment
In this example, second_disk is renamed to third_disk.
# lurename -e second_disk -n third_disk |
You can associate a description with a boot environment name. The description never replaces the name. Although a boot environment name is restricted in length and characters, the description can be of any length and of any content. The description can be simple text or as complex as a gif file. You can create this description at these times:
When you create a boot environment with the lucreate command and use the -A option
After the boot environment has been created by using the ludesc command
For more information about using the -A option with lucreate |
To Create a Boot Environment for the First Time (Command-Line Interface) |
For more information about creating the description after the boot environment has been created |
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.
Type:
# /usr/sbin/ludesc -n BE_name 'BE_description' |
Specifies the boot environment name and the new description to be associated with the name
In this example, a boot environment description is added to a boot environment that is named second_disk. The description is text that is enclosed in single quotes.
# /usr/sbin/ludesc -n second_disk 'Solaris 10 11/06 test build' |
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.
Type:
# /usr/sbin/ludesc -n BE_name -f file_name |
Specifies the boot environment name
Specifies the file to be associated with a boot environment name
In this example, a boot environment description is added to a boot environment that is named second_disk. The description is contained in a gif file.
# /usr/sbin/ludesc -n second_disk -f rose.gif |
The following command returns the name of the boot environment associated with the specified description.
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.
Type:
# /usr/sbin/ludesc -A 'BE_description' |
Specifies the description to be associated with the boot environment name.
In this example, the name of the boot environment, second_disk, is determined by using the -A option with the description.
# /usr/sbin/ludesc -A 'Solaris 10 11/06 test build' second_disk |
The following command displays the boot environment's name that is associated with a file. The file contains the description of the boot environment.
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.
Type:
# /usr/sbin/ludesc -f file_name |
Specifies the name of the file that contains the description of the boot environment.
In this example, the name of the boot environment, second_disk, is determined by using the -f option and the name of the file that contains the description.
# /usr/sbin/ludesc -f rose.gif second_disk |
This procedure displays the description of the boot environment that is named in the command.
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.
Type:
# /usr/sbin/ludesc -n BE_name |
Specifies the boot environment name.
In this example, the description is determined by using the -n option with the boot environment name.
# /usr/sbin/ludesc -n second_disk Solaris 10 11/06 test build |
Use the List menu or the lufslist command to list the configuration of a boot environment. The output contains the disk slice (file system), file system type, and file system size for each boot environment mount point.
From the main menu, select List.
To view the status of a boot environment, type the name.
Name of Boot Environment: solaris8 |
Press F3.
The following example displays a list.
Filesystem fstype size(Mb) Mounted on ------------------------------------------------------------------ /dev/dsk/c0t0d0s1 swap 512.11 - /dev/dsk/c0t4d0s3 ufs 3738.29 / /dev/dsk/c0t4d0s4 ufs 510.24 /opt |
To return to the List menu, press F6.
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.
Type:
# lufslist -n BE_name |
Specifies the name of the boot environment to view file system specifics
The following example displays a list.
Filesystem fstype size(Mb) Mounted on ------------------------------------------------------------------ /dev/dsk/c0t0d0s1 swap 512.11 - /dev/dsk/c0t4d0s3 ufs 3738.29 / /dev/dsk/c0t4d0s4 ufs 510.24 /opt |