First of all, you will need the Solaris Media (CD) and a CD-ROM drive attached to the machine. If you do not know what version of solaris you are running, login into the server as a normal user and type: uname -a
which should return something like the following:
SunOS yourmachinename 5.8 Generic_103640-08 sun4u sparc SUNW,Ultra-1
This means your server is running Solaris 8 (also call SunOS 5.8)

Next we need to find out where the root partition is mounted, login into the server as a normal user and type: df -k /

Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t0d0s0 241543 195738 21651 91% /

In this case, the root partition is mounted on /dev/dsk/c0t0d0s0. Write this down somewhere.

Insert the correct Solaris media in the CD-ROM drive

To shutdown the server, type: Stop-A

At the ok prompt, type: boot cdrom -s

Wait for the system to finish rebooting. You will be brought to the root shell in single-user mode.

From the command prompt, type the following to mount the root file system: mount [root-device] /mnt
where the root-device is the device name you wrote down above, for example: mount /dev/dsk/c0t0d0s0 /mnt

Edit the file /mnt/etc/shadow, when you open the file, the first line in the shadow file should look like this: root:0iIrCerpgZebQ:9783::::::
The second field (between the first and second colon) contains the encrypted root password. Remove it. In this case, the file should look like: root::9783::::::
After making your change, save the file

Reboot the system sync;sync;sync;reboot
You should now be able to login into the system without a password for root. The first thing you should do is set a new password for the root user and write it down.


In addition,

IA32 system:
1) At boot, prompt type
b –s : To boot system into single mode
b –a : To boot system step-by-step i.e. interactively.

SPARC System:
1) At Ok, prompt type:
boot –s : To boot system into single mode
boot –a : To boot system step-by-step i.e. interactively

Comments:

You can still run into problems. Just because in your running system the root filesystem is on a particular controller is no guarantee that it will be if you boot from cd/dvd/network.

OK, if you have not added any controllers since the system was built then you are almost certainly fine, but if you have then when you boot from the controllers are numbered by the speed at which they respond electronically.

Now, if you find that teh device you mounted on /mnt is not the root device that you expected, you may need to run format(1M) to discover the other devices that match in all respects except the controller number and try those.

Alan.

Posted by Alan Hargreaves on August 14, 2008 at 12:26 PM CST #

Post a Comment:
  • HTML Syntax: NOT allowed

This blog copyright 2009 by Ding-Ze Hironics Zhu