[SPARCbook] Shell?

Sunder sunder at sunder.net
Mon Jan 24 13:52:39 CST 2000


Lion Templin wrote:
> 

> It doesn't matter ... ever try to boot a Solaris box (<= 2.6, anyway.  I
> haven't used 7) WITHOUT mounting /usr?  Good luck doing anything with it ..
> why?  Look at your root directory (`ls -al /`).
> The two entries of interest:
> 
> lrwxrwxrwx   1 root     root           9 Dec  7  1998 bin -> ./usr/bin/
> lrwxrwxrwx   1 root     root           9 Dec  7  1998 lib -> ./usr/lib/


Clue:

root:x:0:1:Super-User:/:/sbin/sh
                        ^^^^^^^^

So you won't have the problem of being without a shell if you can't mount user.
/sbin isn't not a symlink.  It's part of root.  And further, /sbin/sh isn't
dynamically linked:

[fenris:/sbin:7]$ file sh
sh:             ELF 32-bit MSB executable SPARC Version 1, statically linked,
stripped


However, you're right.  Without /usr, you don't have fsck, mount, or format,
and you can't just copy them over to /sbin because they're dynamically linked,
which leaves you a single option: boot from CDROM to fix stuff:


[fenris:/sbin:9]$ file `which fsck`
/usr/sbin/fsck: ELF 32-bit MSB executable SPARC Version 1, dynamically linked,
stripped
[fenris:/sbin:10]$ file `which format`
/usr/sbin/format:       ELF 32-bit MSB executable SPARC Version 1, dynamically
linked, stripped
[fenris:/sbin:12]$ file `which newfs`
/usr/sbin/newfs:        ELF 32-bit MSB executable SPARC Version 1, dynamically
linked, stripped

So you know what, fuck it, and just set it to /usr/local/bin/bash and don't
worry, because like Lion said, you won't be doing very much anyway. :)

-- 
---------------------------- Kaos Keraunos Kybernetos -------------------- 
 + ^ +  Sunder              "Only someone completely distrustful of   /|\ 
  \|/   sunder at sunder.net    all government would be opposed to what /\|/\ 
<--*--> -------------------- we are doing with surveillance cameras" \/|\/ 
  /|\   You're on the air.   -- NYC Police Commish H. Safir.          \|/ 
 + v +  Say 'Hi' to Echelon  "Privacy is an 'antisocial act'" - The FedZ.
---------------------------- http://www.sunder.net -----------------------
I love the smell of Malathion in the morning, it smells like brain cancer.






More information about the SPARCBook mailing list