Gopi Desaboyina Solaris Blogs

Just another weblog

/packages/ufs-file-system: Last Trap: Division by Zero

{0} ok boot -sv
SC Alert: Host System has Reset
ChassisSerialNumber xxxxxxxxx
Sun Fire T200, No Keyboard
Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
OpenBoot 4.30.4, 32640 MB memory available, Serial #80469064.
Ethernet address xxxxxxxxxxx, Host ID: xxxxxxxxx.
Boot device: /pci@780/pci@0/pci@9/scsi@0/disk@0  File and args: -sv
ERROR: /packages/ufs-file-system: Last Trap: Division by Zero
{0} ok


System has OS on mirrored zpool.

Error indicates that there is a problem with boot block. since we’ve ZFS filesystem and some how due to corruption it’s taking as UFS and throwing above error. to fix this issue. That is what I did.


1. Boot CDROM or net which has Solaris 10 version later than U6. Prefer U8 or U9.

2. zpool import  & check for rpool is available.

# zpool import 
pool: rpool 
id: 10247304097055351608
state: ONLINE
action: The pool can be imported using its name or numeric identifier.
        rpool         ONLINE
          mirror      ONLINE
            c0t0d0s0  ONLINE
            c0t1d0s0  ONLINE

3. zpool import -R /a rpool. You can ignore the errors it thrown below.

#  zpool import -R /a rpool 
cannot mount ‘/a/export’: failed to create mountpoint
cannot mount ‘/a/export/home’: failed to create mountpoint
cannot mount ‘/a/rpool’: failed to create mountpoint


4. zfs list

# zfs list
rpool                 55.2G  11.7G    97K  /a/rpool
rpool/ROOT            13.9G  11.7G    21K  legacy
rpool/ROOT/sol10      13.9G  11.7G  4.58G  /a
rpool/ROOT/sol10/var  9.34G   671M  9.34G  /a/var
rpool/dump            8.00G  11.7G  8.00G  –
rpool/export            51K  11.7G    23K  /a/export
rpool/export/home       28K  5.00G    28K  /a/export/home
rpool/swap            32.3G  11.7G  32.3G  –
rpool/tmp              974M  4.05G   974M  legacy

5. zfs mount rpool/ROOT/sol10   # Mount the BE on to /a

6. cd /a ; ls -ltr & see if you can all the files.
7. installboot -F zfs /a/usr/platform/`uname -i`/lib/fs/zfs/bootblk /dev/rdsk/c0t0d0s0 #This will install the boot blk from same image to sector 0.
8. bootadm update-archive -R /a      # Updates the boot-archive. Normally nor required unless it throws error on boot-archive.


After all above steps. system booted without any issues.


May 31, 2011 Posted by | Solaris | | 1 Comment

Solaris 10: Patch fails with install/checkinstall: test: argument expected

Example below:

/var/tmp/121012-03/SUNWcsu/install/checkinstall: test: argument expected

pkgadd: ERROR: checkinstall script did not complete successfully
Dryrun complete.
No changes were made to the system.


This Problem happens when your /var/sadm/pkg/<package name>/pkginfo file is corrupted or messed up. In most of the cases I’ve seen is due to PATCHLIST entry in pkginfo file has “unwanted characters” or patch names not in that format it expected.

PATCHLIST should contain <PATCH BASE NUMER><REVISION> separated by spaces.

Exmaple for above error when I looked at pkginfo file. it looked like this.

# cat /var/sadm/pkg/SUNWcsu/pkginfo |grep -i patchlist
PATCHLIST=118367-04 118371-07 118373-01 118872-04 118918-22 119042-10 119573-01 119574-02
 119578-30 119824-02 120044-01 120050-04 120062-01 120128-02 120618-01 120737-01 120816-01 
120830-05 120845-03 120988-01 121002-03 121012-02 121132-01 12641SUNW_OBSOLETES=
Issue was caused due to bad entry 12641SUNW_OBSOLETES=. I’ve seem some cases PATHCLIST will have
just some base number without any -REVISION then also we get this error. 
so correcting/removing that entry & installing patch again should resolve the issue.

May 19, 2011 Posted by | Solaris | | Leave a comment

Solaris 10 Patching issue: Patches fails with unhandled subprocess exit status ‘5’ (exit n branch)

Patch fails with below errors.

# /usr/sbin/patchadd 119254-78
Validating patches…

Loading patches installed on the system…


Loading patches requested to install.


Checking patches that you specified for installation.


Approved patches will be installed in this order:


Checking installed patches…
Executing prepatch script…

Patch 119254-78 failed to install due to a failure produced by pkgadd.

See /var/sadm/patch/119254-78/log for details

Patchadd is terminating.

Log shows below error.

patchadd exit code : 5
application of 119254-78 failed : unhandled subprocess exit status ‘5’ (exit n branch)
finish time : 2011.05.16 20:14:13
FINISHED : application of 119254-78


Whenever you get this kind of errors. Please make sure you’ve following things

1. patch dir & it’s sub-dir  is owned by root:root and read and execute permission is there for others

2. make sure there are nobody & noaccess users exist in your machine. if any one of them is missing you would get this error.

3. so it’s better always install patches from /tmp or /var/tmp. If it’s patch bundle or cluster patch set. better do it from /var/tmp. that way even on reboot you wouldn’t loose unzipped version of patch set.

May 19, 2011 Posted by | Solaris | | 2 Comments