Doth quoth the DaveM

Oops!

Wednesday Aug 27, 2008

Some weeks back, my manager gave me a HP Compaq 8510p laptop to use, on condition that I install OpenSolaris, use it, and report problems. Sounded good to me, so I grabbed it.

Over the past several weeks, I've gotten OpenSolaris and various tools I use installed and working nicely, and was pretty productive on the laptop. I figured out how to hook up and use the 24.1 inch monitor here at work[1], figured out how to customize the system using NWAM (NetWork Auto-Magic). Everything was going good.

I turned on my laptop on Sunday, and it gave me a grub> prompt. Oh oh. GRUB couldn't see anything. I thought maybe the laptop had taken a hard knock on a trip to downtown Austin on Saturday morning. Even scarier, I tried to recover using an OpenSolaris 2008.05 LiveCD I had around, but it gave me errors. At first I thought the errors were something seriously wrong with the system, but on closer inspection, noticed it was complaining about a bad sector on the CD. So I burned another CD, and it started fine. The OpenSolaris from the new copy of the LiveCD could see the partitions, but it couldn't access the ZFS pool on hard disk. At this point, I gave up and re-installed OpenSolaris 2008.05 from the CD. That went fine.

But during the install, I recalled that I had seen this when looking at the ZFS pool using zpool status on Friday:

  pool: rpool
 state: ONLINE
status: The pool is formatted using an older on-disk format.  The pool can
	still be used, but some features are unavailable.
action: Upgrade the pool using 'zpool upgrade'.  Once this is done, the
	pool will no longer be accessible on older software versions.
 scrub: none requested
config:

	NAME        STATE     READ WRITE CKSUM
	rpool       ONLINE       0     0     0
	  c5t0d0s0  ONLINE       0     0     0

errors: No known data errors
    

I had gone ahead and upgraded rpool. Hmm, could this be it? I then recalled reading something on some OpenSolaris e-mail list about this, where GRUB couldn't read the latest ZFS format, or if it could, you needed to update GRUB on the disk. There's an e-mail thread that discusses this. It turns out I *might* have been able to recover, had I had a nv94 or higher CD

So the moral of that story is to make sure you know what you're doing before upgrading a root ZFS pool. Also, make backups of system configuration information and scripts!

After I installed, I knew I'd need a few things to be productive:

  • Sun Studio Express
  • OpenOffice
  • Punchin
  • XEmacs
  • tkbiff
  • NWAM scripts

Sun Studio Express and OpenOffice were easy to get, I just grabbed them using from the IPS repository by using pkg install .... Punchin was a chicken and egg problem, in that I had to get punched in to get the packages. Fortunately, I have a Solaris Express VMware virtual machine on my home PC, and used that to punchin and grab the packages, then used scp to copy the packages and credentials to the laptop.

tkbiff was trivial. XEmacs was a bit more involved, though I was surprised how little it took to get it built and working. Turns out I remembered a few things from the first time around. I wanted to use the old X Athena widgets, but the header files disappeared from OpenSolaris several builds ago. But IPS lets you install old versions of packages, so I figured out which package and the version I needed and installed it.

NWAM has been more interesting, and is one area where I really wish I'd saved a backup copy of the scripts. Grr. You can write a script that NWAM invokes when there's a change in the system's network interfaces, and from that you can return a name. NWAM invokes bringup and teardown scripts associated with that name. So my typical way of working is wireless at home and wired at work. When I'm at work, I use NIS, at home, I don't. Sadly, I'm still working on getting these right, and when I do, I'll write up another blog entry about them.


Footnotes:

[1] If the monitor is connected and plugged in when Xorg starts, it just works, but it drivers the laptop display at 1920x1200, which the laptop doesn't support. So I use xrandr --output LVDS --off to make it work.

Like this post? del.icio.us | furl | slashdot | technorati | digg