Migrating from Solaris Express to OpenSolaris

There's currently no way to do an in-place upgrade0 from Solaris Express's SysV packaging to OpenSolaris' IPS packaging, so you have to think outside the box just a little.

My Ultra 40 M2 has been happily chugging away with SXCE builds since I took delivery of it, but with build 131 fast approaching (when we start delivering a nightly IPS repo rather than SysV packages), I figured I should put some effort into migrating to the new world. Fortunately for me, I've been running with ZFS root since it was first available (build 80 or so), and when I reinstalled my laptop last year I put OpenSolaris on it. It's been upgraded to snv_126 in the last week, too.

Here's what I did.


After making sure I had enough space in my u40m2 ("blinder") root pool, I created a zfs snapshot of the current BE on the laptop ("gedanken"). Then destroyed it, pruned sundry filesystems and a bunch of packages which I don't need (eg, I have no use for almost all the localisations), and re-created the snapshot.


gedanken# zfs snapshot rpool/ROOT/opensolaris-7@yay
blinder# zfs create rpool/ROOT/opensolaris-7


Then I sent it from gedanken to blinder:

gedanken# zfs send rpool/ROOT/opensolaris-7@yay | \\
    ssh blinder zfs recv -v rpool/ROOT/opensolaris-7

[trundle]

received 20.8GB stream in 2707 seconds (7.85MB/sec)


Now the action switches to blinder:

(add entry to grub menu.lst, remember to set the default)

# zpool set boots=rpool/ROOT/opensolaris-7 rpool
# zfs set canmount=noauto rpool/ROOT/opensolaris-7
# zfs set mountpoint=/ rpool/ROOT/opensolaris-7


Time for some customisations on the new pool:

# zfs set mountpoint=/mnt rpool/ROOT/opensolaris-7
# cp /etc/ssh/sshd\*key\* /mnt/etc/ssh
# cp /etc/hostid /mnt/etc/hostid
# cp /etc/inet/hosts /mnt/etc/inet/hosts
# cp /etc/X11/xorg.conf /mnt/etc/X11
# cp /etc/hostname.nge0 /mnt/etc
# cp /var/spool/cron/cronjobs/onhg /mnt/var/spool/cron/cronjobs


I think that's it, I really should have run this from within script(1)!

# cd /
# zfs umount rpool/ROOT/opensolaris-7
# zfs set mountpoint=/ rpool/ROOT/opensolaris-7


Time for the acid test!

# init 6
[dammit, this "fast reboot" stuff is TOO FAST!]
root@blinder:~# cat /etc/release 
                       OpenSolaris Development snv_127 X86
           Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
                        Use is subject to license terms.
                           Assembled 06 November 2009
root@blinder:~# 
root@blinder:~# uname -a
SunOS blinder 5.11 snv_127 i86pc i386 i86pc
root@blinder:~# 


and X came up just fine.

After making sure that all the bits that I expected were there, I was very pleased to call this exercise a success.

The only bit that remains to be done is configuring my non-global zone but I'll leave that for another post.
Comments:

Many thanks webmaster for this great information. Thanks

Posted by Autoversicherung on November 13, 2009 at 10:30 AM EST #

James,

I did a similar thing. Originally, I had my system with two disks with a UFS root partition for liveupgrade, and the rest a mirrored zfs pool for the home directories and /usr/local. I have a nightly backup (using rsync) to another zfs pool, so I had copies of the files you copied already.

My steps were:

1) Break the mirror so I had two independent disks.
2) Install OSOL on the free disk.
3) Import the old pool.
4) Copy the stuff from the old pool to the new one.
5) Copy the stuff needed from the backup.
6) reboot.

I have swap-able drive, so to bring back SXCE (in case of a problem with OSOL), I could just swap drives instead of changing grub. However, this turned out not to be necessary. :)

Once I got OSOL working as needed, I added the SXCE drive as a mirror, and installed grub on that. I'm now SXCE free.

The biggest problems I had was trying to do things the OSOL way. I finally had to make root back a user so I could still do my rsync backups, and turn off NWAM because I have multiple NICs to initialize.

Gary

Posted by Gary Gendel on November 13, 2009 at 04:49 PM EST #

James - Trying to get in touch with you in reference to your comment here:

http://enginesmith.wordpress.com/2009/08/28/ssd-faults-finally-resolved/#comment-5

... if you'd be willing to get in touch with me regarding that same issue, I've got a Solaris contract and you'd save Sun the cost of a new SSD!

Posted by Karl Katzke on November 18, 2009 at 02:27 AM EST #

Hi,
Thanx for this handy post. I was struggling with how to update my sxce to osol. this helps a lot.
Looking forward to your post about moving the zones. I'm running 6 zones with sparse roots, i havent figured out yet what the best way would be to move them to the "new" osol partition in a zone.
greets Leon

Posted by Leon on November 18, 2009 at 08:49 PM EST #

Post a Comment:
Comments are closed for this entry.
About

I work at Oracle in the Solaris group. The opinions expressed here are entirely my own, and neither Oracle nor any other party necessarily agrees with them.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today