Tuesday, July 14, 2009

Minimal OpenSolaris SPARC install

Using previous instructions I've successfully installed opensolaris 2009.06 on my TestFarm (thanks, Jim) T2000 from existing Nevada b98.
Steps are identical: my machine have 4 disks, so I've prepared third disk (c0t2d0) for installation (I take 4gb):

Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 824 4.00GB (825/0/0) 8395200
1 unassigned wm 0 0 (0/0/0) 0
2 backup wu 0 - 14086 68.35GB (14087/0/0) 143349312
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0

Next steps (it's fast):

zpool create opensolaris c0t2d0s0
zfs create opensolaris/rootfs
zfs set compression=on opensolaris/rootfs
zfs set mountpoint=legacy opensolaris/rootfs
mkdir /zfsroot
mount -f zfs opensolaris/rootfs /zfsroot

Here's minimal list of packages for my T2000 (sun4v):

SUNWcsd
SUNWcs
SUNWcsl
SUNWcakr
SUNWcar
SUNWcfcl
SUNWckr
SUNWcnetr
SUNWcurl
SUNWefc
SUNWerid
SUNWesu
SUNWfctl
SUNWpd
SUNWfchba
SUNWfruid
SUNWgnu-idn
SUNWgss
SUNWgssc
SUNWinstall-libs
SUNWipf
SUNWipkg
SUNWkey
SUNWkvm
SUNWldom
SUNWlexpt
SUNWlibC
SUNWlibms
SUNWlibsasl
SUNWloc
SUNWlxml
SUNWmd
SUNWnfsc
SUNWnfsckr
SUNWopenssl
SUNWperl584core
SUNWpicl
SUNWpool
SUNWpr
SUNWsmapi
SUNWrmodu
SUNWssh
SUNWsshcu
SUNWsshd
SUNWPython
SUNWpython-pyopenssl
SUNWTcl
SUNWTk
SUNWadmap
SUNWadmlib-sysid
SUNWadmr
SUNWbash
SUNWbip
SUNWbzip
SUNWtecla
SUNWtls
SUNWtoo
SUNWwbsup
SUNWxwrtl
SUNWzfs
SUNWzfskr
SUNWzlib
SUNWzone
SUNWintgige
entire

I already have pkg built and installed from sources on my Nevada. Now network installation:

pkg image-create -F -f -a opensolaris.org=http://pkg.opensolaris.org /zfsroot

cd /zfsroot

for pkg in `cat pkg.lst`; do pkg install --no-refresh --no-index $pkg; done

echo "etc/zfs/zpool.cache" >> /zfsroot/boot/solaris/filelist.ramdisk

zpool set bootfs=opensolaris/rootfs opensolaris

echo "opensolaris/rootfs - / zfs - no -" >> /zfsroot/etc/vfstab

mkdir -p /opensolaris/platform/sun4v

cp /zfsroot/platform/sun4v/bootlst /opensolaris/platform/sun4v/

cp /zfsroot/lib/svc/seed/global.db /zfsroot/etc/svc/repository.db

devfsadm -R /zfsroot

bootadm update-archive -R /zfsroot

installboot -F zfs /platform/sun4v/lib/fs/zfs/bootblk /dev/rdsk/c0t2d0s0

Booting:

ok boot disk2
...
Sun Fire T200, No Keyboard
Copyright 2008 Sun Microsystems, Inc. All rights reserved.
OpenBoot 4.28.9, 16256 MB memory available
...
Boot device: /pci@780/pci@0/pci@9/scsi@0/disk@2 File and args:
SunOS Release 5.11 Version snv_111b 64-bit
Copyright 1983-2009 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
Hostname: unknown
Configuring devices.
Loading smf(5) service descriptions: 84/84
Reading ZFS config: done.
Mounting ZFS filesystems: (2/2)

unknown console login: root
Password:
Sun Microsystems Inc. SunOS 5.11 snv_111b November 2008
root@unknown:~# df -h
Filesystem size used avail capacity Mounted on
opensolaris/rootfs 3.9G 630M 3.3G 16% /
/devices 0K 0K 0K 0% /devices
/dev 0K 0K 0K 0% /dev
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 12G 176K 12G 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
sharefs 0K 0K 0K 0% /etc/dfs/sharetab
fd 0K 0K 0K 0% /dev/fd
swap 12G 0K 12G 0% /tmp
swap 12G 16K 12G 1% /var/run
opensolaris 3.9G 60K 3.3G 1% /opensolaris


This install take only 630 mb. Now I can adjust my network settings and install additional packages.

6 comments:

Unknown said...

little typo:
zfs set mountpoint=legasy opensolaris/rootfs

s/legasy/legacy/

IMHO :)

alhazred said...

sickness: thanks, updated

Binary Crusader said...

You're missing one package:

entire


Without the correct version of that package installed, the pkg(5) system won't be able to correctly upgrade or install new packages on that system.

Be sure you add it, and don't worry, that won't install any additional packages! It will just properly constrain all of your installed packages to a single build.

alhazred said...

Thanks, Shawn!
You are always right :)

alhazred said...

This method has one unpleasant feature - BE is null after reboot to OpenSolaris and you can´t upgrade the system or create another BE. This can be avoided by creating new BE with lucreate. Then you just need to remove the SXCE contents in new BE and install OS packages.

Anonymous said...

I want to install OpenSolaris. thanks are guided on how to install this.

How to determine PXE mac address when booting illumos via PXELinux/iPXE

In illumos, if you need to determine the interface which was used for booting via PXE then it's possible to use "boot-mac" pro...