Sunday, April 30

Blasting fast Solaris upgrades

Been wanting to upgrade my laptop to a new OpenSolaris release for a while and decided to
try the "BFU" upgrades today. Quite impressive I must say, very smooth.

BFU stands for "blasting fast upgrade" and is more or less a bunch of cpio images and update scripts that sort things out without chewing through pkg databases and other time consuming things. It works on all modern OpenSolaris builds, I upgraded from nvr_b33 to what is b39. However, it does not include updates to JDS and other high level things. It's only the core os. The download is about 90Megs and upgrading is a piece of cake if you have ever used Unix before. If you want to stay bleeding edge with OpenSolaris, you got to live this. :)

Went to this site and downloaded the latest BFU-archive and BFU tools and ran through this quick process.

Install the BFU tools, just extract and pkgadd. The package will be installed under /opt/onbld.

Prepare the upgrade environment.
export PATH="/opt/onbld/bin/:/opt/onbld/bin/i386/:$PATH"
export FASTFS="/opt/onbld/bin/i386/fastfs"
export GZIPBIN="/usr/bin/gzip"
export BFULD="/opt/onbld/bin/`uname -p`/bfuld"
Now start the upgrade process.
This took less than 10 minutes on my 1.4Ghz/768Meg Centrino laptop.
bfu /export/share/archives-20060424/i386/
To resolve any dependencies run the "acr" tool and reboot.
I got a clean boot at first attempt, you may need to boot in single user mode and resolve any config issues.
Last thing I had to do was to upgade my ZFS pools to the latest version, done in less than a second.
root@halidell$ zpool upgrade data1
This system is currently running ZFS version 2.

Successfully upgraded 'data1' from version 1 to version 2
All done, the latest OpenSolaris system in less than 20 minutes. :)
hali@halidell$ uname -a
SunOS halidell 5.11 opensol-20060424 i86pc i386 i86pc
Oracle 10g still works without glitches, I didn't expect anything less of course. :-)


Friday, April 28

Virtual machines on Intel Macs

Found this cool virtulization engine for Intel Macs.

Solaris, XP, Linux as guest OS's on top of MacOS X... sweet :)

To bad Apple charges a freakin' fortune for the MacBook Pros.

Monday, April 24

Not all new things are bad

In my previous post I ranted about how all new features in UNIX/Linux add complexity and random annoyances.
The one thing that shines above all this is Suns ZFS. Every time I issue a zfs/zpool command I get a warm fuzzy feeling. The nightmares of VxVM/VxFS are all goooone. I configured an old 420r with a few (even older) Netapp shelves for a friend the other day. The basic mirrorsets and raidz tanks where configured in under a minute.

And now I jus stumbled across this blog describing how to boot (almost) from ZFS only system. Cool indeed! :)
Im seriously considering getting a AMD64 Shuttle-style PC with a pair of SATA drives to keep as a small server hidden away in the closet. Would be nice to have that on pure ZFS.
Solaris 10u3 with some luck.

Now I have to reinstall our spare v20z with b39 tomorrow.

"ZFS, because your worth it"

Friday, April 21

When things are just to much

Found a quite fun (old) article that talks about how BSD was born at Berkeley in the mid 70's. Describes how Bill Joy produced massive code in very little time.
Looking at how "big" a OS is these days it's nice to think back at the cleaner old-school versions of the world.
I'm a huge fan of Solaris 10, but sometimes I can't stop to wonder if it really has to be so big and intense. It tends to get in your face sometimes. Do we really need XML config files for every little peace of software? Are we not supposed to configure our applications the old fashioned way, using vi.
A good example is DHCPD in later versions of Solaris, why should I use pntadm and dhtadm to configure something as simple as DHCP. I get the core reasons of having the unified tool, i.e. when using an alternative namespace for DHCP data. But looking at a DHCP config file the file looks a bit quirky and has a big "DO NOT EDIT THIS FILE" header in it.
Why can't we just keep things clean and simple?

Well, I'm off to play with OpenBSD to calm my nerves, I always get tense after a bad hangover.

Tuesday, April 18

Find schema references

Simple SQL query that can give some insight in to what references what.

You have a table, a boring old table that makes no sense to have. But someone may have create a foreign key to that table and things "may" break if you drop it with a cascade. This simple little query will show you all FK's to a table.
select u.table_name, u.constraint_name from
user_constraints u,
user_cons_columns c
and c.table_name='TABLE_NAME'

Oh, and yes. The iBook is chugging along just fine. Would like another 512Megs of RAM and XE on it tho.

Wednesday, April 12

48 hours on Mac

So I've had the iBook for about 48 hours now. The first 10 where quite annoying, had no idea where my applications went, how to "right-click" or even where stuff go in the file system.
Googled a bit and found a few nice tools to sort me out.

  • Fink offers a number of nice GNU-tools to make the shell a bit more familiar.
  • Virtue provides cool spinning virtual desktops
  • Quicksilver offers a nice "CLI" interface to most apps. I.e. pause iTunes with applekey-space and the command pau.
  • Firefox ... of course.
  • Transmission. Decent torrent client.

    Found most of the programs over at

    The desktop resolution on the 12" screen is a bit low, 1024x768. Not the massive 1600 resolution I got on my old Dell.
  • Sunday, April 9

    Cheap iBooks (revisited)

    Yes! The Apple Store had cheap iBooks in stock again. And this time I didn't hesitate to order one. Cheapo 1.3GHz 512Meg model. Just so I can play around a bit with OS X a bit. Total cost including shipping was £524. Not bad, not bad at all.

    I'm still looking forward to the new smaller MacBook Pros.
    Just imagine a 13" widescreen laptop with two 2GHz cores, 2Gb RAM and four (4!) operating systems to choose from. MacOS, Linux, Windows and yes, Solaris. With some luck (and probably more RAM) I is theretically possible to run all four of them at the same time (hypervisor). But it would be cool to at least be able to switch between OS X and XP and have the possibility to start a virutal Linux or Solaris machine when needed.
    I do hope they will ship the new MacBooks with massive harddrives tho :)

    Thursday, April 6

    SQL - Connect by

    Lots of people has been asking me about self joins and connect by queries in the last week.
    Not sure, guess its just that time of the year. Anyway.
    One question was regarding how to find parent relations in a "people-table". It's easy to find someones parent with a self join if the table is designed correctly, but what if you want to find the grand parent or even great grant parents? You can't really self-join the table N times.
    Here is where connect by comes it. Learn how to use connect by and how to take advantage of the pseudo column level in your application. Level tells you the "depth" in the relation tree, how many parents you have. Perfect to render a tree structure.

    Look at this sample table:
    create table cb (
    id number(4),
    name varchar2(20),
    age number(3),
    parent number(4)

    create sequence cb_id_seq;

    -- Some sample data
    insert into cb values(cb_id_seq.nextval, 'Adam', 99, null);
    insert into cb values(cb_id_seq.nextval, 'Scott', 75, 1);
    insert into cb values(cb_id_seq.nextval, 'Tiger', 74, 1);
    insert into cb values(cb_id_seq.nextval, 'Puffer', 74, 1);
    insert into cb values(cb_id_seq.nextval, 'Sarah', 54, 3);
    insert into cb values(cb_id_seq.nextval, 'Bob', 54, 3);
    insert into cb values(cb_id_seq.nextval, 'Greg', 25, 4);
    insert into cb values(cb_id_seq.nextval, 'Mary', 34, 6);

    -- So what do we have now.
    select * from cb;

    ---- -------------------- ---- ----------
    1 Adam 99
    2 Scott 75 1
    3 Tiger 74 1
    4 Puffer 74 1
    5 Sarah 54 3
    6 Bob 54 3
    7 Mary 34 6
    8 Greg 25 4

    -- Ok, lets use the nice level pseduo-column for something usefull.
    column LVL format a30
    select lpad(' ',3*level)||name lvl ,age from cb
    start with id=1 connect by prior id=parent;

    ------------------------------ ----
    Adam 99
    Scott 75
    Tiger 74
    Sarah 54
    Bob 54
    Mary 34
    Puffer 74
    Greg 25

    Oracle provides good docs as usual.

    Wednesday, April 5

    It's like ... Pink

    Just listened to Pink's new album titled I'm Not Dead.
    Pink is not my usual kind of music but the new album is quite good.
    The last song on the album is a nice duet with her father, a song he wrote while he was fighting in Vietnam.
    although the PCM CD release (LaFace) I have is awfully distorted, annoying scratching sounds in some bass beats. Even notice them in my rather poor Grado SR-80 headphones.

    Laptop cases

    Found this quite fun blog entry about Laptop cases on slashdot.
    However all the cases recommended in that blog are so ugly so I thought I'd suggest a few stylish alternatives.

    Tucano Guaina Second Skin from Knomo.

    Knomo Orkney Laptop Briefcase from Knomo.

    Louis Vitton Messenger bag.

    Sunday, April 2

    Cheap iBooks

    So yesterday when I browsed the Apple website I found the Apple refurbished stored. They had cool 12" iBooks at a 26% discount. Thats a lousy £525 for a 1.3GHz model. I was quite tempted to buy one but decided to sleep on it. I don't really need a new laptop *that* bad. But it would be a fun gadget, I haven't played with OS X that much.
    And slept I did, woke up and decided to go online and order that laptop. And now they are all gone.
    F&%king annoying. Just my luck, I knew I should just have ordered one yesterday.

    Now I'm going to have to spend a few hours watching Family Guy to get over it. Stewie understands me.