Creates a multi-volume CD (or CDs) from a mksysb or savevg backup image.
mkcd -r directory | -d cd_device | -S [ -m mksysb_image | -M mksysb_target | -s savevg_image | -v savevg_volume_group ] [ -C cd_fs_dir ] [ -I cd_image_dir ] [ -V cdfs_volume_group ] [ -B ] [ -p pkg_source_dir ] [ -R | -S ] [ -i image.data ] [ -u bosinst.data ] [ -e ] [ -P ] [ -l package_list ] [ -L ][ -b bundle_file ] [ -z custom_file ] [ -D ] [ -U ] [ -Y ]
The mckd command creates a system backup image (mksysb) to CD-Recordable (CD-R) or DVD-Recordable (DVD-R, DVD-RAM) from the system rootvg or from a previously created mksysb image. It also creates a volume group backup image (savevg) to CD-R from a user-specified volume group or from a previously created savevg image.
With the mkcd command, you can create bootable and non-bootable CDs in Rock Ridge (ISO9660) or UDF format.
See the -L flag for details about creating DVD-sized images. What applies to CDs also applies to DVDs, except where noted.
Note: The functionality required to create Rock Ridge format CD images and to write the CD image to the CD-R, DVD-R or DVD-RAM device is not part of the mkcd command. You must supply additional code to mkcd to do these tasks. The code will be called via shell scripts and then linked to /usr/sbin/mkrr_fs (for creating the Rock Ridge format image) and /usr/sbin/burn_cd (for writing to the CD-R device). Both links are called from the mkcd command.Some sample shell scripts are included for different vendor-specific routines. You can find these scripts in /usr/samples/oem_cdwriters.
If you do not give any file systems or directories as command parameters, mkcd creates the necessary file systems and removes them when the command finishes executing. File systems you supply are checked for adequate space and write access.
Note: If mkcd creates file systems in the backup volume group, they are excluded from the backup.
If you need to create multi-volume CDs because the volume group image does not fit on one CD, mkcd gives instructions for CD replacement and removal until all the volumes have been created.
-d cd_device | Indicates the CD-R, DVD-R or DVD-RAM device (/dev/cd1, for instance). This flag is required unless you use the -S flag. |
-r directory | Indicates existing directory structure to burn onto a CD or DVD. This makes a CD image that is a copy of the given directory structure. |
-m mksysb_image | Specifies a previously created mksysb image. If you do not give the -m flag mkcd calls mksysb. (See the -M flag for more information about where the mksysb image is placed.) |
-s savevg_image | Indicates a previously created savevg image.See the Notes below. |
-v savevg_volume_group | Denotes the volume group to be backed up using the savevg command. See the Notes below. (See the -M flag for more information about where the savevg image is placed.) |
-C cd_fs_dir | Specifies the file system used to create the CD file system structure,
which must have at least 645MB of available disk space (up to 4.38 GB for
DVD sized images). The CD image will only consume as much room as necessary
to contain all the data on the CD.
If you do not specify the -C flag and the /mkcd/cd_fs directory exists, mkcd uses that directory. If you do not give the -C flag and the /mkcd/cd_fs directory does not exist, mkcd creates the file system /mkcd/cd_fs and removes it when the command finishes executing. The command creates the file system in the volume group indicated with the -V flag, or rootvg if that flag is not used. Each time you invoke the mkcd command, a unique subdirectory (using the process id) is created under the /mkcd/cd_fs directory, or in the directory specified with the -C flag. Note: If performing DVD sized backups, the filesystems need to be large file enabled. This also requires setting the file ulimit size to unlimited. |
-M mksysb_target | States the directory or file system where the mksysb or savevg image is stored if a previously created
backup is not given with the -m or -s flags. If the -M flag is not used and a mksysb or savevg image is not provided, mkcd verifies that /mkcd/mksysb_image exists. If the directory does not exist, then mkcd creates a separate file system, /mkcd/mksysb_image, where the mksysb or savevg images are temporarily stored. The command creates
the file system in the volume group given with the -V flag,
or in rootvg if that flag is not used.
Note: If performing DVD sized backups, the filesystems need to be large file enabled. This also requires setting the file ulimit size to unlimited. |
-I cd_image_dir | Specifies the directory or file system where the final CD images are
stored before writing to the CD-R, DVD-R or DVD-RAM device. If this flag
is not used, mkcd uses the /mkcd/cd_images directory if it already exists. If not, the
command creates the /mkcd/cd_images file system in the volume group given with the -V flag, or in rootvg if that flag is not used.
If mkcd creates the file system, it is removed upon command completion, unless either the -R or -S flag is used. If the -R or -S flag is used, consideration must be made for adequate file system, directory, or disk space, especially when creating multi-volume CDs. The CD image will only consume as much room as necessary to contain all the data on the CD.Note: If performing DVD sized backups, the filesystems need to be large file enabled. This also requires setting the file ulimit size to unlimited. |
-V cdfs_volume_group | Indicates the volume group used when creating the file systems needed for the mkcd command. If the -V flag is not given and a file system is needed but not there (because it was not supplied with other flags), then rootvg is the default volume group for creating the file systems. If mkcd creates the file systems in the backup volume group, those file systems are not included as part of the backup image. mkcd-created file systems are removed upon the command's completion. |
-p pkg_source_dir | Names the directory or device that contains device and kernel package images. The device can only be a CD device (for example, /dev/cd0). If you use the same CD-R, DVD-R or DVD-RAM device that you gave with the -d flag, the product CD media must be inserted into the CD-R drive first. mkcd then prompts you to insert the writeable CD before the actual CD creation. |
-B | Prevents mkcd from adding boot images (non-bootable CD) to the CD. Use this flag if creating a mksysb CD that you will not boot. Before installing the non-bootable mksysb CD you must boot a same level (V.R.M.) product CD. The mkcd command defaults to creating a bootable CD for the machine type of the source system. See the Notes below. |
-R | Prevents mkcd from removing the final CD images. mkcd defaults by removing everything that it creates when it finishes executing. The -R flag allows multiple CD image sets to be stored, or for CD creation (burn) to occur on another system. If multiple volumes are needed, the final images are uniquely named using the process ID and volume suffixes. |
-S | Stops mkcd before writing to the CD-R, DVD-R or DVD-RAM without removing the final CD images. The -S flag allows multiple CD sets to be created, or for CDs to be created on another system. The images remain in the directory marked by the -I flag, or in the /mkcd/cd_images directory if the -I flag is not used. If multiple volumes are required, the final images are uniquely named using the process ID and volume suffixes. |
-u bosinst.data | Specifies the user-supplied bosinst.data file. This data file takes precedence over the bosinst.data file in the mksysb image. If you do not give the -u flag, then mkcd restores bosinst.data from the given mksysb image, or generates a new bosinst.data file during the creation of mksysb. |
-i image.data | Specifies the user-supplied image.data file.
This data file takes precedence over the image.data file
in the mksysb image. If you do not give the -i flag, then mkcd restores the image.data from the given mksysb image, or generates
a new image.data file during the creation of mksysb.
Note: The -i flag cannot be used to specify a user-supplied vgname.data file for use with a savevg image. |
-e | Excludes the files and/or directories from the backup image listed in the /etc/exclude.volume_group file. You cannot use this flag with the -m or -s flags. |
-P | Creates physical partition mapping during the mksysb or savevg creation. You cannot use this flag with the -m or -s flags. |
-l package_list | Specifies the file containing a list of additional packages you want copied to the ./usr/lpp/inst.images directory of the CD file system. The images are copied from the location named with the -p flag. If you use the -l flag you must also use the -p flag. |
-L | Creates final CD images that are DVD sized (up to 4.38 GB). |
-b bundle_file | Gives the full pathname of the file containing a list of filesets to be installed after the mksysb is restored. This file is copied to ./usr/sys/inst.data/user_bundles/bundle_file in the CD file system and also copied to RAM in case the CD is unmounted. The file would be listed as BUNDLES=/../usr/sys/inst.data/user_bundles/bundle_file in the bosinst.data file. |
-z custom_file | States the full pathname of the file to be copied to the root directory
of the CD file system. This file could be a customization script specified
in the bosinst.data file, such as CUSTOMIZATION_FILE=filename.
For example: If the file my_script is in /tmp on the machine where mkcd is running, then enter -z/tmp/my_script and specify CUSTOMIZATION_FILE=my_script. The code copies the script to the root directory of the RAM file system before it executes. |
-D | Turns on the debug output information feature. The default is no debug output. |
-U | Creates a UDF (Universal Data Format) file system on DVD-RAM media. It does not require the amount of free space needed to create Rock Ridge format backups. It does not need the /mkcd/cd_fs and /mkcd/cd_images file systems. Therefore, the only temporary disk space it needs is to create the backup image that will be copied to the media. This means that the -I and -C flags do not apply to the -U flag. Because the backup is copied to the media, images cannot be created and burned later or on another system. So, the -R flag and -S flag do not apply when using the -U flag. You need to specify a device to write to with the -d flag. The -U flag does not use the /usr/sbin/mkrr_fs or /usr/sbin/burn_cd file systems. |
-Y | Accepts licenses. |
Notes:
- If you are creating a non-bootable CD (using the -B flag), you cannot use the -p or -l flags.
- If you are creating a non-bootable CD with a savevg image (using the -s or -v flags), you cannot use the -p, -l, -u, -i, -z, or -b flags.
mkcd -d /dev/cd1
mkcd -d /dev/cd1 -L
mkcd -d /dev/cd1 -v myvg
Note: All savevg backup images are non-bootable.
mkcd -B -I /mydata/my_cd -V myvg -S
/mycd/a /mycd/b/d /mycd/c/f/g
use the following command:
mkcd -r /mycd -d /dev/cd1
After mounting with mount -o ro /dev/cd1 /mnt, cd to /mnt; a find . -print command displays:
./a ./b ./b/d ./c ./c/f ./c/f/g
/usr/bin/mkcd | Contains the mkcd command. |
The mksysb command and savevg command.
The /image.data file and the /bosinst.data file.
A procedure to verify the backup can be found in the article "Verifying a System Backup" in the AIX 5L Version 5.2 Installation Guide and Reference.
For more information about CD-R drives (including DVD-R and DVD-RAM drives) and CD-R creation software, refer to the following README file: /usr/lpp/bos.sysmgt/README.oem_cdwriters