Stuff Nobody Cares About

The soul...
The feeds...
The links...
Wednesday Dec 10, 2008

Checking your OpenSolaris version via the net...

Can't quite remember what level of Sun OpenSolaris you're running? Easy enough:


shumira:/tmp> pfexec pkg info -l entire
Name: entire
Summary: entire incorporation
State: Installed
Authority: opensolaris.org
Version: 0.5-DOT-11
Build Release: 5.11
Branch: 0.101
Packaging Date: Thu Nov 6 17:09:44 2008
Size: 0.00 B
FMRI: pkg:/entire-AT-0.5-DOT-11,5.11-0.101:20081106T170944Z

Want to find out what's available?


shumira:/tmp> pfexec pkg info -r entire
Name: entire
Summary: entire incorporation
State: Not installed
Authority: opensolaris.org
Version: 0.5.11
Build Release: 5.11
Branch: 0.101
Packaging Date: Thu Dec 4 01:09:54 2008
Size: 0.00 B
FMRI: pkg:/entire-AT-0.5.11,5.11-0.101:20081204T010954Z

So 'entire' is the package you check... '-r' for the remote copy on the package servers, and '-l' for your local installed version.

Wednesday Nov 19, 2008

God damn, the blog spam...

They just don't stop. And while I moderate comments - I'm not interested in my site being used for google-bombing - it gets annoying.

Let's try a new trick... if you post a comment, you HAVE to have a proper referrer.

Tuesday Sep 02, 2008

Jumpstarting a SPARC over the WAN - Part 1, the WAN-boot.

Before you can do anything else, you need to get your SPARC booting the Solaris install environment. Normally this is done via RARP/DHCP, TFTP, and NFS.

With no local server under control, and no willing/knowledgeable admins for the other machines on the subnet, RARP/DHCP has been ruled out. However, as I mentioned before, you don't really need RARP or DHCP. You can do most of what you need via the PROM.

First off, you'll need a webserver. This does not necessarily have to be the same machine you've got supplying your install media... but, half the time, you'll make your life easier if it is. I would recommend that it be Solaris.

You'll need to configure the wanboot cgi. First, on your webserver, create the directory /etc/netboot. It will not exist by default, and this is where wanboot-cgi will look for its configuration files. Make sure this directory is accessible by your webserver user.

Secondly, create a directory under your webserver's document-root named "wanboot". On a typical Solaris 10 machine, using the Sun-supplied Apache 2 webserver, this will be located under /var/apache2/htdocs... so, you'd make /var/apache2/htdocs/wanboot.

If you're like me, and your personal-only webserver has ExecCGI turned on for the whole documentroot, you can copy the wanboot-cgi from /usr/lib/inet/wanboot/wanboot-cgi into the wanboot directory. I also have "index.cgi" as one of the Index pages, so I symlinked wanboot-cgi as index.cgi. If your webserver is more secured, you might have to copy wanboot-cgi into your cgi-bin directory as wanboot.cgi. It really makes no difference, I'm just lazy.

Next step, you need to configure your /etc/netboot/wanboot.conf. wanboot-cgi is picky about this file... annoyingly so. So, to make your life easier, here's what I used:


boot_file=/wanboot/sun4v.wanboot
root_server=http://192.168.1.10:80/wanboot/
root_file=/wanboot/miniroot.s10sparc
server_authentication=no
client_authentication=no
system_conf=sys-conf.s10-sparc

Note a few things about this configuration. First off, 192.168.1.10 (example IP) is the IP address of my *webserver*. Not the machine with an NFS export. Also note the boot_file and root_file settings, which refer to files we've not set up yet. Finally, a warning: wanboot-cgi seems sensitive to the order of the lines in this file, and its errors are not helpful. Overall, wanboot-cgi seems flaky enough that I'm considering rewriting it. It's a trivial little program, and could probably be easily re-implemented in Perl.

We need to grab the appropriate wanboot bootloader for our platform. I'm Jumpstarting a T2000, which is a sun4v platform, as is the 5140 and 5240. You might have a different platform. You can find the proper loader on your install media, under Solaris_10/Tools/Boot/platform/. For my sun4v, I wanted Solaris_10/Tools/Boot/platform/sun4v/wanboot. To match my configuration above, I copied that file to /var/apache2/htdocs/wanboot/sun4v.wanboot.

(You can't use inetboot here like you would if you were getting the loader via TFTP. inetboot will happily mount your root filesystem over NFS, but the problem is that it'll try to get the information needed to do so via bootparams, and you can't supply it with such - again, no local network control.)

You can test whether wanboot-cgi is happy by trying to access it with your web browser. For example, if your webserver was the same as mine, you could try to access http://192.168.1.10/wanboot/index.cgi?CONTENT=bootfile&IP=192.168.2.0&CID=0, and your browser should offer you a binary file to download.

The next step will be building the miniroot. Yes, wanboot causes your SPARC to boot pretty much just like an x86 machine... no NFS root, using a miniroot archive instead. Fortunately, setup_install_server has a flag, -w, to do so for you. You'll probably do this on the server with your install media, and copy it over (which is why it's easier if you have the webserver and install server be the same...). Myself, I just made a directory, /tmp/wantmp, and ran "./setup_install_server -b -w /tmp/wantmp /tmp/wantmp".

Once setup_install_server is done, you'll have a file, /tmp/wantmp/miniroot. It'll be about 300 megs or so. Copy this file to your webserver... if you're matching the configuration above, you'll be copying it to /var/apache2/htdocs/wanboot/sun4v.miniroot. The file is not gzipped. Unlike the miniroot on x86, you don't want it to be.

You can test whether or not *this* file is working by changing "bootfile" in the URL above to "bootfs".

Now, you need to configure your PROM to go for the right spot. This is actually the easier part, especially if you've read the eeprom(1m) manpage. At the "ok" prompt, issue the command:

setenv network-boot-arguments host-ip=192.168.2.45,router-ip=192.168.2.1,subnet-mask=255.255.255.0,hostname=client,file=http://192.168.1.10/wanboot

Substitute IPs as needed. Hostname should match whatever you're going to name this machine. It doesn't seem important until you're using a "hostname" rule in your Jumpstart rules file.

At this point, you should be able to issue a "boot net - install", and the system will start wanboot, rush off to your webserver to fetch the sun4v.wanboot and sun4v.miniroot files via wanboot-cgi, and start booting. Be patient, the miniroot is a big file.

After that, the install will promptly fail. We'll deal with that next.

Monday Oct 01, 2007

Febuary 22nd!

Holy crap, why do I even run this thing if I'm not going to post to it? I suck.