OpenSolaris Automated Installer Guide
Previous Next

How to Add Install Services

Use one of the following procedures:

How to Add an Install Service Correlated to IP Addresses

You can use the installadm create-service command with -i and -c options to accomplish any of the following:

  • You want your install server to act as your DHCP server, and you want to set up the proper DHCP settings on the server.

  • You want to correlate specific IP addresses with an install service. Using the -i and -c options, the installadm create-service command assigns a starting IP address and a total number of IP address to be made available to clients of the install service.

  • You want to add more IP addresses that will correlate with an install service.

Use the command with the following options:

installadm create-service [-i dhcp_ip_start -c count_of_ipaddr] [-s srcimage] targetdir
  • Using the -i option, the command sets up a new DHCP server. The IP addresses, starting from dhcp_ip_start, are set up.

  • Using the -c option, the command sets up a total number of IP addresses in the DHCP table equal to the value of the count_of_ipaddr. The first IP address is the value of dhcp_ip_start that is provided by the -i option.

  • Using the -s option, the command specifies an AI ISO image, srcimage, to use for setting up the install service. The source image is compacted and not ready for use in installations. The command expands this image and places the resultant net image in the targetdir location. This net image enables client installations.

Example: How to Set Up a Server and Multiple x86 Clients

This example describes how the installadm create-service command can be used to set up one server that can install five x86 clients in, for example, a classroom setting. The following describes the general steps to this process. Then, specific command details are provided to illustrate this process.

This example has the following conditions:

  • The server and clients are in the same subnet.

  • You want to install the OpenSolaris 2009.06 release on the first disk of each client.

  • All clients are identical systems, so no additional client customizations are needed.

  • You need to set up a DHCP server on the installation server.

Run the following command to set up an install service, providing the required initial image source and a target directory.

Because this is the first install 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.

installadm create-service [-n svcname] [-s srcimage] [-i dhcp_ip_start \
-c count_of_ipaddr] targetdir

This single command sets up an install service on your system.

See the following example:

# installadm create-service -n 0906x86 -i 10.6.68.201 -c 5 \
-s /export/aiimages/osol-0906-ai-x86.iso /export/aiserver/osol-0906-ai-x86

In this example, the terminal displays the progress as follows:

Setting up the target image at /export/aiserver/osol-0906-ai-x86 ...
Registering the service 0906x86._OSInstall._tcp.local
Creating DHCP Server
Created DHCP configuration file.
Created dhcptab.
Added "Locale" macro to dhcptab.
Added server macro to dhcptab - line1-x4100.
DHCP server started.
Added network macro to dhcptab - 10.0.0.0.
Created network table.
copying boot file to /tftpboot/pxegrub.I86PC.OpenSolaris-1
Service discovery fallback mechanism set up

The options in this example accomplish the following:

Table 4-1 Example Components

Options

Description

-s export/aiimages/osol-0906-ai-x86.iso

Using the -s option, the command identifies the path to an AI ISO image, export/aiimages/osol-0906-ai-x86.iso. This image is compacted and not usable for installations. The command unpacks the image and stores the resultant net image in a target directory, /export/aiserver/osol-0906-ai-x86. This net image enables client installations.

-n 0906x86

Using the -n option, the command specifies a name, 0906x86, for the new install service.

-i 10.6.68.201 -c 5

  • Using the -i and -c options, the installadm command creates a DHCP server and macro.

  • The -i option assigns a starting IP address of 10.6.68.201.

  • The -c option allocates 5 IP addresses for clients.

  • The command creates a macro, dhcp_macro_0906x86.


    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.


The progress displays provides additional information:

  • The command creates default manifest files that are based on the installation image. Additionally, the command associates the manifest files with the install service. The progress display shows that the command created an install service named 0906x86.

  • The command creates a boot file, 0906x86, under /tftpboot, and creates a menu.lst file. The client searches for and locates this boot file name through DHCP.


    Note - You can examine this information in the menu.lst file. In this example, the file would be called /tftpboot/menu.lst.0906x86.


  • The command also creates a link from the net image at /export/aiserver/osol-0906-ai-x86 to a web server that is running on port 5555.

How to Add Install Services Without Specific IP Addresses

If you already have the correct DHCP settings on your system, and you do not want to specify additional IP addresses for clients, only a source image and a target directory are required to set up an additional install service. For example, if you want to have multiple install services on an install server, you do not always need to add more IP addresses when you add more services.

The syntax for this minimal command is as follows:

# installadm create-service [-s srcimage] targetdir

Using the -s option, the command specifies an ISO image, srcimage, to use for setting up the install service. The source image is compacted and not ready for use in installations. The command expands this image and places the resultant net image in the targetdir location. This net image enables client installations.


Note - The command outputs the name of a client-specific macro and its values. You need to add this information to the DHCP server. To create the macro on your DHCP server, use the DHCP Manager or run the dhtadm commands that are provided in the command output.


Example: How to Set Up a Server to Install SPARC and x86 Clients

This example describes how to set up one server that can install both SPARC and x86 clients in, for example, a lab setting. The following describes the general steps to this process. Then, specific examples are provided to illustrate this process.

This example has the following conditions:

  • The server and clients may not be on the same subnet.

  • You want to install the OpenSolaris OS on SPARC and x86 clients.

  • The DHCP server is remote.

  • You want to set up individual clients and assign specific IP addresses to these clients.

Run the following commands to set up a SPARC install service and an x86 install service.


Note - Because the DHCP server in this example is not set up by installadm commands, you should not provide a starting IP address and a total number of IP addresses to be made available for the clients.


  1. Set up a SPARC install service as follows:

    # installadm create-service -n 0906sparc \
    -s /export/aiimages/osol-0906-ai-sparc.iso \
    /export/aiserver/osol-0906-ai-sparc

    The following displays:

    Setting up the target image at /export/aiserver/osol-0906-ai-sparc ...
    Registering the service 0906sparc._OSInstall._tcp.local
    
    Detected that DHCP is not set up on this server.
    If not already configured, please create a DHCP macro
    named dhcp_macro_0906sparc with:
       Boot server IP (BootSrvA) : 10.6.68.29
       Boot file      (BootFile) : http://10.6.68.29:5555/cgi-bin/wanboot-cgi
    If you are running Sun's DHCP server, use the following
    command to add the DHCP macro, dhcp_macro_0906sparc:
       /usr/sbin/dhtadm -g -A -m dhcp_macro_0906sparc \
    -d :BootSrvA=10.6.68.29:BootFile=\"http://10.6.68.29:5555/cgi-bin/wanboot-cgi\":
    
    Note: Be sure to assign client IP address(es) if needed
    (e.g., if running Sun's DHCP server, run pntadm(1M)).
    Service discovery fallback mechanism set up
    Creating SPARC configuration file

    In this example, the command creates an install service named 0906sparc, using the AI ISO image previously downloaded at /export/aiimages/osol-0906-ai-sparc.iso, and storing the resultant net image at /export/aiserver/osol-0906-ai-sparc.

    As shown above, this command outputs the name and values of a macro, dhcp_macro_0906sparc, which needs to be added to the DHCP server. If you are using a Sun DHCP server, you can create the above macro on your DHCP server either by using the DHCP Manager or by running the dhtadm commands, provided in the above output, on your DHCP server:

    On systems which support graphic interfaces, you can use the DHCP Manager, dhcpmgr, instead of the dhtadm command. For more information, see the dhcpmgr(1M) man page.

  2. Set up an x86 install service as follows:

    # installadm create-service -n 0906x86 \
    -s /export/aiimages/osol-0906-ai-x86.iso \
    /export/aiserver/osol-0906-ai-x86

    The following displays:

    Setting up the target image at /export/aiserver/osol-0906-ai-x86 ...
    Registering the service 0906x86._OSInstall._tcp.local
    
    Detected that DHCP is not set up on this server.
    If not already configured, please create a DHCP macro
    named dhcp_macro_0906x86 with:
       Boot server IP (BootSrvA) : 10.6.68.29
       Boot file      (BootFile) : 0906x86
       GRUB Menu      (GrubMenu) : menu.lst.0906x86
    If you are running Sun's DHCP server, use the following
    command to add the DHCP macro, dhcp_macro_0906x86:
       /usr/sbin/dhtadm -g -A -m dhcp_macro_0906x86 \
    -d :BootSrvA=10.6.68.29:BootFile=0906x86:GrubMenu=menu.lst.0906x86:
    
    Additionally, if the site specific symbol GrubMenu
    is not present, please add it as follows:
       /usr/sbin/dhtadm -g -A -s GrubMenu -d Site,150,ASCII,1,0
    
    Note: Be sure to assign client IP address(es) if needed
    (e.g., if running Sun's DHCP server, run pntadm(1M)).
    copying boot file to /tftpboot/pxegrub.I86PC.OpenSolaris-1
    Service discovery fallback mechanism set up

    In this example, the command creates an install service named 0906x86, using the AI ISO image previously downloaded at /export/aiimages/osol-0906-ai-x86.iso, and storing the resultant net image at /export/aiserver/osol-0906-ai-x86.

    As shown above, this command outputs the name and values of a macro, dhcp_macro_0906x86, which needs to be added to the DHCP server. If you are using a Sun DHCP server, you can create the above macro on your DHCP server either by using the DHCP Manager or by running the dhtadm commands, provided in the above output, on your DHCP server:

    On systems which support graphic interfaces, you can use the DHCP Manager, dhcpmgr, instead of the dhtadm command. For more information, see the dhcpmgr(1M) man page.

  3. Set up two SPARC clients with MAC addresses of 0:14:4f:1d:b9:14 and 0:14:4f:22:90:50 as follows:

    1. Set up the first SPARC client:

      # installadm create-client -e 0:e0:81:5d:bf:e0 \
      -t /export/aiserver/osol-0906-ai-sparc -n 0906sparc

      The following displays:

      Setting up SPARC client...
      Creating SPARC configuration file
      
      Detected that DHCP is not set up on this server.
      If not already configured, please create a DHCP macro
      named 0100E0815DBFE0 with:
         Boot server IP (BootSrvA) : 10.6.68.29
         Boot file      (BootFile) : http://10.6.68.29:5555/cgi-bin/wanboot-cgi
      If you are running Sun's DHCP server, use the following
      command to add the DHCP macro, 0100E0815DBFE0:
         /usr/sbin/dhtadm -g -A -m 0100E0815DBFE0 -d \
      :BootSrvA=10.6.68.29:BootFile=\"http://10.6.68.29:5555/cgi-bin/wanboot-cgi\":
      
      Note: Be sure to assign client IP address(es) if needed
      (e.g., if running Sun's DHCP server, run pntadm(1M)).

      In this example, the command creates a client-specific setup for the system with a MAC address of 0:e0:81:5d:bf:e0. This client will use the install service previously setup, named 0906sparc, and the install image at /export/aiserver/osol-0906-ai-sparc.

      As shown above, this command outputs the name and values of a macro, dhcp_macro_0906sparc, which needs to be added to the DHCP server. If you are using a Sun DHCP server, you can create the above macro on your DHCP server either by using the DHCP Manager or by running the dhtadm commands, provided in the above output, on your DHCP server:

      On systems which support graphic interfaces, you can use the DHCP Manager, dhcpmgr, instead of the dhtadm command. For more information, see the dhcpmgr(1M) man page.

    2. Set up the second SPARC client:

      # installadm create-client -e 0:e0:81:5d:bf:e0 \
      -t /export/aiserver/osol-0906-ai-sparc -n 0906sparc

      The following displays:

      Setting up SPARC client...
      Creating SPARC configuration file
      
      Detected that DHCP is not set up on this server.
      If not already configured, please create a DHCP macro
      named 0100E0815DBFE0 with:
         Boot server IP (BootSrvA) : 10.6.68.29
         Boot file      (BootFile) : http://10.6.68.29:5555/cgi-bin/wanboot-cgi
      If you are running Sun's DHCP server, use the following
      command to add the DHCP macro, 0100E0815DBFE0:
         /usr/sbin/dhtadm -g -A -m 0100E0815DBFE0 -d \
      :BootSrvA=10.6.68.29:BootFile=\"http://10.6.68.29:5555/cgi-bin/wanboot-cgi\":
      
      Note: Be sure to assign client IP address(es) if needed
      (e.g., if running Sun's DHCP server, run pntadm(1M)).

      In this example, the command creates a client-specific setup for the system with MAC address of 0:e0:81:5d:bf:e0. This client will use the install service previously setup, named 0906sparc, and the install image at /export/aiserver/osol-0906-ai-sparc.

      As shown above, this command outputs the name and values of a macro, dhcp_macro_0906sparc, which needs to be added to the DHCP server. If you are using a Sun DHCP server, you can create the above macro on your DHCP server either by using the DHCP Manager or by running the dhtadm commands, provided in the above output, on your DHCP server:

      On systems which support graphic interfaces, you can use the DHCP Manager, dhcpmgr, instead of the dhtadm command. For more information, see the dhcpmgr(1M) man page.

  4. Create the x86 client with a MAC address of 0:d:56:f2:c3:de as follows:

    # installadm create-client -e 0:10:18:0f:28:26 -n 0906x86 \
    -t /export/aiserver/osol-0906-ai-x86

    The following displays:

    Setting up X86 client...
    Service discovery fallback mechanism set up
    
    Detected that DHCP is not set up on this server.
    If not already configured, please create a DHCP macro
    named 010010180F2826 with:
       Boot server IP (BootSrvA) : 10.6.68.29
       Boot file      (BootFile) : 010010180F2826
    If you are running Sun's DHCP server, use the following
    command to add the DHCP macro, 010010180F2826:
       /usr/sbin/dhtadm -g -A -m 010010180F2826 -d \
    :BootSrvA=10.6.68.29:BootFile=010010180F2826:GrubMenu=menu.lst.010010180F2826:
    
    Note: Be sure to assign client IP address(es) if needed
    (e.g., if running Sun's DHCP server, run pntadm(1M)).
    If not already configured, enable network boot by creating
    a macro named 01000D56F2C3DE with:
    Boot server IP (BootSrvA) : 10.6.35.226
    Boot file (BootFile) : 01000D56F2C3DE

    In this example, the command creates a client-specific setup for the system with MAC address of 0:d:56:f2:c3:de. This client will use the install service previously setup, named 0906x86, and the install image at /export/aiserver/osol-0906-ai-x86.

    As shown above, this command outputs the name and values of a macro, dhcp_macro_0906x86, which needs to be added to the DHCP server. If you are using a Sun DHCP server, you can create the above macro on your DHCP server either by using the DHCP Manager or by running the dhtadm commands, provided in the above output, on your DHCP server:

    On systems which support graphic interfaces, you can use the DHCP Manager, dhcpmgr, instead of the dhtadm command. For more information, see the dhcpmgr(1M) man page.

Previous Next