Systems-Solaris

From DevRandom

Jump to: navigation, search

Note: Document under work.

Disabling Desktop login

Disable /usr/dt/bin/dtconfig -d

Stop services /etc/init.d/dtlogin stop

Managing Services

List all services

#svcs -a 

Restarting services :

svcadm restart svc:/network/ssh:default

Make sure you disable the following if you are not using them. These are enabled unless you disable remote services during install.

telnet rlogin snmpd sendmail

svcadm disable telnet
svcadm disable svc:/network/login:rlogin
svcadm disable svc:/network/ftp:default 
svcadm disable svc:/network/shell:default


Disk Naming Convention

/dev/dsk/c#t#d#s#

Where C= Controller T= Target D= Device S=Slice

Software RAID

The following are my handy-dandy raid one setup instructions (root - d0, swap -d1): In this example :- /dev/dsk/c0t0d0s0 is the root partition

/dev/dsk/c0t0d0s1 is the swap

/dev/dsk/c0t0d0s7 is the metadb slice

Install everything and make sure your os is running fine.

Copy the partition table. It uses BSD style disk layout, so the second slice is considered the entire disk layout or sometimes called "overlap"


#prtvtoc /dev/rdsk/c0t0d0s2 | fmthard -s - /dev/rdsk/c0t1d0s2

create the meta database on slice 7 on both disk


#metadb -af -c 3 /dev/dsk/c0t0d0s7

#metadb -af -c 3 /dev/dsk/c0t1d0s7

Initialize the array


#metainit -f d10 1 1 /dev/dsk/c0t0d0s0

#metainit -f d20 1 1 /dev/dsk/c0t1d0s0

Create the mirror


#metainit -f d0 -m d10

Repeat for swap


#metainit -f d11 1 1 /dev/dsk/c0t0d0s1

#metainit -f d21 1 1 /dev/dsk/c0t1d0s1

#metainit -f d1 -m d11

Setup the root


#metaroot d0

Reboot


#sync && init 6

Attach the mirrors


#metattach -f d0 d20

#metattach -f d1 d21

Install the book block on the 2nd disk

#installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c0t1d0s0

Configure the eeprom

#eeprom boot-device="disk0 disk1 net"

Setting NIC speed and duplex

Solaris is often unable to correctly auto-negotiate duplex settings , especially when the switch is set to 100Mbit full-duplex. You can force the NIC into 100Mbit full-duplex

Example with eri0:

  1. ndd -set /dev/eri adv_100hdx_cap 0
  1. ndd -set /dev/eri adv_100fdx_cap 1
  1. ndd -set /dev/eri adv_autoneg_cap 0


Or to preseve across boots

  1. vi /etc/system

Add:

  1. set eri:eri_adv_autoneg_cap=0
  1. set eri:eri_adv_100hdx_cap=0
  1. set eri:eri_adv_100fdx_cap=1


Root Password Recovery

Boot from Solaris CD rom Press the STOP and A key at the same time.

Ok> boot cdrom

Select preferred language

When you reach the prompt hostname information right click on the desktop and

Select a terminal window.

At the command prompt, you can mount the root partition from your primary drive (the one that boots Solaris) to any directory.

You must know the boot drive (c0t0d0 etc..). You can use the format command to determine this.

Once determined mount it

#mount   /dev/dsk/c0t0d0s0  /tmp_drive

vi the shadow file and remove the encrypted password. The fields are delimted by a colons, remove the password between the

first and second colon.

root:f45tege6y6y:6455::::::

Note : If vi complains about terminal settings do this

            #TERM=ansi

            #export TERM

            #vi shadow

Reboot the system

# shutdown –i 6 –g 0

Once the system has rebooted, log in as root and hit the return key.

Since root has no password it should let you login. Change the password and never forget it

Similary you can edit the vfstab file if made any mistakes while entering information in it. sendmail_on_solaris9.htm

Views
Personal tools
About Me

Blog

Contact Me

Resume

Photos