Migrating from Solaris Express to OpenSolaris
By jmcp on Nov 13, 2009
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.