Messages in cipher reflected in the looking glass

http://blogs.sun.com/thaniwa/date/20070501 2007年 5月 01日 火曜日

(EN) Diskless Solaris x86 Part 1 : Setup Diskless Solaris Environment

The support of the diskless client environment with Solaris is being offered from Solaris 8.
Of course, the diskless client environment can be used also with Solaris10.
I think that I write test results of diskless client with Solaris in several times.
The first time is about building diskless client enviroments.
Test environments are Sun Fire X4200 M2 as server (Hostname : x4200m2) and Sun Java Workstation W1100Z as client (Hostname : w1100z).

You can see documents about diskless client on docs.sun.com :
Solaris 10 System Administrator Collection >> System Administration Guide: Basic Administration >> Chapter 7. Managing Diskless Clients (Tasks)
URL : http://docs.sun.com/app/docs/doc/817-1985/6mhm8o5mf?a=view

0. Preparing for Managing Diskless Clients

The followings are informations of test environment of the diskless client system.

  • OS = Solaris 10 11/06
  • platform of diskless client = i386.i86pc.Solaris_10 (instruction-set.machine-class.Solaris-version)
  • Solaris image for installation : /export/install/sol_10_1106_x86
  • OS image for diskless client
    • root(/) = /export/root
    • swap = /export/swap
    • /usr = /export/Solaris_10/usr_i386.all/usr (/export/exec/Solaris_10_i386.all/usr)
    • /opt = /export/Solaris_10/opt
  • locale = ja

1. Setting up the install server

First step of building diskless client is setting up of the install server.
The way to set up the install server with Solaris 10 11/06 DVD is as follows. The command to set up of the install server is setup_install_server, this command is in the Solaris_10/Tools directory in DVD.

# mkdir -p /export/install/sol_10_1106_x86
# cd /cdrom/sol_10_1106_x86/Solaris_10/Tools
# ./setup_install_server /export/install/sol_10_1106_x86
Verifying target directory...
Calculating the required disk space for the Solaris_10 product
Calculating space required for the installation boot image
Copying the CD image to disk...


2. install OS image for diskless client

The next step is installation of the OS image for diskless client.
Before installation, you have to change the value of LANG to "C" in /etc/default/init .

LANG=C
#LANG=ja

The command to set up the diskless client environment is /usr/sadm/bin/smosservice . Before use this command, you have to set JAVA_HOME and LD_LIBRARY_PATH as follows.

# JAVA_HOME="/usr/j2se" ; export JAVA_HOME
# LD_LIBRARY_PATH="/usr/sadm/lib/wbem:/usr/snadm/lib" ; export LD_LIBRARY_PATH

After that, install OS image for diskless client by "smosservice add" .
The option used is as follows.

  • -H host:port : host of SMC which manage diskless client information (x4200m2:898)
  • -o os_server : server which has OS image ( x4200m2 )
  • -x mediapath=path : directory of the install image ( /export/install/sol_10_1106_x86 )
  • -x platform=platform : platform of the diskless client ( i386.i86pc.Solaris_10 )
  • -x cluster=cluster : cluster of the installation ( SUNWCXall )
  • -x locale=locale : locale ( ja )

# /usr/sadm/bin/smosservice add -H x4200m2:898 -- -o x4200m2 -x \
mediapath=/export/install/sol_10_1106_x86 -x 
platform=i386.i86pc.Solaris_10 \ 
-x cluster=SUNWCXall -x locale=ja
Authenticating as user: root

Type /? for help, pressing  accepts the default denoted by [ ]
Please enter a string value for: password ::
Loading Tool: com.sun.admin.osservermgr.cli.OsServerMgrCli from x4200m2:898
Login to x4200m2 as user root was successful.
Download of com.sun.admin.osservermgr.cli.OsServerMgrCli from x4200m2:898 was successful.

memo

Use smossservice command when you want to delete OS image for diskless client. In this case, run smosservice command with "delete" like a following line.

# /usr/sadm/bin/smosservice delete -H x4200m2:898 -- -x rmplatform=i386.all.Solaris_10

3. Installation of the packages which are not installed by "smosservice add"

"smosservice add" does not install some packages. As for these packages, ARCH=all is set as architecture type of it.
So, if you want to need these packages, you have to install these package by yourself. In the manual on docs.sun.com, BASEDIR of the packages, which was not installed, is root(/) or /usr , but the packages, which BASEDIR is /opt, also was not installed.
You can find the packages, which was not installed, by the following command.

# cd /export/install/sol_10_1106_x86/Solaris_10/Product
# find ./ -name pkginfo -exec grep -w ARCH=all {} /dev/null \;
./SUNWjdmk-base/pkginfo:ARCH=all
./SUNWjhdem/pkginfo:ARCH=all
./SUNWjhdev/pkginfo:ARCH=all
./SUNWjhdoc/pkginfo:ARCH=all
./SUNWjhrt/pkginfo:ARCH=all
./SUNWmlibk/pkginfo:ARCH=all

The installation directory is found by examining BASEDIR or SUNW_PKGTYPE.

# grep -w SUNW_PKGTYPE ./SUNWjdmk-base/pkginfo \ 
./SUNWjhdem/pkginfo ./SUNWjhdev/pkginfo \
./SUNWjhdoc/pkginfo ./SUNWjhrt/pkginfo ./SUNWmlibk/pkginfo
./SUNWjdmk-base/pkginfo:SUNW_PKGTYPE=usr
./SUNWjhdem/pkginfo:SUNW_PKGTYPE=usr
./SUNWjhdev/pkginfo:SUNW_PKGTYPE=usr
./SUNWjhdoc/pkginfo:SUNW_PKGTYPE=usr
./SUNWjhrt/pkginfo:SUNW_PKGTYPE=usr

# grep -w BASEDIR ./SUNWjdmk-base/pkginfo \
./SUNWjhdem/pkginfo ./SUNWjhdev/pkginfo \ 
./SUNWjhdoc/pkginfo ./SUNWjhrt/pkginfo ./SUNWmlibk/pkginfo
./SUNWjdmk-base/pkginfo:BASEDIR=/usr
./SUNWjhdem/pkginfo:BASEDIR=/usr
./SUNWjhdev/pkginfo:BASEDIR=/usr
./SUNWjhdoc/pkginfo:BASEDIR=/usr
./SUNWjhrt/pkginfo:BASEDIR=/usr
./SUNWmlibk/pkginfo:BASEDIR=/opt

Confirm whether packages are not installed or not.

# pkginfo -R /export/Solaris_10 SUNWjdmk-base \
SUNWjhdem SUNWjhdev SUNWjhdoc SUNWjhrt SUNWmlibk
ERROR: information for "SUNWjdmk-base" was not found
ERROR: information for "SUNWjhdem" was not found
ERROR: information for "SUNWjhdev" was not found
ERROR: information for "SUNWjhdoc" was not found
ERROR: information for "SUNWjhrt" was not found
ERROR: information for "SUNWmlibk" was not found

Make admin file to use it with pkgadd. The following is for packages, which are installed into /usr directory for x86 platform.

# cat >/tmp/admin_usr <<EOF
mail=
instance=unique
partial=nocheck
runlevel=nocheck
idepend=nocheck
rdepend=nocheck
space=nocheck
setuid=nocheck
conflict=nocheck
action=nocheck
basedir=/usr_i386.all
EOF

Install package as follows.

# pkgadd -R /export/Solaris_10 -a /tmp/admin_usr -d . SUNWjdmk-base

<SUNWjhrt> JavaHelp Runtime(all) 2.0,REV=2004.11.23
<SUNWjhdev> JavaHelp Development Utilities(all) 2.0,REV=2004.11.23
was not able to be installed and I got a error as follows.

No compatible version of Java is installed.
checkinstall script suspends

So, I installed SUNWjdmk-base package only.

Next, install SUNWmlibk into /opt directory of the diskless client directory.

# cat >/tmp/admin_opt <<EOF
mail=
instance=unique
partial=nocheck
runlevel=nocheck
idepend=nocheck
rdepend=nocheck
space=nocheck
setuid=nocheck
conflict=nocheck
action=nocheck
basedir=/opt
EOF

# pkgadd -R /export/Solaris_10 -a /tmp/admin_opt -d . SUNWmlibk

4. Registration of the diskless client information to the server.

Next step is the registration of the diskless client informations and make / (root) directory for the client.
At first, add host information to /etc/hosts .

192.168.0.100 w1100z

Regist informations of the diskless client by smdiskless command.

/usr/sadm/bin/smdiskless add -- -i 192.168.0.100 -e 01:02:03:04:05:06 \
-n w1100z -x os=i386.i86pc.Solaris_10 -x root=/export/root/w1100z \
-x swap=/export/swap/w1100z -x swapsize=512 -x tz=Japan -x locale=ja

The options, which are used with smdiskless command, are as follows.

  • -i : IP Address of the client
  • -e : MAC Address of the client
  • -n : Hostname of the client
  • -x os=<ostype> : OS type ( i386.i86pc.Solaris_10 )
  • -x root=<dir> : root(/) directory for the client on the server
  • -x swap=<file> : swap file path for the client on the server
  • -x swapsize=<int> : swap file size ( MBytes )
  • -x tz= : timezone ( Japan )
  • -x locale= : locale ( ja )

5. Start up of tftp server

To use diskless client environments on Solaris x86, you have to run tftp server service.

Before start up the tftp server service, change tftp part of /etc/inetd.conf as follows.

tftp dgram udp6 wait root /usr/sbin/in.tftpd in.tftpd -s /tftpboot

Start up the tftp service.

# /usr/sbin/inetconv
inetconv: Notice: Service manifest for 100235/1 already generated as /var/svc/manifest/network/rpc/100235_1-rpc_ticotsord.xml, skipped
tftp -> /var/svc/manifest/network/tftp-udp6.xml
Importing tftp-udp6.xml ...Done

You can check whether tftp server runs or not with svcs command like a following.

# svcs network/tftp/udp6
STATE          STIME    FMRI
online         17:48:28 svc:/network/tftp/udp6:default

6. Start up of dhcp server

Diskless clients for Solaris x86 needs dhcp server to boot via network. To setup dhcp server, using dhcp manager is most easy way on Solaris environment.

# /usr/sadm/admin/bin/dhcpmgr

IP address and hostname sets into /etc/hosts of server and information of diskless client. So, same hostname and IP address should be set in dhcp server. To do this, Client ID must be set 01[MAC Address of diskless client] to IP address which is lease by dhcp server.
And, add options to macro as follows for diskless client.
The field to add this option is shown in "Macro&qout; tab in the dhcpmgr (DHCP manager GUI).

BootSrvA: server-ip-address
BootFile: client-macro 

When making diskless client by smosservice, smosservice prepare BootFile for diskless client, which name is 01[MAC Address of diskless client]. Therefore, it is okey to set 01[MAC Address of diskless client] to BootFile variable.
BootFile is prepared for each diskless clients, so you want to use all these files, you have to make macro to each clients. But, in case of all diskless clients are same configurations, it is no problems that one macro is used by all client.

7. Boot the diskless client

The setting up the diskless client finished in the previous section.
You can use diskless client after boot the client via network.
When the client starts first time, it takes time to runs Solaris configuration.

And at this time, you can use CDE only (you cannot use JDS).
I will write how to use JDS(GNOME) environment in the next blog.

投稿されたコメント:

コメント
コメントは無効になっています。