Solaris Notes

shutdown or reboot

init state Function
0 Firmware Open Boot
S or s Single User Mode
1 Admin
2 Multiuser, no NFS
3 Multiuser with NFS
4 Usually Unused
5 Shutdown
6 Reboot

Put the system into init5 state for poweroff

shutdown -y -i5 -g0

Put it into init6 for reboot

shutdown -y -i6 -g0

Secure disk wiping

This uses the purge utility built into the format command. Boot the system off a cd to single user mode with boot cdrom -s Type format and select the analyse menu, select purge and slice 2 for the whole disk. The program warns you that it will take a considerable amount of time, it's not kidding. This could take several hours or more depending on the disk size. See Sun Tech FAQ. This is supposed to “ overwrite the available disk sectors with patterns that comply with the Department of Defense declassification regulations for data remanence. ”.

Start system without X

bash-3.00# /usr/dt/bin/dtconfig -d
done
desktop auto-start disabled.

Install patch Cluster

Patch needs to be done in Single user mode:

# init S

Copy device names to backup in case they are overwritten, and do install

# cp /kernel/drv/sd.conf /kernel/drv/sd.conf.pre_cluster_installation
# cp /kernel/drv/st.conf /kernel/drv/st.conf.pre_cluster_installation

# cd $PATCH_CLUSTER_DIRECTORY
# ./install_cluster

Errors:-

Installation of patch failed. Return code 2.
Installation of patch failed. Return code 8.

Code 2 means patch already installed.
Code 8 means that the patch is for a package not present on the system.

Copy device descriptions back if needed (check files with diff) & reboot system

# mv /kernel/drv/sd.conf.pre_cluster_installation /kernel/drv/sd.conf
# mv /kernel/drv/st.conf.pre_cluster_installation /kernel/drv/st.conf

# shutdown -i6 -g0 -y

Use showrev & showrev -p to show version of Solaris and the patches installed.
Use uname -a to get the following info:-

$ uname -a
SunOS asp-olog01 5.8 Generic_117350-62 sun4u sparc SUNW,Sun-Fire-V440

SunOS <server name> 5.10 Generic_118833-24 sun4u sparc SUNW,Sun-Fire

The SunOS 5.10 is Solaris 10. The Generic_118833-24 is the Cluster Patch / kernal level of the OS.

The /etc/release will tell you what installed media was used but not the current patch level.

Solaris 8 shows up as SunOS 5.8 Solaris 9 shows up as SunOS 5.9 Solaris 10 shows up as SunOS 5.10

eg.

$ cat /etc/release     
                     Solaris 8 HW 7/03 s28s_hw3wos_05a SPARC
             Copyright 2003 Sun Microsystems, Inc.  All Rights Reserved.
                             Assembled 11 June 2003

Reconfiguration boot

# touch /reconfigure

ILO

Enter ILO from system prompt:-

#.

Commands:-

setupsc Setup
setsc Change variable
showsc View config

Prom commands

# setenv auto-boot? false

Solaris explorer

The first time run this:-

# /opt/SUNWexplo/bin/explorer -g

from then on, run this:-

# /opt/SUNWexplo/bin/explorer

Cron

Solaris 8 doesn't seem to set it's environment to allow crontabs to be edited with crontab. This is b ecause the EDITOR variable is not set. It can be set for all users in /etc/profile:-

gy-asp-db02# tail /etc/profile

EDITOR=vi
export EDITOR

System Accounting

This email message is produced by system accounting:-

Thu Dec 30 02:30:18 UTC 2010
***UPDATE /etc/acct/holidays WITH NEW HOLIDAYS***

To stop system accounting, see this link, however you will need to change rc2.d to rc3.d:-

gy-asp-app02# unlink /etc/rc2.d/S22acct
unlink: No such file or directory
gy-asp-app02# unlink /etc/rc3.d/S22acct
gy-asp-app02#
http://docs.sun.com/app/docs/doc/817-0403/sysresacctsetup-41703?l=en&a=view

Preventing root logins

edit /etc/default/logins:-

# If CONSOLE is set, root can only login on that device.
# Comment this line out to allow remote login by root.  
# 
CONSOLE=/dev/console
 
solaris/solarisnotes.txt · Last modified: 09/01/2021 17:49 by andrew