{anchor:build_live_cd}
h1. A simple use case: building the 2008.11 image
# Make a copy of the default manifest file (/usr/share/distro_const/slim_cd/slim_cd.xml) to somewhere on your system. In this example, I just put it in /
{code}cp /usr/share/distro_const/slim_cd/slim_cd_x86.xml /slim_cd.xml
{code}
# Make the file writable:
{code}chmod +w slim_cd.xml{code}
# Modify /slim_cd.xml to specify values that are specific to your environment. The values you need to modify/verify are the following.
| *XML tag name* | *Explanation* |
| main url | It defaults to [http://pkg.opensolaris.org]. This will generally work, but it is very slow since a lot of people uses this repo. If you have your own repo, or you have access to another repo(ie: a Sun internal repo, if you work at Sun),You should use that instead. |
| build_area | This is the working area for the build. You have to make sure this is valid for your system. If you want to use checkpointing, this should either point to a ZFS dataset or a mount point that correlates to a ZFS data set. The ZFS dataset doesn't have to exist, it will be created it if it doesn't exist. We do require that the zpool you specified in this exists. If you don't want to use checkpointing, you can provide a regular mountpoint on a ZFS or UFS file system. At least 8G of free space should be available in the zpool for each image. |
Everything else in the file can be left alone for the simple case.
# When you are done with modifying the manifest file, you are ready to run the distro constructor. You have to run it as root.
{code}/usr/bin/distro_const build /slim_cd.xml
{code}
{anchor:use_checkpoint}
h1. Using Checkpointing
The Distro Constructor has a resume and pause feature that will help users debug their selection of files, packages and scripts for creating images. To use the checkpointing feature, you must specify a ZFS dataset as your build area. Each checkpoint is referenced by a name.
* To build an image, from start to finish:
{code}/usr/bin/distro_const build <manifest>
{code}
* To see which checkpoints are available:
{code}/usr/bin/distro_const build -l <manifest>
{code}
* Based on the checkpoints available, re-start from the bootroot initialization step (br-init), and run to completion:
{code}/usr/bin/distro_const build -r br-init <manifest>
{code}
* Based on the checkpoints available, re-start from bootroot initialization step(br-init), and stop at bootroot archiving(br-arch):
{code}/usr/bin/distro_const build -p br-arch -r br-init <manifest>
{code}
* Based on the checkpoints available, start from beginning, and stop at bootroot archive(br-arch):
{code}/usr/bin/distro_const build -p br-arch <manifest>
{code}
h1. A simple use case: building the 2008.11 image
# Make a copy of the default manifest file (/usr/share/distro_const/slim_cd/slim_cd.xml) to somewhere on your system. In this example, I just put it in /
{code}cp /usr/share/distro_const/slim_cd/slim_cd_x86.xml /slim_cd.xml
{code}
# Make the file writable:
{code}chmod +w slim_cd.xml{code}
# Modify /slim_cd.xml to specify values that are specific to your environment. The values you need to modify/verify are the following.
| *XML tag name* | *Explanation* |
| main url | It defaults to [http://pkg.opensolaris.org]. This will generally work, but it is very slow since a lot of people uses this repo. If you have your own repo, or you have access to another repo(ie: a Sun internal repo, if you work at Sun),You should use that instead. |
| build_area | This is the working area for the build. You have to make sure this is valid for your system. If you want to use checkpointing, this should either point to a ZFS dataset or a mount point that correlates to a ZFS data set. The ZFS dataset doesn't have to exist, it will be created it if it doesn't exist. We do require that the zpool you specified in this exists. If you don't want to use checkpointing, you can provide a regular mountpoint on a ZFS or UFS file system. At least 8G of free space should be available in the zpool for each image. |
Everything else in the file can be left alone for the simple case.
# When you are done with modifying the manifest file, you are ready to run the distro constructor. You have to run it as root.
{code}/usr/bin/distro_const build /slim_cd.xml
{code}
{anchor:use_checkpoint}
h1. Using Checkpointing
The Distro Constructor has a resume and pause feature that will help users debug their selection of files, packages and scripts for creating images. To use the checkpointing feature, you must specify a ZFS dataset as your build area. Each checkpoint is referenced by a name.
* To build an image, from start to finish:
{code}/usr/bin/distro_const build <manifest>
{code}
* To see which checkpoints are available:
{code}/usr/bin/distro_const build -l <manifest>
{code}
* Based on the checkpoints available, re-start from the bootroot initialization step (br-init), and run to completion:
{code}/usr/bin/distro_const build -r br-init <manifest>
{code}
* Based on the checkpoints available, re-start from bootroot initialization step(br-init), and stop at bootroot archiving(br-arch):
{code}/usr/bin/distro_const build -p br-arch -r br-init <manifest>
{code}
* Based on the checkpoints available, start from beginning, and stop at bootroot archive(br-arch):
{code}/usr/bin/distro_const build -p br-arch <manifest>
{code}