Example Scenarios for Automated Installer
The following scenarios demonstrate how to use the installadm utility to set
up services and to customize clients.
Setting Up a Server and 20 Clients
This scenario describes how the installadm create-service command can be used to set
up one server that can install 20 clients, for example, in a classroom
setting. The following describes the general steps to this process. Then, specific examples
are provided to illustrate this process.
In this scenario, the server and clients are in the same subnet.
You want to install the OpenSolaris 2008.11 release on the first disk of
each client. All clients are identical x86 systems. You need to set up
a DHCP server on the installation server. No client setup is needed.
An extension of this scenario shows how you can copy an existing
service to an different location. This option could be useful, for example, if
you need to make a service available to people who cannot access it
in it's current location.
Run the following command to set up a service, providing the required initial image source and a target directory.
installadm create-service -s srcimage -i dhcp_ip_start -c count_of_ipaddr targetdir
Note - Because this is the first service created on this system, you also must
provide a starting IP address and a total number of IP addresses to
be made available for the clients.
This single command sets up a service. The components in this command accomplish
the following tasks.
- -s srcimage
The -s option identifies the path to an existing source image. The command sets up an installation image and a service that is based on the source image.
The installadm command sets up the installation image and the OSInstall service in this specified target directory.
The command creates default manifest files that are based on the installation image. Additionally, the command associates the manifest files with the service.
The command also creates a boot file and sets up /tftpboot entries, including the menu.lst file.
- -i dhcp_ip_start -c count_of_ipaddr
These -i and -c command options enable the utility to configure a DHCP server with the default configuration.
Note - If you are running the utility for the first time on the system, you need to use these options to provide the starting address and the range of IP addresses for the clients.
The command creates a DHCP macro for the installation image and updates the DHCP server. The command assigns the created DHCP macro to the range of IP addresses.
Note - If you want to update the default manifest file, use the installadm set
command after creating the service.
Example 2-13 Set Up a Server and 20 Clients
The following example illustrates a specific case where you are setting up a
server and clients.
Use the following command:
installadm create-service -s /tmp/image/OpenSolaris-ai-2008-11.iso -i 220.127.116.11 -c 20 /tmp/newimage
In this example, the terminal displays the progress as follows:
Setting up the target image ...
Registering the service _install_service_46503._install._tcp.local
Creating DHCP Server
Created DHCP configuration file.
Added "Locale" macro to dhcptab.
Added server macro to dhcptab - hostname1.
DHCP server started.
Added network macro to dhcptab - 18.104.22.168.
Created network table.
The components in this example accomplish the following:
This variable identifies the path to an existing source image. The command sets up an installation image and a service that is based on the source image.
The command creates an installation net image in the specified /tmp/newimage target directory.
The progress display shows that the command created a service named install_service_46503. This name is assigned by the installadm utility. The command also sets up a web process, webserver, which runs at the port 46503 for this service.
The command creates a boot file, also named install_service_46503, under /tftpboot. The client searches for and locates this boot file name through DHCP.
The command also creates a link to the net image at /tmp/newimage to a web server that is running on port 5555.
Note - You can check this information in the menu.lst file under the /tftpboot directory. In this example, you would see /tftpboot/menu.lst._install_service_46503 listed.
- -i 22.214.171.124 -c 20
Using the -i and -c options, the installadm command creates a DHCP server and macro. The -i option assigns a starting IP address of 126.96.36.199. The -c option allocates 20 IP addresses for clients. The command creates a macro, which is identified in the progress display as dhcp_macro_install_service_46503.
Note - You can view the DHCP configuration results in the DHCP table in the DHCP Manager by using the /usr/sadm/admin/bin/dhcpmgr utility.
Example 2-14 Copy a Service to Another Location
You can create a new service at different location by using an
existing service as a model. For example, if you need to post a
new service on a location that is accessible to other people, you can
copy an existing service to this accessible location.
This example illustrates a specific case where you are copying a service to
a different location.
Use the following command:
installadm create-service -s /tmp/image -n new_service /tmp/image2
The terminal displays the following progress:
Setting up the target image ...
Registering the service new_service._install._tcp.local
Each of the components in this example accomplish the following:
- -s /tmp/image
The -s option specifies a location of a source image. The command creates a new image by copying the source image that is located in the /tmp/image directory.
The command also creates a new service that is based on the source image.
- -n new_service
The -n command specifies a name, new_service, for the new service. If the -n option is not used in the command, the command automatically creates a new service name.
The command creates the new image in the specified /tmp/image2 directory.
Creating a Custom Client
The automated installer application enables multiple client systems to access the available
installation blueprints that are provided by existing OSInstall services. Client setup is not
required. You need only boot the client to initiate service discovery.
When the client boots, the automated installer process is as follows:
The client system boots.
The client finds its own IP address in the DHCP server, along with the boot file information from the DHCP macro.
The boot file points to the pxegrub function, and GRUB boots.
The OpenSolaris kernel boots by using the menu.lst information.
Additional files are retrieved from the net image by using the menu.lst location.
The client retrieves the automated installer's manifest file by using the mDNS service.
The automated installer program begins by using the installation specifications from the manifest file. The installer uses these specifications to complete the installation on the client.
Optionally, you can use the installadm create-client utility to customize your client configurations
and to limit the services, or to explicitly specify a service name and
image path that a client can discover.
Use the following command to create a custom client.
installadm create-client -e macaddr -n svcname -t imagepath
-e macaddr – This option identifies the MAC address for a client that you want to customize.
-n svcname – This option specifies the name of a service that you want to use for client installation.
-t imagepath – This option specifies the path of a source image that you want to use for installation to this client.
Example 2-15 Create a Custom Client
The following example illustrates a specific case where you set up a client
that references a specific service name and a specific source image location.
Use the following command.
installadm create-client -e 0:19:db:4f:db:c8 -n myservice -t /export/opensolaris/myimage
The terminal displays the following output:
copying boot file to /tftpboot/pxegrub.I86PC.OpenSolaris-1
Enabled PXE boot by adding a macro named 010019DB4FDBC8
to DHCP server with:
Boot server IP (BootSrvA) : 188.8.131.52.
Boot file (BootFile) : 010019DB4FDBC8
-e 0:19:db:4f:db:c8 – Specifies the MAC address, 0:19:db:4f:db:c8, of a particular client that you want to customize.
-n myservice – Specifies an existing service name, myservice, that you want the client to use for installation.
-t /export/opensolaris/myimage – Specifies a path for a source image that you want to be used for the installation.
You can view the DHCP configuration results in the DHCP table in
the DHCP Manager by using the /usr/sadm/admin/bin/dhcpmgr utility.
Go to the /tftpboot directory and view the results of the command as
# cd /tftpboot
# ls -l
lrwxrwxrwx 13:23 010019DB4FDBC8 -> pxegrub.I86PC.OpenSolaris-1
drwxr-xr-x 13:26 I86PC.OpenSolaris-1
-rw-r--r-- 13:23 menu.lst.010019DB4FDBC8
-rwxr-xr-x 13:23 pxegrub.I86PC.OpenSolaris-1
-rw-r--r-- 13:23 rm.010019DB4FDBC8
# cat menu.lst.010019DB4FDBC8
title OpenSolaris myimage
kernel /I86PC.OpenSolaris-1/platform/i86pc/kernel/unix -B