Monday, December 27, 2010

Solaris Jumpstart - setting up the ISO

Step 1: Download the Solaris OS from Oracle
wget --http-user= --http-password= --no-check-certificate --output-document=sol-10-u9-ga-sparc-dvd-iso.zip http://download.oracle.com/otn/solaris/10/sol-10-u9-ga-sparc-dvd-iso.zip &

a. wget may be installed in /usr/sfw/bin, so check that location as well, before you go hunting for wget.
b. This command will seem like it's hanging, but tail the output file, and you'll see the download status.


Step2:
Unzip the file.

Step 3:
Mount the ISO
a. Create a block device for the ISO:

[root@gpadev-sol-x86:/export/depot]# lofiadm -a /export/depot/sol-10-u9-ga-sparc-dvd.iso
/dev/lofi/1

b. Mount it.
[root@gpadev-sol-x86:/export/depot]# mount -F hsfs /dev/lofi/1 /mnt

Step 3

a. Create a directory where you want the media to reside at.
mkdir -p /export/depot/s10upd9

b. Use the Solaris Tools to copy over the Install media to the directory you want. Dont just to a cp!

[root@gpadev-sol-x86:/export/depot/s10upd9]# cd /mnt/Solaris_10/Tools/
[root@gpadev-sol-x86:/mnt/Solaris_10/Tools]# ls
add_install_client Boot dial Installers rm_install_client setup_install_server

c. Use the "setup_install_server" command
[root@gpadev-sol-x86:/mnt/Solaris_10/Tools]# ./setup_install_server -w /export/depot/s10upd9 /export/depot/s10upd9
Verifying target directory...
Calculating the required disk space for the Solaris_10 product
Calculating space required for the installation boot image
Copying the CD image to disk...
Copying Install Boot Image hierarchy...
Copying /boot netboot hierarchy...
Install Server setup complete


Step 4:
Add to the Jumpstart server the location.

Step 5:
Remove the lofi device.

lofiadm -d /dev/lofi/1

Verify:
lofiadm

Sun Hardware handy tools

I came across ipmitool recently, and it is really handy when you need information about your machine (Serial Number, amount of memory etc)

Eg:
Whats the Serial Number of the Sun Blade?

ipmitool -H blade ILO IP-U root fru | grep "Product Serial"

Whats the Serial Number of the Sun Chassis
ipmitool -H chassis ilo ip -U root fru | grep "Product Serial"

How much memory do I have? (I had just installed some 4Gb dimms)
ipmitool -H blade ilo ip -U root fru | grep 4096MB | wc -l
Password:
24

i.e 24 dimms installed.

Friday, December 10, 2010

Oracle Grid control -- Removing EM Targets cleanly

Update: I found that this works in Enterprise Manager 12c as well.

I was installing Grid Control agents on some of my middleware boxes, and ofcourse, the hostname got messed up when I did the silent install. My number of attempts to remove the entry from Grid control had no use. A quick google search revealed, I had to connect to the EMREP database on the Grid Control Server and remove it.

On the Grid Control Server

SQL> select instance_name from v$instance;

INSTANCE_NAME
----------------
emrep


Get a list of all the targets...

oragrid@emhost$ sqlplus '/ as sysdba'

SQL> select target_name from mgmt_targets where target_type='oracle_emd';

Remove the offending target:
SQL> exec mgmt_admin.cleanup_agent('offendingTarget:3872');

After a minute or more, voila, "PL/SQL procedure successfully completed."

Refresh my Grid Control screen, and it's all gone.

Got to give credit where due: I found it here