Feeds:
Posts
Comments

Archive for the ‘Open Solaris’ Category

A very good document on Solaris 8 build , Can also be used to build Solaris 10 with little change.

Download the following Solaris 8 Build Doc

Read Full Post »

The lucreate command is part of a suite of commands that make up the Live Upgrade feature of the Solaris Operating environment.

Example:

# lucreate -n newsystem-new -c solaris10 -m /:/dev/dsk/c0t2d0s0:ufs -m -:/dev/dsk/c0t2d0s1:swap \-m /var:/dev/dsk/c0t2d0s5:ufs -m /usr:/dev/dsk/c0t2d0s6:ufs -m /opt:/dev/dsk/c0t2d0s7:ufs \

-l /var/log/lucreate.err -o /var/log/lucreate.log

BE: Boot Environment

-n: The name of the BE to be created. BE must be unique on a given system

-c: The current BE

-m: mount point:device[,volume]:fs

-l: Error messages and other status messages are sent to error log

-o: All command output is sent to outfile

To check the status of the BEs

The lustatus command displays the status information of the boot environment (BE)

#lustatus

Boot Environment Is Active Active Can Copy

Name Complete Now On Reboot Delete Status

————————– ——– —— ——— —— ————————-

solaris10 yes yes yes no -

newsystem-new yes no no yes -

To find out root and boot slices on both the BEs

bash-3.00# cat /etc/lutab
# DO NOT EDIT THIS FILE BY HAND. This file is not a public interface.
# The format and contents of this file are subject to change.
# Any user modification to this file may result in the incorrect
# operation of Live Upgrade.
1:solaris10:C:0
1:/:/dev/dsk/c0t0d0s0:1
1:boot-device:/dev/dsk/c0t0d0s0:2
2:solaris10-new:C:0
2:/:/dev/dsk/c0t2d0s0:1
2:boot-device:/dev/dsk/c0t2d0s0:2

To list the file system slices in New BE

bash-3.00# lufslist newsystem-new

boot environment name: newsystem-new

Filesystem fstype device size Mounted on Mount Options

———————– ——– ———— ——————- ————–

/dev/dsk/c0t2d0s1 swap 315432960 – -

/dev/dsk/c0t2d0s0 ufs 5370716160 / logging

/dev/dsk/c0t2d0s6 ufs 5370716160 /usr logging

/dev/dsk/c0t2d0s5 ufs 3223265280 /var logging

/dev/dsk/c0t2d0s7 ufs 3223265280 /opt logging

To rename the new BE

bash-3.00# lurename -e newsystem-new -n solaris10-new
Renaming boot environment <newsystem-new> to <solaris10-new>

Changing the name of BE in the BE definition file.
Changing the name of BE in configuration file.
Updating compare databases on boot environment <solaris10-new>.
Changing the name of BE in Internal Configuration Files.
Propagating the boot environment name change to all BEs.
Boot environment <newsystem-new> renamed to <solaris10-new>.

bash-3.00# lustatus
Boot Environment Is Active Active Can Copy
Name Complete Now On Reboot Delete Status
————————– ——– —— ——— —— ———-
solaris10 yes yes yes no -
solaris10-new yes no no yes -

Mounting New BE

bash-3.00# mkdir solaris10-new
bash-3.00# lumount solaris10-new /solaris10-new
/solaris10-new

bash-3.00# df -h
Filesystem size used avail capacity Mounted on
/dev/dsk/c0t0d0s0 4.8G 372M 4.4G 8% /
/devices 0K 0K 0K 0% /devices
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 277M 1.0M 276M 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
/dev/dsk/c0t0d0s6 4.8G 3.5G 1.2G 75% /usr
fd 0K 0K 0K 0% /dev/fd
/dev/dsk/c0t0d0s5 2.9G 465M 2.4G 17% /var
swap 276M 0K 276M 0% /tmp
swap 276M 48K 276M 1% /var/run
/dev/dsk/c0t0d0s7 2.9G 3.6M 2.8G 1% /opt
/dev/dsk/c0t2d0s0 4.9G 376M 4.5G 8% /solaris10-new
/dev/dsk/c0t2d0s6 4.9G 3.5G 1.3G 73% /solaris10-new/usr
/dev/dsk/c0t2d0s5 3.0G 465M 2.4G 16% /solaris10-new/var
/dev/dsk/c0t2d0s7 3.0G 3.7M 2.9G 1% /solaris10-new/opt

Unmounting New BE

bash-3.00# luumount solaris10-new

Following are some of the live upgrade commands

lu: FMLI-based interface for creating and administering BEs.

luactivate: Designate a BE as the BE to boot from upon the next

reboot of the system.

lucancel: Cancel a previously scheduled operation.

lucompare: Compare the contents of two BEs.

lucurr: Display the name of the current BE.

ludelete: Delete a BE.

ludesc: Add or change BE descriptions.

lumake: Re-create a BE based on the active BE.

luupgrade: Upgrade an OS and install application software on a BE.

Such software includes flash archives, complete OS installations, OS and application packages, and OS patches

Read Full Post »

There are many times with we get .so.2 linked library error, this is because of the missing package that provides the shared library files. To find out with package provides which shared libraries.

Go to the following link, in the search field select Provides and give library file name

http://rpm.rutgers.edu/rpm2php/?searchby=provides&searchval=libiconv.so.2

The search will provide you package name to be installed.

The following example show how this works

Example:

bash-3.00# gpg –import mirror
ld.so.1: gpg: fatal: libiconv.so.2: open failed: No such file or directory
Killed

In the given example there’s a libiconv.so.2 error. To find out the dependencies of the application use

ldd : list dynamic dependencies of executable files or shared objects.

bash-3.00# ldd /usr/local/bin/gpg
libiconv.so.2 => (file not found)
libresolv.so.2 => /usr/lib/libresolv.so.2
libz.so => /usr/lib/libz.so
libreadline.so.5 => (file not found)
libcurses.so.1 => /usr/lib/libcurses.so.1
libsocket.so.1 => /usr/lib/libsocket.so.1
libnsl.so.1 => /usr/lib/libnsl.so.1
libc.so.1 => /usr/lib/libc.so.1
libmp.so.2 => /lib/libmp.so.2
libmd5.so.1 => /lib/libmd5.so.1
libscf.so.1 => /lib/libscf.so.1
libdoor.so.1 => /lib/libdoor.so.1
libuutil.so.1 => /lib/libuutil.so.1
libm.so.2 => /lib/libm.so.2
/platform/SUNW,Sun-Blade-100/lib/libc_psr.so.1
/platform/SUNW,Sun-Blade-100/lib/libmd5_psr.so.1

As you can see there are two dependencies missing for executable file gpg

libiconv.so.2 => (file not found)
libreadline.so.5 => (file not found)

Find out what packages provide both the libraries using link provided above

Library libiconv.so.2 is provided by libiconv package and

Library libreadline.so.5 is provided by readline5 package

Install both the package using pkg-get

bash-3.00# pkg-get install libiconv
Sorry, there are multiple versions possible
Please specify one, in the following syntax
pkg-get install libiconv-1.11
pkg-get install libiconv-1.8
pkg-get install libiconv-1.9.2

bash-3.00# pkg-get install libiconv-1.11
ERROR: information for “SMCliconv” was not found
No existing install of SMCliconv found. Installing…
trying ftp://ftp.sunfreeware.com/pub/freeware/sparc/5.10/libiconv-1.11-sol10-sparc-local.gz
–13:58:22– ftp://ftp.sunfreeware.com/pub/freeware/sparc/5.10/libiconv-1.11-sol10-sparc-local.gz
=> `/dev/fd/1′
Resolving ftp.sunfreeware.com… 66.193.208.66
Connecting to ftp.sunfreeware.com|66.193.208.66|:21… connected.
Logging in as anonymous … Logged in!
==> SYST … done. ==> PWD … done.
==> TYPE I … done. ==> CWD /pub/freeware/sparc/5.10 … done.
==> PASV … done. ==> RETR libiconv-1.11-sol10-sparc-local.gz … done.
Length: 1,464,363 (1.4M) (unauthoritative)

100%[==============================================================>] 1,464,363 239.47K/s ETA 00:00

13:58:28 (256.43 KB/s) – `/dev/fd/1′ saved [1464363]

Transferring <SMCliconv> package instance

Processing package instance <SMCliconv> from </var/spool/pkg>

libiconv(sparc) 1.11
Bruno Haible
Using </usr/local> as the package base directory.
## Processing package information.
## Processing system information.
8 package pathnames are already properly installed.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.

Installing libiconv as <SMCliconv>

## Installing part 1 of 1.
/usr/local/bin/iconv
/usr/local/doc/libiconv/ABOUT-NLS
/usr/local/doc/libiconv/AUTHORS
/usr/local/doc/libiconv/COPYING.LIB

output truncated

[ verifying class <none> ]

Installation of <SMCliconv> was successful.

bash-3.00# pkg-get install readline
Sorry, there are multiple versions possible
Please specify one, in the following syntax
pkg-get install readline-5.0
pkg-get install readline-5.1
pkg-get install readline-5.2
bash-3.00# pkg-get install readline-5.2
ERROR: information for “SMCreadl” was not found
No existing install of SMCreadl found. Installing…
trying ftp://ftp.sunfreeware.com/pub/freeware/sparc/5.10/readline-5.2-sol10-sparc-local.gz
–13:59:22– ftp://ftp.sunfreeware.com/pub/freeware/sparc/5.10/readline-5.2-sol10-sparc-local.gz
=> `/dev/fd/1′
Resolving ftp.sunfreeware.com… 66.193.208.66
Connecting to ftp.sunfreeware.com|66.193.208.66|:21… connected.
Logging in as anonymous … Logged in!
==> SYST … done. ==> PWD … done.
==> TYPE I … done. ==> CWD /pub/freeware/sparc/5.10 … done.
==> PASV … done. ==> RETR readline-5.2-sol10-sparc-local.gz … done.
Length: 2,281,936 (2.2M) (unauthoritative)

100%[==============================================================>] 2,281,936 248.49K/s ETA 00:00

13:59:34 (206.49 KB/s) – `/dev/fd/1′ saved [2281936]

Transferring <SMCreadl> package instance

Processing package instance <SMCreadl> from </var/spool/pkg>

readline(sparc) 5.2
Lionel Cons et al
Using </usr/local> as the package base directory.
## Processing package information.
## Processing system information.
6 package pathnames are already properly installed.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.

Installing readline as <SMCreadl>

## Installing part 1 of 1.
/usr/local/doc/readline/CHANGELOG
/usr/local/doc/readline/CHANGES
/usr/local/doc/readline/COPYING
/usr/local/doc/readline/INSTALL
/usr/local/doc/readline/MANIFEST
/usr/local/doc/readline/NEWS
/usr/local/doc/readline/README
/usr/local/doc/readline/USAGE
/usr/local/doc/readline/doc/Makefile
/usr/local/doc/readline/doc/Makefile.in
/usr/local/doc/readline/doc/fdl.texi
/usr/local/doc/readline/doc/history.0
/usr/local/doc/readline/doc/history.3
/usr/local/doc/readline/doc/history.dvi
/usr/local/doc/readline/doc/history.html
/usr/local/doc/readline/doc/history.info
/usr/local/doc/readline/doc/history.pdf

output truncated

[ verifying class <none> ]

Installation of <SMCreadl> was successful.

Now, you can proceed with your command

bash-3.00# gpg –import mirrors
gpg: key E12E9D2F: “Distribution Manager <dm@blastwave.org>” not changed
gpg: Total number processed: 1
gpg: unchanged: 1

There you are successful!!!!!

Read Full Post »

pkg-get tool will automatically download the appropriate version for your architecture and OS revision and install the package in Solaris OS just like apt-get and yum in Debian and Red hat systems respectively.

Download

http://sunfreeware.com/pkg-get.html

# pkg-get
pkg-get SCCS rev @(#) pkg-get 1.56.1.2@(#)
from http://www.bolthole.com/solaris/

pkg-get is used to install free software packages
pkg-get
Need one of ‘install’, ‘upgrade’, ‘available’,'compare’
  ‘-i|install’   installs a package
  ‘-u|upgrade’   upgrades already installed packages if possible
  ‘-a|available’ lists the known available packages
  ‘-c|compare’   shows installed package versions vs available
  ‘-d|download’  just download the package, not install
  ‘-D|describe’  describe available packages
  ‘-f’           dont ask any questions: force default behaviour
                 Normally used with an override admin file
                 See /var/pkg-get/admin-fullauto

  ‘-s ftp://site/dir’  temporarily override site to get from
                      (change /etc/pkg-get.conf for perm)
  ‘-U|updatecatalog’   updates download site inventory

Example:

Install apache in Solaris 10 with apt-get tool

bash-3.00# cat /etc/release
                       Solaris 10 6/06 s10s_u2wos_09a SPARC
           Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
                        Use is subject to license terms.
                             Assembled 09 June 2006
bash-3.00# uanme -a
bash: uanme: command not found
bash-3.00# uname -a
SunOS newsystem 5.10 Generic_118833-17 sun4u sparc SUNW,Sun-Blade-100

bash-3.00# pkg-get install apache2
ERROR: apache2 unrecognized
Perhaps you need to run pkg-get -U
bash-3.00# pkg-get install apache
Sorry, there are multiple versions possible
Please specify one, in the following syntax
pkg-get install apache-1.3.34
pkg-get install apache-2.0.52
pkg-get install apache-2.0.53
pkg-get install apache-2.0.54
pkg-get install apache-2.0.55
pkg-get install apache-2.0.59
pkg-get install apache-2.2.0
pkg-get install apache-2.2.4
pkg-get install apache-2.2.6
pkg-get install apache-2.2.8

(pkg-get will list all the available versions to be installed in the system)

#pkg-get install apache-2.2.8 <- to install apache-2.2.8

To remove package using pkg-get

bash-3.00# pkginfo | grep apache
application SMCap228                         apache

bash-3.00# pkg-get remove apache
WARNING:  the remove option is not very intelligent.
If there are multiple versions of a package with the same
PKG style name, it will remove the first one it can
(will continue in 5 seconds)
Starting remove operations now…

ERROR: information for “SMCapache” was not found
ERROR: information for “SMCapach2″ was not found
ERROR: information for “SMChttpd” was not found
ERROR: information for “SMCapache” was not found
ERROR: information for “SMCaph2″ was not found
ERROR: information for “SMCap2059″ was not found
ERROR: information for “SMCapch22″ was not found
ERROR: information for “SMCap224″ was not found
ERROR: information for “SMCap226″ was not found
Sorry, there are multiple SysV pkgs installed
This is usually not possible, if pkg-get is used.
You will have to resolve this by hand, [with pkgrm]
or try being more specific about the version of software

The following related SysV packages have been detected
SMCapache SMCapach2 SMChttpd SMCapache SMCaph2 SMCap2059 SMCapch22 SMCap224 SMCap226 SMCap228 SMCap228

bash-3.00# pkgrm SMCap228

The following package is currently installed:
   SMCap228  apache
             (sparc) 2.2.8

Do you want to remove this package? [y,n,?,q]

apg-get will give you detail information if it could not remove the package.

Read Full Post »

In Soloaris 10 routeadm command and the ifconfig command can be used instead of the ndd command to set IP forwarding. The main advantages are

  • The settings are persistent across reboots.
  • The new ifconfig  router and – router commands can be placed in the /etc/hostname.interfaces files, along with other ifconfig commands that are run when the interface is initially configured.

To enable

# routeadm -e ipv4-forwarding
# routeadm -e ipv6-forwarding

To disable

# routeadm -d ipv4-forwarding
# routeadm -d ipv6-forwarding

In the previous Solaris releases

To enable

# ndd -set /dev/ip ip_forwarding 1
# ndd -set /dev/ip ip6_forwarding 1

To disable

# ndd -set /dev/ip ip_forwarding 0
# ndd -set /dev/ip ip6_forwarding 0

If you want to enable IP forwarding on a specific IPv4 interface or IPv6 interface.

# ifconfig bge0 router
# ifconfig bge0 inet6 router

To disable

# ifconfig bge0 -router
# ifconfig bge0 inet6 -router

To precede any routeadm settings to take effect on the running system, use the following command:

# routeadm -u

Read Full Post »

Older Posts »

Follow

Get every new post delivered to your Inbox.