OpenSolaris workarounds and useful commands

I have a file lying around with instructions for getting around some OpenSolaris issues I’ve ran into lately, they may prove useful to others.

ld: fatal: file /opt/sunstudio12.1/prod/lib/crti.o: section .rela.annotate has invalid type [ SHT_RELA ]
ld is trying to do 64-bit linking on a non-64 bit system, do export LD_NOEXEC_64=1 and retry the compile.

readline warning turning off output flushing
This is a bug triggered by an upgrade from the 2009.06 stable to certain dev versions. Add clone:ptmx 0666 root sys to /etc/minor_perm

Broken keyboard layout, SHIFT+2 produces ” and SHIFT+’ produces @ (among other oddities)
This is most probably Acer Extensa 5620Z specific but pressing Fn+I fixes it. (Left size of Extensa keyboard: [CTRL][Fn][WIN][ALT])

More a tip than a workaround:

Update system
2009.06 has some very outdated packages and some important packages are not available in its /release repo. Complete upgrade:
pfexec pkg set-publisher -O http://pkg.opensolaris.org/dev opensolaris.org
pfexec pkg image-update

Will update if I run into any other issues or think of anything I’ve missed.

Update: 26/12/09:

The snapshot manager service has been placed offline due to a dependency problem

This message is displayed when trying open the Time Slider GUI interface. Look at the processes it lists, they will look something like:

maintenance svc:/system/filesystem/zfs/auto-snapshot:frequent
maintenance svc:/system/filesystem/zfs/auto-snapshot:daily

For each one run pfexec svcadm clear svc:/system/filesystem/zfs/auto-snapshot:TIMEPERIOD

So in my example, run:

pfexec svcadm clear svc:/system/filesystem/zfs/auto-snapshot:frequent
pfexec svcadm clear svc:/system/filesystem/zfs/auto-snapshot:daily

Start, restart, stop apache

Slipped my mind to mention this earlier, this is a bit unintuitive for Debian-people used to /etc/init.d/apache2

pfexec svcadm COMMAND http:apache22

Examples:

pfexec svcadm start http:apache22
pfexec svcadm restart http:apache22
pfexec svcadm stop http:apache22

Useless boot environment images

Another one that slipped my mind. pkg image-update creates new boot environments, assuming you don’t need the old images and want the diskspace back:

pfexec beadm destroy BENAME

Example:

pfexec beadm destroy opensolaris-1

View ZFS snapshots and their disk-usage

I tend to get paranoid as to how much space my ZFS auto-snapshots are using:

zfs list -t snapshot

Update: 11/01/10

Package ‘xrender’, required by ‘cairo’, not found

You get this if you when requesting details of GTK libs via pkg-config, eg. pkg-config --libs gtkmm-2.4. You need xorg-headers; pfexec pkg install SUNWxorg-headers. You will get this error trying to install Gtk2 for Perl.

Update: 21/06/2010

OpenSolaris continuously restarts while booting

This is an issue caused by updating to the current /dev revision. If you boot in graphical mode, the orange loading bar will appear for a few seconds, the machine will then restart, get back to the orange loading bar and restart again. This will continue ad infinitum.
Fixing it is simple, thanks to ZFS and multiple boot environments.

I did this from a straight upgrade from 2009.06 to /dev 134. My broken /dev boot environment was called opensolaris-1.

Boot into your last working boot environment, in my case this was OpenSolaris 2009.06

Run the following commands:

pfexec beadm mount opensolaris-1 /mnt
pfexec bootadm update-archive -F -R /mnt
pfexec beadm unmount opensolaris-1

Be sure to replace opensolaris-1 with the name of the broken boot environment. If you have gone straight from a fresh install of 2009.06 to the latest dev it will be called opensolaris-1, however if you have done other image-updates previously it may be opensolaris-2 or opensolaris-3 etc. (or if you give your boot environments custom names, something completely different).


This entry was posted on Monday, December 21st, 2009 at 4:18 pm and is filed under opensolaris.

You can follow any responses to this entry through the RSS 2.0 feed.

You can leave a response, or trackback from your own site.

(4) Responses to “OpenSolaris workarounds and useful commands”

  1. michael masterson Says:
    -

    THANK YOU THANK YOU THANK YOU THANK YOU for the fix to the missing xrender.

  2. Wing Wong Says:
    -

    Thanks for the great tips. Upgraded OpenSolaris/DEV recently and got the shell bug. Your tip fixed it right up.

  3. Aldrin Says:
    -

    Thank you so much! for the “readline: warning turning off output flushing” fix.

    I was getting so frustrated after updating the image to latest dev release because the terminal console was unusable.

    By the way, “su” was unusable too, since, after doing “su”, nothing echos to the screen. Had type su root -c “vi /etc/minor_perm” in gedit and use the “/” from the numeric keypad and then copy & past in the console and then wait about 10 seconds to be able to view and edit the file :-(

    Again, thank you so much!

  4. The Intersect » Sun we Hardly Knew Ye Says:
    -

    [...] that’s that. My workarounds post won’t be updated any more, since there is nothing to workaround. The hits on that post from [...]

Leave a Reply