[rescue] solaris missing /usr question

Scotty Logan scotty at catbert.net
Sat Mar 22 16:45:40 CST 2003


On 22 March 2003, Joshua D. Boyd wrote:
> I miss typed something in my vfstab file, so now my disk with /usr on it
> is mounting in the wrong place.  So, I have a /oldusr, and a /user, but
> no /usr.  Well, this would be fine, except that I can't seem to do
> anything without /usr.  All I really need is to be able to edit out one
> little e in my vfstab file, but I can't seem to do anything other than
> cd and pwd now.  mv, cp, alias, and most importantly vi all seem to be 
> dynamically linked so since /usr/lib doesn't exist, they won't work.
> Eg.
> # /oldusr/bin/cp
> cp: Cannot find /usr/lib/ld.so.1
> 
> Can anyone offer any suggestions other than reinstalling everything?

Just some quick ideas - I haven't tried these, so they might not work:

1. If the /usr directory still exists you can umount /user and mount
   the partition on /usr, since /sbin/mount and /sbin/umount should be
   statically linked.

2. You can always use the builtin echo in /sbin/sh to overwrite
   /etc/vfstab, then /sbin/sync 3 times and power cycle.

3. How about setting LD_LIBRARY_PATH to /user/lib, then exporting it
   and using /user/bin/cp or /user/bin/vi?  ( This might not work,
   since on some systems, e.g. Ultra 20, most dynamically linked
   executables appear to have a dependency on
   /usr/platform/.../lib/libc_psr.so.1, whereas on others, such as
   SS5s, they do not)

  Scotty

-- 
Scotty Logan                                 Never take life seriously
mailto:scotty at catbert.net                    Nobody gets out alive anyway


More information about the rescue mailing list