Creating class Files

A class file is a text file that defines how to install the Solaris software on a system. Every rule in the rules file specifies a class file that defines how a system is installed when the rule is matched. You usually create a different class file for every rule; however, the same class file can be used in more than one rule. Please note that Sun will sometimes refer to this file as a profile.

A class file consists of one or more class file keywords (which are described in the following sections). Each class file keyword is a command that controls one aspect of how the Solaris installation program installs the Solaris software on a system. Use the vi editor (or any other text editor) to create a class file in the JumpStart configuration directory on the configuration server. You can create a new class file or edit one of the sample profiles located in /cdrom/cdrom0/s0/Solaris_9/Misc/jumpstart_sample on the Solaris CD-ROM. The class file can be named anything, but it should reflect the way in which it installs the Solaris software on a system. Sample names are basic_install, eng_profile, and accntg_profile.

A class file must have the following:

  • The install_type keyword as the first entry

  • Only one keyword on a line

  • The root_device keyword if the systems being upgraded by the class file have more than one root file system that can be upgraded

A class file allows the following:

  • A comment after the pound sign (#) anywhere on a line. If a line begins with a #, the entire line is a comment. If a # is specified in the middle of a line, everything after the # is considered a comment.

  • Blank lines.

The class file is made up of keywords and their values. They are described in the following sections.

archive location

The archive_location keyword defines where a Web Start Flash archive is stored. As stated in Chapter 8, “Web Start,” this Flash archive can be stored in any one of the following locations for later retrieval:

  • NFS server

  • HTTP server

  • FTP server

  • Local tape

  • Local device

  • Local file

The syntax for the archive_location keyword is as follows:

archive_location <retrieval_type> <location> 

How you specify values for <retrieval_type> and <location> depends on where the Web Start Flash archive is stored. I’ve defined the syntax for each in the following sections.

NFS Server

When the archive is stored on an NFS server, the syntax is as follows:

archive_location <nfs server_name>:</path/filename> retry <n> 

server_name is the name of the server where the archive is stored. The /path/filename is broken down as follows:

path is the path to the location on the server where the archive is stored. filename is the name of the Web Start Flash archive. retry is an option keyword followed by a value <n> that specifies the maximum number of times the Web Start Flash utilities will attempt to mount the archive if the first attempt fails.

Here are a couple of examples of how to use the archive_location keyword to specify an archive located on an NFS server:

archive_location nfs zeus:/webarchives/usrarchive 

archive_location nfs://zeus/webarchives/usrarchive

HTTP Server

When the archive is stored on an HTTP server, the syntax is as follows:

archive_location http://<server_name>:<port> <path/filename> [optional keywords] 

Where:

server_name is the name of the server where the archive is being stored. server_name can be a port number or the name of a TCP service that has a port number that is determined at runtime.

port is where you can specify an optional port in addition to the server_name. If you do not specify a port, the Web Start Flash installation utilities use the default HTTP port number, 80.

The /path/filename is broken down as follows: path is the path to the location on the server where the archive is stored. filename is the name of the Web Start Flash archive.

optional_keywords are the optional keywords listed in Table 7.5 that you can specify when you retrieve a Web Start Flash archive from an HTTP server.

Table 7.5. Option Keywords for archive_location on an HTTP Server
Option Keywords Description
auth basic <user_name> <password> The auth_basic option enables you to specify the name and password if the archive is located on an HTTP server that is password protected.
timeout <min> The timeout keyword enables you to specify, in minutes, the maximum length of time to wait for the HTTP server to respond before the connection is closed, reopened, and resumed from the point at which the timeout occurred. If you specify a timeout value of 0 (zero), the connection is not reopened. If a timeout reconnection occurs, the Web Start Flash installation utilities attempt to resume the installation at the last-known position in the archive. In the event that the installation cannot resume from the last-known position, the retrieval will start over from the beginning of the archive.
proxy <host>:<port> The proxy keyword enables you to specify a proxy host and proxy port to retrieve a Web Start Flash archive from the other side of a firewall. A proxy port must be specified when using this option.

Here are a couple examples of how to use the archive_location keyword to specify an archive located on an HTTP server:

archive_location http://pyramid/webarchives/usrarchive.flar timeout 5 

Here’s an example of the auth_basic keyword:

archive_location http://pyramid/webarchives/usrarchive.flar timeout 5  
auth_basic bcalkins mypasswd

FTP Server

When the archive is stored on an FTP server, the syntax is as follows:

archive_location ftp://<username>:<password>@<servername>:<port>  
<path/filename> [optional_keywords] 

Where:

username:password is the username and password required to access the FTP server.

servername is the name of the server where the archive is stored. servername can be a port number or the name of a TCP service that has a port number that is determined at runtime.

port enables you to specify an optional port. If you do not specify a port, the Web Start Flash installation utilities use the default FTP port number, 21. The /path/filename is broken down as follows:

path is the path to the location on the server where the archive is stored. filename is the name of the Web Start Flash archive.

optional_keywords are the optional keywords listed in Table 7.6 that you can specify when you retrieve a Web Start Flash archive from an FTP server.

Table 7.6. Option Keywords for archive_location on an FTP Server
Option Keyword Description
timeout <min> The timeout keyword enables you to specify, in minutes, the maximum length of time to wait for the FTP server to respond before the connection is closed, reopened, and resumed from the point at which the timeout occurred. If you specify a timeout value of 0 (zero), the connection is not reopened. If a timeout reconnection occurs, the Web Start Flash installation utilities attempt to resume the installation at the last-known position in the archive. In the event that the installation cannot resume from the last-known position, the retrieval will start over from the beginning of the archive.
proxy <host>:<port> The proxy keyword enables you to specify a proxy host and a proxy port to retrieve a Web Start Flash archive from the other side of a firewall. A proxy port must be specified when using this option.

Here is an for example of how to use the archive_location keyword to specify an archive located on an FTP server:

archive_location ftp://bcalkins:mypasswd@pyramid/webarchives/usrarchive.flar timeout 5 

Local Tape

When the archive for is stored on tape and is accessible via the local tape drive, the syntax is as follows:

archive_location local_tape <device> <position>
							

Where:

device is the name of the local tape drive.

position is where you specify the position of the archive on the tape. If you do not supply a position, the Web Start Flash installation utilities retrieve the archive from the current position on the tape drive. The begin script or a sysidcfg file can be located on other positions on the tape before the archive.

Here is an example of how to use the archive_location keyword to specify an archive located on a local tape. We’ll be specifying the local tape named /dev/rmt/0n (no rewind device), tape position 5:

archive_location local_tape /dev/rmt/0n 5 

Local Device

When the archive is stored on a local disk (hard drive or CD-ROM), the syntax is as follows:

archive_location local_device <device> <path/filename> <filesystem_type> 

device is the name of the disk drive where you stored the archive. The /path/filename is broken down as follows:

path is the path to where the archive is stored.

filename is the name of the Web Start Flash archive.

file_system_type specifies the type of file system that the archive is stored on. If you do not supply a file system type, the Web Start Flash installation utilities will try to mount a UFS file system by default. If the UFS mount fails, the Web Start Flash installation utilities attempt to mount an HSFS file system.

Here is an example of how to specify an archive located on a local disk (UFS file system):

archive_location local_device c0t0d0s0 /webarchives/usrarchive

Local File

You can retrieve an archive that you stored in the miniroot from which you booted. When you perform a custom JumpStart installation, you boot the system from a CD-ROM or an NFS-based miniroot. The installation software is loaded and run from this miniroot. Therefore, a Web Start Flash archive that you stored in the CD-ROM or NFS-based miniroot is accessible as a local file. Use the following syntax for the archive_location keyword:

archive_location local_file <path/filename> 

The /path/filename is broken down as follows:

path is the path to the location of the archive.

filename is the name of the Web Start Flash archive.

To use an archive that is located in the local directory named /webarchives /usrarchive, use the following syntax:

archive_location local_file /webarchives/usrarchive

backup_media

backup_media defines the medium used to back up file systems if they need to be reallocated during an upgrade because of space problems. If multiple tapes or disks are required for the backup, you are prompted to insert these during the upgrade. Here is the backup_media syntax:

backup_media <type> <path>
						

type can be one of the keywords listed in Table 7.7.

Table 7.7. backup_media Keywords
Keyword Description
local_tape Specifies a local tape drive on the system being upgraded. The <path> must be the character (raw) device path for the tape drive, such as /dev/rmt/0.
local_diskette Specifies a local diskette drive on the system being upgraded. The <path> is the local diskette, such as /dev/rdiskette0. The diskette must be formatted.
local_filesystem Specifies a local file system on the system being upgraded. The <path> can be a block device path for a disk slice or the absolute <path> to a file system mounted by the /etc/vfstab file. Examples of <path> are /dev/dsk/c0t0d0s7 and /home.
remote_filesystem Specifies an NFS file system on a remote system. The <path> must include the name or IP address of the remote system (host) and the absolute <path> to the NFS file system. The NFS file system must have read/write access. A sample <path> is sparc1:/home.
remote_system Specifies a directory on a remote system that can be reached by a remote shell (rsh). The system being upgraded must have access to the remote system through the remote system’s .rhosts file. The <path> must include the name of the remote system and the absolute path to the directory. If a user login is not specified, the login is tried as root. A sample <path> is bcalkins@sparcl:/home.

Here are some examples:

  • backup_media local_tape /dev/rmt/0

  • backup_media local_diskette /dev/rdiskette0

  • backup_media local_filesystem /dev/dsk/c0t3d0s7

  • backup_media local_filesystem /export

  • backup_media remote_filesystem sparc1:/export/temp

  • backup_media remote_system bcalkins@sparc1:/export/temp

backup_media must be used with the upgrade option only when disk space reallocation is necessary.

boot_device

boot_device designates the device where the installation program installs the root file system and consequently what the system’s startup device is. The EEPROM value also lets you update the system’s EEPROM if you change its current startup device so that the system can automatically start up from the new startup device. Here’s the boot_device syntax:

boot_device <device> <eeprom>
						

The device and eeprom values are described in Table 7.8.

Table 7.8. boot_device Keywords
Keyword Description
<device> Specifies the startup device by specifying a disk slice, such as c0t1d0s0. It can be the keyword existing, which places the root file system on the existing startup device, or the keyword any, which lets the installation program choose where to put the root file system.
<eeprom> Specifies whether you want to update the system’s EEPROM to the specified startup device. <eeprom> specifies the value update, which tells the installation program to update the system’s EEPROM to the specified startup device, or preserve, which leaves the startup device value in the system’s EEPROM unchanged. An example is boot_device c0t1d0s0 update.

The installation program installs the root file system on c0t1d0s0 and updates the EEPROM to start up automatically from the new startup device.

client_arch

client_arch indicates that the OS server supports a platform group other than its own. If you do not specify client_arch, any diskless client or Solstice AutoClient system that uses the OS server must have the same platform group as the server. client_arch can be used only when system_type is specified as the server. You must specify each platform group that you want the OS server to support. Here’s the client_arch syntax:

client_arch karch_value [karch_value...] 

Values for karch_value include sun4m, sun4u, and i86pc. Here’s an example:

client_arch sun4m 

client_root

client_root defines the amount of root space, in megabytes, to allocate for each client. If you do not specify client_root in a server’s profile, the installation software automatically allocates 15MB of root space per client. The size of the client root area is used in combination with the num_clients keyword to determine how much space to reserve for the /export/root file system. Here’s the syntax:

client_root <root_size> 

root_size is specified in megabytes. Here’s an example:

client_root 20 

Note

When allocating root space, 20MB is an adequate size. 15MB is the minimum size required. Any more than 20MB is just wasting disk space.


client_swap

client_swap defines the amount of swap space, in megabytes, to allocate for each diskless client. If you do not specify client_swap, 32MB of swap space is allocated. Physical memory plus swap space must be a minimum of 32MB. If a class file does not explicitly specify the size of swap, the Solaris installation program determines the maximum size that the swap file can be based on the system’s physical memory. The Solaris installation program makes the size of swap no more than 20 percent of the disk where it resides, unless there is free space left on the disk after the other file systems are laid out.

Note

The client_swap keyword can only be used when system_type is specified as server.


Here’s the syntax:

client_swap <swap_size> 

swap_size is specified in megabytes. Here’s an example:

client_swap 64 

This example specifies that each diskless client has a swap space of 64MB.

cluster

cluster designates which software group to add to the system. The software groups are listed in Table 7.9.

Table 7.9. Software Groups
Software Group group_name
Core SUNWCreq
End-user system support SUNWCuser
Developer system support SUNWCprog
Entire distribution SUNWCall
Entire distribution plus OEM support SUNWCXall (SPARC-based systems only)

You can specify only one software group in a profile, and it must be specified before other cluster and package entries. If you do not specify a software group with cluster, the end-user software group, SUNWCuser, is installed on the system by default. Here is cluster’s syntax:

cluster <group_name> 

Here’s an example:

cluster SUNWCall 

This example specifies that the entire distribution group should be installed.

The cluster keyword can also be used to designate whether a cluster should be added to or deleted from the software group that was installed on the system. add and delete indicate whether the cluster should be added or deleted. If you do not specify add or delete, add is set by default. Here’s the syntax:

cluster <cluster_name> [add | delete] 

<cluster_name> must be in the form SUNWCname. To view detailed information about clusters and their names, start AdminTool on an installed system and choose Browse, Software.

dontuse

dontuse designates one or more disks that you don’t want the Solaris installation program to use. By default, the installation program uses all the operational disks on the system. disk_name must be specified in the form c?t?d? or c?d?, such as c0t0d0. Here’s the syntax:

dontuse disk_name [disk_name...] 

Here’s an example:

dontuse c0t0d0 c0t1d0 

Note

You cannot specify the usedisk keyword and the dontuse keyword in the same class file.


filesys

filesys sets up the installed system to mount remote file systems automatically when it starts up. You can specify filesys more than once. The following syntax describes using filesys to set up mounts to remote systems:

filesys <server>:<path> <server_address> <mount_pt_name> [mount_options] 

The filesys keywords are described in Table 7.10.

Table 7.10. filesys Keywords
Keyword Description
<server>: The name of the server where the remote file system resides. Don’t forget to include the colon (:).
<path> The remote file system’s mount point name.
<server_address> The IP address of the server specified in <server>:<path>. If you don’t have a name service running on the network, this value can be used to populate the /etc/hosts file with the server’s IP address, but you must specify a minus sign (–).
<mount_pt_name> The name of the mount point on which the remote file system will be mounted.
[mount_options] One or more mount options that are added to the /etc/vfstab entry for the specified <mount_pt_name> . If you need to specify more than one mount option, the mount options must be separated by commas and no spaces. An example is ro,quota.

Here’s an example:

filesys zeus:/export/home/user1 192.9.200.1 /home ro,bg,intr 

filesys can also be used to create local file systems during the installation by using this syntax:

filesys <slice> <size> [file_system] [optional_parameters] 

The values listed in Table 7.12 can be used for <slice>.

Table 7.11. <slice> Values
Value Description
any This variable tells the installation program to place the file system on any disk.
c?t?d?s? or c?d??z The disk slice where the Solaris installation program places the file system, such as c0t0d0s0.
rootdisk.sn The variable that contains the value for the system’s root disk, which is determined by the Solaris installation program. The sn suffix indicates a specific slice on the disk.

The values listed in Table 7.12 can be used for <size>.

Table 7.12. <size> Values
Value Description
num The size of the file system in megabytes.
existing The current size of the existing file system.
auto The size of the file system is determined automatically, depending on the selected software.
all The specified slice uses the entire disk for the file system. When you specify this value, no other file systems can reside on the specified disk.
free The remaining unused space on the disk is used for the file system.
<start>:<size> The file system is explicitly partitioned. <start> is the cylinder where the slice begins, and <size> is the number of cylinders for the slice.

file_system is an optional field when slice is specified as any or c?t?d?s?. If file_system is not specified, unnamed is set by default, but you can’t specify the optional_parameters value.

The values listed in Table 7.13 can be used for file_system.

Table 7.13. file_system Values
Value Description
<mount_pt_name> The file system’s mount point name, such as /opt.
<swap> The specified slice is used as swap.
<overlap> The specified slice is defined as a representation of the whole disk. overlap can be specified only when <size> is existing, all,or start:size.
<unnamed> The specified slice is defined as a raw slice, so the slice does not have a mount point name. If file_system is not specified, unnamed is set by default.
<ignore> The specified slice is not used or recognized by the Solaris installation program. This can be used to ignore a file system on a disk during an installation so that the Solaris installation program can create a new file system on the same disk with the same name. ignore can be used only when existing partitioning is specified.

In the following example, the size of swap is set to 64MB, and it is installed on c0t3d0s1:

filesys                  c0t3d0s1 64 swap 

In the next example, /usr is based on the selected software, and the installation program determines what disk to put it on when you specify the any value:

filesys                  any auto /usr 

The optional_parameters field can be one of the options listed in Table 7.14.

Table 7.14. optional_parameters Options
Option Description
preserve The file system on the specified slice is preserved. preserve can be specified only when size is existing and slice is c?t?d?s?.
mount_options One or more mount options that are added to the /etc/vfstab entry for the specified mount_pt_name.

install_type

install_type specifies whether to perform the initial installation option or the upgrade option on the system. install_type must be the first class file keyword in every profile. Here’s the syntax:

install_type [initial_install | upgrade] 

Select either initial_install or upgrade. Here’s an example:

install_type initial_install

geo

The geo keyword followed by a locale designates the regional locale or locales you want to install on a system (or to add when upgrading a system). The syntax is as follows:

geo <locale> 

Values you can specify for locale are listed in Table 7.15.

Table 7.15. locale Values
Value Description
N_Africa Northern Africa, including Egypt
C_America Central America, including Costa Rica, El Salvador, Guatemala, Mexico, Nicaragua, Panama
N_America North America, including Canada, United States
S_America South America, including Argentina, Bolivia, Brazil, Chile, Colombia, Ecuador, Paraguay, Peru, Uruguay,Venezuela
Asia Asia, including Japan, Republic of Korea, Republic of China, Taiwan, Thailand
Ausi Australasia, including Australia, New Zealand
C_Europe Central Europe, including Austria, Czech Republic, Germany, Hungary, Poland, Slovakia, Switzerland
E_Europe Eastern Europe, including Albania, Bosnia, Bulgaria, Croatia, Estonia, Latvia, Lithuania, Macedonia, Romania, Russia, Serbia, Slovenia, Turkey
N_Europe Northern Europe, including Denmark, Finland, Iceland, Norway, Sweden
S_Europe Southern Europe, including Greece, Italy, Portugal, Spain
W_Europe Western Europe, including Belgium, France, Great Britain, Ireland, Netherlands
M_East Middle East, including Israel

Refer to the Solaris 9 Advanced Installation Guide for a complete listing of locale values.

Here’s an example in which the locale specified is S_America:

geo S_America

isa_bits

The isa_bits keyword specifies whether 64-bit or 32-bit Solaris 9 packages are to be installed. The syntax is as follows:

isa_bits <bit_switch> 

<bit_switch> represents the option 64 or 32, which you use to indicate whether 64-bit or 32-bit Solaris 9 packages are to be installed. If you do not set this keyword in the class file, JumpStart installs:

64-bit packages on UltraSPARC(TM) systems 
32-bit packages on all other systems 

For example, to specify that only 32-bit Solaris 9 packages are to be loaded, use the following entry in the class file:

isa_bits 32 

layout_constraint

layout_constraint designates the constraint that autolayout has on a file system if it needs to be reallocated during an upgrade because of space problems. layout_constraint can be used only for the upgrade option when disk space reallocation is required.

With layout_constraint, you specify the file system and the constraint you want to put on it. Here’s the syntax:

layout_constraint <slice> <constraint> [minimum_size]
						

The <slice> field specifies the file system disk slice on which to specify the constraint. It must be specified in the form c?t?d?s? or c?d?s?. Table 7.16 describes the options for layout_constraint.

Table 7.16. layout_constraint Options
Option Description
changeable Autolayout can move the file system to another location and can change its size. You can change the file system’s size by specifying the minimum_size value. When you mark a file system as changeable and minimum_size is not specified, the file system’s minimum size is set to 10 percent greater than the minimum size required. For example, if the minimum size for a file system is 100MB, the changed size would be 110MB. If minimum_size is specified, any free space left over (the original size minus the minimum size) is used for other file systems.
movable Autolayout can move the file system to another slice on the same disk or on a different disk, and its size stays the same.
available Autolayout can use all the space on the file system to reallocate space. All the data in the file system is then lost. This constraint can be specified only on file systems that are not mounted by the /etc /vfstab file.
collapse Autolayout moves (collapses) the specified file system into its parent file system. You can use this option to reduce the number of file systems on a system as part of the upgrade. For example, if the system has the /usr and /usr/openwin file systems, collapsing the /usr/openwin file system would move it into /usr (its parent).
minimum_size This value lets you change the size of a file system by specifying the size you want it to be after autolayout reallocates. The size of the file system might end up being more if unallocated space is added to it, but the size is never less than the value you specify. You can use this optional value only if you have marked a file system as changeable. The minimum_size cannot be less than the file system needs for its existing contents.

The following are some examples:

layout_constraint c0t3d0s1 changeable 200 

The file system c0t3d0s1 can be moved to another location, and its size can be changed to more than 200MB but no less than 200MB.

layout_constraint c0t0d0s4 movable 

The file system on slice c0t0d0s4 can move to another disk slice, but its size stays the same.

layout_constraint c0t2d0s1 collapse 

c0t2d0s1 is moved into its parent directory to reduce the number of file systems.

locale

locale designates which language or locale packages should be installed for the specified locale_name.A locale determines how online information is displayed for a specific language or region, such as date, time, spelling, and monetary value. Therefore, if you want English as your language but you also want to use the monetary values for Australia, you would choose the Australia locale value (en_AU) instead of the English language value (C).

The English language packages are installed by default. You can specify a locale keyword for each language or locale you need to add to a system. Here’s the locale syntax:

locale locale_name
						

Here’s an example:

locale es 

This example specifies Spanish as the language package you want installed.

num_clients

When a server is installed, space is allocated for each diskless client’s root (/) and swap file systems. num_clients defines the number of diskless clients that a server supports. If you do not specify num_clients, five diskless clients are allocated. Here’s the syntax:

num_clients client_num
						

Here’s an example:

num_clients 10 

In this example, space is allocated for 10 diskless clients.

package

package designates whether a package should be added to or deleted from the software group installed on the system. add or delete indicates the action required. If you do not specify add or delete, add is set by default. Here’s the syntax:

package package_name [add | delete] 

package_name must be in the form SUNWname . Here’s an example:

package SUNWxwman delete 

In this example, SUNWxwman (X Window online man pages) is not installed on the system.

partitioning

partitioning defines how the disks are divided into slices for file systems during the installation. If you do not specify partitioning, the default is set. Here’s the syntax:

partitioning default|existing|explicit 

The partitioning options are described in Table 7.17.

Table 7.17. partitioning Options
Option Description
default The Solaris installation program selects the disks and creates the file systems where the specified software is installed. Except for any file systems specified by the filesys keyword, rootdisk is selected first. Additional disks are used if the specified software does not fit on rootdisk.
existing The Solaris installation program uses the existing file systems on the system’s disks. All file systems except /, /usr, /opt, and /var are preserved. The installation program uses the last mount point field from the file system superblock to determine which file system mount point the slice represents. When you specify the filesys class file keyword with partitioning, existing must be specified.
explicit The Solaris installation program uses the disks and creates the file systems specified by the filesys keywords. If you specify only the root (/) file system with the filesys keyword, all the Solaris software is installed in the root file system. When you use the explicit class file value, you must use the filesys class file keyword to specify which disks to use and what file systems to create.

root_device

root_device designates the system’s root disk. Here’s the syntax:

root_device <slice> 

Here’s an example:

root_device c0t3d0s2 

system_type

system_type defines the type of system being installed. If you do not specify system_type in a class file, standalone is set by default. Here’s the syntax:

system_type [standalone | server] 

Here’s an example:

system_type server 

usedisk

usedisk designates one or more disks that you want the Solaris installation program to use when the partitioning default is specified. By default, the installation program uses all the operational disks on the system. disk_name must be specified in the form c?t?d? or c?d?, such as c0t0d0. If you specify the usedisk class file keyword in a class file, the Solaris installation program uses only the disks that you specify. Here’s the syntax:

usedisk disk_name [disk_name] 

Here’s an example:

usedisk c0t0d0 c0t1d0 

Note

You cannot specify the usedisk keyword and the dontuse keyword in the same class file.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset