All entries for Tuesday 15 July 2008

July 15, 2008

Opensolaris adventure, part 4; a quick diversion into iLOM

Follow-up to Opensolaris adventure, part 3: pkg from Secret Plans and Clever Tricks

Whilst I’ve got a machine that I can happily reboot without pissing anyone off, I thought I’d see if I could do anything to improve the default iLOM setup.

By default, the iLOM GUI console redirection is enabled, but not the serial console. This is ok, but it has some issues. You can’t use the GUI console if there’s any kind of firewall between you and the server, since it initiates connections to the server on random high ports. So ssh-level access to the console would be nice.

Going into the ilom and doing ‘start /SP/console’ produces no output. A bit more googling suggested that doing eeprom console=ttya might help, so I tried that. Now when rebooting I get output, and once the box is booted I can get a console session via ssh, but I also seem to have aquired a bogus, and totally unbootable, new default entry in the grub menu, titled ‘solaris bootenv RC’ . I note also that the grub menu isn’t accessible via the serial connection – one of the few things that you really would want to be able to access. So that’s not a roaring success, then …

So, I tried eeprom console=text to put it back, which disabled the text-based console access, but still left the bogus grub entry. So, I edited /rpool/boot/grub/menu.lst and changed the ‘default’ option from 3 to 2 (2 being the new snv_93 entry, assuming they’re numbered starting from 0). I also commented out the ‘splashscreen’ entry. Reboot again, and hey presto! I can now select which image to boot from a ssh connection :-)

I suspect that I’ve broken the ability to do serial access to the machine. But TBH that’s probably not too much of a pain. I should probably check that it’s still possible to put a ‘real’ keyboard/monitor/mouse into the back of the box in extremis, should that be needed. Update serial access works just fine :-)

Opensolaris adventure, part 3: pkg

Follow-up to Opensolaris adventure part 2: network and mirroring from Secret Plans and Clever Tricks

For my next trick, I’ll be trying out pkg, the opensolaris packaging system.

I have moderately high standards for this; I use ubuntu on the desktop, so apt is my benchmark for how a unix package management system should operate. Ian Murdock (ex. Debian) is behind OpenSolaris’s pkg, so hopefully the experience should be comparable.

Step 1:

# pkg refresh
# pkg install SUNWipkg

... time passes...


so, a basic smoke-test passes. I can install packages :-). Now, let’s have a look in the repo and see if we can find anything useful

#pkg search -r apache

... nothing ...

hmm… that’s not so good. Where’s apache? a bit of googling suggests that the package is called ‘SUNWapch22’

# pkg search -r apch
# pkg search -r SUNWapch22
# pkg search -r httpd
basename   file      usr/apache2/bin/httpd     pkg:/SUNWapch2@2.2.3-0.75

ah-ha! It seems like pkg search doesn’t search package names and descriptions (as aptitude search does) but rather, file contents. I think that’s a little bit weird; it wouldn’t have occurred to me to specify the name of a file rather than some part of the description, but maybe it makes more sense. For a lot of packages (lynx , say), the name of the binary is the term you’d most likely search on, so it should work well in that circumstance.

pkg install SUNWapch2

So now I have apache; import the manifest and enable the service and away we go!

OK, now to try something a bit more exciting; a distribution upgrade to the latest (snv_93) kernel and associated goodies.

pkg image-update

It dowloads for a couple of hours (Sun repos seem to be slower than the ubuntu ones), and finally announces that it’s made me a new boot environment.

zfs list shows me a new set of file systems under rpool/ROOT/opensolaris-1, and beadm list tells me I now have 2 boot environments; with the new one set to become active on a reboot. Off we go then!

I reboot, wait a bit, and try and ssh back into the box. Hmm; connection refused. I fire up the ilom console and take a look. The system appears to be continually rebooting – when the grub screen comes up, the new BE is present, but as soon as grub tries to boot it, the system goes back to the BIOS startup screen and reboots again :-(

So, next time round I select the old boot environment from the grub menu, and I’m back into my 05.08 environment. So, the fact that the image-update appears to have failed is a bit sucky, but, unlike a failed kernel update in ubuntu (which is rare, but generally leaves you with a broken X and a whole bunch of packages needing to be manually rolled back), I’m seamlessly back to where I started. ZFS FTW!

Anyway, a bit more googling reveals that image-update isn’t quite working yet, you need to manually update the boot archive.

# mkdir /tmp/foo
# mount -F zfs rpool/ROOT/opensolaris-1
# /tmp/foo/boot/solaris/bin/update_grub -R /tmp/foo

Reboot again, and this time when the grub menu comes up, I have a third option, for snv_93. It’s pre-selected, so I let it boot; and it works fine :-) It’s a bit confusing that I still have the ‘opensolaris-1’ item in the grub menu, but it’s not causing any harm so I’m going to leave it there for the moment.

So, now I have a shiny new kernel with all the latest toys. What else do I want?

Well, blastwave and the SFW repositories would be nice:

# pkg set-authority -O sunfreeware
# pkg set-authority -O blastwave
# pkg refresh
# pkg search -r lynx
INDEX      ACTION    VALUE                     PACKAGE
basename   file      opt/csw/bin/lynx          pkg:/IPSlynx@0.5.11-2.6
basename   file      opt/sfw/bin/lynx          pkg:/IPSFWlynx@0.5.11-5.7

Sorted. Next, some zones, I think…

Most recent entries


Search this blog

on twitter...


    Not signed in
    Sign in

    Powered by BlogBuilder
    © MMXIX