Install

Solaris 11 Installation

There is no direct upgrade path from Solaris 10, and Solaris 10 is nearing its end. Here I'll describe a couple of ways to get Solaris 11 installed. In larger (and remotely accessed) environments Automated Installation is the way to go. These example all assume SPARC hardware.

Option A: Boot from ISO

Download the text installer ISO image from oracle.com, and write it to a DVD or USB stick. Connect to the service processor (ie. your XSCF or ILOM access), power-on the physical server and get a console session. 

When booting from DVD, simply issue "boot cdrom" at the "ok" prompt. For USB, identify and boot from the device, eg.

  ok> show-dev
  ok> boot /devices/pci@340/pci@1/pci@0/pci@3/usb@0:7
  ok> boot /devices/pci@340/pci@1/pci@0/pci@3/usb@0/hub@8:8:2

The system configuration dialog is presented, similar to this:

Select keyboard layout US-English (default)
Select language English (default)
Choose to Install Solaris at the install menu
Choose to discover local disks, select the first disk, install to the whole disk
Specify the computer name
Manually configure network connection, select an interface
Specify DNS server and search domain, no alternate name services
Select Australia as timezone region and location, then Victoria
Select English for the default language locale, en_US.UTF-8
Review time settings and keyboard (US-English)
Specify the root password and first user account details
Enter your email address and Oracle Support login (optional)
Review and commence installation, reboot afterward

Option B: Boot from network

This method uses Solaris Automated Installer services, and assumes your systems are on the same VLAN (refer to the Oracle doco for more complicated environments). I have a Solaris Image Packaging Server already available (see IPS Server section below), with the repo shared via HTTP, and I'll also use that as the AI server.

Download the latest AI ISO boot image to the AI server, note this is a different image to the text installer used above.

On the AI server, ensure our solaris publisher is a http location,

$ pkg publisher
On the AI server, create the AI service.

$ installadm create-service -s /ai/sol-11_3-ai-sparc.iso -d /ai/ai-sol11 -n sol11
On the target server with a console session, identify it's mac-address,

$ pkg publisher

On the AI server, add the target (client) system mac-address,

$ installadm create-client -n sol11 -e 0:10:e0:2a:ce:60

$ installadm listOn the target server, configure the network boot options, boot it,

ok setenv network-boot-arguments host-ip=192.168.1.90,router-ip=10.18.40.1,subnet-mask=255.255.255.0,file=http://192.168.1.57:5555/cgi-bin/wanboot-cgi

ok boot net - install
The boot image is downloaded and executed. Login as root/solaris and reboot when prompted. When the system boots from disk, you will then go through the system configuration as above, after which you have a working Solaris 11 system with it's package repo configured. Finally, delete the client from AI,



$ installadm delete-client -e 0:10:e0:2a:ce:60

Solaris 11 IPS Server

Many environments prevent the Solaris systems from accessing the web, or force them to go through a web proxy. Maintaining a copy of the Solaris distribution is a good way to ensure all your systems have access to updates and software packages that are not yet installed. The Solaris Image Packaging System enables you to keep the Solaris software (and your own packages) on-premise, and share it to the other systems. Read on to see how I build an IPS server for Solaris.

To begin, download the latest Solaris IPS repo zip files, for Solaris 11.3 there are 5 files. Also download the "install-repo.ksh" script. 

Create a directory for IPS and remove the existing solaris publisher,

$ mkdir /ips/solaris11
$ pkg unset-publisher solaris

Install the repo using the zip files, confirm it is usable afterwards,

$ cd /var/tmp/ ; $ ./install-repo.ksh -d /ips/solaris11/ -v
$ pkg list -g /ips/solaris11/

The repo will now be share via HTTP (optionally use a different port, or use NFS),

$ unset http_proxy https_proxy
$ svccfg -s application/pkg/server setprop pkg/inst_root=/ips/solaris11
$ svcadm enable pkg/server


Configure the local system to use this HTTP repo location,

$ pkg set-publisher -G '*' -g 'http://myhost' solaris
$ pkg publisher

Now that we have the base release of Solaris 11 in our repo, apply it the latest updates. Login to support.oracle.com, and locate the latest Support Repository Update (SRU). For example, search for "Oracle Solaris 11.3 Support Repository Updates", and download the zipfiles. Extract the zipfiles into some suitable location like /var/tmp/SRU.

$ mkdir /var/tmp/SRU ; cd /var/tmp/SRU

$ unzip ../*1of3.zip ; ../*2of3.zip ; ../*3of3.zip

Apply the SRU to the IPS repo checking the version change, eg.

$ pkgrepo list -s /ips/solaris11/ | grep entire
...20151006...
$ pkgrecv -s /var/tmp/SRU -d /ips/solaris11 '*'
$ pkgrepo list -s /ips/solaris11/ | grep entire

...20160815...

Apply the SRU to the IPS repo checking the version change, eg.


$ pkg rebuild-index

$ pkgrepo -s /ips/solaris11 refresh

$ svcadm refresh svc:/application/pkg/server

$ svcadm restart svc:/application/pkg/server

Now we have an IPS repo that is ahead of the IPS server Solaris patch level. Ensure this and other systems are configured to use the local IPS http location, eg.


$ unset http_proxy https_proxy
$ pkg set-publisher -G '*' -g 'http://myips' solaris
$ pkg publisher

Check the Solaris patch level installed and the SRU levels available in the repo,

$ pkg list entire
$ pkgrepo list -s http://10.18.40.57/ entire

Update this or other systems to the latest patch level (with a dry-run prior). A reboot may be required afterward.

$ pkg update -nv

$ pkg update

Note, the "pkg update" command will update the current boot environment and create a clone. Use "beadm list" to review your patch reversion options.

Now we have an environment where installations and updates are easily performed.
Solaris 11 Post-Installation

Here are a few of the post-install actions typically needed. 

Start by protecting the root role or user access, reset the password. The initial user account has powerful sudo access, and can be seen configured in this file: /etc/sudoers.d/svc-system-config-user.

Increase swap size if necessary, eg,

$ zfs get volsize rpool/swap
$ zfs set volsize=4g rpool/swap

Keep the file index up-to-date using "updatedb", add this to the root crontab,

0 0 * * * /usr/sbin/updatedb > /dev/null 2>&1

Mirror the root volume, eg.

$ echo | format
$ zpool status
$ zpool attach rpool c0t5000CCA016429288d0 c0t5000CCA016425C64d0

If you needed to rename this host (eg retask it),

$ svccfg -s system/identity:node listprop config
$ svccfg -s system/identity:node setprop config/nodename="newname"
$ svccfg -s system/identity:node setprop config/loopback="newname"
$ svccfg -s system/identity:node refresh
$ svcadm restart system/identity:node
$ vi /etc/hosts
$ reboot

To install Perl modules on a system without web access, download the module from CPAN, install it,

$ locate perlgcc
$ perlgcc Makefile.PL && make && make install

To enable this host to be monitored using SNMP, append the community string at "rocommunity", and enable the SNMP service:

$ vi /etc/net-snmp/snmp/snmpd.conf
$ svcadm enable net-snmp

Test access from another server using "snmpwalk -v2c -c secret myhost sysDescr.0".

Use the other pages on this site to configure,

- additional software or data mounts
- monitoring
- zones
- IPMP for networking
- security settings and compliance checks



Prepare for Solaris 10 Installation

Option A: Boot from DVD media. At the “ok” prompt, simply enter “boot cdrom”.

Option B: Configure Oracle Enterprise Manager Ops Center, add the server asset, create deployment plans, and then choose “Install Server”.

Option C: Boot from the network using the steps below,

For convenience, we use the same Solaris server as the “boot server” and the “install server”. Preferably, use a “boot server” on the same subnet as the target system.

Step 1 - Setup the Install server:

Download the version of Solaris you want to deploy, and mount it on the “install server”,

mkdir /mnt/dvd
$ mount -F hsfs -o ro `lofiadm -a /tmp/solaris10dvd.iso` /mnt/dvd

Install and share the server software:

$ mkdir /opt/sol10u11
$ cd /mnt/dvd/Solaris_10/Tools
$ ./setup_install_server /opt/sol10u11
$ cd /
$ unshare /mnt/dvd
$ umount /mnt/dvd

Append the software location to /etc/dfstab, and then share it:

$ share -F nfs -o ro,anon=0 -d "Solaris10update11" /opt/sol10u11
$ shareall
$ share | grep sol10

Step 2. Configure the boot server

Add the target system to /etc/hosts (add the IP and hostname).

Create a boot configuration, adding the target client (you must know the IP, hardware, hostname and mac address), eg.

$ cd /opt/sol10u11/Solaris_10/Tools
$ ./add_install_client -i 192.162.10.112 -e 0:14:4f:6f:d3:48 newsvr sun4u

You can get the mac address from the ALOM “banner” command, or ILOM “show /SYS/MB/NET0“. Check the root and install areas in /etc/bootparams are available thru NFS share:

$ cat /etc/bootparams

Check for the arp process and rpc.bootparamd,

$ ps -ef | egrep "arp|bootpar"

Step 3 - Install Solaris on the target client:

Poweron the target server, get access to the service console, and then install Solaris:

ok boot net - nowin

Solaris 10 Installation
Here is an example of the Solaris installer prompts (note, options have changed somewhat in newer releases),
Select a Language: 0. English What type of terminal are you using? 3) DEC VT100 Is the system networked? Y Specify an Interface? Select default/first listed. Use DHCP for <interface>? N Host name for <interface>? myhost IP address for <interface> 192.168.10.20 System part of a subnet? Yes Netmask for <interface> 255.255.255.0 Enable IPv6 for <interface> No Default Route for <interface> Specify one Router IP Address for <interface> 192.168.10.1 Summary screen for <interface> confirm Configure Kerberos Security No Name service - DNS, 192.168.10.31, mydomain.com Timezone – Continents Oceans, AUST, Queensland Date and Time: confirm/adjust Timezone summary confirm Root password: ****** Remote services enabled: NO, more secure Install type? Standard install (F2) Eject CDROM automatically? Manually eject CD/DVD Reboot after installation? Auto Reboot Upgrade or Initial Install: Initial Install (F4) Software license screen: Accept software license Select the Geographic Regions - Australasia - Australia (ISO8859-1) Select the products to install: F2_Continue Additional Products: None Select the Solaris software to install – Entire plus OEM (5.5GB), or boldly choose core install. Package dependency warning: F2_OK Select Disk – c1t0d0, F2_Continue Preserve data? No, F2_Continue Automatically layout filesystem? F4_Manual Layout, F2_Continue Tab through the fields until complete F2_OK Check the disk slice summary screen, Slice Mount Point Size (MB) 0 / 15363 1 swap 2052 2 overlap 69994 3 /var 4099 4 /mdb 19 5 0 6 /u01 15363 7 /export/home 33091 ======================================================================= Capacity: 69994 MB Allocated: 69987 MB Rounding Error: 3 MB Free: 4 MB Review the Installation Profile F2_Continue Unused disk space warning (c0t0d0) F2_OK
Solaris 10 on Internal Disks

In this example, we decided to use the 3rd internal disk with UFS for the install, and will mirror to the 4th using SVM. The first disk had an EFI partition label so we will convert that to SMI before migrating to ZFS on the first and second:
  Disk Device                                              Available Space
  =============================================================================
  [-]    c0t5000CCA04366CF70d0                                0 MB
  [ ]    c0t5000CCA04366FCB0d0                            286090 MB
  [X]    c0t5000CCA0436703B8d0                            286090 MB  
  [ ]    c0t5000CCA043689C5Cd0                            286090 MB

# One disk needs to change to SMI partition type
format -e c0t5000CCA04366CF70d0
> label
[0] SMI
<enter>, <enter>

# write UFS boot block to each unused disk
installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c0t5000CCA04366CF70d0s0
installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c0t5000CCA04366FCB0d0s0
installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c0t5000CCA043689C5Cd0s0

# Copy partition table to each unused disk
prtvtoc /dev/rdsk/c0t5000CCA0436703B8d0s2 | fmthard -s - /dev/rdsk/c0t5000CCA04366CF70d0s2
prtvtoc /dev/rdsk/c0t5000CCA0436703B8d0s2 | fmthard -s - /dev/rdsk/c0t5000CCA04366FCB0d0s2
prtvtoc /dev/rdsk/c0t5000CCA0436703B8d0s2 | fmthard -s - /dev/rdsk/c0t5000CCA043689C5Cd0s2

# write SVM state databases to each slice 7
metadb -a -c 3 -f c0t5000CCA0436703B8d0s7
metadb -a -c 3 c0t5000CCA04366CF70d0s7
metadb -a -c 3 c0t5000CCA04366FCB0d0s7
metadb -a -c 3 c0t5000CCA043689C5Cd0s7
metadb -i

# Create submirrors (root, swap, var, home), then mirror device,
metainit -f d11 1 1 c0t5000CCA0436703B8d0s0
metainit -f d21 1 1 c0t5000CCA0436703B8d0s1
metainit -f d31 1 1 c0t5000CCA0436703B8d0s3
metainit -f d41 1 1 c0t5000CCA0436703B8d0s4
metainit d12 1 1 c0t5000CCA043689C5Cd0s0
metainit d22 1 1 c0t5000CCA0436703B8d0s1
metainit d32 1 1 c0t5000CCA0436703B8d0s3
metainit d42 1 1 c0t5000CCA0436703B8d0s4
metainit d10 -m d11
metainit d20 -m d21
metainit d30 -m d31
metainit d40 -m d41

# Edit /etc/vfstab to update all except the root volume, 
# eg. /dev/md/dsk/d30 /dev/md/rdsk/d30 /var ...
vi /etc/vfstab

# Apply the change for root and then reboot
metaroot d10
lockfs –fa
reboot

# After the reboot, attach the other sub-mirror (sync takes long time)
# don't need to mirror swap partition, in this case, d20
metattach d10 d12
metattach d30 d32
metattach d40 d42
metastat



Solaris 10 Live Upgrade & Patching

Using 4 internal drives: c0t0d0 mirrored with c2t0d0, c0t1d0 for LU, c2t1d0 is spare. Commands are -> lucreate (copy our OS), luupgrade (upgrade new copy), luactivate (nominate boot env).

First, install Live Upgrade software from Solaris DVD 

$ ./liveupgrade20 -noconsole -nodisplay 

1) To upgrade a Solaris release 
Make sure root partition tables match. Create the new Solaris DVD. 
Stop apps, then copy "/" to c0t1d0 

$ lucreate -c sol10u8 -n sol10u11 -m /:c0t1d0s0:ufs 
$ lustatus 

Insert DVD, upgrade Solaris 10 to latest release 

$ luupgrade -u -n sol10u11 -s /cdrom/cdrom0/s0 

Nominate the new boot environment, note the previous boot disk, 

$ luactivate sol10u11 
$ init 6 
$ cat /etc/release ; uname -rv 
2) To patching Solaris 

Make sure root partition tables match. Download & extract patches (ie. CPU). 
Stop apps, clone root, $ lucreate -c cpujul2015 -n cpujul2016 -m /:c0t1d0s0:ufs 
$ lustatus 
Apply the CPU patches to the new root, 

$ cd /var/tmp/10_Recommended 
$ luupgrade -n cpujul2016 -s /var/tmp/10_Recommended -t `cat patch_order` 
Nominate the new boot environment, note the previous boot disk, 
$ luactivate cpujul2016 
$ init 6 
$ cat /etc/release ; uname -rv 
 
ZFS mirroring
Copy partition table to the 2nd disk (c1t1d0), add the boot block: $ prtvtoc /dev/rdsk/c1t0d0s2 | fmthard -s - /dev/rdsk/c1t1d0s2 $ installboot -F zfs /usr/platform/`uname -i`/lib/fs/zfs/bootblk /dev/rdsk/c1t1d0s0 Mirror ZFS storage pool: $ zpool status rpool $ zpool attach rpool c1t0d0s0 c1t1d0s0 Wait for resilvering completion, then test booting from c1t1d0: $ init 0 ok devalias disk0 ok devalias disk1 ok nvalias rootdisk /pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1/disk@0,0 ok nvalias rootmirror /pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1/disk@1,0 ok setenv boot-device rootdisk rootmirror ok printenv auto-boot? ok boot rootmirror
Reboot with rootdisk (the default), after this test, 
$ reboot


No comments:

Post a Comment