0% found this document useful (0 votes)
460 views

Solaris Questions and Answers

The document provides an overview of common Solaris interview questions. It begins by explaining the four phases of the Solaris boot process: POST, OBP, kernel initialization, and init phases. It then lists and provides brief explanations for several common configuration, troubleshooting, and administrative questions, such as how to configure networking, check hardware, modify users, and view packages and patches.

Uploaded by

ankit0076
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
460 views

Solaris Questions and Answers

The document provides an overview of common Solaris interview questions. It begins by explaining the four phases of the Solaris boot process: POST, OBP, kernel initialization, and init phases. It then lists and provides brief explanations for several common configuration, troubleshooting, and administrative questions, such as how to configure networking, check hardware, modify users, and view packages and patches.

Uploaded by

ankit0076
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 25

Solaris 10 Interview questions

Solaris-Interview Questions

Here is the basic Solaris interview questions which are commonly asked in Solaris L1 or L2 (Level 1 or L2)
interviews.If you dont have a Solaris setup to work,just install Solaris as guest operating system on
VMware workstations and get a hands on experience.

You can also go through the below interface questions on specific category .

1.Solaris zones Interview Questions

2. ZFS interview Questions

3.VXVM Interview Questions

4.Veritas cluster Interview Questions

5.Redhat Linux Interview Questions

Explain the boot process of Solaris operating system?

Boot process dived into 4 phases.

1. POST

2. OBPROM

3. KERNEL INITIALIZATION

4. INIT PHASES

POST: Power on self test, It will detect hardware, machine host ID,serial No, architecture type, memory
and Ethernet address and it will load the primary program called bootblk.

OBP: Open boot programmable,

1.Diagnosing all the system hardware and memory.

2.Initializing the boot parameter.

3.Creating device trees and load the boot block from (0-15 sector), it is called as secondary boot
programmable ufsboot.
KERNEL INITIALIZATION: ufsboot load the kernel (generic unix), kernel will load all the necessary devices
modules to mount the root partition to continue the booting process.

Init Phase : It will started by executing of /etc/init program and start other process reading the

/etc/inittab files, as the directory in the /etc/inittab files.

What is the difference between init 1 and init s ?

If you switch from multiuser mode to init s and switch it back to multiuser mode.then remote useres
automatically reconnects to the system.where as in the case of init 1. they have to reconnect manully
means they have to relogin

Explain about init phases

There are 8 run level.

Init0: Shutting down the system and bring back the system to OBP prompt (OK)

Init1: Single user mode for administrative

Init2: Multi user mode without resource sharing

Init3: Multi user mode with resource sharing

Init4: Not in use

Init5: Shutdown and power off the system

Init6: Reboot the system to default run level

Inits: Single user mode but user login are disabled

Explain rc script and run level

Rc script : check and mount the file system, start and stop the various process.

Run level: Base on the init phases 8 run level

Which file will take place while booting.


# /etc/inittab

How many file to modify the host name to be changed without rebooting the system.

There are 6 files.

#vi /etc/hosts

#vi /etc/nodename

#vi /etc/hostname.hme

#vi /etc/net/ticlts/hosts

#vi /etc/net/ticosts/hosts

#vi /etc/net/ticotsord/hosts

Where the ip address will be stored

# /etc/hosts

# /etc/hosts.equi

# /etc/hosts.hme

How to configure the network card

# ifconfig hme0 plumb

# ifconfig hme0 192.9.200.10 netmask 255.255.255.0 up

# vi /etc/hosts ( update the ip address )

# vi /etc/hosts.hme0 ( update the ip address ) > to bring the interface along with the ipaddress during
boot time.

How to configure the virtual ip address

Infinity virtual ip address can be created.

# ifconfig hme0:1 plumb


# ifconfig hme0:1 192.9.200.10 netmask 255.255.255.0 up

# vi /etc/hosts ( update the ip address )

# vi /etc/hosts.hme0:1 ( update the ip address ) > to bring the interface along with the ipaddress during
boot time.

How to find the network card speed

# ndd get /dev/hme link_speed

1 = 100mbps

0 = 10mbps

How to modify network card speed

# ndd set /dev/hme instance 0

# ndd get /dev/hme link_status

# ndd get /dev/hme link_mode

To modify

# ndd set /dev/eri instance 0

# ndd set /dev/eri adv_100T4_cap0

# ndd set /dev/eri adv_100fdx_cap1

# ndd set /dev/eri adv_100hdx_cap0

# ndd set /dev/eri adv_10fdx_cap0

# ndd set /dev/eri adv_10hdx_cap0

# ndd set /dev/eri adv_autoneg_cap0

How to find the hardware configuration

OK banner > from the open boot prompt

# prtconf
# sysdef

# /usr/platform/sun4u/sbin/prtdiag

How will you find the number of hard disk

# format

#dmesg > this will not give the correct answer

#sysdef

#iostat En > it wont show the Fibre channel

OK show-devs > it will show the device scsi bus channel

OK probe-scsi-all > This will deteck all the scsi bus channel, it will show CD-ROM/DVD-ROM also

Difference between probe-scsi-all and probe-scsi

OK probe-scsi-all: it will show all the scsi devices connected internal and external

OK probe-scsi: it will show only internal scsi devices connected

Procedure for Firmware upgrade

Shutdown root cron on csslu377 servers

#./etc/init.d/cron stop

Reset the system controller from the console.

# resetsc -y

Upgrade the firmware on the system controller

> cd /114527-04

> lom -G ./sgrtos.flash

> lom -G ./sgsc.flash

Escape to lom> and reset the SC:


lom> resetsc -y

Upgrade the firmware on the system boards:

> lom -G ./lw8cpu.flash

> lom -G ./lw8pci.flash

Shutdown the Operating System.

#shutdown i0 g0 y

This may take a while for the server to come up

> poweroff

> poweron

Which file to be configuring the logs messages (like: /var/adm/message etc)

#/etc/syslog.conf

Which file maintain the kernel

# /etc/path_to_inst

This will be quite complicative, because kernel is the core of the operating system, its an image of the
OS. whereas /etc/path_to_inst are the drivers are stored for the enabled hardware.

How will see the kernel version

Ok banner > This will not show the Kernel

Ok .version > This will tell the open boot prompt version otherwords, FIRMWARE

# prtconf V

# showrev > will show the installed patches

# uname x
How will see the hostname

#nodename

#hostname

How will compare 2 host patches

Through ftp copy the copied files nad use dd command to compare both the host patches.

use the command called diff

How will see the version of the patches

# showrev p

# patchadd P

How will check patches installed

# showrev p > This is the correct one

# patchadd P

# patchrm : to remove the patch

# patchad d (patch no ) : to install the patch

How will you view the packages?

#pkginfo | more

When user logging in which file will take place

.profiles

Default path for patches

# /var/sadm/patch
How many fields in passwd, shadow and group files

7 inPasswd: username:passwd:uid:gid:commentfiled:homedirectory:loginshell

9 in shadow: useraccount:passwd:lastchange:min:max:warring:inactivity:expiration:flag

4 in group: username:passwd:gid:user

Syntax for useradd commad

# useradd u 101 g other d /export/home/ragu m s /bin/ksh c revenue ragu

What is difference between g G while creating useradd?

Small g is primary group

Capital G is for secondary group

We have edit the /etc/passwd file and modify a user forget to give the shell will user able to loging?

If Passwd f option given In which files it will update.

How many filed in /etc/vfstab

7 fileds

After creating swap file update the same to /etc/vfstab what will be the fstype.

tempfs

How will you clear the soft error on disk

# format analyst & verify read /write


How to modify the user from ragu to haz

# usermod d /export/home/haz m l haz ragu

How will you find out enough memory?

# /use/platform/sun4u/sbin/prtdiag

# prtconf | grep i mem

What command can be used in running a background process?

# nohup ( comment ) &

How will you rectify the root passwd in solaris

Boot through cdrom 1/3 cd in single user mode.

Ok boot cdrom-s

# mount F ufs /dev/rdsk/c0t0d0s6 /mnt

# cd mnt

#set TERM=vt100

#export TERM > If you dont give, vi editor wont start properly

# vi /etc/shadow (remove the passwd entry and save the file)

# umount /mnt

# reboot ( While system come up it will ask the new root passwd.)

If the system panic or system not booting

Boot through cdrom 1/3 cd in single user mode.

Ok boot cdrom-s

# mount F ufs /dev/rdsk/c0t0d0s0 /mnt


# cd mnt

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

# umount mnt

# boot r

Explain /etc/inittab files

It will have 4 fields( id, rstat, action, process)

Respawn : Restart daemon if killed

Off : Dont start the daemon if killed

Once: Run once

Wait: Wait for the process to be completed before processing the next line in /etc/inittab

How will you ad new aliases name

# vi /etc/mail/aliases ( enter the aliases name (eg) service:[email protected]

# newaliases

# /usr/lib/sendmail v b (aliases name)

What are printer daemon

# /etc/inetd.conf > This is an services daemons

# in.lpd daemon

Explain inode

It contain the information of the files and directory

Like ( date, home directory, rights, modified date, etc)


Explain /etc/system file

It will control the kernel modules and it dived into 5 sector

Moddir : default loadable kernel modules

Root.devices & root files configuration : Physical path name of the devices

Exclude: Does not load the kernel during kernel initializing

Forceload: Force the kernel module to load

Set: set maxium user =40

What is the protocol supported by NFS

UDP and TCP

What is the difference between dsk and rdsk

DSK: Block level devices

RDSK: Raw level device or character level device

How to find the boot path in solaris

# prtconf vp | grep bootpath

or

# eeprom

How to bring the process to offline or online

# psradm f (no of the process)

# psradm a n ( no of the process)

How to check the no of the processor available


# psrinfo v

How will you check the process for particular user

# ps U oracle

or

#ps fu oracle | grep smon

How do you check the no of user logged into the system

# who

How do you check the run level

# who r

How to enable the telnet or ftp session for one host

Edit the /etc/hosts.allow (it will have list of host to access) -> This will show the user list on that host.-

/etc/hosts.deny (it will have list of host to access deny)-> This will show the user list on that host.-

/etc/services file

If telnet not working, what are the thing to be checked

Ping test, service enable or not in (/etc/inetd.conf), NIS problem

If telnet is not working, first of all you will not be get connected, login through console access and then
find out with ps -ef | grep telnetd or Kill -1 <pid_inetd>

In which file port Nos are defined

# /etc/service
Tell me the port for Telnet, ftp,nis,ssh,nfs

ftp = 21ssh = 22Telnet = 23nfs = 2049nis = 749

How will you restart the inetd process?

# Pkill HUP inetd

What is nice and renice command do

To set the high priority for the process

-20 high priorities

+20 low priorities

Eg: # nice 20 oracle

What are thing you must ensure to provide security the system

1. Latest patches

2. Access to the system:

/etc/default/login

sshd.config

3. Limited su access

4. Stop unnecessary service at run level

/etc/inetd.config : finger, discard, daytime,charger,tftp,spary & etc

How will you check the disk performance?

# iostat xctd 4 5
What are performance tool used

Iostat ,vmstat , prstat , sar ,netstat, top

Which service assign port no dynamically

Rpc service ( /etc/rpc)

As a user how he can change is passwd with root privilege.

Setuid to set on /usr/bin/passwd command

What is default permission of /etc/passwd , /etc/shadow files

/etc/passwd: 644

/etc/shadow: 400

What is default permission of files and directory?

file: 644

directory: 755

What is UMASK

UMASK is a Unix environment variable, which automatically sets file permissions on newly created files

Defalut value for umask

umask default value is 022

Explain setuid, setgid and stickybit

Setuid : When setuid permission set on a executable file, user who access the file is granted access
permission of the owner of the file.

# find / -prem 4000


setgid : Permission similar to setuid, The process is changed to owner of the file.

# find / -prem 2000

Stickybit : It is a special permission that protect the files within a public writable directory

Stickybit permission set the shared directory, user can create a files or directory

But only by owner of the directory can modify or delete.

# find / -prem 1000

How to set passwd never expire for a user

#passwd x 1 (username)

How to find the kernel bit version or architecture

# isainfo kv

How to set the time zion

# /etc/default/init

TZ=

How to enable and disable the dtlogin

# /usr/dt/bin/dtconfig e ( enable)

# /usr/dt/bin/dtconfig d ( disable)

How to change the hostname and Ethernet address in single command

# /usr/sbin/sys-unconfig
How do you add the disk without reboot the server?

# devfsadm c disk

How to delete abc files using find command

# find / -name abc exec rm {}\;

What are the NFS daemon in server & client

Server Daemons Client Daemons

1 mountd statd

2.nfsd lockd

3.nfslogd

4.statd

5.lockd

How to start / stop the nfs server

# /etc/init.d/nfs.server start

# /etc/init.d/nfs.server stop

How to find out the shared file system from server and client

Server : # share & dfmount

Client : # showmount e (hostname) and dfshares

To find the OBP environment variable

OK printenv
Expalin soft link and hard link

Softlink : link between different file systems and inode number will be different

(eg) /U3 /U4

#ln s /U3/file1 /U4/file2

Hardlink : link between same file systems and inode number will be same

(eg) /U3 /U3

#ln s /U3/file1 /U3/file2

Explain FSCK

Utility for checking and repairing the files system inconsistence due to abnormal shutdown.

It has 5 phases

Phase 1 : Check block and size

Phase 2 : Check pathname

Phase 3 : Check connectivity

Phase 4 : Check reference count

Phase 5 : Check cylinder group

If super block corrupted how to recover

# newfs N /dev/rdsk/c0t0d0s6

Then run the fsck utility using alternative super block

# fsck F ufs o b=32 /dev/rdsk/c0t0d0s6

How to create swap file

#mkfile 20m /filename


#swap a /filename

#swap l ( to view and swap file)

#swap d ( to delete the swap file)

What is difference between Hard and Soft mount?

Hardmount:Normal file system mount used mainly for mounting local file systems.

Once a file system is hard mounted, can use a normal filesystem untill

its umount.

Soft mount:It allows automatic unmounting if the filesystem is idle for a specified timeout

period. It is mainly used for network filesystems like NFS It can be configured

using Autofs and the network filesystem can be soft mounted.

Which command to lock the user Account?

# lk username

How to boot the solaris system in 64 0r 32 bit kernel

For 64 bit

# eeprom boot-file=/kernel/sparc9/unix

or

OK printenv boot-file

OK settenv boot-file kernel/sparc9/unix

For 32 bit

# eeprom boot-file=/kernel/unix
or

OK printenv boot-file

OK settenv boot-file kernel/unix

What are processing daemon in nis

Ypserv

Ypbind

What are the daemons in nis server.

rpc.yppasswdd

Ypxfrd

rpc.ypupdated

Explain RAID0, RAID1, RAID3,

RAID 0 Concatenation/Striping

RAID 1 Mirroring

RAID 5-Striped array with rotating parity.

Concatenation: Concatenation is joining of two or more disk slices to add up the disk space.
Concatenation is serial in nature i.e. sequential data operations are performed serially on first disk then
second disk and so on. Due to serial nature new slices can be added up without having to take the
backup of entire concatenated volume, adding slice and restoring backup.

Striping: Spreading of data over multiple disk drives mainly to enhance the performance by distributing
data in alternating chunks 16 k interleave across the stripes. Sequential data operations are performed
in parallel on all the stripes by reading/writing 16k data blocks alternatively form the disk stripes.

Mirroring: Mirroring provides data redundancy by simultaneously writing data on to two sub mirrors of
a mirrored device. A submirror can be a stripe or concatenated volume and a mirror can have three
mirrors. Main concern here is that a mirror needs as much as the volume to be mirrored.
RAID 5: RAID 5 provides data redundancy and advantage of striping and uses less space than mirroring.
A RAID 5 is made up of at least three disks, which are striped with parity information written alternately
on all the disks. In case of a single disk failure the data can be rebuild using the parity information from
the remaining disks.

Where will be the configuration for metadevice

#/etc/lvm/md.tab

or

#/etc/opt/SUNWmg/md.tab

How to grow disk size in SDS

1.Identified the free disks and the volumes size and meta device name

#df h

/dev/md/dsk/d19 27G 1.5G 25G 6% /rpbkup

2.Increase the /rpbkup by 10Gb

# metattach d19 c4t50060E80000000000000818D00000009d0

3.Verify the volume size

#metastat d19

4.Increase the file system /rpbkup by 10Gb

# /usr/sbin/growfs -M /rpbkup /dev/md/rdsk/d19

5.Verify the file system

# df-h
How to do the disk cloning on solaris

Here is the procedure

1.install the disk

you can do this few ways, lets the scenario be, the disk is already attached and its been label through
format.

2.If primary disk is u r c1t0d0s2

#dd if=/dev/dsk/c1t0d0s2 of=/dev/dsk/c1t1d0s2 bs=256k

This will take time, depends on the size of the primary disk

3.verfy the clone disk has a clean filesystem, for that

#fsck -y /dev/rdsk/c1t1d0s0

4.To verify that mount the clone disk

#mount /dev/dsk/c1t1d0s0 /mnt

5.change the /etc/vfstab to point to the clone device

#vi /mnt/etc/vfstab

After making changes, boot the clone disk Done

What is the physical device to check the 2 nodes connect in cluster

Physical fiber cable which is connect to the 2 nodes is called a HTEARTBEAT

How will you take ufsdump and ufsrestore in a sing command line?

# ufsdump 0f /dev/rdsk/c0t0d0s6 | (cd /mnt/haz ufsrestore xf -)

To check the status of the media inseted on the tape drive

# mt /dev/rmt/0 status

Syntex to execute a ufsdump


# ufsdump 0uf /dev/rmt/1

Difference between ufs and tar commnad

ufsdump

1. Used for complete file system backup.

2. It copies every thing from regular files in a file system to special character and block

device files.

3. It can work on mounted or unmounted file systems.

Tar:

1. Used for single or multiple files backup.

2. Cant backup special character & block device files.

3. Works only on mounted file system.

What is different between crontab and at command?

Crontab: job can be scheduled

At: Job can be a run once only

What is difference between incremental backup and differential backup?

Incremental: Only those files will be included which have been changed since the last backup.

Differential: Only those files will be included which have been changed since the last Full backup

How many ufsdump level

0-9 level

0 = Full Backup

1-9 = Incremental backup of file,That have changed since the last lower level backup.
Options in ufsdump

S = size estimate amount of space need on tape

L = auto loaded

O = offline once the backup completed & if possible to eject the media

U = update the /etc/dumpdates files (Indicate:Name of the file system,Level of the backup 0-9,Date.

F = specified the tape devices name

Options in ufsrestore

T= list the content of the media

R =restore entire file system

X = restore only the file named on the command line

I = interactive mode

V = verbose mode

F = specified the tape devices name

Disaster recovery steps if OS corrupted

Ok boot cdrom s

# newfs /dev/rdsk/c0t0d0s0

# mkdir a

# mount /dev/dsk/c0t0d0s0 /a

# cd a

# ufsrestore rf /dev/rmt/0

# rm restoresymtable

# cd /usr/platform/uname-m/lib/fs/ufs
# installboot bootblk /dev/rdsk/c0t0d0s0

# cd /

# umount /a

# fsck /dev/rdsm/c0t0d0s0

# init 6

from the OK prompt, execute

OK> boot -r

How will you comment error line in /etc/system file

# Vi /etc/system

(To comment the error line in /etc/system files, we have to use *)

How many replicas should be for raid5 in sds if I have 5 disk

No of Hard Devices No of State Database Replicas to created

One Three, all on one slice

Two-four Two on each drive

Five or more One on each drive

Cannot open /etc/path_to_inst'

System can not find the /etc/path_to_install file .It might be missing or corrupted and needs to be
rebuild.

To rebuild this file boot the system with -ar option :

ok>boot -ar
Press enter to select default values for the questions asked during booting and select yes to rebuild
/etc/path_to_install

The /etc/path_to_inst on your system does not exist or is empty. Do you want to rebuild this file [n]? y

system will continue booting after rebuilding the file.

What is mean by paging & server average time.

If a disk shows consistently high reads/writes along with , the percentage busy (

%b

) of the disks is greater than 5 percent, and the average service time (

svc_t

) is greater than 30 milliseconds, then one of the following action needs to be taken

Is it possible to edit the corntab using vi

It is not recommended but it is possible by editing

# vi /var/spool/cron/crontabs/root

The command to edit the crontab is

#crontab -e

Is it possible to create swap in new harddisk without format

No without label the drive, you cant do anything

What is an alternative to the top command on Solaris?

# prstat a

Thank you for reading this article.Please leave a comment if you have any doubt ,i will get back to you as
soon as possible.

You might also like