Messages in cipher reflected in the looking glass
[ Yasuhiro Fujitsuki's Weblog ]
http://blogs.sun.com/thaniwa/date/20090208 2009年 2月 08日 日曜日

(EN) OpenSolaris b106 : Installation into USB Memory

OpenSolaris b106 supports to install OSes into USB memory.
The way to install OpenSolaris into USB memory is written in this content.


  1. Boot OpenSolaris with LiveCD or LiveUSB.
    In this time, does not connect USB memory, you want to install OpenSolaris, to PC.
  2. After boot OpenSolaris LiveCD/LiveUSB, connect USB memory for installation. When OpenSolaris mount usb memory automatically, unmount it.
  3. Double click Installer icon and start the Installer.
  4. Install OpenSolaris into USB memory with the Installer.

=========================================================================
Additional Infomation
In my environment, OpenSolaris often output warning message like " this device cannot boot " and reboot in the boot phase.
I have decreased the trouble by addition of the usb memory information into /kernel/drv/scsa2usb.conf .
I do not know whether this way is best way to reduce trouble or not.

The way to edit is as follows.

  1. Boot OpenSolaris with LiveUSB or LiveCD.
  2. Import rpool with -f option.

    $ zpool import -f -a
    

    A Small Tip If two or more pools named "rpool" exists in your pc, for example OpenSolaris and Solaris Express are in the same box, you can import the pool, you want to import, using pool id.
    At first, execute zpool import with no option, zpool command output pool informations, which does not be imported.
    When two or more pool exists, everything is displayed.

    $ zpool import
      pool: rpool
        id: 6178916327464335414
     state: ONLINE
    status: The pool is formatted using an older on-disk version.
    action: The pool can be imported using its name or numeric identifier, though
    	some features will not be available without an explicit 'zpool upgrade'.
    config:
    
    	rpool        ONLINE
    	  c12t0d0s0  ONLINE
    

    Second, import pool by zpool import with pool id.

    $ zpool import -f 6178916327464335414
    

  3. Change mount point of rpool/ROOT/opensolaris from / to legacy.

    $ zfs set mountpoint=legacy rpool/ROOT/opensolaris
    

  4. mount rpool/ROOT/opensolaris with mount -F zfs command.

    $ mount -F zfs rpool/ROOT/opensolaris /mnt
    

  5. Add USB memory information into /mnt/kernel/drv/scsa2usb.conf as follows.

    At first, find USB memory name by rmformat command.
    Name of the USB memory of the following sample is " PicoDUAL " .

    $ rmformat
    Looking for devices...
         1. Logical Node: /dev/rdsk/c11t0d0p0
            Physical Node: /pci@0,0/pci1462,6510@1d,7/storage@2/disk@0,0
            Connected Device: GH       PicoDUAL         PMAP
            Device Type: Removable
    	Bus: USB
    	Size: 15.3 GB
    	Label: 
    	Access permissions: 
    

    Second, execute the following command.

    $ prtconf -v > /tmp/a
    

    Third, find usb-vendor-id , usb-product-id and usb-revision-id of your USB memory.

    In this sample, usb-vendor-id is 00000a6b, usb-product-id is 0000000f and usb-revision-id is 00000110 .

                        name='usb-product-name' type=string items=1
                            value='PicoDUAL'
                        name='usb-vendor-name' type=string items=1
                            value='GH'
                        name='usb-serialno' type=string items=1
                            value='078C06810B04'
                        name='usb-raw-cfg-descriptors' type=byte items=32
                            value=09.02.20.00.01.01.00.80.64.
                            09.04.00.00.02.08.06.50.00.07.05.81.02.
                            00.02.00.07.05.02.02.00.02.00
                        name='usb-dev-descriptor' type=byte items=18
                            value=12.01.00.02.00.00.00.40.6b.0a.0f.00.10.01.01.02.03.01
                        name='usb-release' type=int items=1
                            value=00000200
                        name='usb-num-configs' type=int items=1
                            value=00000001
                        name='usb-revision-id' type=int items=1
                            value=00000110
                        name='usb-product-id' type=int items=1
                            value=0000000f
                        name='usb-vendor-id' type=int items=1
                            value=00000a6b
    

    Add USB memory information and removable=false option into attribute-override-list in /mnt/kernel/drv/scsa2usb.conf like following.

    # ANYTHING CHANGED BEFORE THIS POINT MAY BE OVERWRITTEN IN UPGRADE
    attribute-override-list = "vid=0xa6b pid=0x0f rev=* removable=true";
    


  6. umount mountpoint.

    $ umount /mnt
    

  7. Back mountpoint information to / .

    $ zfs set mountpoint=/ rpool/ROOT/opensolaris
    


=========================================================================

The followings are outputs of rmformat, zpool status.

user@opensolaris:~$ uname -a
SunOS opensolaris 5.11 snv_106 i86pc i386 i86pc Solaris
user@opensolaris:~$ cat /etc/release
                         OpenSolaris 2009.06 snv_106 X86
           Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
                        Use is subject to license terms.
                            Assembled 28 January 2009

user@opensolaris:~$ rmformat
Looking for devices...
     1. Logical Node: /dev/rdsk/c10t0d0p0
        Physical Node: /pci@0,0/pci10f7,8338@1d,7/storage@1/disk@0,0
        Connected Device: GH       PicoDUAL         PMAP
        Device Type: Removable
	Bus: USB
	Size: 15.3 GB
	Label: 
	Access permissions: 
     2. Logical Node: /dev/rdsk/c8t0d0p0
        Physical Node: /pci@0,0/pci10f7,8338@1d,7/cdrom@3/disk@0,0
        Connected Device: MATSHITA DVD-RAM UJ-823S  1.50
        Device Type: CD Reader
	Bus: USB
	Size: 
	Label: 
	Access permissions: 
user@opensolaris:~$ zpool status
  pool: rpool
 state: ONLINE
 scrub: none requested
config:

	NAME         STATE     READ WRITE CKSUM
	rpool        ONLINE       0     0     0
	  c10t0d0s0  ONLINE       0     0     0

errors: No known data errors


I was installed OpenSolaris b106 into USB memory on Panasonic Let's note W4. And, other computer (MCJ Co,.Ltd m-book P650) can boot with this usb memory. Let's note W4 is centrino technology environment, display size is 1024x768(XGA). m-book P650 is centrino 2 technology environment, and graphics chip is GeForce 9600M GT, display size is 1650x1050(WSXGA).
OpenSolaris, install into USB memory, automatically recognize graphics chip and display size and so on. I think that OpenSolaris USB Memory version is very useful!

http://blogs.sun.com/thaniwa/date/20090205 2009年 2月 05日 木曜日

(EN) How to Use VMWare Image on VirtualBox

This content is English version of (JA) Use VMWare Image on VirtualBox : http://blogs.sun.com/thaniwa/entry/ja_vmware_image_on_virtalbox .
CentOS is used in this contents though Debian is used in Japanese Version, There is no change in the way to use VMWare image.


Start VirtualBox and select "Files" -> "Virtual Media Manager"
New Window of "Virtual Media Manager" will be appeared.



Click "Add" button on the "Virtual Media Manager".
Filechooser will be appeared.



Select a VMWare image file, you want to add, on the File chooser. In this contents, select VMWare image of CentOS.



The following image shows that VirtualBox recognize CentOS VMware image.



Click "New" button on the main window of the VirtualBox and call "Create New Virtual Machine" dialog.



Select CentOS VMWare image on the "Virtual Hard Disk".



Finish the creation of the new virtual machine with VMWare image.



Run CentOS 4.3 on VirtualBox (Grub)



Run CentOS 4.3 on VirtualBox (Kudzu)



Run CentOS 4.3 on VirtualBox (Console Login)



http://blogs.sun.com/thaniwa/date/20080526 2008年 5月 26日 月曜日

(EN) Dual Boot of Solaris Express(Nevada) and OpenSolaris(Indiana)

Solaris installers allow only one Solaris partition exists in one HDD. In this situation, even if you want to install OpenSolaris(Indiana) into HDD which had already installed Solaris Express(Nevada), you have to destroy or clear existing Solaris partition.

This contents is how to install two Solaris OSes (Solaris Express/nevada and OpenSolaris/indiana) into one HDD.

Install OpenSolaris 2008.05 into HDD which has Solaris Express(nevada) partition.

I already installed Solaris Express(nevada) into my pc. My envirnments(HDD partitions) are as follows.

  • 0 : Windows XP
  • 1 : Solaris Express (Nevada)
  • 2 : FAT32 ( Shared disk for all OSes, for data exchange)
  • 3 : OpenSolaris (Indiana) <- new partition for Indiana

All partitions are basic partition, because Solaris requires partition for Solaris is basic partition.
***
Additional Information: Four basic partitions can be made into one HDD when extended partitions does not exists. ( Three basic partitions can be made into one HDD when extended partitions exists. ) And, If you already made extended partition, you cannot create new basic partition into you HDD.
***

The following image is a screenshot of OpenSolaris installer. In default, OpenSolaris installer display warning messages, and installer does not go to next step.
Installer recognize that two Solaris partitions exists in same HDD.

Sorry, comments of image are written in Japanese.



In this case, to install OpenSolaris, you have to give up to make new partition for OpenSolaris and permit to overwrite existing Solaris partition by installer, or you have to destroy existing Solaris Express partition and make new OpenSolaris partition....
However, you can install two Solaris OSes into one HDD by deceiving the installer.
The trick is changing partition number of existing Solaris Express partition while installing OpenSolaris into other partition of same HDD.
I used "Acronis PertitionExpert" to change existing Solaris Express(nevada) partition number. I changed Solaris Express partition number from 0xbf to 0xbd . After that, OpenSolaris installer recognizes Solaris Express partition to "Unknown Partition", so OpenSolaris installer recognizes No.4 partition is only one Solaris partition in the HDD.

Sorry, the characters in the following image are Japanese.



After Installed OpenSolaris, change Solaris Express partition number to original number "0xbf". When partition number is different, grub cannot read grub second stage menu. It means Solaris in this partition cannot boot.

Customize of Grub menu

To switch Solaris Express and OpenSolaris, grub second menus are in each partition. Because, Solaris partition, you want to boot, requires that target partition status is "active" when boot kernel/OSes. To use makeactive command of Grub can be change patition status to active, but, grub read grub second menu from active partition, so, when you want to boot Solaris Express, grub have to read second menu in Solaris Express partition and grub requires second menu in OpenSolaris partiotion if you want to boot OpenSolaris.

The way to switch Grub menu between Solaris Express grub second menu and OpenSolaris grub second menu are as follows.
This way requires to change Solaris Express grub second menu and OpenSolaris grub second menu.

This additional part is for Solaris Express grub second menu. (Add followings to /boot/gurb/menu.lst in Solaris Express partition. )

title Switch to OpenSolaris(Indiana) Grub Menu
  root (hd0,3)
  makeactive
  chainloader +1

It's for OpenSolaris grub second menu, add the followings to /rpool/boot/grub/menu.lst in OpenSolaris partition.

title Switch to Solaris Express(Nevada) Grub Menu 
  root (hd0,1)
  makeactive
  chainloader +1

http://blogs.sun.com/thaniwa/date/20080522 2008年 5月 22日 木曜日

(EN) log of building nxge driver(kernel module) on Debian Linux 4.0r3

It's just log of building nxge ( 1027A-Z 10Gbit Ethernet Adapter ) on Debian Linux 4.0r3 (AMD64).
Sorry, I had not test to recognize 10Gbit Ethernet by Debian Linux, because I have no card to test.

Driver source code can be downloaded at http://www.sun.com/download/products.xml?id=4653d592 .

To build nxge driver, linux-headers is required.

# apt-get install linux-headers-2.6-amd64

Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
  gcc-4.1 libssp0 linux-headers-2.6.18-6 linux-headers-2.6.18-6-amd64
  linux-kbuild-2.6.18
Suggested packages:
  gcc-4.1-doc gcc-4.1-locales libc6-dev-i386 lib32gcc1 lib32ssp0
Recommended packages:
  libc6-dev libmudflap0-dev
The following NEW packages will be installed:
  gcc-4.1 libssp0 linux-headers-2.6-amd64 linux-headers-2.6.18-6
  linux-headers-2.6.18-6-amd64 linux-kbuild-2.6.18
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/4169kB of archives.
After unpacking 27.6MB of additional disk space will be used.
Do you want to continue [Y/n]? y

Makefile is in sun_10_Gigabit_Ethernet_driver_Linux_Src_update_2.zip, but does not use this file.
The way to build is as follows.

# cd 
# mkdir nxge
# cd nxge
# unzip ../ sun_10_Gigabit_Ethernet_driver_Linux_Src_update_2.zip
# make
# make -C /usr/src/linux-headers-2.6.18-6-amd64 SUBDIRS=`pwd` modules
make: Entering directory `/usr/src/linux-headers-2.6.18-6-amd64'
  CC [M]  /home/user01/nxge/nxge_main.o
  CC [M]  /home/user01/nxge/nxge_ethtool.o
  CC [M]  /home/user01/nxge/npi.o
  CC [M]  /home/user01/nxge/npi_mac.o
  CC [M]  /home/user01/nxge/npi_ipp.o
  CC [M]  /home/user01/nxge/npi_txc.o
  CC [M]  /home/user01/nxge/npi_txdma.o
  CC [M]  /home/user01/nxge/npi_rxdma.o
  CC [M]  /home/user01/nxge/npi_fflp.o
  CC [M]  /home/user01/nxge/npi_espc.o
  CC [M]  /home/user01/nxge/npi_zcp.o
  CC [M]  /home/user01/nxge/npi_vir.o
  CC [M]  /home/user01/nxge/nxge_rxport.o
  CC [M]  /home/user01/nxge/nxge_txc.o
  CC [M]  /home/user01/nxge/nxge_fflp.o
  CC [M]  /home/user01/nxge/nxge_mac.o
  CC [M]  /home/user01/nxge/nxge_fzc.o
  CC [M]  /home/user01/nxge/nxge_param.o
  CC [M]  /home/user01/nxge/nxge_espc.o
  LD [M]  /home/user01/nxge/nxge.o
  Building modules, stage 2.
  MODPOST
  CC      /home/user01/nxge/nxge.mod.o
  LD [M]  /home/user01/nxge/nxge.ko
make: Leaving directory `/usr/src/linux-headers-2.6.18-6-amd64'
debian:/home/user01/nxge#

# install -m 644 builds/2.6.18-6-amd64/nxge.ko /lib/modules/2.6.18-6/amd64/kernel/drivers/net

# insmod /lib/modules/2.6.18-6-amd64/kernel/drivers/net/nxge.ko
# lsmod | grep nxge
nxge                  405484  0


http://blogs.sun.com/thaniwa/date/20080123 2008年 1月 23日 水曜日

(EN) xrdp 0.4.0 on Solaris Express

http://xrdp.sourceforge.net/
Xrdp is a RDP server software for linux. In default Linux environment, we can transfer X11 application with ssh -X or X protcol. Default Windows environment has no function to display X11 application (Windows requires X11 server application like cygwin-X11, reflection X and so on). To use xrdp, Windows can connect to Linux with Windows Terminal Services client.

Xrdp is for Linux, so it is not possible to compile on Solaris without change.
I wrote patches of xrdp for Solaris Express environment.


The way to apply patches except startwm.sh is as follows . startwm.sh is a shell script, if you want to use it , please overwrite /usr/local/xrdp/startwm.sh .

# gpatch -p0 < xrdp-0.4.0-ja.gdiff

The outline of xrdp-0.4.0-sxce.gdiff is as follows.

  • Changed from 'make' to 'gmake' in all Makefile.
  • Changed 'install' to '/usr/ucb/install'
  • Deleted '-ldl' option of LIBS in libxrdp/Makefile
  • Added '-D_POSIX_PTHREAD_SEMANTICS' to DEFINES and '-lsocket' to LDFLAGS in sesman/Makefile .
  • Deleted '-lpthread' flag from LDFLAGS in sesman/libscp/Makefile .
  • Added '-lsocket' to LDFLAGS in sesman/tools/Makefile .
  • Deleted g_setenv("SHELL", pw_shell, 1); from sesman/env.c
    # Sesman get Segmentation Fault to exec this line.
  • Changed xrdp_control.sh to run on Solaris.

The way to build software is as follows. (tcsh)

# setenv PATH $PATH":/usr/sfw/bin"
# setenv LD_LIBRARY_PATH /usr/lib:/usr/ccs/lib:/usr/sfw/lib
# setenv LD /usr/sfw/bin/gld
#
# gmake 
# gmake install

To run xrdp is as follows.

# /usr/local/xrdp/xrdp_control.sh start

Connected to xrdp server with rdesktop (login screen)



After logged in.



http://blogs.sun.com/thaniwa/date/20080111 2008年 1月 11日 金曜日

(EN) Running CentOS 5.1 on Soalris xvm

I tried and success to install and run CentOS 5.1 on Solaris xvm/xen.
So, I wrote logs.
I also try to install Fedora 8 onto Solaris xvm, but I got errors when installing Fedora 8 with virt-install command. virt-install seems not to support Fedora 8.

Making A Image File of CentOS

Before installing CentOS, you have to prepare servers, nfs server or http server or ftp server. And copy all files in CentOS DVD image into [nfs, http, ftp] server's directory. In this content, I used nfs server(nfs_server:/export2/soft/CentOS).
The reason of prepairing server, virt-install command, which command is used when making guest OS images, can boot from DVD iso image of linux, but installer(up by virt-install) cannot load rpm files of DVD images. Therefore, server is needed to make guest OS images.

Use virt-install command to make guest OS images.
The parameters of this test is as follows.

  • Virtual Machine Name = centos5
  • Memory for VM = 512MB
  • Image File of guest OS = /export/centos5
  • Disk size of Image File = 4GB
  • Graphics Support = no
    *** If you want to install linux, you have to set this parameter no .
    Reference : http://in.opensolaris.org/jive/thread.jspa?threadID=45427&tstart=45
  • Installer Image = nfs:nfs_server:/export2/soft/CentOS

The execution sample is as follows.

bash-3.2# virt-install
What is the name of your virtual machine? centos5
 How much RAM should be allocated (in megabytes)? 512
 What would you like to use as the disk (path)? /export/centos5
 How large would you like the disk (/export/centos5) to be (in gigabytes)? 4
 Would you like to enable graphics support? (yes or no) no
 What is the install location? nfs:nfs_server:/export2/soft/CentOS


Starting install...
Creating storage file...  100% |=========================| 4.0 GB    00:00
Creating domain...                                                 0 B 00:16
Linux version 2.6.18-53.el5xen (mockbuild@builder6.centos.org) (gcc version 4.1.
2 20070626 (Red Hat 4.1.2-14)) #1 SMP Mon Nov 12 03:26:12 EST 2007
BIOS-provided physical RAM map:
 Xen: 0000000000000000 - 0000000020800000 (usable)
0MB HIGHMEM available.

After setting parameters, virt-install load text installer as follows.

Welcome to CentOS

                   +---------+ Choose a Language +---------+
                   |                                       |
                   | What language would you like to use   |
                   | during the installation process?      |
                   |                                       |
                   |       Catalan                ^        |
                   |       Chinese(Simplified)    :        |
                   |       Chinese(Traditional)   #        |
                   |       Croatian               :        |
                   |       Czech                  :        |
                   |       Danish                 :        |
                   |       Dutch                  :        |
                   |       English                v        |
                   |                                       |
                   |                +----+                 |
                   |                | OK |                 |
                   |                +----+                 |
                   |                                       |
                   |                                       |
                   +---------------------------------------+

  <Tab>/<Alt-Tab> between elements  | <Space> selects | <F12> next screen

Select options and Install CentOS. After installation, a virtual machine reboot and appear menus.
In this menu you can set security options, SELinux and Firewall. If you want to test easily, please set disable these options. CentOS offers "system-config-securitylevel" to change security level parameters, so you can change settings later when you set enable these parameters.

xm command

xm is a command to operate virtual machines on xvm/xen.
At least, you sould know list, start, shutdown and console options to use virtual machine.

# xm start centos5

# xm list
Name                                      ID   Mem VCPUs      State   Time(s)
Domain-0                                   0   484     1     r-----    527.1
centos5                                    6   512     1     -b----     47.6

# xm console centos5
.....
CentOS release 5 (Final)
Kernel 2.6.18-53.el5xen on an i686

localhost.localdomain login:

Use X of CentOS

In default, Solaris express is not permit remote connections of X application. To change it, use svccfg command as follows.

bash-3.2# svccfg -s x11-server listprop
options                                  application
options/default_depth                    integer  24
options/server                           astring  /usr/X11/bin/Xorg
options/server_args                      astring
options/stability                        astring  Evolving
options/value_authorization              astring  solaris.smf.manage.x11
options/tcp_listen                       boolean  false
.....

bash-3.2# svccfg -s x11-server setprop options/tcp_listen = true
svc:/application/x11/x11-server

After changed, please re-start X server.
To use X application of CentOS, set DISPLAY enviromnent variable on CentOS side and run xhost command on Solaris.

# xhost + centos (on Solaris side)


# export DISPLAY=solaris:0 (on CentOS side)

Run gdm of CentOS via Xnest

The following logs are set up to use gdm of CentOS via Xnest.

At first, set parameter in /etc/gdm/custom.conf file to be able to connect gdm via network.
Red charactors in the following are added settings.
AllowRemoteRoot=true is not needed, if you do not want to log into CentOS by root user.

[daemon]
RemoteGreeter=/usr/libexec/gdmgreeter

[security]
AllowRemoteRoot=true

[xdmcp]
Enable=true

If you are using firewall, you have to change to be able to connect XDMCP(177/UDP) from other machine.

In default, CentOS run on console mode. If you want to run graphical user interface mode on default, change /etc/inittab .

[root@localhost sbin]# runlevel
N 3

[root@localhost sbin]# cat /etc/inittab
#
# inittab       This file describes how the INIT process should set up
#               the system in a certain run-level.
#
# Author:       Miquel van Smoorenburg, 
#               Modified for RHS Linux by Marc Ewing and Donnie Barnes
#

# Default runlevel. The runlevels used by RHS are:
#   0 - halt (Do NOT set initdefault to this)
#   1 - Single user mode
#   2 - Multiuser, without NFS (The same as 3, if you do not have networking)
#   3 - Full multiuser mode
#   4 - unused
#   5 - X11
#   6 - reboot (Do NOT set initdefault to this)
#
id:3:initdefault:

Of course, you can change to graphical user mode using init command.

[root@localhost sbin]# ps -ef | grep gdm

[root@localhost sbin]# init 5
[root@localhost sbin]# Intel CPU マイクロコードアップデートを適用中: [失敗]
Starting monitoring for VG VolGroup00:   2 logical volume(s) in volume group "Vo
lGroup00" monitored
[  OK  ]
readahead をバックグランドで起動中: [  OK  ]
irqbalance を起動中: [  OK  ]
anacron を起動中: [  OK  ]
readahead をバックグランドで起動中: [  OK  ]

[root@localhost sbin]# ps -ef | grep gdm
root      2231     1  0 20:29 ?        00:00:00 /usr/sbin/gdm-binary -nodaemon
root      2260     1  0 20:29 ?        00:00:00 /usr/sbin/gdm-binary -nodaemon
root      2338  1968  0 20:30 xvc0     00:00:00 grep gdm

After up gdm, you can use with Xnest as follows.

# Xnest :1 -query centos

These are screenshots of running CentOS 5.1 on Solaris Express xvm/xen, and connecting CentOS 5.1 via Xnest.




http://blogs.sun.com/thaniwa/date/20070605 2007年 6月 05日 火曜日

(EN) Diskless Solaris x86 Part 6 : Small Tips

There are small tips for making diskless clients.

Initial settings of the Diskless Clients ディスクレスクライアントの初期設定

/export/root/clone/Solaris_10/i86pc is a base dir of / (root) directory for diskless clients.
You can customize initial settings of diskless clients to edit this directory.
For example, default settings of /etc/default/init (/export/root/clone/Solaris_10/i86pc/etc/default/init ) is as follows.

TZ=PST8PDT
CMASK=022

In default, dtlogin(login menu) are in English. But, to change as follows, login menu in Japanese is shown without customize after making diskless clients by "smosservice add" .

TZ=Japan
CMASK=022
LANG=ja


root password is empty in default settings of diskless client

In default, smosservice does not set root password of the diskless client. So root password is empty in the first boot time.
But, you cannot use above-method to set password.
If you want to set password of root as default. After making diskless client by smosservice, change /etc/shadow file of the diskless client by yourself.
If you are okay that root password of diskless client is same as root password of the server, copying server's /etc/shadow to the client is easy way to set root password.

# cp /etc/shadow /export/root/w1100z/etc/shadow


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

(EN) Diskless Solaris x86 Part 5 : Add StarSuite 8 into diskless client

Part 5 is installation of StarSuite 8. Installation of StarSuite 8 for Japanese environments is written in this blog.


In general, use setup command to install, but you have to use pkgadd command to install StarSuite into diskless client environment.
Detail information is written in the manual at docs.sun.com
StarOffice 8 Collection, English >> StarOffice 8 Administration Guide >> 1. Installing StarOffice

At first, check installation directory of the package, you want to install.
Search pkginfo file of the package to find installation directory of the package. The following is example of searching installation directory of the package of StarSuite 8 for Japanese environment.

# /cdrom/office8_id2043/office/packages
# grep BASEDIR */pkginfo
SUNWstarsuite-agfafonts/pkginfo:BASEDIR=/opt/starsuite8
SUNWstarsuite-base/pkginfo:BASEDIR=/opt/starsuite8
SUNWstarsuite-calc/pkginfo:BASEDIR=/opt/starsuite8
SUNWstarsuite-core01/pkginfo:BASEDIR=/opt/starsuite8
SUNWstarsuite-core02/pkginfo:BASEDIR=/opt/starsuite8
SUNWstarsuite-core03/pkginfo:BASEDIR=/opt/starsuite8
SUNWstarsuite-core04/pkginfo:BASEDIR=/opt/starsuite8
SUNWstarsuite-core05/pkginfo:BASEDIR=/opt/starsuite8
SUNWstarsuite-core06/pkginfo:BASEDIR=/opt/starsuite8
SUNWstarsuite-core07/pkginfo:BASEDIR=/opt/starsuite8
SUNWstarsuite-core08/pkginfo:BASEDIR=/opt/starsuite8
SUNWstarsuite-core09/pkginfo:BASEDIR=/opt/starsuite8
SUNWstarsuite-desktop-int-root/pkginfo:BASEDIR=/
SUNWstarsuite-desktop-integratn/pkginfo:BASEDIR=/
SUNWstarsuite-draw/pkginfo:BASEDIR=/opt/starsuite8
SUNWstarsuite-fonts/pkginfo:BASEDIR=/opt/starsuite8
SUNWstarsuite-gallery/pkginfo:BASEDIR=/opt/starsuite8
SUNWstarsuite-gnome-integration/pkginfo:BASEDIR=/opt/starsuite8
SUNWstarsuite-graphicfilter/pkginfo:BASEDIR=/opt/starsuite8
SUNWstarsuite-impress/pkginfo:BASEDIR=/opt/starsuite8
SUNWstarsuite-ja-fonts/pkginfo:BASEDIR=/opt/starsuite8
SUNWstarsuite-ja-help/pkginfo:BASEDIR=/opt/starsuite8
SUNWstarsuite-ja-res/pkginfo:BASEDIR=/opt/starsuite8
SUNWstarsuite-ja/pkginfo:BASEDIR=/opt/starsuite8
SUNWstarsuite-javafilter/pkginfo:BASEDIR=/opt/starsuite8
SUNWstarsuite-lngutils/pkginfo:BASEDIR=/opt/starsuite8
SUNWstarsuite-math/pkginfo:BASEDIR=/opt/starsuite8
SUNWstarsuite-ooofonts/pkginfo:BASEDIR=/opt/starsuite8
SUNWstarsuite-shared-mime-info/pkginfo:BASEDIR=/usr
SUNWstarsuite-writer/pkginfo:BASEDIR=/opt/starsuite8
SUNWstarsuite-xsltfilter/pkginfo:BASEDIR=/opt/starsuite8

And check pkgmap file to find a installation dir of the package.
You can divide to four group as follows.

Packages which are installed into /opt/starsuite8 directory.

SUNWstarsuite-agfafonts
SUNWstarsuite-base
SUNWstarsuite-calc
SUNWstarsuite-core01
SUNWstarsuite-core02
SUNWstarsuite-core03
SUNWstarsuite-core04
SUNWstarsuite-core05
SUNWstarsuite-core06
SUNWstarsuite-core07
SUNWstarsuite-core08
SUNWstarsuite-core09
SUNWstarsuite-draw
SUNWstarsuite-fonts
SUNWstarsuite-gallery
SUNWstarsuite-gnome-integration
SUNWstarsuite-graphicfilter
SUNWstarsuite-impress
SUNWstarsuite-ja-fonts
SUNWstarsuite-ja-help
SUNWstarsuite-ja-res
SUNWstarsuite-ja
SUNWstarsuite-javafilter
SUNWstarsuite-lngutils
SUNWstarsuite-math
SUNWstarsuite-ooofonts
SUNWstarsuite-writer
SUNWstarsuite-xsltfilter


Packages which are installed into /usr directory (Type A).
SUNWstarsuite-shared-mime-info

Packages which are installed into /usr directory (Type B).
SUNWstarsuite-desktop-integratn

Packages which are installed into / (root) directory.
SUNWstarsuite-desktop-int-root

Make admin files for each type.
admin file for packages, which are installed into / (root) and /opt

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

admin file for packages, which are installed into /usr (Type A)

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

admin file for packages, which are installed into /usr (Type B)

# cat >/tmp/admin_usr_b <<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 packages into /opt and /usr for diskless client.

# pkgadd -a /tmp/admin_default -R /export/Solaris_10 -d . \
SUNWstarsuite-agfafonts SUNWstarsuite-base SUNWstarsuite-calc \
SUNWstarsuite-core01 SUNWstarsuite-core02 SUNWstarsuite-core03 \
SUNWstarsuite-core04 SUNWstarsuite-core05 SUNWstarsuite-core06 \
SUNWstarsuite-core07 SUNWstarsuite-core08 SUNWstarsuite-core09 \
SUNWstarsuite-draw SUNWstarsuite-fonts SUNWstarsuite-gallery \
SUNWstarsuite-gnome-integration SUNWstarsuite-graphicfilter \
SUNWstarsuite-impress SUNWstarsuite-ja-fonts SUNWstarsuite-ja-help \
SUNWstarsuite-ja-res SUNWstarsuite-ja SUNWstarsuite-javafilter \
SUNWstarsuite-lngutils SUNWstarsuite-math SUNWstarsuite-ooofonts \
SUNWstarsuite-writer SUNWstarsuite-xsltfilter

# pkgadd -a /tmp/admin_usr_a -R /export/Solaris_10 -d . SUNWstarsuite-shared-mime-info

# pkgadd -a /tmp/admin_usr_b -R /export/Solaris_10 -d . SUNWstarsuite-desktop-integratn


Install SUNWstarsuite-desktop-int-root into / (root) directory.
The following is a example to install it to / (root) directory of w1100z .(/export/root/w1100z)

First step is copy it into /tmp directory.

# cp -r SUNWstarsuite-desktop-int-root /tmp

Rewrite /tmp/SUNWstarsuite-desktop-int-root/install/checkinstall as follows. Because checkinstall script does not run in the diskless client setup.
Comment out all and set OFFICE_PATH to /opt/starsuite8 .

# Check if the core package has been installed
#COREPKG=`echo ${PKGINST} | sed 's/desktop-.*/core01/'`

#pkginfo ${PKG_INSTALL_ROOT:+'-R'} ${PKG_INSTALL_ROOT} -q ${COREPKG}
#if [ $? -ne 0 ]; then
#  echo "The ${COREPKG} package could not be found. Please install the"
#  echo "${COREPKG} package and try this installation again"
#  exit 3    # Suspend
#fi

#OFFICE_PATH=`pkginfo ${PKG_INSTALL_ROOT:+'-R'} ${PKG_INSTALL_ROOT} -r ${COREPKG}`

#cat >$1 <<!
#OFFICE_PATH=${OFFICE_PATH}
#!

OFFICE_PATH=/opt/starsuite8

exit 0

Rewrite /tmp/SUNWstarsuite-desktop-int-root/pkgmap as follows.
Because, pkgadd check correspondence files in the package before installation.

: 1 33
1 i checkinstall 522 40668 1122390176
1 i copyright 466 43035 1122390173
1 i depend 51 4532 1122390177
1 d none etc 0755 root sys
1 e build etc/mailcap 0644 root bin 3097 27993 1122390173
1 e build etc/mime.types 0644 root bin 1710 33433 1115994216
1 s none etc/starsuite8=../opt/starsuite8
1 i pkginfo 465 37950 1122390176
1 i postinstall 252 20473 1122390177
1 i space 0 0 1122390177

Changed part is as follows. (change to 522 and 40668)

1 i checkinstall 522 40668 1122390176

The following is installation error, which is gotten if pkgmap file is not rewrited.

# pkgadd -d . SUNWstarsuite-desktop-int-root

Processing package instance <SUNWstarsuite-desktop-int-root> from 

Desktop integration for StarSuite 8 (root)(i386) 8.0.0,REV=106.2005.05.23
Copyright  2003 Sun Microsystems, Inc. All rights reserved. Use is subject 
to license terms. Third-party software, including font technology, is 
copyrighted and licensed from Sun suppliers. Sun, Sun Microsystems, the 
Sun logo, Java, Solaris and StarSuite are trademarks or registered 
trademarks of Sun Microsystems, Inc. in the U.S. and other countries. 
Federal Acquisitions: Commercial Software - Government Users Subject to 
Standard License Terms and Conditions.

This appears to be an attempt to install the same architecture and
version of a package which is already installed.  This installation
will attempt to overwrite this package.

## Executing checkinstall script.
Using </> as the package base directory.
## Processing package information.
## Processing system information.
   2 package pathnames are already properly installed.
pkgadd: ERROR: packaging file </root/SUNWstarsuite-desktop-int-root/install/checkinstall> is corrupt
    file size <482> expected <522> actual
    file cksum <37893> expected <40668> actual

Installation of <SUNWstarsuite-desktop-int-root> failed (internal
error).
No changes were made to the system.

Install SUNWstarsuite-desktop-int-root into / (root) director of disklecc client.

# pkgadd -a /tmp/admin_default -R /export/root/w1100z -d . SUNWstarsuite-desktop-int-root

After installation, overwrite symbolic link as follows. Because pkgadd made the following symbolic link, but it links to wrong directory.

# cd /export/root/w1100z/etc
# rm starsuite8
# ln -sf ../opt/starsuite8 starsuite8

After that, install latest patches for StarSuite 8 as follows. In this blog, 120190-09 (Product Update 5) is used.

# patchadd -R /export/Solaris_10 120190-09
Validating patches...

Loading patches installed on the system...


Additional Information : StarSuite 8 cannot run on diskless client when latest patch is not applied.

If an initial version of StarSuite 8 is into NFS v4 server and client mount with NFS v4 client, client cannot execute StarSuite 8. StarSuite 8 outputs error message as follows.

    The application cannot be started 
    The component manager is not available 

This error does not
This bug is not seen in Product Update 5 or later.
If your environment cannot update, change nfs mount type of directory , which has StarSuite 8 binaries, to NFS v3.
Add ver=3 to option part of mounting part of /opt directory in /etc/vfstab of diskless client.

x4200m2:/export/Solaris_10/opt -       /opt    nfs     -       yes     ro,vers=3


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

(EN) Diskless Solaris x86 Part 4 : Add NVIDIA graphics driver into diskless client

Part 3 is about installation of nvidia graphics driver into diskless clients.
Diskless client(Solaris 10 x86) has no HDD, but other part is same sa PC or PC Workstation. So, if PC has nvidia's graphics card, diskless client can use OpenGL with H/W acceleration.
Nvidia graphics driver is included into Solaris Express, but it isn't included in Solaris 10 x86.
To use OpenGL with 3D H/W acceleration on Solaris 10 x86 system, you have to install nvidia graphics driver into your Solaris 10 x86.

Overview of the addition of packages

First, the method of adding the package explains.
Pkgadd command is used to add the package in Solaris.
When installing packages into a diskless client, use -R option and -a option . The following is an example of admin file to add package into Solaris for diskless client.

mail=
instance=unique
partial=nocheck
runlevel=nocheck
idepend=nocheck
rdepend=nocheck
space=nocheck
setuid=nocheck
conflict=nocheck
action=nocheck
basedir=/usr_i386.all

All of the above-mentioned content are not necessary. Most important variable is "basedir" to install packages into /usr of diskless clients.
Because /usr for diskless client is in /export/Solaris_10/usr_i386.all/usr (/export/exec/Solaris_10_i386.all/ ), and /var for diskless client is in /export/Solaris_10 .
In case of the installation directory is not /usr, it is okay that basedir is default. (basedir=default)

The adding package to /usr for diskless client is as follows. /tmp/admin is an admin file as above-mentioned.

# pkgadd -R /export/Solaris_10 -a /tmp/admin <pkg>

The following is example of adding package into / (root) directory. When adding packages into / (root), you have to add packages to all / (root) of diskless client.

# pkgadd -R /export/root/w1100z -a /tmp/admin <pkg>
# pkgadd -R /export/root/clone/Solaris_10/i86pc/ -a /tmp/admin <pkg>


You can check whether package is installed by pkginfo If you want to find where the package is installed, see pkginfo file and pkgmap file in the package directory.
Info : The last character of a lot of package, which is installed into root directory, names is r or -root.

Install nvidia graphics driver into OS image of the diskless client

Dowmload nvidia graphics driver from
http://www.nvidia.com/object/unix.html .
1.0-9755(NVIDIA-Solaris-x86-1.0-9755.run) is used this blog.

After downloading driver, uncompress this file with -x option.

# sh NVIDIA-Solaris-x86-1.0-9755.run --help
NVIDIA Software Installer for Solaris

This program is used to install and upgrade the
NVIDIA Accelerated Graphics Driver Set
for Solaris x64/x86

This program contains the driver version 1.0-9755

Available options:

    -h, --help: print this help message
    -x, --extract-only: extract the package in the current directory


# sh ./NVIDIA-Solaris-x86-1.0-9755.run -x

After uncompression, the directory name as NVIDIA-Solaris-x86-1.0-9755 is shown.

# cd NVIDIA-Solaris-x86-1.0-9755
# ls
NVDAgraphics   NVDAgraphicsr  gfx_private    install

Contents are as follows.

  • NVDAgraphics : nvidia graphics libraries installed into /usr
  • NVDAgraphicsr : kernel driver installed into /kernel
  • gfx_private : kernel module (two modules are in for Solaris 10 and Solaris 11)
  • install : script to use installation

First step is installation of the NVDAgraphics package. Before installation, make admin file for NVDAgraphics as follows. (NVDA_admin_usr)
Components of this file is based on the components in install script.

mail=
instance=overwrite
partial=nocheck
runlevel=ask
idepend=nocheck
rdepend=nocheck
space=nocheck
setuid=nocheck
conflict=nocheck
action=nocheck
basedir=/usr_i386.all/usr

Package NVDAgraphics installation is as follows.

# pkgadd -a /tmp/NVDA_admin_usr -R /export/Solaris_10 -d. NVDAgraphics

Processing package instance <NVDAgraphics> from </root/NVIDIA-Solaris-x86-1.0-9755>

NVIDIA Graphics System Software(i386) 1.0.9755,REV=2007.02.26.23.59
Copyright 2005 by NVIDIA Corporation.  All rights reserved.
Use is subject to license terms.
Using </export/Solaris_10/usr_i386.all/usr> as the package base directory.
## Processing package information.
## Processing system information.
   26 package pathnames are already properly installed.

Installing NVIDIA Graphics System Software as <NVDAgraphics>

After installation of the NVDAgraphics, make symbolic link files as follows.

 # cd /export/Solaris_10/usr_i386.all/usr/lib
 # ln -sf ../X11/lib/NVIDIA/libGL.so.1 .
 # ln -sf ../X11/lib/NVIDIA/libGL.so .
 # ln -sf ../../X11/lib/NVIDIA/amd64/libGL.so.1 ./amd64
 # ln -sf ../../X11/lib/NVIDIA/amd64/libGL.so ./amd64

  The following 4 ln commands overwrites symbolic link files to MESA OpenGL.

 # cd /export/Solaris_10/usr_i386.all/usr/X11/lib
 # ln -sf NVIDIA/libGL.so .
 # ln -sf NVIDIA/libGL.so.1 .
 # ln -sf ../NVIDIA/amd64/libGL.so ./amd64
 # ln -sf ../NVIDIA/amd64/libGL.so.1 ./amd64

 # mkdir -p /export/Solaris_10/usr_i386.all/usr/include/GL
 # cd /export/Solaris_10/usr_i386.all/usr/include/GL
 # ln -sf ../../X11/include/NVIDIA/GL/glxext.h .
 # ln -sf ../../X11/include/NVIDIA/GL/glx.h .
 # ln -sf ../../X11/include/NVIDIA/GL/glext.h .
 # ln -sf ../../X11/include/NVIDIA/GL/gl.h .

 # cd /export/Solaris_10/usr_i386.all/usr/X11/lib/modules/extensions
 # ln -sf NVIDIA/libglx.so.1 .
 # ln -sf NVIDIA/libglx.so .
 # ln -sf ../NVIDIA/amd64/libglx.so.1 ./amd64
 # ln -sf ../NVIDIA/amd64/libglx.so ./amd64

Second step is installation of the NVDAgraphicsr. If you already made diskless clients, you have to install it into root directory of all diskless clients.

The admin file for installation of NVDAgraphicsr is as follows.(tmp/NVDA_admin_root)

mail=
instance=overwrite
partial=nocheck
runlevel=ask
idepend=nocheck
rdepend=nocheck
space=nocheck
setuid=nocheck
conflict=nocheck
action=nocheck
basedir=default

Installation of NVDAgraphicsr package is as follows.

Install NVDAgraphicsr into clone
# pkgadd -a /tmp/NVDA_admin_root -R \
  /export/root/clone/Solaris_10/i86pc -d. NVDAgraphicsr

Install NVDAgraphicsr into client : w1100z
# pkgadd -a /tmp/NVDA_admin_root -R /export/root/w1100z -d. 

NVDAgraphicsr

Processing package instance <NVDAgraphicsr> from </root/NVIDIA-Solaris-x86-1.0-9755>

NVIDIA Graphics System Device Driver(i386) 1.0.9755,REV=2007.02.26.23.59
Copyright 2005 by NVIDIA Corporation.  All rights reserved.
Use is subject to license terms.
Using </export/root/w1100z> as the package base directory.
## Processing package information.
## Processing system information.
   3 package pathnames are already properly installed.

Installing NVIDIA Graphics System Device Driver as <NVDAgraphicsr>

Third step is copying gfx_private into /kernel of diskless client. Gfx_private for Solaris 10 and for Solaris 11 are in the graphics driver directroy.

copy gfx_private into clone

# cp -fp gfx_private/SunOS-5.10/gfx_private \
  /export/root/clone/Solaris_10/i86pc/kernel/misc
# cp -fp gfx_private/SunOS-5.10/amd64/gfx_private \
  /export/root/clone/Solaris_10/i86pc/kernel/misc/amd64

copy gfx_private into diskless client : w1100z

# cp -fp gfx_private/SunOS-5.10/gfx_private \
  /export/root/w1100z/kernel/misc
# cp -fp gfx_private/SunOS-5.10/amd64/gfx_private \
  /export/root/w1100z/kernel/misc/amd64

After that, reboot diskless client host with reconfigure option. In case of generic Solaris 10 client, execute "reboot -- -r" in the client.
But this command is not effective, a different method is used in diskles client.
There are two way to reboot with reconfigure option in the diskless client environment.

  • Add -r option in the grub menu, and boot diskless client
  • Change grub configuration file of diskless client as follows, for example /export/root/w1100z/boot/grub/menu.lst, and reboot diskless client.

default=0
timeout=10
title Solaris Diskless Client
        root (nd)
# If console is on ttya|ttyb, replace kernel line with
# one of the commented lines

#        original
#        kernel /w1100z/multiboot 

#       boot with re-config
        kernel /w1100z/multiboot -r

#       kernel /w1100z/multiboot -B console=ttya
#       kernel /w1100z/multiboot -B console=ttyb
        module /w1100z/boot_archive

Next step is setting to use NVIDIA graphics driver.

  1. make xorg.conf
    Run xorgconf tool and save xorg.conf(/etc/X11/xorg.conf), no actions(change configurations) is needed.
    After that, change from [driver "nv"] to [driver "nvidia"] in /etc/X11/xorg.conf .
  2. run kdmconfig, and select xorg.

All steps of installation of nvidia graphics driver are finished. Now, you can use 3D H/W acceleration.

Of course, Project Looking Glass (LG3D) runs correctly on the diskless client. LG3D cannot run (run too slow) on software OpenGL environments, so you can use to check whether nvidia graphics driver installed correctly into the diskless client environment.



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

(EN) Diskless Solaris x86 Part 3 : Apply patches to the diskless client

Part 3 is about adding patches to the diskless client. I think this is very important.

Applying patches by smosservice command. (This way is written in the manual on docs.sun.com .)

smosservice command has an ability to apply patch to the OS image of the diskless clients. Applying patches which smosservice is two steps.
First step is that add patches to the spool by "smosservice patch" .

For example, the patch of in.telnetd is applied to the diskless client. If you are using Solaris 10, you should apply this patch.

# /usr/sadm/bin/smosservice patch -- -a /tmp/120069-03

If smc service down with EXM_RMIERROR, you can restart it as follows.

# svcadm restart wbem

When the addition of the patch to the spool succeeds, the patch copy into /export/diskless/Patches directory.

# ls /export/diskless/Patches
120069-03  Archive

Archive directory is an area where the applied patch is in.
You can check whether patch is added into spool by "smosservice patch -- -p"

# /usr/sadm/bin/smosservice patch -- -P
Patches In Spool Area
Os Rel  Arch    Patch Id    Synopsis
--------------------------------------------------------------------------------
10      i386    120069-03   SunOS 5.10_x86: in.telnetd patch
86      i386    120069-03   SunOS 5.10_x86: in.telnetd patch

The patch of the x86 edition seems to become two-line display, the patch of the SPARC version is one line. In case of

Next step is applying(distributing) patches to all diskless client.

# /usr/sadm/bin/smosservice patch -- -m -U

After that, check whether patch was applied or not.

# /usr/sadm/bin/smosservice patch -- -P

Os Rel  Arch    Patch Id    Synopsis
--------------------------------------------------------------------------------
10      i386    120069-03   SunOS 5.10_x86: in.telnetd patch
86      i386    120069-03   SunOS 5.10_x86: in.telnetd patch

Patch seems not be applied.

Apply patch with patchadd command

Patch seems not be applied in the test environment, but this patch is very important patch. So, I tried to apply patch by another way.
Generally, to use patchadd command to apply patch. When the patch is applied to Solaris OS, the patchadd command is used usually.
Patchadd command has -R option to set directory (client root path). The following is output of the patchadd command.

# patchadd
Patch or "-M patchdir" must be specified.
Usage:
        patchadd [-G] [-t] [-d] [-u] [-n] [-B backout_dir]
                [-k keystore] [-P passwd] [-x proxy] [target] source
        patchadd -p [target]
        patchadd -Z

        [target] specifies destination system to apply or query patches,
        and can be one of:

                [-C net_install_image] - apply/query patch on mini root
                [-R client_root_path] - apply/query patch on bootable
                                        client root

Client root patch can be set with -R option, but patchadd seems not have an option to use(set) admin file.
Therefore, patchadd command cannot change "basedir".
In diskless client environment, /var directory is in /export/Solaris_10, this directory has package informations, and /usr directory is in /export/Solaris_10/usr_i386.all/ ( /export/exec ). So, to applied the patch, It is necessary to make the symbolic link as follows.

# cd /export/Solaris_10
# ln -s ./usr_i386.all/usr usr

After that, apply patch by patchadd -R .

# patchadd -R /export/Solaris_10 120069-03
Validating patches...

Loading patches installed on the system...

Done!

Loading patches requested to install.

Done!

Checking patches that you specified for installation.

Done!


Approved patches will be installed in this order:

120069-03


Checking installed patches...
Verifying sufficient filesystem capacity (dry run method)...
Installing patch packages...

Patch 120069-03 has been successfully installed.
See /export/Solaris_10/var/sadm/patch/120069-03/log for details

Patch packages installed:
  SUNWtnetd

You can check whether the patch is applied or not as follows. Output of this sample includes patch information, which is in /usr or /opt directory only. If you want to know the information which in / (root) directory, set diskless client's root directory to -R option. ( e.g. /export/root/w1100z )

# patchadd -p -R /export/Solaris_10 | grep 120069
Patch: 120069-01 Obsoletes: Requires: Incompatibles: Packages: SUNWtnetd
Patch: 120069-03 Obsoletes: Requires: Incompatibles: Packages: SUNWtnetd


The followings are example to apply patch to / (root) directory.

# patchadd -R /export/root/cloneSolaris_10/i86pc/ ( clone )
# patchadd -R /export/root/w1100z ( diskless client : w1100z )


To use this method, you can apply patches to the diskless client, but it becomes a problem in the following case.

  • Target patch requires other patches. One is applied into / (root) directory, another is applied into /usr directory.
  • Target patch has 2 or more packages, and some packages is applied into / (root) directory, other packages is applied into /usr directory.

If you want to applied these patch into diskless client enviroment with patchadd command, a more thorough customizing is needed.

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

(EN) Diskless Solaris x86 Part 2 : Use JDS(Gnome) on diskless client

Previous content is : (EN) Diskless Solaris x86 Part 1 : Setup Diskless Solaris Environment .

When using diskless client, some troubles might occur, which does not occur in the normal environments.
There are some tips to use diskless client.

Fails in login of Java Desktop System(Gnome).

If you do not customize after setup the diskless client, user can log into CDE desktop environment, but user cannot login with JDS environemnt and cannot use gnome-based application as gnome-terminal and so on.
Core file was found in the home directory after failed to log in. So, I checked the core file with pstack. The followings are output of the pstack.

core file ( Locale=C )

# pstack core
core 'core' of 10077:   /usr/lib/gnome_segv gnome-session 11 2.6.1
 fce54179 FcPatternPosition (81fd128, fce6398c) + 69
 fce54244 FcPatternFindElt (81fd128, fce6398c) + 34
 fce54f64 FcPatternGet (81fd128, fce6398c, 0, 8045670) + 34
 fce553dc FcPatternGetCharSet (81fd128, fce6398c, 0, 80456bc) + 3c
 fce5063b FcSortWalk (81b1d30, 422, 8297ef8, 8045724, 1) + 73
 fce50be4 FcFontSetSort (8103a30, 8045780, 1, 81029e0, 1, 0) + 3fc
 fce50d52 FcFontSort (8103a30, 81029e0, 1, 0, 80457cc, 81029e0) + ca
 fe838043 pango_fc_font_map_get_patterns () + 157

core file ( Locale=ja)

# pstack core.ja
core 'core.ja' of 8063: jp.co.justsystem.atokx2.BasicAux
 fd8507e7 kill     (b, 0, 8045250) + 7
 fd85001f __sighndlr (b, 0, 8045250, 80a13c0) + f
 fd8465d9 call_user_handler (b, 0, 8045250) + 22b
 fd846759 sigacthandler (b, 0, 8045250) + bb
 --- called from signal handler with signal 11 (SIGSEGV) ---
 fd434179 FcPatternPosition (841bcb0, fd44398c) + 69
 fd434244 FcPatternFindElt (841bcb0, fd44398c) + 34
 fd434f64 FcPatternGet (841bcb0, fd44398c, 0, 80454fc) + 34
 fd4353dc FcPatternGetCharSet (841bcb0, fd44398c, 0, 8045548) + 3c
 fd43063b FcSortWalk (82d97b0, 426, 83bbb88, 80455b0, 1) + 73
 fd430be4 FcFontSetSort (823b298, 804560c, 1, 8233988, 1, 0) + 3fc
 fd430d52 FcFontSort (823b298, 8233988, 1, 0, 8045658, 8233988) + ca
 fd358043 pango_fc_font_map_get_patterns () + 157

As for this cause, the following URL becomes reference.
http://www.opensolaris.org/jive/thread.jspa?threadID=22240&tstart=195
This error occured because fc-cache failed in making the font cache file.
Fc-cache process start up in boot time of solaris, in this time fc-cache make font cache file if fc-cache cannot find font cache file in font directory under /usr.
But, fc-cache cannot make font cache file in the diskless client environment, because diskless client mounts /usr in read-only mode.
Fc-cache start up when font cache files found in the font directory, so to prepare font cache files is the way to fix this bug.

To fix, change mode of the /usr directory to read and write mode, and make font cache files. (It seems okay to copy font cache files from server)


You can check the state of sharing of the /usr directory by share command.

# share
-               /export/exec/Solaris_10_i386.all/usr   ro   ""
-               /export/root/w1100z   rw=w1100z,root=w1100z   ""
-               /export/swap/w1100z   rw=w1100z,root=w1100z   ""

change share setting of /export/exec/Solaris_10_i386.all/usr /etc/dfs/dfstab as follows.

# share -F nfs -o ro /export/exec/Solaris_10_i386.all/usr
share -F nfs -o rw=w1100z,root=w1100z /export/exec/Solaris_10_i386.all/usr
share -F nfs -o rw=w1100z,root=w1100z /export/root/w1100z
share -F nfs -o rw=w1100z,root=w1100z /export/swap/w1100z

execute shareall command to update state of directory share.

# shareall
# share
-               /export/exec/Solaris_10_i386.all/usr   rw=w1100z,root=w1100z   ""
-               /export/root/w1100z   rw=w1100z,root=w1100z   ""
-               /export/swap/w1100z   rw=w1100z,root=w1100z   ""

Next step is change mount setting of the /usr directory of "vfstab" for the diskless client.( /export/root/w1100z/etc/vfstab )

#device         device          mount           FS      fsck    mount   mount
#to mount       to fsck         point           type    pass    at boot options
#
/devices        -               /devices        devfs   -       no      -
/proc           -               /proc           proc    -       no      -
ctfs            -       /system/contract        ctfs    -       no      -
objfs           -       /system/object  objfs   -       no      -
fd              -               /dev/fd         fd      -       no      -
swap            -               /tmp            tmpfs   -       yes     -

x4200m2:/export/root/w1100z     -       /       nfs     -       -       rw
x4200m2:/export/swap/w1100z     -       /dev/swap       nfs     -       -       -
/dev/swap       -       -       swap    -       -       -
# x4200m2:/export/exec/Solaris_10_i386.all/usr   -       /usr    nfs     -       -       ro
x4200m2:/export/exec/Solaris_10_i386.all/usr    -       /usr    nfs     -       -       rw

Boot the diskless client and log into JDS environment.
After that font cache files, fonts.cache-1 and so on, appeared in the font directory like a following.

# cd /export/exec/Solaris_10_i386.all/usr/openwin/lib/X11/fonts/Type1
# ls -l
-rw-r--r--   1 root     bin         4204 Dec 16  2004 fonts.alias.all
-rw-r--r--   1 root     root        8013 Apr 23 14:10 fonts.cache-1
-rw-r--r--   1 root     bin         1162 Dec 16  2004 fonts.dir
-rw-r--r--   1 root     bin         1162 Dec 16  2004 fonts.scale
drwxr-xr-x   2 root     bin          512 Apr 23 14:10 outline
drwxr-xr-x   2 root     bin          512 Apr 23 14:10 prebuilt
drwxr-xr-x   3 root     bin         2048 Apr 23 14:10 sun

You only have to do this method only once on one diskless client per server even if you set up some diskless clients. So, after do this method, you may return it to default setting.

/opt of the diskless client is empty...

/opt directory of the diskless client is empty, because mouting /opt information is not in /etc/vfstab file of the diskless client.

In generally, some applications, StarSuite(StarOffice), Netbeans and so on, in the /opt directoy. So it is useful to share and mount /opt directory.
/opt directory for diskless client is in /export/Solaris_10 directory. To mount /opt directory, change /etc/dfs/dfstab to share /export/Solaris_10/opt directory on the server.

share -F nfs -o rw=w1100z,root=w1100z /export/Solaris_10/opt

Do not forget to execute shareall command on server console.
Next step is to change vfstab of the diskless client. ( /export/root/w1100z/etc/vfstab )

#device         device          mount           FS      fsck    mount   mount
#to mount       to fsck         point           type    pass    at boot options
#
/devices        -               /devices        devfs   -       no      -
/proc           -               /proc           proc    -       no      -
ctfs            -       /system/contract        ctfs    -       no      -
objfs           -       /system/object  objfs   -       no      -
fd              -               /dev/fd         fd      -       no      -
swap            -               /tmp            tmpfs   -       yes     -

x4200m2:/export/root/w1100z     -       /       nfs     -       -       rw
x4200m2:/export/swap/w1100z     -       /dev/swap       nfs     -       -       -
/dev/swap       -       -       swap    -       -       -
# x4200m2:/export/exec/Solaris_10_i386.all/usr   -       /usr    nfs     -       -       ro
x4200m2:/export/exec/Solaris_10_i386.all/usr    -       /usr    nfs     -       -       rw
x4200m2:/export/Solaris_10/opt    -       /opt    nfs     -       yes       ro

I will write about patch in the next time.

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.

http://blogs.sun.com/thaniwa/date/20060909 2006年 9月 09日 土曜日

(EN) Trumplayer 1.0

I commited latest source codes of the trumplayer.

New features of the trumplayer are,

  • Album Search Form
  • Album List (Play List) Editor
  • Setup Wizard

The details of the trumplayer can be seen at the following URL.
http://blogs.sun.com/thaniwa/page/lg3den

http://blogs.sun.com/thaniwa/date/20060621 2006年 6月 21日 水曜日

(EN) mkpkg tools

The way to build solaris pkg is as follows.

  1. build binaries of the software, and install it to the empty temporary directory.
  2. create a pkginfo file, which has package informations such as pacakge name, application name, version and so on.
    http://docs.sun.com/app/docs/doc/816-5174/6mbb98uic?a=view
  3. create a prototype file, which include file list of the package,
  4. create package by pkgmk command
  5. (option) create one package file by pkgtrans command.
  6. (option) compress it by gzip or bzip2


It is a little difficult, so I made shell scripts, mkpkg tools, to support to build solaris pkgs. I feel that it does not need licenses, but if needs, this is under meta licensing, CDDL or GPL(V2 or later) :-)

mkpkg.zip includes 3 files, mkpkg, mkpinfo, mkproto .
These commands uses only a minimum parameters, so if you want to build customized solaris pkgs, you should not use this commands.

If you want to build solaris pkg easily, the way to build solaris pkg by mkpkg command is as follows.
  1. build binaries of the software, and install it to the empty temporary directory. (e.g. /tmp/work)
  2. change directory to the installation directory (e.g. # cd /tmp/work)
  3. run mkpkg command


The way to build a solaris pkg of lg3d is as follows.
# mkdir /tmp/work
# cd /tmp/work
# gunzip -c lg3d-fcs-rel-0-8-0-solaris-i86pc-0605121113.tar.gz | tar xvf -
#
# mkpkg lg3d-0.8.0-x86-pkg -p LG3D -n "Project Looking Glass" -v "0.8.0" -a "i86pc" -b "/opt" -vd "lg3d-core team" -g


The following messages are usage of these commands.

mkpkg : command to make a Solaris pkg
Usage of mkpkg
> mkpkg output [-g] [-user <username>] [-group <group>]
             -p <pkg> -n <name> -v <version> -a <arch> [-c <category>]
            [-b <basedir>] [-d <description>] [-vd <vendor>] [-o <flag>...]

  output             : output file name

  [Details of Option]
  -g                 : create gzipped package
  -p  <pkg>          : package name (ex. SUNWgcc)
  -n  <name>         : application name (ex. gcc)
  -v  <version>      : application version (ex. 4.2.0)
  -a  <arch>         : architecuture, i86pc,sun4u...
  -c  <category>     : category of the application (ex. system, application, GNOME2)
                       (default = appilcation)
  -b  <basedir>      : base directory of the application (default = /)
  -d  <description>  : package description
  -vd <vendor>       : vendor name (default = unknown)
  -o  <flag>         : if you want to add other flags, please use it
                       (ex. -o "SUMW_PRODNAME=SunOS" -o "SUNW_PRODVERS=5.10"


mkpinfo : command to make a pkginfo file
Usage of mkpinfo
> mkpinfo -p <pkg> -n <name> -v <version> -a <arch> [-c <category>]
             [-b <basedir>] [-d <description>] [-vd <vendor>] [-o <flag>...]

[Details of Option]
-p  <pkg>          : package name (ex. SUNWgcc)
-n  <name>         : application name (ex. gcc)
-v  <version>      : application version (ex. 4.2.0)
-a  <arch>         : architecuture, i86pc,sun4u...
-c  <category>     : category of the application (ex. system, application, GNOME2)
                     (default = appilcation)
-b  <basedir>      : base directory of the application (default = /)
-d  <description>  : package description
-vd <vendor>       : vendor name (default = unknown)
-o  <flag>         : if you want to add other flags, please use it
                     (ex. -o "SUMW_PRODNAME=SunOS" -o "SUNW_PRODVERS=5.10"


mkproto : command to make a prototype file
Usage of mkproto
> mkproto [Option]

[Details of Option]
Default    : User = root, Group = other
-u <user>  : set user
-g <group> : set group

http://blogs.sun.com/thaniwa/date/20060123 2006年 1月 23日 月曜日

(EN) Customizing of the screen of dtlogin of Solaris 10 and later

Dtlogin theme has changed on Solaris 10 and later, but I cannot found the way to customize on docs.sun.com.
So, I wrote about it on my blog.
Overview of customizing of dtlogin is as follows.

  1. Preparation
  2. Make background images
  3. Make theme file
  4. Regist theme


1. Preparation

Default configuration files of dtlogin are in under /usr/dt/config. But, when configuration files are in /etc/dt/config, dtlogin use these files instead of files in /usr/dt/config.
Therefore, at first, make /etc/dt/config directory, and copy all configuration files in /usr/dt/config to /etc/dt/config like a following.
# mkdir /etc/dt/config
# cp -r /usr/dt/config/* /etc/dt/config/.

2. Make background images

The next step is to make image files used for the background.
Dtlogin requires background image of each screen resolution.
Default resolution are 800x600(SVGA), 1028x768(XGA), 1280x1024(SXGA), and 1400x1050(SXGA+). Dtlogin also can use 1600x1200(UXGA) and 1280x800 and so on, but if you want to use these resolution, you have to enhance theme file.
Dtlogin requires xpm files as background image, you can make xpm files with gimp and so on.
After making image files, it is necessary to compress the image files by gzip as follows.
# mkdir /etc/dt/config
# gzip styleExpress-1028x768.pm

It is preferable to make image files as follows.
  • It is good that gzipped image file size is 400KB or less. (Under 300KB is better.)
  • make one color part in the picture.

The following picture is a example (1024x768). Original image is gdmtheme by chandan. Thanks.



3. Make a theme file

Default theme file of dtlogin of Solaris 10 and later is /etc/dt/config/C/styleModern . If this file is re-writed directly, dtlogin of all language environment are changed.
The login screen can be changed responding to the linguistic environment by preparing another file. In this case, [4. Regist theme] is required.
In this content, make new theme file, /etc/dt/config/ja_JP.UTF-8/styleExpress, as copy of styleModern. And re-write it to fit new background image.
To change in the following elements is needed.
  • Define a background image files
  • Text color and backgound color
  • Coordinates of items
    • Messages
    • Input field of user name and password
    • [OK],[Reset],[Option],[Help] buttons.

It is necessary to set up information in each resolution.

The following configuration file is changed 1024x768 settings as sample theme file.
Settings in the first part, Dtlogin*foreground and so on, are default settings of colors. These settings are used by all resolutions. In this configuration, another color settings are made in the 1024x768 part, because settings for 1024x768 only has changed in this configuration.
Dtlogin*foreground:             white
Dtlogin*background:            #416d89
Dtlogin*XmTextField*background: #8e8e8e
Dtlogin*highlightColor:         #9dca12
Dtlogin*table.background:       black
Dtlogin*button_matte*background: #2a4456

#if (WIDTH >= 1400) && (HEIGHT >= 1050)
...
#elif (WIDTH >= 1024) && (HEIGHT >= 768)
Dtlogin*foreground:             white
Dtlogin*background:             black
Dtlogin*XmTextField*background: #8e8e8e
Dtlogin*highlightColor:         #9dca12
Dtlogin*table.background:       black
Dtlogin*button_matte*background: black

Dtlogin*matte1.backgroundPixmap:        styleExpress-1028x768.pm-1024.pm.gz
Dtlogin*matte.width:                    1024
Dtlogin*matte.height:                    768
Dtlogin*matteFrame.width:               1024
Dtlogin*matteFrame.height:               768

!! "Welcome to _____" message
Dtlogin*greeting.leftOffset:            540
Dtlogin*greeting.rightOffset:           80
Dtlogin*greeting.height:                48
Dtlogin*greeting.topOffset:             30

!! Session type message
!! offset from bottom of welcome message
Dtlogin*dt_label.topOffset:             410
Dtlogin*dt_label.height:                32
Dtlogin*dt_label.leftOffset:            540
Dtlogin*dt_label.rightOffset:           40

!! Login area
!! offset from bottom of welcome message
Dtlogin*login_form.topOffset:           450
Dtlogin*login_form.leftOffset:          540
Dtlogin*login_form.rightOffset:         40

Dtlogin*login_text.bottomPosition:      90
Dtlogin*login_text.leftPosition:        8

Dtlogin*passwd_text.bottomPosition:     90
Dtlogin*passwd_text.leftPosition:       8

!! Buttons below login area
Dtlogin*ok_button.bottomPosition:       99
Dtlogin*clear_button.bottomPosition:    99
Dtlogin*options_button.bottomPosition:  99
Dtlogin*help_button.bottomPosition:     99
Dtlogin*button_matte.leftOffset:        510
Dtlogin*button_matte.rightOffset:       10

#else

...


Offset settings are as following picture.

4. Regist theme

If you make an another theme file, you have to change [Xresources] file of the locale that you want to regist theme.
The way to change is as follows.
!!######################################################################
!!
!!  LOGIN SCREEN STYLE
!!
!!  Allows customization of login screen look for different displays/types
!!  If no style is given, the "classic" CDE login screen look is used
!!  File is simply a Xresources format file found in the search path of
!!  /etc/dt/config/%L:/etc/dt/config/C:/usr/dt/config/%L:/usr/dt/config/C
!!
!! #include "styleModern"
#include "styleExpress"