Story from the Shoot Yourself in the Foot Dept.

Matt Graham danceswithcrows@usa.net
24 May 2001 12:50:41 EDT


Adam McDougall <mcdouga9@egr.msu.edu> wrote:
> On Thu, 24 May 2001, Mark Szidik wrote:
> > I didn't happen to notice that root entry for the shell was
> > /sbin/sh so I accidentally changed the entry to /sbin/bash.
> > WOOPS!  there is no bash in /sbin.  So my system is hosed, no
> > root access!

...the "NEVER change root's default shell" camp likes to bring this argument
up.

> > So I am thinking that Linux is pretty good with mounting other
> > FS's.  Sure enough 'man mount' on RH 7.1 says it'll mount UFS
> > file systems.   So pulled the drive from the Sun box, slapped it into
> > my Linux box and booted.  For the life of me I cannot get the
> > darn drive to mount.  Here is what I get no matter what
> > combination of options I try:
> >
> > ]# mount -t ufs -o ufstype=sun /dev/hdb1 /s
> > mount: wrong fs type, bad option, bad superblock on /dev/hdb1,
> >        or too many mounted file systems
> > So I think I need to re-comple the kernel with UFS support.  Does
> > that make sense?
> 
> I cannot really comment on the solution you are trying to do except
> mention that Suns are big endian and pc's are little endian so you may
> want to look out for Big Endian UFS support of some sort.

UFS should be UFS.  The kernel code should detect whether the filesystem is
big- or little- endian and adjust accordingly.  It would be good to check and
make sure that UFS support is compiled as a module, and it would be a good
idea to make sure that the partitions on /dev/hdb can be read.  Solaris uses a
different partition scheme than the x86 does.  At boot time, the messages
should say something like "hdb: hdb1 hdb2 hdb3..."  If you don't get that,
then you may have to build a kernel with Solaris partition type support
compiled in.  Also, ufstype= takes both "sun" and "sunx86" depending on
whether the machine the filesystem was made on was a Sparc or an x86....

>  Also, is there
> any way you could get a root shell on the X1 with some sort of bootable
> media?

Yeah, it should've come with a bootable rescue system of some sort.  Try
that....

-- 
Matt G / Dances With Crows
There is no Darkness in Eternity/But only Light too dim for us to see
"I backed up my brain to tape, but tar says the tape contains no data...."

____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1