You are here: Home archive 2009 October 20


Oct 20, 2009

SXCE to OpenSolaris Migration on Sparc

Using some already existing blogs/mail-lists and elbow grease, I've migrated a SPARC server to OpenSolaris from SXCE.

With SXCE EOL coming up fast and the AI not quite up to speed (for this instance at any rate), I've cobbled together and carried out a migration of a Sun e220r sparc box from SXCE.

I used quite abit from Edward Pilatowicz's blog and also Alex Eremin's blog . I altered/diverged to suit my needs as well due to things changing rapidly in OpenSolaris.

I built IPS from the gate, more details on IPS and the mercurial url here: . With that installed proceeded to create an new root pool on a separate disk.

I utilized the following from Edward's blog, where I've diverged/changed I have commented out the original and noted beside my change:

# we're going to do our install in /a

# mount our zpool on /a
mkdir -p $PKG_IMAGE
mount -F zfs rpool/ROOT/opensolaris $PKG_IMAGE
mkdir -p $PKG_IMAGE/opt
mount -F zfs rpool/ROOT/opensolaris/opt $PKG_IMAGE/opt

# create the basic opensolaris install image.
#pkg image-create -F -a $PKG_IMAGE
pkg image-create -f -F -a $PKG_IMAGE # Sparc requires the dev repos
#pkg refresh
pkg -R $PKG_IMAGE refresh --full # We're not clobbering our original or changing it so the next few are mine too
pkg -R $PKG_IMAGE install entire
pkg -R $PKG_IMAGE install SUNWcsd SUNWcs
pkg -R $PKG_IMAGE install babel_install

# seed the initial smf repository
cp $PKG_IMAGE/lib/svc/seed/global.db $PKG_IMAGE/etc/svc/repository.db
chmod 0600 $PKG_IMAGE/etc/svc/repository.db
chown root:sys $PKG_IMAGE/etc/svc/repository.db

# setup smf profiles
ln -s ns_files.xml $PKG_IMAGE/var/svc/profile/name_service.xml
ln -s generic_limited_net.xml $PKG_IMAGE/var/svc/profile/generic.xml
ln -s inetd_generic.xml $PKG_IMAGE/var/svc/profile/inetd_services.xml
ln -s platform_none.xml $PKG_IMAGE/var/svc/profile/platform.xml


After that I finished with:

echo "rpool/ROOT/opensolaris  -  /  zfs  -  no  -" >> $PKG_IMAGE/etc/vfstab

echo "rpool/ROOT/opensolaris/opt  -  /opt  zfs  -  yes  -" >> $PKG_IMAGE/etc/vfstab

devfsadm -r $PKG_IMAGE

bootadm update-archive -R $PKG_IMAGE

installboot -F zfs /platform/$(uname -i)/lib/fs/zfs/bootblk /dev/rdsk/c0t0d0s0


 Copying relevant networking, passwd, ssh keys, etc. files from the running SXCE system to $PKG_IMAGE, I successfully booted to my OpenSolaris install and tweaked from there.