This chapter identifies information that is missing from the product documentation on the DVD or errors in the documentation.
Creating Linux images involves interaction among various components. To make this process easier to follow, the process is described in multiple sections:
Appropriate Linux and N1 Provisioning Server configurations and configuration requirements are described in Linux Configuration.
The high-level procedure is described in To Create a Linux Image (High-Level Task).
Individual steps within the high-level procedure are described in detail in later sections:
This section describes specific requirements for configuring your Linux environment before you can create Linux images using the N1 Provisioning Server software.
The following requirements must be met on your Linux system:
The PXE Boot Server machine (hereafter refered to as the Kickstart server) must be running Linux. The recommended version is Red Hat Enterprise Linux AS2.1 .
You need to have the Sun Fire B1600 Platform Documentation, Drivers, and Installation CD supplied by Sun with the server blade.
You need to have the Red Hat Enterprise Linux AS2.1 installation CDs.
The Kickstart server can be networked into the N1 Provisioning Server setup in several ways. The following illustrations depict two of those possibilities.
In the scenario illustrated by Figure 4–1, one of the Ethernet interfaces (if the machine has more than one) of the Kickstart server is connected directly to one of the available ports on the blade shelf. In this example, the NETP0 port is used.

Another possibility, as depicted in Figure 4–2, is that the Kickstart server is connected to the blade shelf via an external switch. In the figure, the interface eth1 of the Kickstart server is connected to a Cisco switch C2924. One of the external ports of the shelf, in this case, NETP0, is also connected to the switch C2924.

The rest of the document assumes the setup shown in Figure 4–3, in which the connections with the Provisioning Server machine are included. Note that the setup is based on the one described in Figure 4–1. The Kickstart server can be reached from an external network by using a second Ethernet interface if one exists or via terminal server (if one is configured). Alternatively, the Kickstart server can be accessed directly through its console device (monitor) if one is available. The interface connected to the shelf must be plumbed and assigned a valid Internet address.

The following is an example of the network configuration of the Kickstart server.
[root@ks-server root]# ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:03:47:31:71:98
inet addr:10.5.140.151 Bcast:10.5.140.159 Mask:255.255.255.240
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:134432 errors:0 dropped:0 overruns:0 frame:0
TX packets:114431 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:31829037 (30.3 Mb) TX bytes:45777133 (43.6 Mb)
Interrupt:10 Base address:0xc000
eth1 Link encap:Ethernet HWaddr 00:03:47:31:71:99
inet addr:10.40.40.1 Bcast:10.40.40.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:321940 errors:0 dropped:0 overruns:0 frame:0
TX packets:1540859 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:48545214 (46.2 Mb) TX bytes:2160671329 (2060.5 Mb)
Interrupt:5 Base address:0xe000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:538 errors:0 dropped:0 overruns:0 frame:0
TX packets:538 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:42254 (41.2 Kb) TX bytes:42254 (41.2 Kb)
[root@ks-server root]#
|
The first interface (eth0) of the server is connected to an external switch. The server is accessible through this interface. The second interface (eth1) is connected directly to the shelf and assigned an IP address of 10.40.40.1 in the 10.40.40.0 network.
To set up the Kickstart server, see the instructions in “ Installing Linux From a PXE Boot Install Environment “ in Sun FireTM B100x and B200x Server Blade Installation and Setup Guide. Start at the beginning of Chapter 4 and stop at Step 5 in section 4.4, “Installing Linux on a Server Blade from a PXE Boot Server.”
You can download the Sun FireTM B100x and B200x Server Blade Installation and Setup Guide from the following web site:
The default configuration files provided with the Red Hat distribution need to be modified with appropriate values for IP addresses and path names. Refer to steps 5, 6, and 7 of section 4.4, “Installing Linux on a Server Blade from a PXE Boot Server” in Sun FireTM B100x and B200x Server Blade Installation and Setup Guide. More importantly, you need to customize the disk partition and package selection information for N1 Provisioning Server 3.1, Blades Edition.
The Linux image must contain some packages required by N1 Provisioning Server. To ensure that these packages are included, add the entry N1 Required RPMS to the package selection list. Edit the file /<tftp_base_dir>/as-2.1/RedHat/base/comps to add the following declaration:
1 N1 Required RPMS {
pdksh
tftp
tftp-server
}
The following list is an example of package selection specified by the ks.cfg file.
%packages @ Network Managed Workstation @ Software Development @ Base @ Printing Support @ Network Support @ Messaging and Web Tools @ News Server @ NFS File Server @ Windows File Server @ Web Server @ Router /Firewall @ DNS Name Server @ Emacs @ Utilities @ Advanced Server @ N1 Required RPMS
Actual disk sizes (to the byte level) vary from vendor to vendor. Therefore, for the purpose of generalization, N1 Provisioning Server assumes the size of all disks to be 30*10 ^9 bytes or 30GB. However, the actual disk size of B100n blades is slightly more than 30*10 ^9 bytes (30005305344 bytes). Therefore, a disk image of 30*10 ^9 is guaranteed to work on all B100n/B200n server blades and a disk image of the actual size of the disk might not work on all server blades (due to the variance). Using a disk size value of 30*10 ^9 bytes for all images created ensures that the image will be deployable on all server blades.
The Linux operating system uses disk blocks towards the end of the disk also to store its data. As a result, taking a 30*10 ^9-byte snapshot of the disk leaves out a few critical disk blocks that are towards the end. A blade provisioned with this image will fail to boot. To solve this problem, create a dummy filesystem (approximately 10 MB to account for the extra bytes) towards the end of the disk and exclude this file system before taking the snapshot.
The following disk partition is one example:
part /--asprimary --fstype ext3 --size 512 --grow --ondisk hda part swap --size 2048 --ondisk hda part /tmp --fstype ext3 --size 512 --ondisk hda part /dummy --fstype ext3 --size 10 --ondisk hda |
Notice the /dummy filesystem of size 10 MBytes in the partition information.
You can create Linux images after you install Linux on a server blade. To install Linux on a server blade, use the Red Hat Kickstart technology. The main steps in the Linux image process follow.
Set up a Kickstart environment on a server running Red Hat AS 2.1 (the Kickstart server).
See your Linux documentation for details.
Configure the Kickstart server to be a part of N1 Provisioning Server setup, as described in To Configure the Sun Fire B1600 Switch.
On the Provisioning Server machine, invoke the image wizard and follow the instructions to create a manual operating system installation for a Linux system as described in To Create a Linux Image by Using the Image Wizard.
When you see the following prompt from the image wizard, install Linux as described in To Install Linux on the Selected Resource Pool Server.
Did the installation succeed [y/n] > |
Return to the image wizard and continue.
Did the installation succeed [y/n] > y Issue the following commands on the sytem controller to boot the resource pool server from the disk sc> bootmode bootscript="boot disk" s<X> (where "s<X>" is provided in resource pool server information) then you can issue the following command to reset sc> reset -y s<X> Please enter y when the resource pool server has booted from disk > |
Boot the resource pool server from its disk.
On the system controller, type the following commands:
sc>bootmode bootscript="boot disk" console-id sc>poweron console-id |
For example:
sc>bootmode bootscript="boot disk" s5 S5: Boot script set. sc>poweron s5 S5: Poweron sequence started. |
Return to the image wizard and follow the instructions for customizing Linux for the N1 Provisioning Server environment.
Please enter y when the resource pool server has booted from disk > y You can customize your installation at this point in time. Please logon to the resource pool server and customize. Please enter y when your customization is completed > y Please shutdown the resource pool server by issuing the command For Solaris: # /usr/sbin/shutdown -y -g0 -i0 For Linux: # /sbin/shutdown -h now Once the resource pool server shuts down, for sparc blades set the OBP of resource pool server to boot using dhcp by issuing the following command in the OBP prompt (no changes are required for i86pc blades) ok> setenv boot-device net:dhcp Please enter y when the resource pool server has completed the shutdown and when you have configured the resource pool server to boot using dhcp > |
Prepare the disk for a snapshot as described in To Prepare a Disk for Snapshot.
Return to the image wizard window and continue from the previous point.
In the image wizard text, you see references to “PES.” PES is a historical term that refers to a Resource Pool Server.
Please enter y when the resource pool server has completed
the shutdown and when you have configured the
resource pool server to boot using dhcp > y
Creating image.
This will take some time, please wait till the operation completes.
Do not interrupt the operation.
Please run farm -Lt <farm id> for more information.
--------------- output of internal commands ----------------
Disabling monitoring on PES 50105
Powering off PES 50105 for a move to it's original VLAN
Setting PES State to OFF
Moving PES 50105 to its original VLAN
Powering on PES 50105 in it's original VLAN
Setting PES State to ON
Activating farm 113 ...
Request (id: 597) submitted.
Waiting for request 597 to complete...
..............
Taking snapshot of target 0 for host server for farm 113 to create final image ...
Snapshot image size: 30000000000
Request (id: 601) submitted.
Waiting for request 601 to complete...
........................................................
Snapshot was successful.
Deactivating the farm 113
Request (id: 619) submitted.
Waiting for request 619 to complete...
...............
Farm 113 is deactivated.
Image rh-as2.1-disk-image is ready for use.
---------------------- end of command ----------------------
Image creation completed.
Updating image attributes.
--------------- output of internal commands ----------------
Updated image: 18
---------------------- end of command ----------------------
Image update completed.
WARNING: The farm created for image creation has to be deleted manually.
Use the farm -D <farm id> command to delete the farm.
Please wait for the farm to be deactivated before you issue this command.
IMAGE WIZARD
############
This Wizard can be used to :
* create "image" and store the "image" on the image server (IS) and
"image attributes" in the control plane database (CPDB).
* import "image" and "image attribute information" into the image
repository and control plane database (CPDB).
* manage images and manage image attribute information in the image
repository and control plane database (CPDB).
Please read the N1 PS System Administration Guide before using this
Wizard.
Please select,
1) Create - Create a new image and store the image in the repository
2) Import - Import an image into the repository
3) List - List the images in the repository
4) Update - Update image attribute information in the repository
5) Delete - Delete an image in the repository
6) Validate - Validate imported images
7) Quit
Enter your selection [1-7] > 7
|
Clean up the stale state.
On the Provisioning Server machine, manually delete the temporary farm that was created. Use the following command:
# farm -D farm-id |
Where farm-id is the farm ID printed by the wizard in Step 5. For example:
bash-2.03# farm -D 113 |
The newly created image rh-as2.1-disk-image is ready for deployment.
This section describes the steps needed to configure the switch.
Create a separate VLAN for Linux install.
Log on to the Sun Fire B1600 switch.
For a dual–switch system, make sure that you log on to the active switch.
Create a new VLAN for Kickstart purposes.
Type the following commands:
Vty-0#configure Vty-0(config)#vlan database Vty-0(config-vlan)#vlan vlanid name vlan-name media ethernet state active Vty-0(config-vlan)#end |
In the following example, a new VLAN named kickstart is created with a VLAN id of 3. The VLAN id must not be in use already.
Vty-0#configure Vty-0(config)#vlan database Vty-0(config-vlan)#vlan 3 name kickstart media ethernet state active Vty-0(config-vlan)#end |
To make the Kickstart server part of N1 Provisioning Server setup, configure the interface on the shelf connecting to the Kickstart server to the Kickstart VLAN.
Vty-0#configure Vty-0(config)#interface ethernet port Vty-0(config-if)#switchport allowed vlan add vlanid Vty-0(config-if)#switchport native vlan vlanid Vty-0(config-if)#end |
Where vlanid is the VLAN created in the previous step and port is the port to which the Kickstart server machine is directly connected to the shelf. For example:
Vty-0#configure Vty-0(config)#interface ethernet NETP0 Vty-0(config-if)#switchport allowed vlan add 3 Vty-0(config-if)#switchport native vlan 3 Vty-0(config-if)#end |
The Kickstart server is now ready to perform Kickstart installations.
The general procedure for using the image wizard to create images is described in detail in To Create an Image in N1 Provisioning Server 3.1, Blades Edition, System Administration Guide. The following procedure identifies specific choices that you want to make to create the appropriate Linux image.
To access the image wizard, type the following command from the control plane server:
# /opt/terraspring/sbin/imagewizard |
The image wizard responds with a list of actions for you to choose.
Type 1 to create a new image and store the image in the repository.
Type 2 to choose Linux for your operating system.
Type 1 to choose the x86 architecture.
Type 2 to create an image from a manual operating system installation.
To define device selection attributes for the new image, type 1.
Type 1 and select the appropriate x86 blade server type (for example, sunfireb100x-97–blade).
Type 2 and choose local for your disk type.
Type 3 and choose IDE for your disk controller type.
Type 4 and choose the default of 30 Gigabytes (3000000000 bytes) for your disk size.
When your device attributes are complete and correct, type 5 to return to the previous menu.
To define image atrributes for the new image, type 2.
Type 1 to provide a name for the image, for example rh-as2.1-disk-image.
Type 2 to provide a brief description for the image, for example RedHat AS2.1 Image.
Type 3 and accept the default archive type for the image (disk_image).
Accept the default image type for the image (Global Image).
Type 5 to identify the image size, which defaults to the disk size.
When your image attributes are complete and correct, type 6 to return to the previous menu.
To continue and create the new image, type 3.
The screen displays the information that you have entered so far and asks you to confirm before continuing. This text might look similar to the following example:
Following is the information you have entered Operating system: linux Architecture: i86pc Image name: rh-as2.1-disk-image Image description: RedHat AS2.1 Image Image archive type: disk_image Image type: Global Image Image size: 30000000000 Server Type: sunfireb100x-97-blade Disk Type: local Disk Controller Type: ide Disk Size: 30000000000 Bytes Enter y to continue and n to return to previous option > y |
Make sure that there is enough space on the image server to create the new image before you continue.
At this point, the resource pool server is selected and ready for installation in the image VLAN. Write down the device ID and the console ID. You will need those IDs later.
Follow the information on the terminal screen to start and complete the installation on the selected resource pool server as described in To Install Linux on the Selected Resource Pool Server.
Configure the DHCP settings on the Kickstart server.
For complete instructions, see Section 4.3.1,”Configuring the DHCP Server“ of Sun FireTM B100x and B200x Server Blade Installation and Setup Guide.
The following sample dhcpd.conf file illustrates a working configuration.
authoritative;
default-lease-time 691200;
max-lease-time 691200;
subnet 10.5.140.0 netmask 255.255.255.0 {
not authoritative;
}
shared-network image-copy-subnets {
subnet 10.40.40.0 netmask 255.255.255.0 {
option subnet-mask 255.255.255.0;
filename "/as-2.1/sun/pxelinux.bin";
next-server 10.40.40.1;
range 10.40.40.10 10.40.40.20;
}
}
Move the resource pool server to the Kickstart VLAN.
Because the Kickstart server is on a separate VLAN and is not a part of the image VLAN, the resource pool server is moved to the Kickstart VLAN. To move the resource pool server to the Kickstart VLAN, type the following commands on the Provisioning Server machine:
# vlanconfig -a vlanid interface device-id # vlanconfig -n vlanid interface device-id |
Where:
vlanid is the VLAN created in Step 1 of To Configure the Sun Fire B1600 Switch.
device-id is the device ID of the resource pool server that you noted in Step 8 of To Create a Linux Image by Using the Image Wizard.
interface is the primary interface of the server blade .
For example:
bash-2.03# vlanconfig -a 3 eth0 50105 bash-2.03# vlanconfig -n 3 eth0 50105 |
Boot the resource pool server through the network in the Kickstart VLAN.
On the shelf system controller, type the following commands:
sc>bootmode bootscript="boot net:dhcp" device-id sc>reset -y device-id |
In the following example, the device-id is s5:
sc>bootmode bootscript="boot net:dhcp" s5 S5: Boot script set. sc>reset -y s5 Reset of S5 successful |
The resource pool server will be installed with the Linux Kickstart image setup on the Kickstart server. Log on to the console of the resource pool server to monitor the progress of the installation.
Customize the Linux installation, if needed.
At the end of the install, you will be prompted at the console to press Enter. After the resource pool server boots from the newly installed Linux, you might want to customize other information, such as changing the root password or installing RPMs that you might have missed.
Halt the resource pool server.
On the newly installed Linux machine, type the following command:
[root@linux-client root]# /sbin/shutdown -h now |
Move resource pool server back to image VLAN.
Move the resource pool server back to the image VLAN so that software packages like the N1 Provisioning Server agent can be installed. The resource pool server is removed from membership in the Kickstart VLAN.
# vlanconfig -n 8 interface device-id # vlanconfig -r vlanid interface device-id |
Where:
vlanid is the VLAN created in Step 1 of To Configure the Sun Fire B1600 Switch.
device-id is the device id of the Resource Pool Server that you noted in Step 8 of To Create a Linux Image by Using the Image Wizard.
interface is the primary interface of the server blade .
bash-2.03# vlanconfig -n 8 eth0 50105 bash-2.03# vlanconfig -r 3 eth0 50105 |
To continue, follow the instructions in To Prepare a Disk for Snapshot.
Boot the resource pool server from its disk into the image VLAN.
On the system controller, type the following commands:
sc>bootmode bootscript="boot disk" console-id sc>poweron console-id |
For example:
sc>bootmode bootscript="boot disk" s5 S5: Boot script set. sc>poweron s5 S5: Poweron sequence started. |
On the newly installed Linux machine, exclude the dummy file system.
Exclude the dummy file system created as described in Non-standard Disk Sizes and Linux. Comment out the entry for /dummy in the /etc/fstab file.
Unmount the dummy file system.
Type the following commands to unmount the file system and verify that it is no longer mounted:
[root@linux-client root]# umount /dummy [root@linux-client root]# df -k Filesystem 1k-blocks Used Available Use% Mounted on /dev/hda1 26251900 1146164 23772204 5% / none 1029196 0 1029196 0% /dev/shm /dev/hda3 507620 8253 473159 2% /tmp [root@linux-client root]# |
Make the Linux installation compatible with the N1 Provisioning Server software.
NFS mount the /tftpboot/terraspring directory from the Provisioning Server machine.
Type the following command:
[root@linux-client root]# mount PS-IP-address:/tftpboot/terraspring mount-point |
For example:
[root@linux-client root]# mount 10.42.42.1:/tftpboot/terraspring /mnt |
Create a download directory for software packages and change directory to that location.
For example:
[root@linux-client root]# mkdir -p /tmp/packages [root@linux-client root]# cd /tmp/packages |
Copy the Sun Java Runtime Environment (JRE), N1 Provisioning Server Agent, and Content Load Balancing (CLB) modules.
[root@linux-client root]# cp /mnt/packages/j2re-1_4_1_06-linux-i586-rpm.bin . [root@linux-client root]# cp /mnt/packages/TSPRaglnx-3.1.6.i386.rpm . [root@linux-client root]# cp /mnt/packages/sunclb-admin-1.36-1.i386.rpm . [root@linux-client root]# cp /mnt/packages/sunclb-k2_4_9_e_3smp-1.36-1.i386.rpm . [root@linux-client root]# cp /mnt/packages/sunclb-k2_4_9_e_3-1.36-1.i386.rpm . |
Unmount the directory.
[root@linux-client root]# umount /mnt |
Install the JRE software.
Type the following commands:
[root@linux-client root]# sh ./j2re-1_4_1_06-linux-i586-rpm.bin [root@linux-client root]# rpm -i j2re-1_4_1_06-fcs-linux-i586.rpm |
Install and configure the N1 Provisioning Server agent.
Type the following commands:
[root@linux-client root]# rpm -i TSPRaglnx-3.1.6.i386.rpm [root@linux-client root]# ln -s /usr/java/j2re1.4.1_06/bin/java /opt/terraspring/lib/java |
Install and configure the CLB modules (if required).
If the server blade is to be part of a Sun Fire blade platform with content load-balancing capabilities (Sun Fire B10n series), type the following commands to install and configure the CLB modules:
[root@linux-client root]# rpm -i sunclb-admin-1.36-1.i386.rpm [root@linux-client root]# rpm -i sunclb-k2_4_9_e_3smp-1.36-1.i386.rpm [root@linux-client root]# rpm -i sunclb-k2_4_9_e_3-1.36-1.i386.rpm [root@linux-client root]# ln -s /etc/init.d/sun-clb /etc/rc3.d/S99sunclb |
Specify secondary Ethernet interfaces
Determine the NIC driver present on the system (for example, snet, ce, bge) and write the names of all the secondary interfaces (for example, snet1, ce1, bge1) to the file /etc/opt/terraspring/managed_interfaces. The following example shows a single secondary interface of snet1:
[root@linux-client root ]#cat /etc/opt/terraspring/managed_interfaces snet1 [root@linux-client root ]# |
Halt the resource pool server.
[root@linux-client root ]#/sbin/shutdown -h now |
The blade is now ready for snapshot.
Return to the image wizard and complete the last two steps in To Create a Linux Image (High-Level Task), starting with Step 9.
This section would contain corrections to errors in the N1 Provisioning Server manuals. At present, there are no known corrections.