So we have a laptop running Solaris Nevada SXCE and we need to "upgrade" to OpenSolaris before SXCE becomes
ancient history, and run them side by side for a few builds to get the transition sorted out.

There are several ways to achieve this, none of them are supported but this one is relatively clean to do for
Sun internal folks who can download the build 127 usb iso from the usual sfbay location. I'm not sure how to build
from source and then create a live usb image, but if that is possible it's all goodness.

You'll need two spare USB sticks, one of at least 1GB and the other of at least 4GB, you need to already be
running ZFS boot on your SXCE install.

We'll use usbcopy to put the OpenSolaris Build 127 iso onto the smaller stick, we'll boot that live-usb
image and then install openSolaris on the larger stick.

Insert the smaller stick
# ./usbcopy osol-dev-127-x86.usb
Select the newly inserted stick. Once complete, reboot the system from that stick.

Once booted also insert the second larger USB stick and install OpenSolaris on to it using the
installer icon on the desktop

- DO **NOT** reboot yet.

Now the fun bits.

1/ To avoid a collision of root pool names, if your zfs booted SXCE uses "rpool" for the name of your root
pool, you will need to rename the root pool on your newly installed 4Gb stick.

a/ export the pool
zfs export rpool
b/ Obtain the numeric ID of the instance of "rpool" residing on the USB stick.
zfs import
You will expect to see two pools named rpool.

# zpool import
pool: rpool
id: 5398210322707898534
state: ONLINE
status: The pool was last accessed by another system.


c6t0d0s0 ONLINE

c/ Import that ID under a new name, this will make the stick unbootable without intervention but we can handle that.

zpool import 5398210322707898534 Rpool

# zpool status
pool: Rpool
state: ONLINE
scrub: none requested

Rpool ONLINE 0 0 0
c6t0d0s0 ONLINE 0 0 0

errors: No known data errors

Now halt the live usb instance and remove the small USB stick

Boot from the large USB stick, at the grub loader use the "e" key to edit the
grub menu and again select the line "bootfs rpool/ROOT/opensolaris" and "e" to edit
that line (don't change the findroot line).
The "bootfs" line needs to read "bootfs Rpool/ROOT/opensolaris"

Once done escape back to the grub menu and boot the modified entry
using the "b" key.

Once booted we will make a new OpenSolaris boot environment on the
real disk based rpool.

# beadm create -p rpool zOBE
You can of course name it "opensolaris" if you want but zOBE suits me.

Activate the new BE.
# beadm activate zOBE

Halt and remove the larger memory stick, but KEEP it as you may want it
later if you choose to do further updates of your SXCE environments
using "Live-Upgrade".
You can do that, it will work fine however
you MUST remember that OpenSolaris is your BE master environment now,
to activate a new or upgraded SXCE BE do **NOT** use luactivate.
Reboot OpenSolaris and boot manually via GRUB to test OR use
"beadm activate" from the osol boot environment to activate the
new SXCE BE.

This is necessarily so because the SXCE grub is poisonous to OpenSolaris
BEs and must not be propagated. If you do use luactivate you'll need the
"rescue" USB stick you have just put aside for later.

Boot from your newly activated OpenSolaris BE.

# beadm list
BE Active Mountpoint Space Policy Created
-- ------ ---------- ----- ------ -------
opensolaris - - 4.32G static 2009-11-14 08:58 (That's my 4Gb stick)
zABE - - 18.28G static 2009-11-07 23:42 (My old SXCE main BE)
zMBE - - 115.02M static 2009-10-22 09:06 (My old SXCE alternate BE)
zOBE NR / 3.21G static 2009-11-15 14:43 (The new OpenSolaris BE)

Create a new safety BE and then start grabbing bits as needed from your old environment.

You will definitely want to copy across /etc/hostid from your existing SXCE
or things get very messy at each reboot.

Mount your latest SXCE BE filesystem using the zfs commands (not beadm).

# zfs set mountpoint=/mnt rpool/ROOT/zABE
# zfs mount rpool/ROOT/zABE

# cp /mnt/etc/hostid /etc/hostid
# cp ... ..

Clean up.
# zfs umount /mnt
# zfs set mountpoint=/

Check that the OpenSolaris BE is sharing the swap and dump devs with the SXCE BEs.

# dumpadm -d /dev/zvol/dsk/rpool/dump
# dumpadm
Dump content: kernel pages
Dump device: /dev/zvol/dsk/rpool/dump (dedicated)
Savecore directory: /var/crash/georges-home
Savecore enabled: yes
Save compressed: on

# swap -l
No swap devices configured

Add it manually if needed

# swap -a /dev/zvol/dsk/rpool/swap

Edit /etc/vfstab to add the following line for swap.

/dev/zvol/dsk/rpool/swap - - swap - no -

Now you are good to go with a reboot, then manually select an SXCE BE at
the GRUB menu, using lustatus you should see ONLY the SXCE BEs, just try
to remember that this environment is on it's way to being deprecated so
don't allow GRUB or GRUB menus to be propagated from here. ie don't use
luactivate or installgrub at all when booted SXCE.

So back to your OpenSolaris BE, it's time to use the pkg_manager to go
fetch the packages you want, from the dev repository. (We are on the bleeding
edge here aren't we, since we're likely on snv_127 in both SXCE and Osol .