Wednesday, July 30, 2014

Solaris 11: Recover pam.conf

Get OK Prompt
1. ssh to ILOM console
2. From the ILOM prompt , type the below.

-> set /HOST send_break_action=break
-> start /SP/console to get to the ok prompt.

Manual system reset from the ILOM prompt.

-> set /HOST/bootmode script="setenv auto-boot? false"
-> reset /SYS


{0} ok probe-scsi-all
This command may hang the system if a Stop-A or halt command
has been executed.  Please type reset-all to reset the system
before executing this command.
Do you wish to continue? (y/n) y
/pci@400/pci@2/pci@0/pci@e/scsi@0

FCode Version 1.00.63, MPT Version 2.00, Firmware Version 9.05.00.00

Target 9
  Unit 0   Disk   HITACHI  H109060SESUN600G A690    1172123568 Blocks, 600 GB
  SASDeviceName 5000cca0562b9db8  SASAddress 5000cca0562b9db9  PhyNum 0
Target a
  Unit 0   Removable Read Only device   TEAC     DV-W28SS-W       1.0A
  SATA device  PhyNum 7
Target b
  Unit 0   Disk   HITACHI  H109060SESUN600G A690    1172123568 Blocks, 600 GB
  SASDeviceName 5000cca0562bd16c  SASAddress 5000cca0562bd16d  PhyNum 1

/pci@400/pci@1/pci@0/pci@b/pci@0/usb@0,2/hub@2/hub@3/storage@2
  Unit 0   Removable Read Only device    AMI     Virtual CDROM   1.00

{0} ok devalias

screen                   /pci@400/pci@1/pci@0/pci@0/pci@0/display@0
mouse                    /pci@400/pci@1/pci@0/pci@b/pci@0/usb@0,2/hub@2/device@4/mouse@1
net3                     /pci@500/pci@1/pci@0/pci@5/network@0,1                        
net2                     /pci@500/pci@1/pci@0/pci@5/network@0                          
dvd                      /pci@400/pci@2/pci@0/pci@e/scsi@0/disk@p7                     
disk5                    /pci@400/pci@2/pci@0/pci@e/scsi@0/disk@p5                     
disk4                    /pci@400/pci@2/pci@0/pci@e/scsi@0/disk@p4                     
disk3                    /pci@400/pci@2/pci@0/pci@e/scsi@0/disk@p3                     
disk2                    /pci@400/pci@2/pci@0/pci@e/scsi@0/disk@p2                     
disk1                    /pci@400/pci@2/pci@0/pci@e/scsi@0/disk@p1                     
disk0                    /pci@400/pci@2/pci@0/pci@e/scsi@0/disk@p0                     
disk                     /pci@400/pci@2/pci@0/pci@e/scsi@0/disk@p0                     
scsi0                    /pci@400/pci@2/pci@0/pci@e/scsi@0                             
scsi                     /pci@400/pci@2/pci@0/pci@e/scsi@0                             
rcdrom                   /pci@400/pci@1/pci@0/pci@b/pci@0/usb@0,2/hub@2/hub@3/storage@2/disk@0
rkeyboard                /pci@400/pci@1/pci@0/pci@b/pci@0/usb@0,2/hub@2/device@4/keyboard@0  
rscreen                  /pci@400/pci@1/pci@0/pci@0/pci@0/display@0:r1280x1024x60            
net1                     /pci@400/pci@1/pci@0/pci@4/network@0,1                              
net0                     /pci@400/pci@1/pci@0/pci@4/network@0                                
net                      /pci@400/pci@1/pci@0/pci@4/network@0                                
virtual-console          /virtual-devices@100/console@1                                      

{0} ok boot dvd -s

login with username/password   : root/solaris

Mostly the pool name for root file system is (rpool)

# zpool import |grep -i pool:
pool:rpool

# zpool  import -f rpool   (to import root pool)
# mkdir /a
# zfs set mountpoint=/a rpool/ROOT/solaris
# zfs mount rpool/ROOT/solaris

Recover pam.conf

set back mount points to original and export the pool

# umount /a
# zfs set mountpoint=/ rpool/ROOT/solaris
# zpool export rpool
# halt

Go back to ILOM
-> set /HOST/bootmode script="setenv auto-boot? true"
-> reset /SYS

No comments:

Post a Comment