Sunday, June 08, 2008


For my thesis I've to produce plot of a lot of data. These plot are fairly simple: basically I have a set of points and I simply need to plot them in various styles. The data is taken from a text file containing the outputs of various simulations.

First attempt was python + gnuplot. It worked, by I wasn't satisfied. Then i discover matplotlib, a python plotting library. It does everything I need (actually a lot more than what I need) and it's in python... that is: integrate it into my parsing/manipulating script it's flawless.

In a few minutes I've managed to write a script that parses the data... manipulates it in the way I need (average/variation calculation and stuff like that), plots it, saves the plots in eps and in the end produces a latex file which shows all the generated plot.

I already was a fan of the coding speed of python. Now I've found another thing that make it even more appealing to me.

OpenSolaris upgrade & Boot Environment

I finally did an "image-update" of my OpenSolaris2008.05 installation. The process was a little slow (especially in the "generating plan" part) but otherwise effortless on my side.

Anyway some gigabyte of download later I had my OpenSolaris 2008.05 updated to svn90. The output tells me a new BE was created (like I knew what a BE is!) and it tells me to reboot when ready to use it.

To make a long story short booting using the new GRUB entry didn't work so well. The computer started the boot process but silently rebooted. So I begun to suspect something wasn't going that well as I thought. Rebooted in the old Boot Environment and did a little googling and here's what I found:

Instructions to update OpenSolaris 2008.05 to build 89 or later
The command "pkg image-update" can be used to update an OpenSolaris
2008.05 system to build 89 or later. However due to changes in the
GRUB boot system, one must manually update the Master Boot Record (MBR)
to include these latest changes.

When "pkg image-update" completes successfully, it will print a message
of the form

A clone of opensolaris exists and has been updated and
activated. On next boot the Boot Environment opensolaris-1 will
be mounted on '/'. Reboot when ready to switch to this updated

The name of the newly created clone can also be seen by looking for the
"Active on reboot" entry in the output of the "beadm list" command

$ beadm list
BE Active Active on Mountpoint Space
Name reboot Used
---- ------ --------- ---------- -----
opensolaris-1 no yes - 17.06M
opensolaris yes no - 33.92M

First, mount the clone under the /mnt directory

$ pfexec mount -F zfs rpool/ROOT/opensolaris-1 /mnt

Next, update the GRUB configuration on your ZFS boot device(s) using

$ pfexec /mnt/boot/solaris/bin/update_grub -R /mnt

When you're ready to boot into the updated boot environment, you can
reboot(1M) or init(1M) as usual.

Did that and finally I was able to boot using the new Boot Environment. Cool!
I've had to spend some time studying this... uhm... well I'll add it to the list of
things to check out.