I had a few spare moments, and an OpenAFS bug report about building on OpenSolaris seemed like it would be relatively easy to fix. So, I decided to bring up an OpenSolaris VM and go about fixing it. This is a record of all of the steps from bare metal to building a version of OpenAFS on Solaris.
The bug report was against the newest OpenSolaris development snapshot (snv_129), so that’s what I aimed to install. Much of the trauma below is because I was aiming for this, rather than the last release, 2009.06
- Install a VM with 2009.06. This is straightforward – boot off the image, and select the install icon on the desktop
- Upgrade the VM to snv_129. I used the instructions at http://pkg.opensolaris.org/dev/en/index.shtml
which boil down to:
pfexec pkg set-publisher -O http://pkg.opensolaris.org/dev opensolaris.org pfexec pkg image-update
- Marvel as the machine now panics on boot.
- Googling produced http://mail.opensolaris.org/pipermail/opensolaris-announce/2009-December/001343.html (to be fair, it is the release announcement), and the link to http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6820576. Adding -B disable-pcieb=true to the kernel line in grub is sufficient to get the machine up and running.
- Now, the machine will actually boot, but attempts to log in remotely are doomed with errors like
sshd: error: session_pty_req: session 0 alloc failed
Fortunately, http://defect.opensolaris.org/bz/show_bug.cgi?id=12380 contains both the cause, and a workaround – once you’ve managed to log in as root on console, just
chmod 666 /dev/ptmx
- Now that we’ve finally got a machine that works, make sure and add -B disable-pcieb=true to the kernel lines of the grub configuration in /rpool/boot/grub/menu.lst otherwise it will just panic when you reboot it.
- OpenSolaris ships without a development environment, so first, lets get one of those
pfexec pkg install ss-dev
- Current OpenAFS sources are in ‘git’, so get the git command suite
pfexec pkg install SUNWgit
You should then be able to download (with git clone) and build the current OpenAFS ‘master’ branch. At least you will be able to once the bug fixes that were the reason for embarking on this waste of time get into the tree.