Archive for OpenSolaris

New to OpenSolaris 2008.05 – I was

Well, for my file server I decided to go with OpenSolaris because of ZFS. I’ve read several good things about it, so I wanted to test it out.

After using several Linux distros over the last years, I was a bit skeptic about the whole Solaris thing, but oh well…

The install went smooth, and after some poking around I decided to turn of the GUI (GDM/X). I didn’t need it since I’m just using SSH/PuTTY to log in to my server, so why do I want it running ?

After looking around on the net, I found the command to disable GDM:

pfexec svcadm disable gdm

Next problem, installing/updating packages. I’ve been used to apt for a long while now, and this was one of my bigger concerns when deciding to try OpenSolaris. But luckily they’d just added IPS (Integrated Package System I think), a system that reminds me of a package tool I’m used to using.
So, how does it work?

Refresh the package list:

pfexec pkg refresh

Search for a package (gcc in this case):

pfexec pkg search -r gcc

Generated this output at my system:
INDEX ACTION VALUE PACKAGE
basename link usr/bin/gcc pkg:/SUNWgcc@3.4.3-0.86
basename link usr/bin/gcc pkg:/SUNWgcc@3.4.3-0.79
basename link usr/bin/gcc pkg:/SUNWgcc@3.4.3-0.75
basename link usr/bin/gcc pkg:/SUNWgcc@3.4.3-0.86
basename link usr/bin/gcc pkg:/SUNWgcc@3.4.3-0.89
basename link usr/bin/gcc pkg:/SUNWgcc@3.4.3-0.90
basename link usr/bin/gcc pkg:/SUNWgcc@3.4.3-0.91
basename link usr/bin/gcc pkg:/SUNWgcc@3.4.3-0.93

Then, to install a package (gcc in this case):

pfexec pkg install SUNWgcc

Then I found out that there are other IPS repository’s that I can use (www.blastwave.org and sunfreeware.com). Now, how do I add them?

pfexec pkg set-authority -O http://pkg.sunfreeware.com:9000/ Companion
pfexec pkg set-authority -O http://blastwave.network.com:10000/ Blastwave

To see what repositories you have in your system, do:

pkg authority

I’ve noticed that it’s not always “pkg search” will find the package I’m looking for, so now I always check the package sites (http://blastwave.network.com:10000/ and http://pkg.sunfreeware.com:9000/) manually if I don’t get a hit with “pkg search”.

To do a ‘full’ update of your system:

It it always recommended to upgrade PKG to the latest version first so do this:

BUILD=`uname -v | sed s/snv_//`
pfexec pkg refresh
pfexec pkg install SUNWipkg@0.5.11-0.$BUILD
pfexec pkg install entire@0.5.11-0.$BUILD

pfexec pkg image-update

This will also create a ZFS snapshot of your current system before the upgrade, and then do a update.
Important:
Remeber to update GRUB afterwards like this:

beadm list (you’ll see an BE that has ‘Activate on reboot’=YES, notice this name.)

In the last versions, this won’t be the case by default. Then do ‘pfexec beadm activate name (name is the last entry, like opensolaris-x)

pfexec beadm mount opensolaris-x /mnt
pfexec /mnt/boot/solaris/bin/update_grub -R /mnt
pfexec beadm unmount opensolaris-x

Important:
If you have a pre build 93 system (run: ‘uname -v’ to see what you have), you MUST read this page: http://mail.opensolaris.org/pipermail/indiana-discuss/2008-July/007664.html. And it’s even more important if you have build 86 (as I had when installing from the latest OS2008.05).

Edit: Added some stuff to the ‘image-update’ part.

Comments (7)