* You are viewing the archive for January, 2008

Solaris release update version

Sometimes I just do not bother to label images I burn onto CD’s/DVD’s. The other day I grabbed a DVD that contained a copy of Solaris 10, but I needed to know what release update it was. To find out mount the disc and look at release file in SUNWsolnm package:

bash-3.00# cd /Solaris_10/Product/SUNWsolnm/reloc/etc
bash-3.00# cat release
Solaris 10 3/05 HW2 s10s_hw2wos_05 SPARC
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.
Assembled 26 September 2005
bash-3.00#
Continue Reading

Viewing devaliases inside Solaris

Usually, when you need to view or manipulate content of EEPROM you can use eeprom command in Solaris. However, it’s not of much use if you need to view current device aliases. There is a simple way to do so using prtconf command. Just look for section aliases:


bash-3.00# prtconf -vp

<—————–SNIP—————–>
Node 0xf002d470
disk: '/pci@9,600000/SUNW,qlc@2/fp@0,0/disk@0,0:b'
rootdk: '/pci@9,600000/SUNW,qlc@2/fp@0,0/disk@1,0:b'
disk1: '/pci@9,600000/SUNW,qlc@2/fp@0,0/disk@1,0'
disk0: '/pci@9,600000/SUNW,qlc@2/fp@0,0/disk@0,0'
ide: '/pci@8,700000/ide@6'
scsi: '/pci@9,600000/SUNW,qlc@2'
cdrom: '/pci@8,700000/ide@6/cdrom@0,0:f'
net: '/pci@9,700000/network@2'
net1: '/pci@9,600000/network@1'
net0: '/pci@9,700000/network@2'
flash: '/pci@9,700000/ebus@1/flashprom@0,0'
idprom: '/pci@9,700000/ebus@1/i2c@1,2e/idprom@4,a4'
nvram: '/pci@9,700000/ebus@1/i2c@1,2e/nvram@4,a4'
i2c1: '/pci@9,700000/ebus@1/i2c@1,30'
i2c0: '/pci@9,700000/ebus@1/i2c@1,2e'
bbc: '/pci@9,700000/ebus@1/bbc@1,0'
rsc-console: '/pci@9,700000/ebus@1/rsc-console@1,3083f8'
rsc-control: '/pci@9,700000/ebus@1/rsc-control@1,3062f8'
ttya: '/pci@9,700000/ebus@1/serial@1,400000:a'
pci9b: '/pci@9,700000'
pci9a: '/pci@9,600000'
pci8b: '/pci@8,700000'
pci8a: '/pci@8,600000'
ebus: '/pci@9,700000/ebus@1'
name: 'aliases'

<—————–SNIP—————–> Continue Reading

SC/RSC console setup

Many Sun servers have this nifty little “feature” called Net Management port. When connected to the network and configured it allows SC access over the network. It’s just like being hooked up directly to the ALOM port. Depending on the server model you can telnet or ssh to the server to gain access. Given this is console access to the server ssh is the preferred method if it’s supported. SC output below is from SunFire V245.

Configuration is straight forward, using scadm command. To use it:

bash-3.00# cd /usr/platform/`uname -i`/sbin

First, let’s see the parameters that can be set:

bash-3.00# ./scadm show
if_network="true"
if_modem="false"
if_connection="telnet"
if_emailalerts="false"
sys_autorestart="xir"
sys_bootrestart="none"
sys_bootfailrecovery="none"
sys_maxbootfail="3"
sys_xirtimeout="900"
sys_boottimeout="900"
sys_wdttimeout="60"
netsc_tpelinktest="true"
netsc_dhcp="false"
netsc_ipaddr="10.1.1.1"
netsc_ipnetmask="255.255.255.0"
netsc_ipgateway="10.1.1.254"
mgt_mailhost=""
mgt_mailalert=""
sc_customerinfo=""
sc_escapechars="#."
sc_powerondelay="false"
sc_powerstatememory="false"
sc_clipasswdecho="true"
sc_cliprompt="sc"
sc_clitimeout="0"
sc_clieventlevel="2"
sc_backupuserdata="true"
sys_eventlevel="2"

You can change the parameters using:

scadm set [parameter] [value]

To get SC accessible over the network, if_connection, netsc_ipaddr, netsc_ipnetmask and netsc_ipgateway parameters need to be set. After those parameters are set you will probably have to restart SC using scadm resetrsc for changes to take effect. This does not affect the server itself. Once SC is back up, you can gain access using the method specified in if_connection parameter and then log in using ALOM credentials.

Some server models, such as SunFire V490 do not have SC. Instead they come, at least they used to, with RSC. To use it you will have to download RSC software from Sun. Configuration is similar to SC. If this is your initial configuration of RSC, you can use rsc-config script. It will ask you a bunch of questions and configure RSC for you. Alternatively you can use rscadm utility. To use it

bash-3.00# cd /usr/platform/`uname -i`/rsc

Let’s see some RSC parameters:

bash-3.00# ./rscadm show
mail_enabled="false"
ip_mode="config"
ppp_enabled="false"
tpe_link_test="true"
serial_baud="9600"
serial_parity="none"
serial_stop="1"
serial_data="8"
customerinfo=""
ip_addr="10.1.1.1"
ip_netmask="255.255.255.0"
ip_gateway="10.1.1.254"
mailhost=""
mailuser=""
ppp_local_ip_addr="0.0.0.0"
ppp_remote_ip_addr="0.0.0.0"
hostname="pas2"
escape_char="~"

Once you are happy with your configuration you also have to set input-device and output-device Openboot variables to rsc-console.

SC and RSC are very similar. One notable difference is availability of modem in RSC. For more info check out scadm and rscadm man pages. Pretty useful stuff… Continue Reading

Mounting an ISO image in Solaris

The other day I needed to mount an ISO image in Solaris. It turns out there is a simple way to do that using lofiadm command.
Using lofiadm you can link a file with a block device that can be mounted later as a regular filesystem. First the file has to be linked to a block device:

bash-3.00# lofiadm -a /path/to/my/ISO /dev/lofi/1

Now the block device can be mounted as usual:

bash-3.00# mount -F hsfs /dev/lofi/1 /mnt

When done, simply unmount the block device and remove the file-device association using lofiadm

bash-3.00# lofiadm -d /dev/lofi/1

More info can be found in lofiadm man page. Continue Reading