Wednesday, September 18, 2013

Recovering /etc/path_to_inst file

Format command fails

SolHost10:/lue# format
Cannot set directory to /dev/rdsk - No such file or directory
SolHost10:/lue#


/etc/path_to_inst file is lost

no files in /dev/rds/ and /dev/dsk


SolHost10:/lue# ls -l /dev/rdsk | wc -l
/dev/rdsk: No such file or directory
0
SolHost10:/lue# ls -l /dev/dsk | wc -l
/dev/dsk: No such file or directory
0
SolHost10:/lue#


Copy a good backup instance of /etc/path_to_inst of this host from a very recent backup or explorer.

SolHost10:/root# ls -l /var/tmp/path_to_inst
-r--r--r--   1 soluse dvel     260809 Oct 21 13:05 /var/tmp/path_to_inst
SolHost10:/root#


cp path_to_inst /etc/path_to_inst

chown root:root /etc/path_to_inst

chmod 444 /etc/path_to_inst

ls -l /etc/path_to_inst

more /etc/path_to_inst


devfsadm -Cv

This will restore the device tree