Search This Blog

Friday 30 January 2009

Use SC prompt Sun4v Alom

This one annoyed me. The Sun4V architecture no longer seems to use ALOM. There is now ILOM.

I am new to ILOM and it is a whole new set of commands and it looks differenet ( -> instead of SC>). Through a bit of reading, I found it is possible to get SC> back but you must set up a specific account. Here is how I did it.

Log in to ILOM as root and follow these steps:

-> create /SP/users/admin
ILOM should ask for a password
-> set /SP/users/admin role=Administrator
-> set /SP/users/admin cli_mode=alom

The second line sets the admin user's role as Administrator, the third line sets
the cli_mode to admin

Once this is done, log out and log in as as your new admin user and you'll see the
familiar SC> prompt

Wednesday 28 January 2009

Insert table of contents, word 2003

This is by no means a daunting task but is one I constantly forget how to do. In typical MS fashion, there is no menu link for it, instead it is well hidden.

I normally write my document first including chapter numbers, then I add the ToC when I'm done.

To add a Toc

Insert -> Reference -> Index and Tables

When the option box comes up, click the 'Table of contents' tab. From here there are a few options that you can modify.

Tuesday 27 January 2009

Change IP and hostname in Solaris

This is the procedure to change and IP address and hostname in solaris (v440). It is best to be connected by serial port or net sc.

Find the existing IP address

# ifconfig -a

bring down the port

# ifconfig 'port' down

When you see the existing details, update accordingly. This assumes netmask and broadcast are being changed too where x is details

# ifconfig 'port' inet xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx broadcast xxx.xxx.xxx.xxx

Make a copy of the hosts file

# cp /etc/hosts /etc/hosts.bak

edit the hosts file with the new IP address. If necessary, do the same on /etc/netmask

Restart the inet service, this will assign the new values

# /etc/init.d/inetsvc stop
# /etc/init.d/inetsvc start

if you need to change the default route, find the existing one with

# netstat -nar

to delete the existing route

# route delete default 'defaultroute'

then add it with

# route add default 'defaultroute'

make a back up of /etc/defaultroute and modify it.

To change the hostname, make a backup of hosts and modify /etc/hosts. Then make a back up of the following files and modify all

/etc/nodename
/etc/hostname.*interface
/etc/inet/hosts
/etc/inet/ipnodes

and rename directory under /var/crash

# cd /var/crash
# mv oldname newname

then reboot the server to ensure all changes have taken effect.

Friday 23 January 2009

Replace Windows with Ubuntu

For the last few years, I have been a sys admin on Linux and Solaris servers. Like most people, I was running XP at home and was always perfectly happy with it. Recently my laptop had began to slow so I decided I'd take the plunge and install Ubuntu (Linux).

The first thing that really got me was how nice Ubuntu looks. On a 1.86Ghz CPU with 2GB RAM. I have gotten a very nice looking desktop. It also opens all programs much faster than Windows did and has a faster boot time.

As a sys admin, I had exposure to quite a few systems or tools that I use. Being able to run Squid as a local proxy is excellent, I've always felt Squid's ad blocking was better than any random ad blocking software. The open source community has gotten better too with Linux equivalents to nearly all the Windows programs I use.

The only places I have found trouble are with iTunes (iPod Touch) and my remote control (Logitech Harmony 1000). I've gotten round both of these by installing VirtualBox and running a virtual Windows in here. This took a bit of tweaking for USB communication but has worked since and I can sync my iPod with it now. I'd still prefer Apple and Logitech actually wrote a Linux version, after all Mac OS X is based on BSD. I still have my original Windows partition installed but could probably replace it, the fear still has me. From what I've seen, virtual Windows will do everything I need.

If you are considering taking the plunge and installing Ubuntu as your primary OS, I would strongly recommend it. VirtualBox is free for single use non-commercial machines and runs Windows perfectly, especially if you only need a couple of apps. Ubuntu is definitely more stable and looks a lot nicer. Oh and don't forget, free.

Thursday 22 January 2009

Configure net system console port

Recently I've found a few of my network system console (net sc) ports don't work or are configured incorrectly.

I found on the SUN site that the main items to be configured are:

if_network true
netsc_tpelinktest true
netsc_dhcp false
netsc_ipaddr "ip address"
netsc_ipnetmask "netmask"
netsc_ipgateway "router"

These can be set using "setsc" for example

sc> setsc if_network true

Do this for each of the above values and when done you will
have to reset the sc port using "resetsc".

sc> setsc

If you are configuring the net sc for the first time,
use "setupsc" for the initial configuration,

SUNWsolaris9

Recently I was trying to install a virtual Solaris 9 container on a virtual Solaris 10 ldom. A former colleague had set up all the ldoms so this was the first time I had tried to put Solaris 9 inside one.
When I entered the command

"Create -t SUNWsolaris9"

I was getting an error of SUNWsolaris9 not found. I searched for this and could find little on the internet other than the exact line above in an installation guide. Through some more research and a little help I learned that I had to install the Solaris 9 container packages. I had assumed this to be done.

If you are trying to install a Solaris 9 zone inside an ldom, make sure you install called s9containers-1_0-rr-solaris10-sparc.tar.gz on the Solaris 10 ldom. If you are using Solaris 10/08, you will need version 1.0.1 of the same package.