Archive for the ‘Solaris x86’ Category

wget behind proxy

Friday, March 26th, 2010

One of the ways to get wget to work behind proxy is to create .wgetrc file in the user’s home directory. In it put this:

http_proxy = http://proxy_server_yourdomain.com:8080/

if your proxy is using authentication, add also the following lines to your .wgetrc file

proxy_user=user
proxy_password=password

getting Blastwave to work on Solaris

Friday, March 26th, 2010

Blastwave is Solaris packages repository and offers similar features as many Linux package repositories. It also comes with its own package manager application that you need to install first before you can start using it. If the host you want to install Blastwave package manager is behind proxy, read this page to configure wget to work behind proxy server

To start using it, go to http://www.blastwave.org/ and download pkgutil for Sparc or Intel.

bash-3.00# wget http://download.blastwave.org/csw/pkgutil_sparc.pkg

bash-3.00# pkgadd -d pkgutil_sparc.pkg

then you need to download the package catalog:

/opt/csw/bin/pkgutil –catalog

then you can search packages, I needed iozone, so here I am checking if iozone is available:

bash-3.00# /opt/csw/bin/pkgutil -a |grep -i iozone
iozone CSWiozone 3.217,REV=2004.08.12 948.2 KB

now I’ll install iozone package:

bash-3.00# /opt/csw/bin/pkgutil -i CSWiozone
Parsing catalog, may take a while…
New packages: CSWcommon-1.4.6,REV=2008.04.28 CSWiozone-3.217,REV=2004.08.12
Total size: 971.2 KB
2 packages to fetch. Do you want to continue? [Y,n] y
Fetching CSWcommon-1.4.6,REV=2008.04.28…
–2010-03-26 09:56:45– http://download.blastwave.org/csw/unstable/sparc/5.10/common-1.4.6,REV=2008.04.28-SunOS5.8-sparc-CSW.pkg
Connecting to 165.135.4.112:8080… connected.
Proxy request sent, awaiting response… 200 OK
Length: 23552 (23K) [application/octet-stream]
Saving to: `/var/opt/csw/pkgutil/packages/common-1.4.6,REV=2008.04.28-SunOS5.8-sparc-CSW.pkg’

100%[================================================================================>] 23,552 87.1K/s in 0.3s

2010-03-26 09:56:45 (87.1 KB/s) – `/var/opt/csw/pkgutil/packages/common-1.4.6,REV=2008.04.28-SunOS5.8-sparc-CSW.pkg’ saved [23552/23552]

MD5 for CSWcommon-1.4.6,REV=2008.04.28 matched.
Fetching CSWiozone-3.217,REV=2004.08.12…
–2010-03-26 09:56:45– http://download.blastwave.org/csw/unstable/sparc/5.10/iozone-3.217,REV=2004.08.12-SunOS5.8-sparc-CSW.pkg.gz
Connecting to 165.135.4.112:8080… connected.
Proxy request sent, awaiting response… 200 OK
Length: 971005 (948K) [application/x-gzip]
Saving to: `/var/opt/csw/pkgutil/packages/iozone-3.217,REV=2004.08.12-SunOS5.8-sparc-CSW.pkg.gz’

100%[================================================================================>] 971,005 539K/s in 1.8s

2010-03-26 09:56:47 (539 KB/s) – `/var/opt/csw/pkgutil/packages/iozone-3.217,REV=2004.08.12-SunOS5.8-sparc-CSW.pkg.gz’ saved [971005/971005]

MD5 for CSWiozone-3.217,REV=2004.08.12 matched.
Installing CSWcommon-1.4.6,REV=2008.04.28

Processing package instance from

common – common files and dirs for CSW packages(sparc) 1.4.6,REV=2008.04.28
http://www.blastwave.org/ packaged for CSW by Philip Brown
## Executing checkinstall script.
## Processing package information.
## Processing system information.
7 package pathnames are already properly installed.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.

Installing common – common files and dirs for CSW packages as

## Installing part 1 of 1.
/opt/csw/bin/sparc
/opt/csw/doc
/opt/csw/info
/opt/csw/lib/32
/opt/csw/lib/64
/opt/csw/lib/locale
/opt/csw/lib/sparc
/opt/csw/lib/sparcv8
/opt/csw/man
/opt/csw/share/locale/bg/LC_TIME
/opt/csw/share/locale/cs/LC_TIME
/opt/csw/share/locale/da/LC_TIME
/opt/csw/share/locale/de/LC_TIME
/opt/csw/share/locale/el/LC_TIME
/opt/csw/share/locale/es/LC_TIME
/opt/csw/share/locale/fr/LC_TIME
/opt/csw/share/locale/gl/LC_TIME
/opt/csw/share/locale/it/LC_TIME
/opt/csw/share/locale/ja/LC_TIME
/opt/csw/share/locale/ko/LC_TIME
/opt/csw/share/locale/locale.alias
/opt/csw/share/locale/nl/LC_TIME
/opt/csw/share/locale/no/LC_TIME
/opt/csw/share/locale/pl/LC_TIME
/opt/csw/share/locale/pt/LC_TIME
/opt/csw/share/locale/pt_BR/LC_TIME
/opt/csw/share/locale/ru/LC_TIME
/opt/csw/share/locale/sk/LC_TIME
/opt/csw/share/locale/sl/LC_TIME
/opt/csw/share/locale/sv/LC_TIME
/opt/csw/share/locale/zh/LC_TIME
[ verifying class ]

Installation of was successful.
Installing CSWiozone-3.217,REV=2004.08.12

Processing package instance from

iozone – IO benchmarking tool(sparc) 3.217,REV=2004.08.12
” Original Author: William Norcott (wnorcott@us.oracle.com)”,
” 4 Dunlap Drive”,
” Nashua, NH 03060″,
” “,
” Enhancements: Don Capps (capps@iozone.org)”,
” 7417 Crenshaw”,
” Plano, TX 75025″,
” “,
” Copyright 1991, 1992, 1994, 1998, 1999, 2002 William D. Norcott”,
” “,
” License to freely use and distribute this software is hereby granted “,
” by the author, subject to the condition that this copyright notice “,
” remains intact. The author retains the exclusive right to publish “,
” derivative works based on this work, including, but not limited to, “,
” revised versions of this work”,
” “,
” Other contributors:”,
” “,
” Don Capps (Hewlett Packard) capps@iozone.org”,
Using as the package base directory.
## Processing package information.
## Processing system information.
## Verifying package dependencies.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.

Installing iozone – IO benchmarking tool as

## Installing part 1 of 1.
/opt/csw/bin/iozone
/opt/csw/bin/iozone64
/opt/csw/share/doc/iozone/docs/IOzone_msword_98.doc
/opt/csw/share/doc/iozone/docs
/opt/csw/share/doc/iozone/docs/IOzone_msword_98.pdf
/opt/csw/share/doc/iozone/docs/Iozone_ps.gz
/opt/csw/share/doc/iozone/docs/Run_rules.doc
/opt/csw/share/man/man1/iozone.1
[ verifying class ]

Installation of was successful.

Done.

Perform Live Upgrade on Solaris 10 x86, update 7 to update 8

Tuesday, February 16th, 2010

Download and mount ISO image you want to use for live upgrade.

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

Specify source boot environment (BE1) and new boot environment (Solaris_10_u8) which is a snapshot of source boot environment (BE1):

bash-3.00# lucreate -c “BE1″ -n “Solaris_10_u8″
Checking GRUB menu…
System has findroot enabled GRUB
Analyzing system configuration.
Comparing source boot environment file systems with the file
system(s) you specified for the new boot environment. Determining which
file systems should be in the new boot environment.
Updating boot environment description database on all BEs.
Updating system configuration files.
Creating configuration for boot environment .
Source boot environment is .
Creating boot environment .
Cloning file systems from boot environment to create boot environment .
Creating snapshot for on .
Creating clone for on .
Setting canmount=noauto for in zone on .
Creating snapshot for on .
Creating clone for on .
Setting canmount=noauto for in zone on .
Creating snapshot for on .
Creating clone for on .
Setting canmount=noauto for in zone on .
WARNING: split filesystem file system type cannot inherit
mount point options <-> from parent filesystem file
type <-> because the two file systems have different types.
Saving existing file in top level dataset for BE as //boot/grub/menu.lst.prev.
Saving existing file in top level dataset for BE as //boot/grub/menu.lst.prev.
File propagation successful
Copied GRUB menu from PBE to ABE
No entry for BE in GRUB menu
Population of boot environment successful.
Creation of boot environment successful.

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

if you are doing straight upgrade (not changing mounting of any partitions), then you can verify filesystems that are part of your old and new boot environment (they should be the same):

bash-3.00# lufslist BE1
boot environment name: BE1
This boot environment is currently active.
This boot environment will be active on next system boot.

Filesystem fstype device size Mounted on Mount Options
———————– ——– ———— ——————- ————–
/dev/zvol/dsk/rpool-vigilante/swap02 swap 12884901888 – -
/dev/zvol/dsk/rpool-vigilante/swap swap 2147483648 – -
rpool-vigilante/ROOT/BE1 zfs 36503444992 / -
rpool-vigilante/ROOT/BE1/opt zfs 813439488 /opt -
rpool-vigilante/ROOT/BE1/var zfs 4603225600 /var -
rpool-vigilante/export zfs 3617869312 /export -
rpool-vigilante/export/home zfs 3617849856 /export/home -
rpool-vigilante zfs 90195877888 /rpool-vigilante -
rpool-vigilante/suspend-data zfs 19456 /rpool-vigilante/vda/suspend-data -
bash-3.00# lufslist Solaris_10_u8
boot environment name: Solaris_10_u8

Filesystem fstype device size Mounted on Mount Options
———————– ——– ———— ——————- ————–
/dev/zvol/dsk/rpool-vigilante/swap02 swap 12884901888 – -
/dev/zvol/dsk/rpool-vigilante/swap swap 2147483648 – -
rpool-vigilante/ROOT/Solaris_10_u8 zfs 57545728 / -
rpool-vigilante/export zfs 3617869312 /export -
rpool-vigilante/export/home zfs 3617849856 /export/home -
rpool-vigilante/ROOT/Solaris_10_u8/opt zfs 274432 /opt -
rpool-vigilante zfs 90207728128 /rpool-vigilante -
rpool-vigilante/suspend-data zfs 19456 /rpool-vigilante/vda/suspend-data -
rpool-vigilante/ROOT/Solaris_10_u8/var zfs 28694528 /var -

To upgrade Solaris_10_u8 boot environment, run:

bash-3.00# luupgrade -u -n Solaris_10_u8 -s /mnt/

System has findroot enabled GRUB
No entry for BE in GRUB menu
Uncompressing miniroot
Copying failsafe kernel from media.
63093 blocks
miniroot filesystem is
Mounting miniroot at
Validating the contents of the media .
The media is a standard Solaris media.
The media contains an operating system upgrade image.
The media contains version <10>.
Constructing upgrade profile to use.
Locating the operating system upgrade program.
Checking for existence of previously scheduled Live Upgrade requests.
Creating upgrade profile for BE .
Checking for GRUB menu on ABE .
Saving GRUB menu on ABE .
Checking for x86 boot partition on ABE.
Determining packages to install or upgrade for BE .
Performing the operating system upgrade of the BE .
CAUTION: Interrupting this process may leave the boot environment unstable
or unbootable.
Upgrading Solaris: 100% completed
Installation of the packages from this media is complete.
Restoring GRUB menu on ABE .
Updating package information on boot environment .
Package information successfully updated on boot environment .
Adding operating system patches to the BE .
The operating system patch installation is complete.
ABE boot partition backing deleted.
PBE GRUB has no capability information.
PBE GRUB has no versioning information.
ABE GRUB is newer than PBE GRUB. Updating GRUB.
GRUB update was successfull.
Configuring failsafe for system.
Failsafe configuration is complete.
INFORMATION: The file on boot
environment contains a log of the upgrade operation.
INFORMATION: The file on boot
environment contains a log of cleanup operations required.
INFORMATION: Review the files listed above. Remember that all of the files
are located on boot environment . Before you activate boot
environment , determine if any additional system
maintenance is required or if additional media of the software
distribution must be installed.
The Solaris upgrade of the boot environment is complete.
Installing failsafe
Failsafe install is complete.

Now we need to activate new boot environment so that system will boot from it:

bash-3.00# luactivate Solaris_10_u8
System has findroot enabled GRUB
Generating boot-sign, partition and slice information for PBE
Saving existing file in top level dataset for BE as //etc/bootsign.prev.
A Live Upgrade Sync operation will be performed on startup of boot environment .

Setting failsafe console to .
Generating boot-sign for ABE
Saving existing file in top level dataset for BE as //etc/bootsign.prev.
Generating partition and slice information for ABE
Copied boot menu from top level dataset.
Generating multiboot menu entries for PBE.
Generating multiboot menu entries for ABE.
Disabling splashimage
No more bootadm entries. Deletion of bootadm entries is complete.
GRUB menu default setting is unaffected
Done eliding bootadm entries.

**********************************************************************

The target boot environment has been activated. It will be used when you
reboot. NOTE: You MUST NOT USE the reboot, halt, or uadmin commands. You
MUST USE either the init or the shutdown command when you reboot. If you
do not use either init or shutdown, the system will not boot using the
target BE.

**********************************************************************

In case of a failure while booting to the target BE, the following process
needs to be followed to fallback to the currently working boot environment:

1. Boot from Solaris failsafe or boot in single user mode from the Solaris
Install CD or Network.

2. Mount the Parent boot environment root slice to some directory (like
/mnt). You can use the following command to mount:

mount -Fzfs /dev/dsk/c0t0d0s0 /mnt

3. Run utility with out any arguments from the Parent boot
environment root slice, as shown below:

/mnt/sbin/luactivate

4. luactivate, activates the previous working boot environment and
indicates the result.

5. Exit Single User mode and reboot the machine.

**********************************************************************

Modifying boot archive service
Propagating findroot GRUB for menu conversion.
File propagation successful
File propagation successful
File propagation successful
File propagation successful
Deleting stale GRUB loader from all BEs.
File deletion successful
File deletion successful
File deletion successful
Activation of boot environment successful.

Important note: You MUST NOT USE the reboot, halt, or uadmin commands. You
MUST USE either the init or the shutdown command when you reboot. If you
do not use either init or shutdown, the system will not boot using the
target BE.

We can verify that Solaris_10_u8 will be active on reboot:

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

Before the reboot here is the content of /etc/release:
bash-3.00# cat /etc/release
Solaris 10 5/09 s10x_u7wos_08 X86
Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.
Assembled 30 March 2009
bash-3.00# uname -a
SunOS vigilante 5.10 Generic_142901-01 i86pc i386 i86pc

Now, we are ready to reboot the system:

bash-3.00# sync
bash-3.00# init 6
updating /platform/i86pc/boot_archive
propagating updated GRUB menu
Saving existing file in top level dataset for BE as //boot/grub/menu.lst.prev.
Saving existing file in top level dataset for BE as //boot/grub/menu.lst.prev.
File propagation successful
File propagation successful
File propagation successful
File propagation successful
bash-3.00# Hangup

after the boot:

bash-3.00# cat /etc/release
Solaris 10 10/09 s10x_u8wos_08a X86
Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.
Assembled 16 September 2009
bash-3.00# uname -a
SunOS vigilante 5.10 Generic_141445-09 i86pc i386 i86pc

Mount ISO image in Solaris 10 x86

Tuesday, February 16th, 2010

To mount ISO image in Solaris 10 x86 (this should work with Sparc as well), do the following:

bash-3.00# lofiadm -a /export/home/user/sol-10-u8-ga-x86-dvd.iso /dev/lofi/1 ### create new lofi device
bash-3.00# mount -F hsfs -o ro /dev/lofi/1 /mnt ### mount lofi device
bash-3.00# ls -al /mnt/ ### Solaris 10 x86 install DVD image is mounted
total 1007
dr-xr-xr-x 2 root sys 4096 Sep 16 18:31 .
drwxr-xr-x 25 root root 26 Feb 2 13:33 ..
-r–r–r– 1 root root 2048 Sep 16 18:31 .catalog
-r–r–r– 1 root root 68 Aug 21 15:32 .cdtoc
dr-xr-xr-x 5 root root 2048 Sep 16 18:31 .install
lr-xr-xr-x 1 root root 33 Sep 16 18:30 .install_config -> ./Solaris_10/Misc/.install_config
-r–r–r– 1 root root 388 Aug 21 15:32 .slicemapfile
-r–r–r– 1 root root 20 Aug 21 15:32 .volume.inf
-r–r–r– 1 root root 27 Sep 16 18:16 .volume.inf.1
-r–r–r– 1 root root 27 Sep 16 18:17 .volume.inf.2
-r–r–r– 1 root root 22 Sep 16 18:15 .volume.inf.3
-r–r–r– 1 root root 22 Sep 16 18:15 .volume.inf.4
-r–r–r– 1 root root 22 Sep 16 18:16 .volume.inf.5
-r–r–r– 1 root root 6582 Aug 21 15:34 Copyright
-r–r–r– 1 root root 487593 Aug 21 15:32 JDS-THIRDPARTYLICENSEREADME
dr-xr-xr-x 2 root root 2048 Sep 16 18:30 License
dr-xr-xr-x 7 root root 2048 Sep 16 18:31 Solaris_10
dr-xr-xr-x 5 root root 2048 Sep 16 18:31 boot
-r-xr-xr-x 1 root root 257 Sep 16 18:16 installer