booting problem

any one can help me. my system running on solaris 2.7. recently there is sudden power failure while system running. after that unable to boot the system. it is giving comment that "can not open /etc/path_to_inst" and then returning back to "OK" after comment of termination. The processor is USPIIi

I think some booting process software has been corrupted. Is there any method to recover the disk without formatting. I am having the CD Rom of solaris 2.7.
Pl help.

try a "boot -rsv" and look for errors.

boot -ar

yes, but only after the first boot to see if there are filesystem errors... the "-a" option creates a new /etc/path_to_inst but if there are problems with the filesystem they need to be fixed first...

what do you think?

How would fsck open /dev/rdsk/c0t0d0s0 if path_to_inst is missing? The kernel needs something to populate /devices. I'm not sure if an initial fsck is an option unless you boot from cdrom to do the fsck. But I have never tried it.

i didn't want to run fsck... the "boot -rsv" was for having a closer look at the problem... for an fsck you clearly need to boot from cd or network.

No, I meant what I said..."boot -ar". If the root filesystem needs an fsck it won't come up beyond single user mode and it won't be able to create the path_to_inst.

In that case the -r and -s are redundant. The system is not booting so -s makes no difference, it's not even getting as for as single user and the -r wouldn't be any use in the case either, in fact it simply won't work without the -a for the reasons given by Perderabo.

i tried by giving boot -ar. It started with following details:
1.boot device: /pci@1f,0/pci@1,1/scsi@2/disk@0,0:a
2.enter file name [kernel/unix]: I gave return as i am not sure.
3.enter default directory for modules[/platform/sunw;ultrsparc-IIi-c Engine/kernel /platform/sun4u/kernel /kernel /usr/kernel: I gave return as i am not sure.
4.enter system file [etc/system]: i select etc.
5.Warning: unknown command 'hostname' on line 16 of etc.
6. Warning: unknown command 'hostfinal' on line 17 of etc.
7.The /etc/path-to-inst on your system does not exist or empty.
8 do you want to rebuild this file [n]? i select y.
9. root file system type [ufs]: i select ufs.
10.enter physical name of root device:(same as shown in line no.1 ): i gave return.
11. /dev/rdsk/c0t0d0s0: unexpected inconsistency run fsck manually
12. fsck -F ufs /dev/rdsk/c0t0d0s0 command i gave.
13. it ask to remove path_to_inst : given yes.
after completion of fsck with 'file system was modified'
14.exit csh .
15.ask to 'type control -d to proceed with normal startup or give root password for system maintenance.
15. after root password i checked /etc and do not find path-to-inst.
after shutdown when reboot the same
can not open /etc/path_to_inst.
come to ok prompt after termination.

what can i do now?

boot again with "boot -ar", if that doesn't work you will need to boot in single user mode from a CD/DVD or the network and fsck the root filesystem, then boot again with "boot -ar"

The "enter physical name of root device" is the tricky part of this procedure. Something like "/pseudo/md@0:0,0,blk" might have been the right response if the root volume is mirrored. Some other string would be needed if veritas vm was being used but I have no idea what it would be. If the root voume was mirrored, I would be afraid the the mirror might now be out of sync, so I would probably break the mirror and if I get the box rebooted, remirror. I recently posted my procedure to break a mirror, but I have never done it in conjunction with rebuilding path_to_inst.

Thank u. I have solved the problem with your advice and others views.