*BSD News Article 97368


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!uunet!in3.uu.net!194.87.0.28!demos!newsfeed.direct.ca!newsfeed.internetmci.com!howland.erols.net!sol.ctr.columbia.edu!startide.ctr.columbia.edu!wpaul
From: wpaul@ctr.columbia.edu (Bill Paul)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Mounting Solaris Drives
Date: 8 Jun 1997 19:40:58 GMT
Organization: Columbia University Center for Telecommunications Research
Lines: 72
Message-ID: <5nf1sb$gu4$1@sol.ctr.columbia.edu>
References: <5ncbkd$g07@nntp02.primenet.com>
NNTP-Posting-Host: startide.ctr.columbia.edu
X-Newsreader: TIN [version 1.2 PL2]
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:42610

Daring to challenge the will of the almighty Leviam00se, Soren Ragsdale
(soren@primenet.com) had the courage to say:

: So I've done a Dumb New Administrator Thing and changed root's shell
: (don't do it, kids!) to tcsh and then moved the tcsh binary, resulting in
: root being unable to log in.

I haven't tried this, but what about FTP'ing in? If you can FTP, you
can load a new copy of tcsh into place. (You'll need to give it execute
permission too.)

: This is on a Solaris system.

Then you should be posting to a Solaris newsgroup.

: And the
: standard solution, being for me to boot the machine from the CD and fix
: the /etc/passwd file, is not currently workable because the Ultrasparc
: arrived before I did and the system CDs have been misplaced.  So rather
: than wait a week for the people at Sun to send us another system disk,
: I've taken the drives from the sparc home over the weekend and am
: attempting to mount the drives from FreeBSD and do the repairs here.

Forget it.

: Is this even possible?

No.

: I've so far been unable to get mount to do its
: thing, and I'm wondering if perhaps solaris has its own special format
: that FreeBSD can't deal with.

You're doing another Dumb New Administrator Thing by assuming that
all UNIXes use exactly the same filesystem and partition format. You're
also not taking byte sex into account: SPARC is big-endian, i386 is
little-endian.

There are a few other things you can do:

1) Find another Sun SPARC machine (doesn't have to be an Ultra, but
   should be running Solaris). You can temporarily attach the Ultra's
   root disk to the other machine as a data disk, then boot the other
   machine, become root, mount the hosed root disk manually and edit
   the password file.

2) Configure another SPARC as a boot server and boot the Ultra over
   the network.

3) NOT FOR THE TIMID: Attempt to modify the shell field in the password
   file by twidling the disk's raw sectors. This will involve reading from
   the raw /dev/sd1 device on the FreeBSD host and scanning through until
   you find the exact spot where the password file lives. Then you need to
   read the block correct block, change the shell, and write the block back.
   Finding the correct block is tricky and may require you to slap together
   a small C program. Reading and modifying the block can be done with dd.

In future, always insure that you have bootable OS media handy for
_ALL_ the platforms you admin, and keep them handy at all times. If
the Solaris media kit wasn't there when you arrived, then the
first thing you should have done was order a new one.

-Bill

--
=============================================================================
-Bill Paul            (212) 854-6020 | System Manager, Master of Unix-Fu
Work:         wpaul@ctr.columbia.edu | Center for Telecommunications Research
Home:  wpaul@skynet.ctr.columbia.edu | Columbia University, New York City
=============================================================================
  "Now, that's "Open" as used in the sentence "Open your wallet", right?"
=============================================================================