The most common problem that can be seen in many environment is to recover root password.
As commited in my previous post, Herein I will be going to present a New Procedure for Root Password recovery for Solaris 10 without CD/DVD.
Below is the detailed procedure for the same.
1.) Bring the server at OK prompt.
yogesh-test# init 02.) Here comes the magic of Solaris 10, There is a new boot mode called Failsafe mode which is used to boot your server from RAM without any need of CD/DVD. I will show you the complete booting sequence in Failsafe below with the example.
{0} ok boot -F failsafeNote: Sometimes (every time is X-86 servers) the Failsafe mode will ask you to mount the rootdisk before giving you the Shell prompt. Do not mount at that time, just say No every where and bring the failsafe mode at Shell Prompt and then do the mount and update archive manually.
Probing system devices
Probing memory
ChassisSerialNumber 0730TL21HC
Probing I/O buses
screen not found.
keyboard not found.
Keyboard not present. Using ttya for input and output.
Probing system devices
Probing memory
ChassisSerialNumber 0730TL21HC
Probing I/O buses
Sun Fire V245, No Keyboard
Copyright 2007 Sun Microsystems, Inc. All rights reserved.
OpenBoot 4.22.33, 8192 MB memory installed, Serial #74086296.
Ethernet address 0:14:4f:45:c9:7e, Host ID: 8479b97e.
Rebooting with command: boot -F failsafe
Boot device: /pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1/disk@1,0 File and args: -F failsafe
SunOS Release 5.10 Version Generic_142909-17 64-bit
Copyright (c) 1983, 2010, Oracle and/or its affiliates. All rights reserved.
WARNING: i2c_0 failed to add interrupt.
WARNING: i2c_0 operating in POLL MODE only
Hardware watchdog enabled
Configuring devices.
Searching for installed OS instances…
No installed OS instance found.
Starting shell.
# uname -a
SunOS 5.10 Generic_142909-17 sun4u sparc SUNW,Sun-Fire-V245
# df -k
Filesystem kbytes used avail capacity Mounted on
/ramdisk-root:a 201463 178943 2374 99% / ————> Server booted from RAM.
/devices 0 0 0 0% /devices
ctfs 0 0 0 0% /system/contract
proc 0 0 0 0% /proc
mnttab 0 0 0 0% /etc/mnttab
swap 7725248 320 7724928 1% /etc/svc/volatile
objfs 0 0 0 0% /system/object
sharefs 0 0 0 0% /etc/dfs/sharetab
swap 7725504 576 7724928 1% /tmp
/tmp/dev 7725504 576 7724928 1% /dev
fd 0 0 0 0% /dev/fd
#
//
//
3.) Once your server will boot up in Failsafe, mount your rootdisk at /a. Here my rootdisk is c1t1d0s0.
# mount /dev/dsk/c1t1d0s0 /a4.) Take a copy of /a/etc/passwd & /a/etc/shadow file.
# df -h /a
Filesystem size used avail capacity Mounted on
/dev/dsk/c1t1d0s0 7.9G 7.1G 714M 92% /a
# cp -p /a/etc/passwd /a/etc/passwd-orig5.) Now stick to basic and remove the encrypted password entry for root from /a/etc/shadow file.
# cp -p /a/etc/shadow /a/etc/shadow-orig
Before Modifications:
#grep root /a/etc/shadowAfter Modifications:
root:WP7grKsEFAgt.:15182::::::
#grep root /a/etc/shadow6.) Update the boot archive as below before proceeding with the reboot.
root::15182::::::
# bootadm update-archive -R /a7.) Reboot your system, this time you are allowed to login into the server without password. Now first recommended thing would be to set you password for root.
Creating boot_archive for /a
updating /a/platform/sun4u/boot_archive
# init 6This is one of the best feteaur I have observed in Solaris 10. Which make the troubleshooting part much flexible in case of remote service areas.
Note: The procedure for Solaris X-86 is also same, In X-86 select the Failsafe mode from GRUB Menu which is present in the GRUB menu bydefault. The GRUB is picking the entry from /boot/grub/menu.lst.
http://gurkulindia.com/main/2011/08/solaris-troubleshooting-magic-of-solaris-10-root-password-recovery-for-any-solaris-10-without-cddvd/
No comments:
Post a Comment