Sun Update Connection - Enterprise Bare Metal Installation Guide

Chapter 2 Using the Bare Metal Installation Server

The BMI server automatically creates a Linux or Solaris box from a bare-metal system. It allows you to define a specific function for the server, letting the BMI server use Sun Update Connection – Enterprise features to automatically handle component and dependency installations.

This section contains the following procedures for using the BMI server:

Starting the BMI Server

The BMI server interface is a web application. The Sun Update Connection – Enterprise user with permissions to manage the BMI server is bmi_admin. For the steps to create the user account, see To Create a BMI Admin User Account.


Note –

Before you log into a Sun Update Connection – Enterprise interface (console or CLI) with the BMI user account, log out of the BMI server browser.


ProcedureTo Start the BMI Server

  1. Open a web browser.

  2. To start the server, type this address:

    http://IP-address-of-BMI-server/provision/

    The Login dialog box opens.

  3. In the login window, type the bmi_admin user password.

    The BMI server application opens, displaying the Status page.

Setting Up Your Environment

Before using the BMI server, make sure that the Solaris OS and Linux images that you need are set up for network installation and that the BMI server has HTTP, FTP, or NFS access to the image server. When your image server is ready, configure your BMI channels, as needed, to point the BMI server to the correct image on the image server.

This section contains information about configuring the following channels:

ProcedureTo Configure BMI Channels

This task explains how to point the BMI server to an image.

  1. Log into the BMI server.

  2. From the BMI server page menu, click Setup.

    The BMI Channels page is displayed, listing the channels you activated when you installed the Sun Update Connection – Enterprise.

  3. Check the status of each channel:

    • If the status is Configure, click Configure. A distribution-specific configure window opens. Complete the information needed to configure the selected channel for network installation.

    • If the status is Re-Configure, it is ready to use. Click Re-Configure if you need to change the path to the distribution CDs.

    • If the status is Channel Enabled, it is an S/390 channel and is ready to use. These channels are configured on the mainframe instead of the BMI server.

ProcedureTo Configure IA-32 Channels

This task explains how to configure IA-32 channels.

  1. From the BMI Channels page, choose an IA-32 channel and click Configure or Re-Configure.

  2. In the text box, enter the HTTP, FTP (or similar), or NFS path to the distribution CDs on the Image server.

    • Example HTTP format: http://system-name/path

    • Example FTP format: ftp://username:password@system-name/path/

    • Example NFS format: NFS: file:///path

  3. Click Continue.

    The change is saved and the BMI Channels page is displayed.

Before Provisioning With the IA-32 Channel

Before provisioning with the IA-32 channel, start up the systems and make sure they are set up for netboot, using their PXE cards.

ProcedureTo Configure AMD-64 Channels

To set up AMD–64 channels, you need paths to specific network boot files. This task explains how to obtain these files and configure channels based on AMD 64-bit architecture.

Before You Begin

You must obtain the network boot files, create a local mount point on the SDS, then loop mount the boot.img file on the mount point.

To obtain the network boot files, copy the boot.img file from the images subdirectory in the first installation CD to the SDS.

To create a local mount point on the SDS, type the following:


# mkdir /mnt/ia64boot

To loop mount the boot.img file on the mount point, type the following:


# mount -o loop /tmp/boot.img /mnt/ia64boot
  1. From the BMI Channels page, choose a AMD-64 channel and click Configure or Re-Configure.

  2. In the first text box, enter the HTTP, FTP (or similar), or NFS path to the distribution CDs on the image server.

  3. In the next text boxes, enter the path names mounted in the preparation procedure:

    • pxelinux – file:///mnt/ia64boot/elilo.efi

    • initrd file – file:///mnt/ia64boot/initrd.img

    • Kernel – file:///mnt/ia64boot/vmlinuz

  4. Click Continue.

    The change is saved and the BMI Channels page is displayed.

Before Provisioning With the AMD-64 Channel

Before provisioning with the AMD-64 channel, start up the systems and make sure they are set up for netboot.

If you do not have a preconfigured network boot option in the Boot Manager menu, add a boot option in the Boot Option Maintenance Menu.

ProcedureTo Configure IA-64 Channels

To set up Itanium type channels, you need paths to specific network boot files. This task explains how to obtain these files and configure channels based on 64-bit Intel architectures (Itanium).

Before You Begin

You must obtain the network boot files, create a local mount point on the SDS, then loop mount the boot.img file on the mount point.

To obtain the network boot files, copy the boot.img file from the images subdirectory in the first installation CD to the SDS.

To create a local mount point on the SDS, type the following:


# mkdir /mnt/ia64boot

To loop mount the boot.img file on the mount point, type the following:


# mount -o loop /tmp/boot.img /mnt/ia64boot
  1. From the BMI Channels page, choose a IA-64 channel and click Configure or Re-Configure.

  2. In the first text box, enter the HTTP, FTP (or similar), or NFS path to the distribution CDs on the image server.

  3. In the next text boxes, enter the path names mounted in the preparation procedure:

    • pxelinux – file:///mnt/ia64boot/elilo.efi

    • initrd file – file:///mnt/ia64boot/initrd.img

    • Kernel – file:///mnt/ia64boot/vmlinuz

  4. Click Continue.

    The change is saved and the BMI Channels page is displayed.

Before Provisioning With the IA-64 Channel

Before provisioning with the IA-64 channel, start up the systems and make sure they are set up for netboot.

If you do not have a preconfigured network boot option in the Boot Manager menu, add a boot option in the Boot Option Maintenance Menu. You can find additional details at http://developer.intel.com/technology/efi/help/efidocs.htm.

ProcedureTo Configure Solaris Software Channels

This task explains how to configure channels based on Solaris UNIX® software on a SPARC® technology architecture.


Note –

After you activate your Solaris channels in Sun Update Connection – Enterprise, use the upload.html command to upload your Solaris software to the SDS. See Chapter 5, Local Inventory, in Sun Update Connection – Enterprise 1.0 User’s Guide.


  1. From the BMI Channels page, choose a Solaris channel and click Configure or Re-Configure.

  2. In the first text box, enter the NFS path to the distribution CDs on the image server.

  3. In the second text box, enter the HTTP, FTP (or similar), or local path to the Solaris kernels directory, which is typically under the directory you entered in the first text box.

    You can use the file://, http://, or ftp:// protocol to access the directory. The directory is typically /CD-install-directory/Tools/Boot/usr/platform-name.

  4. Click Continue.

    The change is saved and the BMI Channels page is displayed.

Before Provisioning With the Solaris Channel

Start up the systems and make sure they are set up for netboot.

Creating or Provisioning Machines

This procedure explains how to install a Linux distribution or the Solaris operating system with the BMI server.


Note –

The BMI software only loads profiles at log in. If you create a profile after you log in to the BMI server, the profile is displayed the next time that you log in to the BMI server.


Before You Begin

If you want to provision specific system functionality, such as a web server or printer server, on the system where you install the operating system, you must first create a profile. The Sun Update Connection – Enterprise interface (console or CLI) enables you to create profiles to define installation requirements for a specific type of system. For more information, see Chapter 9, Profiles, in Sun Update Connection – Enterprise 1.0 User’s Guide.

ProcedureTo Install a Linux Distribution or the Solaris OS

  1. Log into the BMI server.

  2. On the Status page, check existing systems to make sure that the one upon which you want to perform a bare-metal installation does not yet exist.


    Note –

    If you run the BMI server functions on an existing Linux system or Solaris system, the previous operating system and all data are overwritten.


  3. Click Provisioning.

    The Select Platform page appears.

  4. From the Select list, click the platform of the system that you want to provision, then click Continue.

    The Server Provisioning page appears. This pageis platform-specific.

  5. Type the host name and MAC address of the system to be provisioned.

  6. Select an IP assignment type:

    • Dynamic – DHCP gives IP addresses on dynamic basis. If you select this, leave the IP Address field blank.

    • Static – Predefined IP address in the DHCP server for this host. If you select this, enter the static IP address in the IP Address field. Whenever you boot the system, the DHCP server assigns the defined IP address to the host.

  7. If you are provisioning a Linux system, skip to Step 8. If you are provisioning a Solaris system, select the appropriate Disk Type from the list.

  8. Select the distribution from the drop-down menu.

  9. If you are provisioning a Linux system, skip to Step 10. If you selected a SPARC platform distribution, select the system platform in the Platform Name field.

  10. (Optional) Select either or both of the following optional profile deployments:

    • In the Post-install Action field, select one or more system-defined tests to run after the installation:

      • System Check – Identifies missing dependencies

      • Security Check – Identifies available security updates to install

      • Upgrade – Installs any available software upgrades

    • In the Host Profile field, select one or more profiles from the list. The list contains the profiles that you created in Sun Update Connection – Enterprise.


      Note –

      If you create a profile after you log into the BMI server, the profile does not display until the next time that you log in to the BMI server.


  11. In the Root Password field, create a password for root permissions for the new system.

  12. Determine if you want to customize startup files..

    • To customize a start up file, select the Edit netboot File or Edit Kickstart checkbox, then click Continue. The file is uploaded to the BMI and is displayed for you to view, edit, or overwrite. For editing information, see Editing Files.

      The kickstart files are for Red Hat Kickstart, for YaST for SUSE, or the AutoYaST module of YaST2 applications.

    • To provision the system without customizing a start up file, or to continue provisioning after editing your netboot file, deselect the Edit netboot file checkbox, then go to Step 13.

  13. Click Continue.

    The system data is displayed in the Confirmation table.

  14. Determine if you want to provision the systems displayed, or if you want to provision additional systems.

    • To provision the systems displayed, go to Step 15.

    • To provision additional systems, select the platform that you want to provision. The Server Provisioning page is displayed. Go to Step 5 and complete the provisioning information for the new system.

  15. Select the checkboxes for the host systems that you want to provision, then click Commit.

    The new hosts are added to the BMI server database. A window containing the group designation opens for each host that is added to the database.

  16. Copy the group designation text and paste the text into the IP address range in the dhcp.conf file on the DHCP server.

    The graphic shows an example of the group designation text that you need to add to the IP address range in the dhcp.conf file.

    Figure showing content to cut and paste into the user's
dhcp.conf file.
  17. Depending on the type of DHCP server your environment uses, do one of the following:

    • Local DHCP server – Define additional options in the dhcp.conf file.

      1. Save the exported dhcp.conf data as a file.

      2. Add the following lines:


        option space pxelinux;
        option pxelinux.magic code 208 =string;
        option pxelinux.configfile code 209 =text;
        option pxelinux.pathprefix code 210 = text;
        option space SUNW;
        option SUNW.root-mount-options code 1 = text;
        option SUNW.root-server-ip-address code 2 = ip-address;
        option SUNW.root-server-hostname code 3 = text;
        option SUNW.root-path-name code 4 = text;
        option SUNW.swap-server-ip-address code 5 = ip-address;
        option SUNW.swap-file-path code 6 = text;
        option SUNW.boot-file-path code 7 = text;
        option SUNW.posix-timezone-string code 8 = text;
        option SUNW.boot-read-size code 9 = unsigned integer 16;
        option SUNW.install-server-ip-address code 10 = ip-address;
        option SUNW.install-server-hostname code 11 = text;
        option SUNW.install-path code 12 = text;
        option SUNW.sysid-config-file-server code 13 = text;
        option SUNW.JumpStart-server code 14 = text;
        option SUNW.terminal-name code 15 = text;
        option SUNW.magic code 208 =string;
        option SUNW.configfile code 209 =text;
        option SUNW.pathprefix code 210 =text;
        option SUNW.magic code 208 =string;
      3. Append the file to the DHCP server’s dhcp.conf file.

    • Local DHCP server on Windows – Define additional options in the DHCP server application.

      1. See the following URL:


        http://www.microsoft.com/resources/documentation/WindowsServ/2003/standard/
        proddocs/en-us/Default.asp?url=/resources/documentation/WindowsServ/2003/standard/
        proddocs/en-us/sag_DHCP_pro_Topnode.asp
      2. Add the following lines:


        option space pxelinux;
        option pxelinux.magic code 208 =string;
        option pxelinux.configfile code 209 =text;
        option pxelinux.pathprefix code 210 = text;
  18. Restart the dhcp server.

    The following actions are carried out on the system:

    • The selected distribution/operating system is installed on the host.

    • The Sun Update Connection – Enterprise agent is installed for further management tasks.

    • The new system is installed with software of the profile, provisioning it for the selected purpose (if you selected an optional profile).

    • The selected Post-Install Actions are performed to ensure the integrity of the server.

Reprovisioning Servers

This procedure explains how to recycle a system’s function by reprovisioning a new operating system, a new profile, or both. You can reprovision a managed host that has already been provisioned.

ProcedureTo Reprovision a Server


Caution – Caution –

When you click Continue in the Reprovisioning form, the operating system is reinstalled and all existing data is overwritten. This occurs even if you did not make any changes.


  1. In the Status page, select the host to be reprovisioned.

  2. Click the recycle icon.

    The Reprovisioning page opens. The Reprovisioning page is prepopulated with the system information. For more information, see Creating or Provisioning Machines.

  3. Edit the options required to recycle this system.


    Note –

    If you change the platform operating system of a Solaris system, you must copy the DHCP content to the dhcp.conf file on the Solaris client. The BMI then sends a Sun Update Connection – Enterprise job to restart the system.


  4. Click Continue.

    The operating system is reinstalled and all existing data is overwritten.

Next Steps

The following actions are carried out on the system:

Editing Files

Options in the Server Provisioning and Reprovisioning pages enable you to view and edit the netboot and the startup files.

The startup files are for the following applications:

Before You Begin

Make sure that you are familiar with the contents of the netboot file, which details parameters of the kernel and command line options, and with the contents of the startup file you are using. For details, see the URLs, documentation, or technical support of the distribution. For example, find the Red Hat Kickstart Customization Guide at http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/custom-guide/, the Novell SUSE AutoYaST documentation at http://www.suse.de/~nashif/autoinstall/ref.html, and a Solaris JumpStart HowTo at http://www.pimpworks.org/sun/jumpstart-howto.html (see “How To Setup a Jumpstart Server”).

Alternatively, contact Sun Technical Support.

ProcedureTo Edit the netboot File

  1. Open the netboot file in a text editor. The netboot file is located in the /tftpboot/pxelinux.cfg/MAC-address-of-system-to-provision/ directory on the BMI server.

  2. The netboot file contains the kernel parameters. The line that you most probably need to check or edit is the append line.

    In the following example, the append line is shown on two lines, but it will be on a single line in the file.


    default ks
    prompt 1
    timeout 10
    label ks
    kernel images/redhat/AS_3.0/vmlinux
    append ksdevice=eth0 ks=nfs:10.0.1.3:/tftpboot/images/redhat/AS_3.0/kickstart
    initrd=images/redhat/AS_3.0/initrd.img
    1. If there is more than one network card to choose from, verify that the value of ksdevice is correct.

    2. Verify that the value of ks correctly points to the appropriate configuration file, either Kickstart or YaST (or the AutoYaST module of YaST2), and that the path is correct.

    3. Verify that the value of initrd is the correct distribution and path to the network setup for the operating system that you want to install.

ProcedureTo Edit the Kickstart or the YaST Files

Kickstart is a Red Hat configuration application. YaST, or the AutoYaST module of YaST2, is a SUSE configuration application. Both offer GUIs for the creation and editing of the resulting host file. The BMI server offers a browser to the file. Typically, it is easier to use the application than to edit the file.

  1. Open the configuration file.

    • To edit the file using the GUI, open the configuration application.

    • To edit the file using a text editor, open the file in the /tftpboot/pxelinux.cfg/MAC-address-of-system-to-provision/ directory.

  2. Verify that the following parameters have the same value as the host that you are provisioning:

    • Host name – Check that the host name in the file is the same as the host name you have given to the selected managed host to be created.

    • Root password – Although the root password is encrypted in the file, you can copy and paste from the BMI server provisioning or reprovisioning form into the file.

    • NFS installation server – Check that the server name and path correctly point to the installation CDs.


      Note –

      The parameters might have different names in the Kickstart and the YaST files.


Using BMI in Customized Environments

You can have proprietary files for unattended installation and provisioning. For example, your enterprise may have a specific disk partitioning requirement or a pre-OS-installation methodology to enable proprietary hardware. This section explains how to use the BMI server with your customized environment. Sun Update Connection – Enterprise does not support a customized environment. The procedures are given as best-practice suggestions for manually creating a custom environment.


Note –

Customization of the BMI server files, and their maintenance and control, is the responsibility of the user.


Template Files

The /usr/local/uce/server/private/channels.xml file contains a section called bmi , which contains pointers to the BMI template files. The BMI template files define how the BMI server provisions managed hosts.The template files are refreshed whenever a user configures or reconfigures the channel.

The template files are explained in the following table.

File Defining Behavior 

Description 

initrd (binary)

The init ramdrive determines the modules to be present before installation. 

kernel (binary)

Kernel used for installation. 

netboot (configuration template)

Identifies the location of these files in the filesystem. 

kickstart (configuration template)

Response file, which contains the predefined answers for installation, created by either Kickstart or the AutoYaST module in YaST. This file controls system creation. 

BMI Template Directories

After you configure a channel, the BMI server gets the latest template files from the knowledge base and stores them in the /tftpboot/images/TYPE (Redhat or SuSE)/ARCHITECTURE (IA32 or AMD64)/DISTRIBUTION/ directory on the BMI server.

For example: /tftpboot/images/SuSE/IA32/SLES_9_0_IA32/kickstart

A channel-specific template directory is created for each set of architecture-distribution type systems that is relevant for your environment. Each directory contains the appropriate BMI server template files.

BMI Server Macros in Template Files

The configuration template files (netboot and kickstart) contain parameter macros. The BMI server substitutes the macros with actual data when a system is added as a managed host of the BMI server. The macros are needed as-is for BMI server operations.


Caution – Caution –

Do not change the macro text or the placement of the macros in the file.


Template File 

Macro Name 

Template File 

Macro Name 

netboot

INITRD PATH

kickstart

{HOSTNAME}

 

KERNEL_PATH

 

{ROOT_PASSWORD}

 

KICKSTART_PATH

 

{SERVER_NAME}

 

DISTRO_SOURCE

 

{USERNAME}

     

{PASSWORD}

Host Files

When a system is provisioned, a subdirectory is created under the /tftpboot/pxelinux.cfg directory on the BMI server. The name of the subdirectory is the MAC address of the provisioned host. The //BMI-system/tftpboot/pxelinux.cfg/MAC-address/ directory contains the kickstart and netboot host files. A host file contains the same lines that are in the template file, but the macro is replaced with host-specific data. A host file also has a post-install section that must not be changed.

Host files are refreshed whenever a host is reprovisioned.

Customizing Files

When you customize the files, either the template files or the host files, there are some parts that must be copied exactly from the original files.

Customizing Template Files

BMI template files belong to a specific architecture-distribution. Modifying the files affects all future system provisioning for that distribution.

When you change or add a template file, you must copy the macros from the original file in the exact text and order.

Customizing Host Files

A host file affects the installation and provisioning of one system. To ensure consistency, copy your customized files to every relevant /MAC-address/ directory.

The kickstart host file is the BMI name for the file created with either Kickstart or YaST. In the kickstart file there is a post section containing data that leads the installation of the Sun Update Connection – Enterprise agent and notifies the BMI server of successful provisioning. The post-install section must be copied exactly into all your customized files.

ProcedureTo Create Customized Template Files

  1. Maintain the default template files for copying and backup:


    # cd /tftpboot/images/TYPE/ARCH/DISTRO
    # mv kickstart kickstart.orig
    # mv netboot netboot.orig
    
  2. Maintain the default host files for copying and backup:


    # cd /tftpboot/pxelinux.cfg/MAC-address/
    # mv kickstart kickstart.orig
    # mv netboot netboot.orig
    
  3. In either or both directories, make another copy for customization:


    # cp kickstart.orig kickstart.significant-suffix
    # cp netboot.orig netboot.significant-suffix
    
  4. Change the files as needed:

    • If you change a template file, make sure the macro lines are exactly as in the original template file, in the same order and the same text.

    • If you change a host file, make sure your host file has the post-install section copied exactly, in the same location in the file as in the original host file.

    • If you want to keep multiple versions of a file, give each version a different suffix and make sure to copy over the needed macros or post-install section.

  5. Decide which version will be used for the next BMI server session. Make a backup of this file. This is important, because if any user changes the configuration through the BMI Server Setup feature, your active files will be overwritten.

  6. Create a symlink for the BMI server to find the files that you want to use for the next BMI provisioning session:


    # ln -s kickstart.your-suffix kickstart
    # ln  -s netboot.your-suffix netboot
    

Example 2–1 Symlink For the BMI Server


kickstart.orig
kickstart.myServers
kickstart.myWorkstations_partA
kickstart.myWorkstations_partB
kickstart.myWorkstations_partA_backup
kickstart -> kickstart.myWorkstations_partA

Maintaining Customization

If the BMI Server Setup feature is used to reconfigure a channel, either by you or by another user, the original files will be reinstalled and will overwrite the symlink and the linked file.

To make sure you can recover from this overwrite:

Troubleshooting

When you install the BMI, it is configured to work with the Sun Update Connection – Enterprise Python-API. If the default configuration is not appropriate for your local environment, the following message is displayed:


Failed to prepare API working directory!
Failed to extract uce_port from uce.rc!
run config.py manually!
  1. Open a terminal window and log in with root permissions.

  2. Use the which python command to find the path to your python executable.

  3. In /opt/local/uce/agent/bin/.uce.rc, find server-port and distrizor-port.

  4. In a terminal, type the following command in one line:


    # <path/to/python> /opt/local/uce/api/python/lib/PyOsApi/utils/config.py \
    local-host server-port local-host distrizor-port \
    /usr/local/uce/engine/bin/uce.public /opt/local/uce/.uce_python
    
  5. Type chown uce-sds.uce.sds /opt/local/uce/.uce_python/.

    This allows the API read-write functions in the BMI server, because uce-sds is the owner of web applications.