Solaris Questions and Answers
Solaris Questions and Answers
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. 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.
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
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
Init0: Shutting down the system and bring back the system to OBP prompt (OK)
Rc script : check and mount the file system, start and stop the various process.
How many file to modify the host name to be changed without rebooting the system.
#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
# /etc/hosts
# /etc/hosts.equi
# /etc/hosts.hme
# vi /etc/hosts.hme0 ( update the ip address ) > to bring the interface along with the ipaddress during
boot time.
# vi /etc/hosts.hme0:1 ( update the ip address ) > to bring the interface along with the ipaddress during
boot time.
1 = 100mbps
0 = 10mbps
To modify
# prtconf
# sysdef
# /usr/platform/sun4u/sbin/prtdiag
# format
#sysdef
OK probe-scsi-all > This will deteck all the scsi bus channel, it will show CD-ROM/DVD-ROM also
OK probe-scsi-all: it will show all the scsi devices connected internal and external
#./etc/init.d/cron stop
# resetsc -y
> cd /114527-04
#shutdown i0 g0 y
> poweroff
> poweron
#/etc/syslog.conf
# /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.
Ok .version > This will tell the open boot prompt version otherwords, FIRMWARE
# prtconf V
# uname x
How will see the hostname
#nodename
#hostname
Through ftp copy the copied files nad use dd command to compare both the host patches.
# showrev p
# patchadd P
# patchadd P
#pkginfo | more
.profiles
# /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
We have edit the /etc/passwd file and modify a user forget to give the shell will user able to loging?
7 fileds
After creating swap file update the same to /etc/vfstab what will be the fstype.
tempfs
# /use/platform/sun4u/sbin/prtdiag
Ok boot cdrom-s
# cd mnt
#set TERM=vt100
#export TERM > If you dont give, vi editor wont start properly
# umount /mnt
# reboot ( While system come up it will ask the new root passwd.)
Ok boot cdrom-s
# umount mnt
# boot r
Wait: Wait for the process to be completed before processing the next line in /etc/inittab
# newaliases
# in.lpd daemon
Explain inode
Root.devices & root files configuration : Physical path name of the devices
or
# eeprom
# ps U oracle
or
# who
# who r
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 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>
# /etc/service
Tell me the port for Telnet, ftp,nis,ssh,nfs
What are thing you must ensure to provide security the system
1. Latest patches
/etc/default/login
sshd.config
3. Limited su access
# iostat xctd 4 5
What are performance tool used
/etc/passwd: 644
/etc/shadow: 400
file: 644
directory: 755
What is UMASK
UMASK is a Unix environment variable, which automatically sets file permissions on newly created files
Setuid : When setuid permission set on a executable file, user who access the file is granted access
permission of the owner of the file.
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
#passwd x 1 (username)
# isainfo kv
# /etc/default/init
TZ=
# /usr/dt/bin/dtconfig e ( enable)
# /usr/dt/bin/dtconfig d ( disable)
# /usr/sbin/sys-unconfig
How do you add the disk without reboot the server?
# devfsadm c disk
1 mountd statd
2.nfsd lockd
3.nfslogd
4.statd
5.lockd
# /etc/init.d/nfs.server start
# /etc/init.d/nfs.server stop
How to find out the shared file system from server and client
OK printenv
Expalin soft link and hard link
Softlink : link between different file systems and inode number will be different
Hardlink : link between same file systems and inode number will be same
Explain FSCK
Utility for checking and repairing the files system inconsistence due to abnormal shutdown.
It has 5 phases
# newfs N /dev/rdsk/c0t0d0s6
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
# lk username
For 64 bit
# eeprom boot-file=/kernel/sparc9/unix
or
OK printenv boot-file
For 32 bit
# eeprom boot-file=/kernel/unix
or
OK printenv boot-file
Ypserv
Ypbind
rpc.yppasswdd
Ypxfrd
rpc.ypupdated
RAID 0 Concatenation/Striping
RAID 1 Mirroring
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.
#/etc/lvm/md.tab
or
#/etc/opt/SUNWmg/md.tab
1.Identified the free disks and the volumes size and meta device name
#df h
#metastat d19
# df-h
How to do the disk cloning on solaris
you can do this few ways, lets the scenario be, the disk is already attached and its been label through
format.
This will take time, depends on the size of the primary disk
#fsck -y /dev/rdsk/c1t1d0s0
#vi /mnt/etc/vfstab
How will you take ufsdump and ufsrestore in a sing command line?
# mt /dev/rmt/0 status
ufsdump
2. It copies every thing from regular files in a file system to special character and block
device files.
Tar:
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
0-9 level
0 = Full Backup
1-9 = Incremental backup of file,That have changed since the last lower level backup.
Options in ufsdump
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.
Options in ufsrestore
I = interactive mode
V = verbose mode
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
OK> boot -r
# Vi /etc/system
System can not find the /etc/path_to_install file .It might be missing or corrupted and needs to be
rebuild.
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
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
# vi /var/spool/cron/crontabs/root
#crontab -e
# 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.