Getting an OpenSolaris bootable USB drive

Tuesday, February 24th, 2009

This was not a straightforward process.

What I would have loved would be a ‘dd’able image. That way, from a linux server I could (as far as I know) write the image out and be done.

In any case, this was not to be.
First problem, I needed a Solaris system to create the USB image from.
For this I figured I could use Virtualbox, which I upgraded before starting.

I’m not sure if I needed to upgrade 2008.05 to 2008.11, but I figured I’d do it while I was at it. I found good instructions on the OpenSolaris site: Basically,

$ BUILD=`uname -v | sed -e "s/snv_//" -e "s/[a-z]//"`
$ pfexec pkg refresh
$ pfexec pkg install entire@0.5.11-0.${BUILD}
$ pfexec pkg install SUNWipkg@0.5.11-0.${BUILD}
$ pfexec pkg install SUNWinstall-libs
$ pfexec pkg image-update

This took a LONG TIME in VirtualBox (running on a pretty new MacBook Pro even) and my whole machine wasn’t all that usable during the process, but hey.

Then I rebooted into the new OS (and it looks shiny!) which this time detected the windows-formatted partition on my USB disk, a convenient improvement.

I then shortcutted one of the steps in this article about building distros on USB sticks by downloading a canned image from genunix.org: Specifically http://www.genunix.org/distributions/indiana/osol-0811.usb

I unmounted the USB device, and then installed the new-ish Sun “dist build” tools:

pkg install SUNWdistro-const

And then ran the newly-installed ‘usbcopy’ tool:

/usr/bin/usbcopy osol-0811.usb

And, about 20 minutes later, it was done!

I have now tested it by booting from it on an eeePC 1000HA and it worked great. I’ve ripped the image in linux with dd, and we’ll be testing it to see if it’s portable that way. (Surely would be a lot less work than my way.)

Useful Electronics: Cat Accident Preventer

Monday, February 23rd, 2009

I am the owner of a generally very awesome product — a Litter Robot automated cat litter box.

However, we occasionally have an issue where the box malfunctions in some way. This is either because

  • The switch which gets tripped when the cats go in stops working, thus never initiating the self-cleaning service. Horrible consequence: the house starts to smell because the crap stays in the sand.
  • The box ends up stuck in the ‘dumping out the crap’ state (upside down.) Horribler Consequence: the cats refuse to use the box, thus finding alternative (and far less pleasant) places to relieve themselves.

If you are familiar at all with the delicate scents of cat defecates you will appreciate my desire to eliminate both of these issues.

So, I thought to myself that if I only had some way to track when the box was in it’s normal state, and not in it’s normal state, I would be able to alert my wife and I to either malfunction state soon enough that we could deal with it.

Hence, the below design was born.

Litter Robot Malfunction Detector

It uses a very nice and yet simple sensor (with a pullup resistor to get a clean signal) called a Reed Switch which creates a closed circuit when it’s near a magnetic field. I can epoxy this to the un-moving base of the Litter Robot, and epoxy a small magnet to the corresponding spot on the inside of the dome. (Inside rather than outside so it does not interfere with the dome’s rotation.)

I then read this sensor from an Arduino board. This would be ridiculous overkill just to get a simple binary signal into a computer, but I’ll be using the Arduino for other home automation tasks. (Temperature Sensing, power switch control, etc.) Whenever it changes state, it can send a message over the Serial-over-USB cable to my very low power home NAS. (Which will probably be another blog entry, as it’s a work in progress.) This can store in a local database every time the state changes, and have a simple Perl script wake up every 20 minutes to see

  • If the box has not rotated for more than 6 hours
  • If the box has been off the ‘home’ position for more than 40 minutes.

It then sends us an SMS (just an email to [10 digit number]@txt.att.net) to alert us. This is a nice form of alert because if I’m home, it might wake me, but not anyone else. If I’m at work, I’m close enough to make a quick lunch break trip home and resolve it before anything stinky happens. If I’m on a trip, I can give a friend with house keys a quick call and ask for a favor.

I have ordered all the parts for this project and should be ready to go soon. Other than the Arduino, the whole thing can be built for about $2 in parts. I’ll hopefully be posting an entry soon with the Arduino and Perl code that makes it all work and photos. (That is, unless I fail in an epic fashion.)

Useful Firefox Addon: Tree Style Tab

Monday, February 16th, 2009

I found this today and I already love it.

It does 2 amazing things:

  1. Moves the tabs to the left. On a widescreen computer this makes more sense than stealing Y-axis resolution. Also, I have to create a LOT of tabs before I start scrolling, which used to be a frequent annoyance. (If you prefer things to be on top/bottom/right, you can choose that in the preferences.)
  2. Shows which page the tab ‘came from’ in a nice tree view. This is so nice for dealing with a tab overload efficiently — I often find that I am researching several aspects of something at the same time. Even the fact that my tabs can be gathered up under their respective google searches is useful.

You can install it at Mozilla Addons. Check there for more screenshots and a full list of the features.

Here is a simple example of it in action:

Tree Style Tab Screenshot