System Administration Guide, Volume I

How to Add a Package to a Diskless or AutoClient System's root (/) File System

When you add a package to a diskless or AutoClient system, you don't actually install the package on the client. Instead, you add the package to the client's root file system, which resides on a server. A diskless or AutoClient system's root file system is typically in /export/root/hostname on the server.


Note -

If the package's files are installed into the /usr file system, you need to install the package on the server. If you are working in a homogeneous client/server environment, use Table 17-2 to determine how to install the package. If you are working in a heterogeneous client/server environment, use Table 17-3 to determine how to install the package.


  1. Log in to the server as superuser.

  2. Remove any already installed packages with the same names as the ones you are adding.

    This ensures that the system keeps a proper record of software that has been added and removed. There may be times when you want to maintain multiple versions of the same application on the system. For strategies on how to do this, see "Guidelines for Removing Packages", and for task information, see "How to Remove a Diskless or AutoClient System's Package".

  3. Add a software package to the client system's root (/) file system.


    server# pkgadd -R rootpath -d device-name pkgid ...

    -R rootpath

    Specifies the path name of the client's root file system. 

    -d device-name

    Specifies the absolute path to the software packages. device-name can be the path to a device, a directory, or a spool directory. If you do not specify the path where the package resides, the pkgadd command checks the default spool directory (/var/spool/pkg). If the package is not there, the package installation fails.

    pkgid

    (Optional) Is the name of one or more packages (separated by spaces) to be installed. If omitted, pkgadd installs all available packages.


    Caution - Caution -

    During the installation, you may see the following message: WARNING: filename <not present on Read Only file system>

    This indicates that not all of the package's files have been installed. The client may not have access to all files necessary for the software to work correctly. If you see this warning message, you must also install the package on the server as well as the client's root file system.


  4. Verify the package has been installed by logging in to the server as superuser and using the pkginfo command.


    server# pkginfo -R rootpath | egrep pkgid
    

    The pkginfo command returns a line of information about the installed pkgid. If pkgid is not installed, pkginfo returns the system prompt.

  5. Verify that the package has been installed successfully using the pkgchk command.


    server# pkgchk -R rootpath -v pkgid
    

    If pkgchk determines there are no errors, it returns a list of installed files. Otherwise, it reports the error.

Example--Installing a Package From a Mounted CD to a Diskless Client's Root File System


Note -

The name of this release is Solaris 7 but code and path or package path names may use Solaris 2.7 or SunOS 5.7. Always follow the code or path as it is written.


The following example shows a command to install the SUNWadmr (software to support system and network administration) package from a server onto a diskless client's root file system. In this case, the diskless client's root file system is /export/root/client-1. This example assumes the SUNWadmr package is available from a mounted SPARC 2.7 Solaris CD (/cdrom/cdrom0/s0/Solaris_2.7/Product). The example also shows use of pkginfo and pkgchk to verify that the package's files were installed properly.


server# pkgadd -R /export/root/client-1 
-d /cdrom/cdrom0/s0/Solaris_2.7/Product SUNWadmr
			.
			.
			.
Installation of <SUNWadmr> complete.
server# pkginfo -R /export/root/client-1 | egrep SUNWadmr
system			SUNWadmr			System & Network Administration Root
server# pkgchk -v -R /export/root/client-1 SUNWadmr
/etc
/etc/init.d
/etc/init.d/autoinstall
/etc/init.d/sysid.net
/etc/init.d/sysid.sys
/etc/rc2.d
/etc/rc2.d/S30sysid.net
/etc/rc2.d/S71sysid.sys
/etc/rc2.d/S72autoinstall
/sbin
/sbin/bpgetfile

Example--Installing a Package From a Package Server to a Diskless Client's Root File System

The following example shows a command to install the SUNWcg6 package from a server onto a diskless client's root file system. In this case, the diskless client's root file system is /export/root/client-2. This example assumes the SUNWcg6 package is available from a package server on the network (/net/package-server/latest-packages).


server# pkgadd -R /export/root/client-2
-d /net/package-server/latest-packages SUNWcg6
		.
		.
		.
Installation of <SUNWcg6> complete.