Switching from Nevada to OpenSolaris

I've fixed another bug (findroot grub menu entry) in the create-be script and added support for additional zpools (i.e. along with rpool, other zpools should now work seamlessly across Nevada and OpenSolaris BEs. NOTE: for additional zpools, the nevada and OpenSolaris BEs should be the exact same build).

The scripts lets you create a new (non COW) OpenSolaris BE on a nevada zfs root based system (or OpenSolaris system). You can use this to transition a Nevada zfs root based system to OpenSolaris. You can also choose to install an arbitrary OpenSolaris build (i.e. if you want to downgrade).

DISCLAIMER: this is totally unsupported by Sun, could mess up your system, etc. etc.

I strongly recommend creating a scratch BE to run this script out of, in case something goes wrong.

You can grab an updated copy here. Remember the DISCLAIMER above.. Back up your data first!

For folks inside of SWAN, here's a cheatsheet...

Write down your IP addr, netmask, gateway, NIS domain

Create & switch to a scratch BE

# lucreate -n scratch-be
# luactivate scratch-be
# init 6
Install the new OpenSolaris BE (this is not an upgrade, it's a fresh install into a BE on the same rpool as your current BEs)
# pkgadd -d /net/girltalk2/export/mrj/pkg-gate/packages/i386/ \\
  SUNWipkg SUNWpython-ply SUNWpython-pycurl
# wget http://blogs.sun.com/mrj/resource/create-be
# chmod a+x create-be
# /root/create-be --build=129 --bename=osol129 --repo=http://ipkg.sfbay/dev --menu="osol129"
If you want to install additional software, i.e. setup a build machine
# zfs set mountpoint="/mnt" rpool/ROOT/osol129
# zfs mount rpool/ROOT/osol129
# pkg -R /mnt set-publisher -O http://ipkg.sfbay/extra extra
# pkg -R /mnt install developer/opensolaris/osnet@0.5.11-0.129
# zfs umount rpool/ROOT/osol129
If you want to be able to build xvm-gate
# zfs set mountpoint="/mnt" rpool/ROOT/osol129
# zfs mount rpool/ROOT/osol129
# pkg -R /mnt install \\
  SUNWgmake@3.81-0.129 \\
  SUNWbcc@0.16.17-0.129 \\
  SUNWgnu-readline@5.2-0.129 \\
  SUNWxwinc@0.5.11-0.129 \\
  SUNWgnome-common-devel@0.5.11-0.129 \\
  SUNWlibtool@1.5.22-0.129 \\
  SUNWgnu-automake-110@1.10-0.129 \\
  SUNWaconf@2.63-0.129 \\
  SUNWgit@1.5.6.5-0.129 \\
  SUNWxvm@3.3.2-0.129
# zfs umount rpool/ROOT/osol129
Reboot into your new be, configure the network, etc. migrate over other BE settings, e.g. sshd config.
# bootadm list-menu
# bootadm set-menu default=....your-osol129-menu-number....
# reboot
: run through sysconfig, reboot
: login
# beadm mount ....your-old-be.... /mnt
# cp /mnt/etc/ssh/sshd_config /etc/ssh/
# cp /mnt/etc/ssh/\*key\* /etc/ssh/
# svcadm refresh ssh;svcadm restart ssh
: migrate over other customizations you might have
# beadm umount ....your-old-be....
Comments:

Thanks for that. However to get it to work on nv125 I had to make the following changes or it would complain that it could not create the new BE as the mount would fail as it was already mounted. The change is to set canmount=noauto when you create the file system rather than the 2 stage approach you had.

# diff -c create-be create-be.fixed
\*\*\* create-be Thu Dec 17 16:09:18 2009
--- create-be.fixed Fri Dec 18 10:24:22 2009
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
\*\*\* 42,49 \*\*\*\*
# XXX - should have the following in here too...
# zfs set org.opensolaris.libbe:uuid=<UUID> rpool/ROOT/<beName>
cmdList = [
! "/usr/sbin/zfs create rpool/ROOT/" + beName,
! "/usr/sbin/zfs set canmount=noauto rpool/ROOT/" + beName,
]

if os.path.exists("/sbin/beadm"):
--- 42,48 ----
# XXX - should have the following in here too...
# zfs set org.opensolaris.libbe:uuid=<UUID> rpool/ROOT/<beName>
cmdList = [
! "/usr/sbin/zfs create -o canmount=noauto rpool/ROOT/" + beName,
]

if os.path.exists("/sbin/beadm"):
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
\*\*\* 80,88 \*\*\*\*
--- 79,89 ----
p = subprocess.Popen(command)
rc = p.wait()
if rc != 0:
+ print >> sys.stderr, "ERROR: command"
print >> sys.stderr, "ERROR: unable to setup repo"
return None
except:
+ print >> sys.stderr, "ERROR: command"
print >> sys.stderr, "ERROR: unable to setup repo"
return None

Posted by Chris Gerhard on December 17, 2009 at 09:30 PM EST #

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

mrj

Search

Categories
Archives
« April 2015
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