Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Server will not boot without running fsck

Status
Not open for further replies.

gazamatt

Technical User
May 8, 2012
1
US
HI,

I am having quite a bit of trouble with a server running Solaris 8. I was in the process of recovering the root password (long story) using vi editor and the /a/etc/shadow file. The steps I had failed, no big deal, the server was running fine with out it so I decided to call it quits for now and just bring the server back up. While booting it found errors in the file system and prompted "enter root password to enter maintenance mode, or press ctrl-d to continue booting normally." As I do not have the root password I pressed ctrl-d, the server responded with the finger and asked me to run fsck again. Is there any way around it? I am sure that the setup allows only root permissions to run fsck. I am pretty inexperienced when it comes to Unix and Solaris systems, any advice at all would be helpful.

Thanks,
Matt
 
Well you can boot from CDRom and mount the disk and fsck and or boot CDRom and reset the root password and fsck ....

If it helps here is a basic root recovery process ....

Code:
Load the Solaris cdrom 

Take the machine down to the PROM level - 
# init 0 (or halt) 

When it comes down to the OK prompt - 
OK boot cdrom -s 

When it is back up - 
# mount /dev/dsk/c0t0d0s0 /a (your root device/partition) 
# fsck /dev/dsk/c0t0d0s0 (optional, if you can't mount disk) 
# cd /a/etc 
# TERM=vt100;export TERM 
# vi shadow and remove second field on root line 

The root line should look like - 
root::12345:::::: (it must start root:: the other values are not important) 

wq! (or x!) 
init 6 (or reboot)


IHTH

Laurie.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top