Daily Archives: July 16, 2008
I’ve had quite a time of late trying to set up a developer environment for the web stack.
First, I was going to do it on Solaris 10, as preinstalled on the machine supplied by Sun. Seems I have to install a huge package called sfwnv (Sun Freeware Nevada – the nv being the codename for current opensolaris work, or somesuch).
So I go to the sfwnv instructions, and I need a bunch of prerequisites. One of these is a package called ON, which it makes clear has to be a much more recent version than anything in Solaris 10.
So I go to ON instructions, and download a bunch of stuff, including a binary-only package. But hang on! This isn’t a package, it’s a bloomin’ filesystem, containing a whole bunch of Unix core stuff. /usr/bin and /usr/lib. Dammit, if I overwrite that stuff I’m sure to end up with a system that’s unusable!
Plan B. Download OpenSolaris 2008.05 and burn it to a CD. This is sufficiently up-to-date that I won’t have to overwrite all that core stuff, right? And it’s a nevada build (snv_86), so all this nevada stuff will integrate natively, right?
Right, is there a partition I can install this to? df tells me there is indeed an unused partition, and it’s 99% of my disc (well, I haven’t had the machine long enough to use significant space beyond the OS itself). So let’s just boot off the CD and install OpenSolaris.
The install is somewhat disconcerting: it tells me I have four partitions (which I’d already ascertained with df), and I can deduce from their respective sizes which is the free one. But it’s alarmingly vague, and there’s no option to get details of the disc. Oh well, go for it. At the end of the install (which goes very smoothly), I am again disconcerted that it doesn’t present me an option to set up the boot loader (grub). Oh well, try it.
The machine reboots just fine, but the boot menu is just OpenSolaris – the Solaris 10 is gone! Booting again from the live CD, and the same thing with a Linux CD, fail to find the Solaris 10 partitions. Turns out they weren’t partitions, they were Solaris slices, and the OpenSolaris installer doesn’t grok slices, so it just overwrote them. Grrr … I should’ve known – I’ve never been a Solaris sysop, but I have done FreeBSD, and that uses slices too. My excuse: the Solaris 10 is the first operating system I haven’t installed myself in the last twelve years. But what’s the OpenSolaris installer’s excuse?
Nevermind, I can work on OpenSolaris, can’t I? Of course I have copies of my data. Now that I’m running an snv release, installing sfwnv will be straightforward, right?
Turns out it’s an epic task from here. I should’ve got a DVD-sized point release of SXCE instead. Never mind: I can follow the instructions in Sriram’s blog. Sriram tells me to start by updating the package manager/repository itself, then install a whole bunch of stuff. The amount of stuff this process downloads is in the gigabyte range, so it’s an all-day job just installing packages. Shut down at the end of the day.
Powering up next day, the boot menu has changed. Instead of one bootable image, I now have four:
- OpenSolaris 2008.05 snv_86_rc3 X86
The first – OpenSolaris as installed from the CD, will no longer boot: it comes up with a bunch of errors:
not found: hvmboot_rootconf not found: spa_boot_init not found: dcopy_cmd_alloc not found: dcopy_cmd_post not found: dcopy_alloc not found: dcopy_cmd_poll not found: dcopy_cmd_free not found: dcopy_free do_relocations: /kernel/amd64/genunix do_relocate failed krtld: errors during load/link phase krtld: could neither locate nor resolve symbols for: /platform/i86pc/kernel/amd64/unix in the boot archive. Please verify that this file matches what is found in the boot archive.
But the others are fine. Using (for no particular reason) the third, I continued the process described in Sriram’s blog, which involved (again) installing ON. Only this ON is different: it’s a package under the management of pkgadd, and didn’t want to overwrite all my core utilities. Along with that, I (re)installed other stuff to get myself a working environment: for example, the punchin VPN client so I can access Sun’s network, and slocate as recently blogged here.
Eventually I came to the point of trying to build the sfwnv package. Parts of it were successful, but much also failed. With about 100Mb of build log(!), this is a much bigger task than I want to try and fix by hand. So let’s see if Jyri’s blog entry can help. Jyri has another long list of packages to install, and when I’ve installed them, the image they’re installed in is no longer bootable – same problem as before with the original OpenSolaris 2008.05.
I can still boot the second of the boot images. So I do. But now, a whole bunch of stuff I’ve installed has gone again. My sfw user and slocate group don’t exist. The whole of /usr/local (including punchin and slocate) is gone, along with /var/db/slocate. And b***** me if ON hasn’t gone, too! Aaargh!!!
I can also google what’s been happening to my boot images: there’s a thread here on the subject. So now I know what I should’ve done, but there’s no way to go back and do it, nor am I clear how I should know whether it’s necessary when I install any particular package. I can go on from where I am, or restart from scratch. Not particularly keen on either.
This is about where I am now: I’ve reinstalled stuff, but I’m still missing some of what I need to build sfwnv (and which I had on the previous boot image before that died). I’m tempted by an alternative suggestion from Sriram: install SXCE in a virtual machine. I think I need to get hold of an SXCE DVD to do that, and I don’t want to risk wiping/losing such a huge download until I have it on the physical medium.
Yow! There’s lots of goodies in OpenSolaris, but running it as a developer is much more bleeding edge than anything I’m accustomed to.
 That includes bundled Windows on PCs that I’ve had no choice about. First thing I’ve always done with that is to wipe it, and (if I want to have windows available) reinstall into a small partition.