Sun N1 Service Provisioning System User's Guide and Release Notes for the OS Provisioning Plug-In 2.0

Setting up the Linux Server

The Linux boot and install server includes the following software:

ProcedureHow to Copy Linux Files

Steps
  1. Create a directory to contain the Linux files.


    Note –

    To serve multiple distributions from the same server, create a separate directory for each distribution.


  2. Mount the first CD-ROM or ISO image file.

    Use a command similar to one of the following examples:


    #mount /dev/cdrom by default, will mount on /mnt/cdrom, check /etc/fstab
    #mount /path-to-first-iso /mnt/loop assumes /mnt/loop exists
      
    
  3. Copy the content from the CD-ROM or ISO image file to the directory that you created in Step 1.

    Use a command similar to one of the following examples:


    #/bin/cp -avf  /mnt/cdrom/* /export/RHEL3.0
    #bin/cp -avf  /mnt/loop/* /export/RHEL3.0
       
    
  4. Repeat Steps 2 and 3 for all the CD-ROM or ISO media in the distribution.

ProcedureHow to Set up NFS Access

The distribution should be accessible through NFS for each subnet served from this boot and install server.

Steps
  1. Edit the /etc/exports file and add lines similar to the following example:


    /export   10.42.42.*(ro)
  2. Enable NFS and start it.

    Use commands similar to the following, which apply to RedHat AS 3.0:


    #chkconfig nfs on
      #service nfs restart
    

ProcedureHow to Set up TFTP Access

The distribution should be accessible through NFS for each subnet served from this boot and install server.

Steps
  1. Look for the server_args parameter in the /etc/xinet.d/tftp file.

    This defines the root directory used by the TFTP server. If the directory does not exist, create it.


    Note –

    This task uses /tftpboot as an example.


  2. Enable TFTP and restart the xinetd daemon.

    Use commands similar to the following example, which works on RedHat AS 3.0:


    #chkconfig tftp on
      #service xinetd restart
    
  3. Copy or create the following directories under the TFTP root directory:

    • /tftpboot/pxelinux.0 – You can download the Linux PXE bootstrap file from http://syslinux.zytor.com/pxe.php.

    • /tftpboot/pxelinux.cfg/ – This directory contains the PXE configuration files. These files contain parameters specific to each hardware platform and Linux distribution.

    • /tftpboot/pxelinux.cfg/v20z-config – A specific directory for the V20z platform.

    • /tftpboot/vmlinuz – The installation kernel found under the distribution, in /images/pxeboot.

    • /tftpboot/initrd.img – The installation RAM disk found under the distribution, in /images/pxeboot.


Example 6–1 Sample PXE Configuration File

The following example shows the PXE configuration file for a SunFire V20z system.

default el30 ks
serial 0 9600
label el30
kernel vmlinuz
append linksleep=30 ksdevice=eth0 console=tty0 console=ttyS1,9600 load_ramdisk=1 initrd=initrd.img network

Where:


ProcedureHow to Create the Linux Image Server

You can create a Linux image server from the N1 SPS browser interface or command-line interface. To create the server from the command line, type commands similar to the following:


# cr_cli -cmd cdb.vs.add -comp NM:/com/sun/n1osp/untyped/LinuxServer \
-name "linuxserver" -u admin -p admin -vars "boot_server_tftp_root_directory=/tftpboot"
# cr_cli -cmd pe.p.run -u admin -p admin \
-PID NM:/com/sun/n1osp/untyped/LinuxServer-create \
-tar H:NM:bikickstart -comp + -vs linuxserver -pto 30 -nto 10

To create the server from the browser interface, follow these steps.

Before You Begin

The kickstart file should be placed on the Linux boot and install server in an NFS exported directory so that the target hosts can locate it, for example, /export/kickstart.

Steps
  1. In the Common Tasks section of the provisioning software page, select OS Provisioning.

  2. On the OS Provisioning Common Tasks page, click Create in the Linux Image Servers section.

  3. On the Plans Details page, click Run.

  4. Choose variables to use for this plan.

    • To use an existing variables set, select a name from the drop-down menu in the LinuxServer component row of the Plan Parameters table.

    • To create a new variables set, click Select from List in the LinuxServer component row of the Plan Parameters table.

      1. Click Create Set.

      2. Type a name for the variables set.

      3. If needed, change the boot_server_tftp_root_directory variable to the location where you want the Linux packages to be installed.

        By default, the path is /tftpboot.

      4. If needed, change the linuxHost variable to the location of the command-line interface.

        By default, the virtual Linux host name is set to the host name of the target host with -linux appended.


        Caution – Caution –

        Do not modify the installPath variable.


      5. Save the variables set.

      6. Select the variables set that you just saved from the drop-down menu in the LinuxServer component row of the Plan Parameters table.

  5. Select the host on which to create the Linux image server.

  6. Click Run Plan (includes preflight).

  7. To verify that the image server is created successfully, click the Hosts link in the left side of the provisioning server window.

    You should see the name of the virtual host appended with -linux. For example, if you installed on host bikickstart, the virtual host is bikickstart-linux.