How to install and keep an obsolete Solaris package

If you (like me) are still using Solaris (why BTW, if I may ask?), then you might stumble upon the problem of disappearing packages. Let’s take, for example, gimp:

# pkg list -af gimp
NAME (PUBLISHER)          VERSION                    IFO
image/editor/gimp         2.6.10-     --o
image/editor/gimp         2.6.10-    ---
image/editor/gimp         2.6.10-    ---
image/editor/gimp         2.6.10-    ---
image/editor/gimp         2.6.10-     ---
image/editor/gimp         0.5.11-           ---

Flag “o” means “obsolete”. If you have version “2.6.10-” installed, and it gets updated to “2.6.10-” (which is obsolete), your package will get removed. If this what happened, here’s the path to restore it.

First, install the latest version before “o”:

pkg install -v image/editor/gimp@2.6.10-

Then “freeze” it:

# pkg freeze image/editor/gimp

Now if you run pkg list again, you will see two new flags:
“i” – installed
“f” – frozen

# pkg list -af gimp
NAME (PUBLISHER)            VERSION                    IFO
image/editor/gimp           2.6.10-     --o
image/editor/gimp           2.6.10-    if-
image/editor/gimp           2.6.10-    ---
image/editor/gimp           2.6.10-    ---
image/editor/gimp           2.6.10-     ---
image/editor/gimp           0.5.11-           ---

# pkg freeze
NAME               VERSION            DATE            COMMENT
image/editor/gimp  2.6.10- 15 Feb 2017 23:01:02 CET None

One-liner: how to check the SSL certificate expiration of several servers

for i in
  exp=`echo | openssl s_client -connect $i:443  2>/dev/null | 
  openssl x509 -noout -dates | fgrep notAfter | sed -e 's/^.*=//'`
  echo "$i        $exp"
done	    Feb  6 12:00:00 2018 GMT   Apr 20 10:01:10 2017 GMT

One-liner: how to count the total amount of specific lines in several files

egrep -c extended */*.conf | 
awk 'BEGIN {FS=":"; sum=0;}{sum +=$2} END {print sum}'  

BTW, using awk alone is slower:

time awk 'BEGIN {sum=0;}/extended/{sum++} END {print sum}' */*.conf

real	0m0.94s
user	0m0.91s
sys	0m0.01s

time egrep -c extended */*.conf | 
awk 'BEGIN {FS=":"; sum=0;}{sum +=$2} END {print sum}'

real	0m0.13s
user	0m0.10s
sys	0m0.02s

fgrep is slower than egrep:

time fgrep -c extended */*.conf | 
awk 'BEGIN {FS=":"; sum=0;}{sum +=$2} END {print sum}'

real	0m0.21s
user	0m0.17s
sys	0m0.03s

Firefox 18.0 crashes on Solaris

Update: fixed in v19.0beta (at least v19.0b1 build3 looks good): (19b1 does not save sessions, though ;-)

Firefox 18 (all betas and 18.0) crashes on Solaris 11 and OpenSolaris. The workaround is to set the following variables to “false”:


See bug 827971.

Default passwords

Solaris 11: root/solaris
Cyclades console servers (e.g. ACS4): root/tslinux
Avocent ACS5000 console servers: root/avocent
Avocent ACS6000 console servers: admin/avocent or root/linux
Cisco VPN3000: admin/admin
Cisco ASA: empty
Netscreen: netscreen/netscreen
Avocent/Cyclades PM IPDU: admin/pm8 root/linux

Solaris 11 EA (b173) ZFS pool versions

Solaris 11 EA (Sep 2011 build 173) updated zpool version to 33:

$ zpool upgrade -v
This system is currently running ZFS pool version 33.

The following versions are supported:

— ——————————————————–
1 Initial ZFS version
2 Ditto blocks (replicated metadata)
3 Hot spares and double parity RAID-Z
4 zpool history
5 Compression using the gzip algorithm
6 bootfs pool property
7 Separate intent log devices
8 Delegated administration
9 refquota and refreservation properties
10 Cache devices
11 Improved scrub performance
12 Snapshot properties
13 snapused property
14 passthrough-x aclinherit
15 user/group space accounting
16 stmf property support
17 Triple-parity RAID-Z
18 Snapshot user holds
19 Log device removal
20 Compression using zle (zero-length encoding)
21 Deduplication
22 Received properties (Solaris Nevada b130 Dec 2009)
23 Slim ZIL
24 System attributes
25 Improved scrub stats
26 Improved snapshot deletion performance
27 Improved snapshot creation performance
28 Multiple vdev replacements (ZFS for Linux)
29 RAID-Z/mirror hybrid allocator
30 Encryption
31 Improved ‘zfs list’ performance (Solaris 11 Express b151a Nov 2010)
32 One MB blocksize
33 Improved share support (Solaris 11 EA b173 Sep 2011)

Crash recovery after updating Win7 x64

Not sure if it’s a problem of VirtualBox, but when trying to install Win7x64 SP1 Windows stuck with the following message:

Fatal error C0000034 applying update operation 282 of 117809 (_00000…)

This method helped!

Continue reading “Crash recovery after updating Win7 x64”

Solaris and external USB disks

Short tutorial on how to connect, format, mount, detach and reconnect external USB disks.

The used disk is WD20EARS connected to a USB port via Sharkoon Quickport Pro cradle.

Basically, you need only two commands:

  • rmformat – to determine the device name/path
  • zpool – to do the rest (create ZFS, mount, attach and detach)

Continue reading “Solaris and external USB disks”