home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1994 June / NEBULA_SE.ISO / Documents / FAQ / Solaris2-faq / FAQ < prev    next >
Encoding:
Text File  |  1993-06-17  |  39.5 KB  |  1,039 lines

  1. Newsgroups: comp.unix.solaris,comp.sys.sun.admin,comp.answers,news.answers
  2. Path: senator-bedfellow.mit.edu!enterpoop.mit.edu!usc!cs.utexas.edu!utnut!utzoo!sq!ian
  3. From: ian@sq.sq.com (Ian Darwin)
  4. Subject: Solaris 2.1 Frequently Answered Questions (FAQ) $Revision: 1.20 $
  5. Message-ID: <1993Jun16.214346.4978@sq.sq.com>
  6. Followup-To: poster
  7. Summary: This posting contains a list of Frequently Asked Questions
  8.     (and their answers) about Sun Microsystem's Solaris 2.x system.
  9. Reply-To: ian@sq.com
  10. Organization: SoftQuad Inc., Toronto, Canada
  11. Date: Wed, 16 Jun 93 21:43:46 GMT
  12. Approved: news-answers-request@MIT.Edu
  13. Lines: 1023
  14. Xref: senator-bedfellow.mit.edu comp.unix.solaris:4589 comp.sys.sun.admin:16521 comp.answers:1028 news.answers:9495
  15.  
  16. Archive-name: Solaris2-FAQ
  17. Version: $Id: solaris2.faq,v 1.20 93/06/16 17:43:10 ian Exp $ -----
  18. Maintained-by: Ian F. Darwin <ian@sq.com>
  19.  
  20. [Note: this is the first posting to comp.sys.sun.admin, comp.answers,
  21. and news.answers - the former to benefit more system admins, and the latter
  22. for archiving.  It isn't much different from the latest version posted
  23. to comp.unix.solaris; apologies to those who see it twice in a week on
  24. that newsgroup. -- ian]
  25.  
  26. The following is a list of questions that are frequently asked about
  27. Solaris 2.x.  You can help make it an even better-quality FAQ by writing a
  28. few lines on one topic that burned you while moving to Solaris 2.1 and
  29. sending it BY EMAIL ONLY to me, ian@sq.com. Thanks!
  30.  
  31. CONTENTS
  32.     GENERAL
  33.     1) A real list of questions will be here someday)
  34.     FOR MORE INFO
  35.     1) ditto
  36.     SYSTEM ADMINISTRATION
  37.     1) ditto
  38.     NETWORKING
  39.     1) ditto
  40.     SOFTWARE DEVELOPMENT
  41.     1) ditto
  42.  
  43. PART ONE - GENERAL
  44.  
  45. What's a Solaris anyway?
  46.  
  47.     Solaris(tm) is Sun's name for their UNIX-based user environment,
  48.     including the UNIX(tm) operating system, window system (X11-based),
  49.     and other stuff too.
  50.  
  51.     Solaris 1.x is a retroactive (marketing?) name for SunOS4.1.x (x>=1),
  52.         a version of UNIX that is BSD-like with some SVR4 features.
  53.     Solaris 2.x (which is what most everybody means by "Solaris")
  54.         includes SunOS5.x, which is an SVR4-derived UNIX.
  55.     For more details, see the chart in the next-to-next question.
  56.  
  57. What is Solaris 2? Is it really SVR4 based?
  58.     Solaris 2.1 is an "operating environment" that includes the
  59.     SunOS 5.1 operating system and the OpenWindows 3.1 window environment.
  60.  
  61.     SunOS 5.0 and 5.1 are based on USL's SVR4.0. SVR4.0, in turn, was
  62.     developed jointly by AT&T and Sun while Sun was developing 4.1.0,
  63.     which is why things like RFS, STREAMS, shared memory, etc.,
  64.     are in SunOS 4.1.x, and why things like vnodes, NFS and XView
  65.     are in SVR4.0.
  66.  
  67. What machines does Solaris 2.x run on?
  68.  
  69.     Solaris 2.0 only ran on desktop SPARCstations and a few other Sun
  70.     machines.
  71.  
  72.     Solaris 2.1 and later comes in two flavors, SPARC and "x86".
  73.  
  74.     Solaris 2.1 (and 2.2, ...) for SPARC run on all SPARCstations and
  75.     clones, as well as all models of the Sun-4 family. The old FPU
  76.     on the 4/110 (and 260??) is not supported, so floating point
  77.     will be SLOW, but it does work.
  78.  
  79.     Solaris 2.1 for x86 has recently been released to end users.
  80.     It runs on a wide range of high-end PC-architecture machines.
  81.     "High-end" means: 16MB of RAM and an 80486 (or 33MHz or faster
  82.     80386DX).  It will not run on your 4 MB 16MHz 386SX, so don't
  83.     bother trying! Also, floating point hardware (80387-style) is
  84.     absolutely required. All three buses are supported: ISA, EISA, MCA.
  85.  
  86.     To summarize all this, Jim Prescott gave this chart, which I've updated:
  87.     Solaris    SunOS    OpenWin        Other    Comments
  88.     1.0    4.1.1B    2.0            (sun3 EOL)
  89.     1.0.1    4.1.2    2.0            (6[379]0-1[24]0 MP)
  90.     1.1    4.1.3    3.0            SP Viking support
  91.     2.0    5.0    3.0.1        ONC+    sun4c only
  92.        2.1SPARC    5.1    3.1         ONC+    Late '92?
  93.     2.1x86    5.1    3.1         ONC+    May '93
  94.        2.2SPARC    5.2    3.2        ONC+    May '93
  95.     2.?    5.?    4.0            Fall 1993??
  96.                     According to remarks at the March '93
  97.                     Solaris Developer's Conference,
  98.                     OpenWin 4 will be X11R5 based: Display
  99.                     PostScript instead of NeWS, no SunView.
  100.                     It will still be primarily OPEN LOOK.
  101.                     The Spring 1994 OpenWin will be Motif
  102.                     and COSE-based.
  103.  
  104. Will my XXX applications from 4.1.x run on Solaris 2?
  105.  
  106.     There is quite a bit of support in SunOS 5.x for running 4.1.x
  107.     binaries in an emulation mode called "Binary Compatibility"
  108.     (BCP).  This works by dynamically linking the 4.1.x binaries
  109.     with a shared library that emulates the 4.1.x binary interface
  110.     on top of 5.x, so there is some overhead. Programs will only
  111.     work if they were dynamically linked, and if they meet certain
  112.     other criteria. Best bet: try it and see.
  113.  
  114.     Be aware, though, that Sun WILL drop the binary compatibility 
  115.     package someday soon.  Try to wean yourself and your users from
  116.     depending on it, even if it means beating on your software
  117.     vendors to offer "native" Solaris2 applications.
  118.  
  119. Will my XXX applications from SVR3 on the 386 run on Solaris 2/Intel?
  120.  
  121.     As with SPARC, there is an emulation mode that should run the
  122.     majority of well-behaved SVR3 and Xenix binaries. I've not
  123.     had time to test it.
  124.  
  125.     Applications from any other vendor's standards-conforming 
  126.     386/486 SVR4 should also run.
  127.  
  128. Where is the XXX command gone now?
  129.  
  130.     There are too many of these changes to include in this FAQ, but
  131.     here are some key ones:
  132.  
  133.         a. locations are often different
  134.                  hostid         /usr/ucb/hostid
  135.                  whoami         /usr/ucb/whoami
  136.                  hostname       /usr/ucb/hostname
  137.  
  138.         b. some old commands don't exist or have replacements
  139.  
  140.                  4.1.X          Solaris 2.X
  141.  
  142.                  hostname       uname -n
  143.                  pstat -s       swap -s  (how much swap space?)
  144.                  dkinfo         /usr/sbin/prtvtoc raw_dev_name
  145.                  trace          truss
  146.                  mount -a       mountall
  147.                  exportfs       share
  148.                  bar            cpio -H bar (read only)
  149.  
  150.     The file "whatlist" is included in the "Admigration" package
  151.     (see below), was posted to Newsgroups comp.unix.solaris and
  152.     comp.sys.sun.admin by ft@cbnewsi.cb.att.com (frederick.d.true)
  153.     with the subject line
  154.  
  155.     Subject: INFO: Command summary, SunOS 4.x --> 5.x
  156.  
  157.     You can also FTP this file from ftp.cs.toronto.edu in
  158.     /pub/darwin/solaris2/whatlist.
  159.  
  160. Should I upgrade?
  161.  
  162.     That depends - on you, your situation, your application mix, etc.
  163.     Eventually SunOS4.1.x will go the way of the 3/50 - it'll still
  164.     be around, but Sun will no longer support it.
  165.  
  166. Is Solaris 2.2 reliable/stable enough to use?
  167.  
  168.     The concensus seems to be that yes, it is, for many applications
  169.     and most users. Your mileage may vary.
  170.  
  171.     And the performance in 2.2 is very close to that of SunOS 4.1.x.
  172.  
  173. PART TWO - FOR MORE INFO
  174.  
  175. How can I RTFM when I don't have it anymore?
  176.  
  177.     "RTFM" is an old saying: Read The Manual.  Sun still sells
  178.     printed manuals, but don't automatically distribute them. A
  179.     smaller, lighter, bookshelf-friendly :-) CD-ROM called "The
  180.     AnswerBook"(tm) contains all the printed documents in
  181.     machine-readable (PostScript) form, and a keyword search
  182.     engine. 90% of your introductory questions are answered therein!
  183.  
  184.     Note there are (at least) two answerbooks. The Solaris 2.2 CD itself
  185.     includes the "OpenWindows Answerbook", which has a few
  186.     OpenWindows book. There is also the "Solaris 2.2 System Software
  187.     AnswerBook" (SUNWabook) which has almost *ALL* of the documents
  188.     (including another copy of /usr/man, but indexed for searching).
  189.  
  190.     As distributed, the Answerbook search engine runs only with the
  191.     OpenWindows server, not with MIT X11. This will change; for now,
  192.     if you are using the MIT server instead of what Sun provides,
  193.     you'll have to use one of several "answerbook workaround" scripts
  194.     that are in circulation.
  195.  
  196.     You should buy (or print from within Answerbook) at least the
  197.     reference manual and the System and Network Administration books,
  198.     because if your system becomes disabled you won't be able to
  199.     run the Answerbook to find out how to fix it...
  200.  
  201. What Software is available for Solaris 2.x?
  202.  
  203.     Most commercial software that ran on 4.x either will run in BCP
  204.     mode, or is available for Solaris 2.x, or is being ported now.
  205.  
  206.     You can obtain a list of official 3rd party porting
  207.     commitments, maintained by Sun's "Solaris Demand Center"
  208.     (whatever that is), by sending electronic mail to
  209.     "solaris2apps@sun.com" -- this is an automatic reply server.  The list
  210.     shows what third party applications are currently available for 
  211.     Solaris, and lists expected dates for many more.
  212.  
  213.     A list of freeware (some "public domain", but mostly copyright-
  214.     but-freely-distributable) [as well as commercial software??]
  215.     that has been ported to Solaris 2.x
  216.     is posted monthly to the newsgroup comp.unix.solaris by
  217.     ric@updike.sri.com (Richard Steinberger). Look for this:
  218.  
  219.         Subject: Solaris SW list.  Monthly Post.
  220.  
  221.     If you can't wait, the list is also available via anonymous FTP
  222.     from updike.sri.com.
  223.  
  224. What FTP sites do I need to know about?
  225.  
  226.     SunSite (sunsite.unc.edu) - Sun sponsors an FTP site at the
  227.     University of North Carolina. Lots of good stuff here.
  228.  
  229.     OpCom. (opcom.sun.ca) - run by Sun Microsystems' OpCom group - lots 
  230.     of stuff. Here is an extract from their README:
  231.  
  232.     pub/binaries    - binaries/man pages for Solaris 2.0 native binaries.
  233.  
  234.     pub/Cygnus      - the Cygnus port of gcc (has been removed!)
  235.  
  236.     pub/newsletter  - issues of the monthly OpCom newsletter.
  237.  
  238.     pub/docs        - assorted documentation, papers, and other information.
  239.             - all of the RFCs
  240.  
  241.     pub/drivers     - information related to device driver writing under
  242.               under Solaris 2.0 as well as a skeleton SCSI driver.
  243.  
  244.     ls-lR.Z         - compressed recursive listing of files available
  245.               on the server.
  246.  
  247.     pub/tars        - compressed tars.
  248.  
  249.     pub/tmp         - place for uploading things to the server.
  250.  
  251.     pub/R5          - the unadultered MIT x11r5 distribution.
  252.  
  253.     pub/x11r5       - port of X11r5 to Solaris 2.0, binaries, libraries
  254.               and headers.  A compressed tar of this tree can
  255.               be found in tars.
  256.  
  257.     export.lcs.mit.edu - the master X11 site
  258.  
  259.     ftp.uu.net    - UuNet communication archives
  260.  
  261. What other FAQ's do I need to know about?
  262.  
  263.     All of them :-). But in particular you should see these FAQ's:
  264.     
  265.     1) Newsgroups: comp.sys.sun.admin,comp.sys.sun.misc,comp.unix.solaris,
  266.         comp.answers,news.answers
  267.     Subject: FAQ: Sun Computer Administration Frequently Asked Questions
  268.  
  269.     2) comp.windows.open-look - Anything related to OpenWindows or the
  270.         OPEN LOOK Graphical User Interface.
  271.  
  272.     3) The Sun-Managers mailing list (see below) has its own FAQ,
  273.         maintained by John DiMarco <jdd@cdf.toronto.edu>.
  274.         FTP from ra.mcs.anl.gov in the sun-managers directory.
  275.  
  276.     *) See also the "Solaris SW list. Monthly Post" above and the
  277.         "whatlist" file.
  278.  
  279. What mailing lists should I get?
  280.  
  281.     First, read all the USENET newsgroups with "sun" in their name :-)
  282.  
  283.     1) The Florida SunFlash is a "closed" mailing list for Sun owners.
  284.     It contains mostly press releases from Sun and third-party
  285.     vendors.  This list contains information on conferences such as
  286.     the Solaris Developer's Conference as well.  It is normally
  287.     distributed regionally - to find out about a mail point in your
  288.     area, or for other information send mail to info-sunflash@Sun.COM.
  289.  
  290.     Subscription requests should be sent to sunflash-request@Sun.COM.
  291.     Archives are on solar.nova.edu, ftp.uu.net, sunsite.unc.edu,
  292.     src.doc.ic.ac.uk and ftp.adelaide.edu.au
  293.  
  294.     2) The Sun Managers list is an unmoderated mailing list for
  295.     *emergency-only* requests. Subscribe and listen for a while,
  296.     and read the regularly-posted Policy statement BEFORE sending
  297.     mail to it, and to get a feel for what kinds of traffic it carries.
  298.     Write to sun-managers-request@eecs.nwu.edu.
  299.  
  300. What books should I read?
  301.  
  302.     O'Reilly & Associates specializes in UNIX books.  Their "UNIX
  303.     In A Nutshell" has been updated for SVR4 and Solaris 2.0.  Get
  304.     their catalog by calling 800-998-9938 (1-707-829-0515) 7AM to
  305.     5PM PST.
  306.  
  307.     SunSoft Press carries books specific to Solaris 2. Look for the
  308.     inset with your End User Media Kit that lists the most relevant ones.
  309.  
  310.     Prentice-Hall has reprints of much of the AT&T documentation.
  311.     I'm not sure how much of this you need - a lot of the same
  312.     material is in the Answerbook (see above).
  313.  
  314. PART THREE - SYSTEM ADMINISTRATION
  315.  
  316. How much disk space do I need to install Solaris 2?
  317.  
  318.     A full install of 2.2 is supposed to be 164 MB, but that doesn't
  319.     include swap. Here is a net exchange between Casper Dik and Gil Tene:
  320.  
  321.     In article <1993Apr2.083549.19177@fwi.uva.nl>, Casper writes:
  322.     |> >How much disc space does SOLARIS take up ? That is should we buy a
  323.     |> >424Mb disc or get a 1Gb disc to put it on :-)
  324.     |> 
  325.     |> Solaris 2.x takes about as much diskspace as SunOS 4.x:
  326.     |> 
  327.     |> Partition/Slice Solaris SunOS
  328.     |> /        10MB     8MB
  329.     |> /usr        78MB    90MB
  330.     |> /var        10MB    10MB
  331.     |> /usr/openwin    83MB    83MB
  332.     |> 
  333.  
  334.     Gil replies:
  335.     On my system, with a full Solaris installation (EVERYTHING selected)
  336.     + gnu's binary stuff for solaris (off of the Catalyst CD) installed 
  337.     in /opt I see a similar situation to the above plus :
  338.  
  339.     16852   /opt/SUNWabe
  340.     19      /opt/SUNWcg12
  341.     7968    /opt/SUNWdiag
  342.     721     /opt/SUNWgt
  343.     7740    /opt/SUNWits
  344.     14609   /opt/cygnus-sol2-1.0
  345.  
  346.     (output from "du -k -s /du/*")
  347.  
  348.     - SUNwabe is the basic answerbook stuff, which you don't need if you
  349.       use the full answerbook.
  350.  
  351.     - SUNWcg12 is (obviously) cg12 support.
  352.  
  353.     - SUNWdiag is obvious too.
  354.  
  355.     - SUNWgt is support for gt boards.
  356.  
  357.     - SUNWits is the xgl3.0 library (it has libPEX5.so.1 in there too).
  358.  
  359.     - cygnus-sol2-1.0 is the gcc2.0+tools stuff. I have gcc2.3.3 on 
  360.       another partition and that takes about the same space as 2.0 does.
  361.  
  362.     Another important note : The full Solaris 2.1 answerbook takes up 164MB
  363.     on disk. I highly recommend installing it and not using it off the
  364.     CDROM drive. It's much more usable (faster) this way. And it always
  365.     stays around -- even when you have something else in the CDROm drive.
  366.  
  367. How can I convert all my local changes that I've made over the years
  368. into their corresponding forms on Solaris 2?
  369.  
  370.     1) Do it by hand. You did document every single change and
  371.     check it into RCS, didn't you?
  372.  
  373.     2) Automate it, using the AMToolkit (Administration Migration 
  374.     Toolkit) from the OpCom FTP server (q.v.)!
  375.  
  376. What are "packages"?
  377.  
  378.     A SVR4 mechanism for "standardizing" the installation of
  379.     optional software. Most vendors are expected to use this
  380.     format for distributing add-on software for Solaris 2.x.
  381.  
  382.     Packages can be installed/deinstalled with pkgadd/pkgrm which
  383.     are standard SVR4 items, or with swm (CRT) or swmtool (GUI-based)
  384.     which are provided only in Solaris 2.
  385.  
  386.     Note that the "pkg" system keeps lots of files in /var/sadm/install,
  387.     and in particular the file "contents", which is hundreds of KB,
  388.     and that there are two copies of it while pkgadd is running, so you
  389.     needs lots of free space where /var is, typically the root.
  390.     This file must be kept around if you want, for example, to use
  391.     pkgrm to remove a package, or pkgchk to verify months later that
  392.     all of a a package's files are still intact.
  393.  
  394. Why can't I write in /home?
  395.  
  396.     This is a common one! SunOS is delivered with the "automounter"
  397.     enabled. The automounter is designed for NFS sites, to
  398.     simplify maintenance of the list of filesystems that need
  399.     mounting. However it is a burden for standalone sites.
  400.  
  401.     The automounter takes over /home and in effect becomes the NFS
  402.     server for it, so it no longer behaves like a normal directory.
  403.     This is normally a Good Thing as it simplifies administration if
  404.     everybody's home directory is under /home.
  405.  
  406.     To kill it off for standalone or small networks, you can comment out
  407.     the three lines in /etc/init.d/nfs.client that start "if" (from the if
  408.     to the fi!!), and reboot.
  409.  
  410.     To learn about it, read the O'Reilly book
  411.     Managing NFS and NIS, or ftp the white paper 'The Art of Automounting". 
  412.     from sunsite.unc.edu in the directory /pub/sun-info/white-papers.
  413.  
  414. What is this junk mail about an error in the crontab entry?
  415.  
  416.     Solaris 2.1 (FCS on SPARC and OEM on Intel) shipped with a
  417.     blank line at the end of root's crontab file. The result is
  418.     that root gets mail at boot time and nightly thereafter,
  419.     complaining about an error in the crontab file and that it has
  420.     "ignored the entry".  Pretty hard work ignoring that blank
  421.     line, eh?  If the messages bug you (they should), su to root
  422.     and use "crontab -e" to edit root's crontab and delete the
  423.     blank line at the end of the file. Fixed in FCS on Intel
  424.     and 2.2 on SPARC.
  425.  
  426. Why are there no passwords in /etc/passwd?
  427.  
  428.     System V Release 4 includes a feature called "shadow passwords".
  429.     The encrypted passwords are moved out into a shadow password file
  430.     (called /etc/shadow in this release) that is NOT publicly readable.
  431.     The passwd file has always been readable so that, for example, ls -l
  432.     could figure out who owns what. But having the passwd encryptions
  433.     readable is a security risk (they can't be decrypted but the bad guy
  434.     can encrypt common words and names &c and compare them with the
  435.     encryptions).
  436.  
  437.     The Shadow Password feature is mostly transparent, but if you
  438.     do any passwd hacking you have to know about it!  And DO make
  439.     sure that /etc/shadow is not publicly readable!
  440.  
  441. Why can't I rlogin/telnet in as root?
  442.  
  443.     >... when I try to rlogin as root ...
  444.     >it gives me the message "Not on system console
  445.     >Connection closed.".  What have I left out?
  446.  
  447.     Solaris 2 comes out of the box a heck of a lot more secure than
  448.     Solaris 1.  There is no '+' in the hosts.equiv.  root logins are not
  449.     allowed anywhere except the console.  All accounts require passwords.
  450.     In order to allow root logins over the net, you need to edit the 
  451.     /etc/default/login file and comment out or otherwise change the 
  452.     CONSOLE= line.
  453.  
  454.     This file's CONSOLE entry can actually be used in a variety of ways:
  455.  
  456.         1) CONSOLE=/dev/console (default) - direct root logins only on console
  457.         2) CONSOLE= - direct root logins disallowed everywhere
  458.         3) #CONSOLE (or delete the line) - root logins allowed everywhere
  459.  
  460. How can I set up anonymous FTP?
  461.  
  462.     If you need help, ftp the file "solaris2-ftp" from
  463.     ftp.cs.toronto.edu:/pub/darwin/solaris2.
  464.  
  465. How can I print from a Solaris 2 (or any System V Release 4) system to
  466. a SunOS4.x (or any other BSD) system?
  467.  
  468.     Hmmm, the lp system is totally different than what you're used to.
  469.     The System V Line Printer System is a lot more, well, flexible.
  470.     A cynic might say "complicated".  Here's a very quick guide --
  471.     see the man pages for each of these commands for the details.
  472.  
  473.     Let's say your Solaris2 workstation is called "sol" and the
  474.     4.1.x server is called "bertha" and you want the printer name
  475.     to be "printer" (imaginative, eh?).
  476.  
  477.     sol# lpsystem -t bsd bertha        # says bertha is a bsd system
  478.     sol# lpadmin -p printer -s bertha    # creates "printer" on "sol"
  479.                         # to be printed on "bertha"
  480.     sol# accept printer            # allow queueing
  481.     sol# enable printer            # allow printing
  482.     sol# lpstat -t                # check the status
  483.  
  484.     Finally, if that's your only printer, make it the default:
  485.  
  486.     sol# lpadmin -d printer
  487.  
  488.     On some systems you may have to turn on the port monitor.
  489.  
  490. I did that. Why does it now complain about invalid content types?
  491.  
  492.     I said it was complicated!
  493.  
  494.     For better or for worse, you need to know about printer content types.
  495.     See the man page for "lpadmin".
  496.  
  497.     To get transparent mode, try this:
  498.  
  499.     lpadmin -I any -p printer
  500.  
  501. Isn't there any easier way?
  502.  
  503.     The GUI-based Admintool has a Printer Manager that is supposed to
  504.     be able to do all this and more. Try it; Sun hopes you'll like it.
  505.  
  506. Now my jobs print but they stay in the queue after!?
  507.  
  508.     It's a known bug, and will probably get fixed in 2.3, since
  509.     2.2 is too close to being frozen.
  510.  
  511.     [Now you want to set up Solaris 2 as a print server?
  512.     You're on your own.]
  513.  
  514. What happened to /dev/MAKEDEV?
  515. How do I add devices?
  516.  
  517.     Device drivers are linked in dynamically. When you add new
  518.     devices, just shutdown the system and do
  519.         boot -r    # use drive spec if not default disk
  520.     to *r*ebuild the /devices and /dev directories.
  521.  
  522.     If you're just adding a SCSI disk, you don't need to reboot.  Run the
  523.     following script (as root):
  524.  
  525.         #!/bin/sh
  526.         #
  527.         # add-disk
  528.         #
  529.         #       Runs the commands to make Solaris locate a new disk that
  530.         #       has been plugged in after the system was booted.
  531.         #
  532.  
  533.         _DVFS_RECONFIG=YES; export _DVFS_RECONFIG
  534.  
  535.         /etc/init.d/drvconfig
  536.         /etc/init.d/devlinks
  537.  
  538.         exit 0
  539.  
  540.     Note that this only works if you already have at least one SCSI disk on
  541.     the system.  (This is because the above just makes symbolic links and
  542.     things, it does not load up the SCSI driver kernel modules, etc.)
  543.  
  544. What happened to /etc/rc and /etc/rc.local?
  545.  
  546.     They're now fragmented into 12 million tiny little pieces. Look in 
  547.     the following files to get oriented:
  548.         /etc/inittab - starting point for init
  549.         /sbin/rcS, /etc/rcS.d/* - booting stuff
  550.         /sbin/rc2, /etc/rc2.d/*,
  551.             /sbin/rc3, /etc/rc3.d/* - stuff for multi-user startup.
  552.     Note that all files in /etc/rc*.d/* are hardlinked from
  553.     /etc/init.d (with better names), so you should grep in there.
  554.  
  555.     There are many "run levels" to the System V init; the run
  556.     level 3 is normally used for "multi user with networking."
  557.  
  558. I can't understand that stuff; can't I have /etc/rc.local back?
  559. I just want to keep all my local changes in one place.
  560.  
  561.     No. You can never have rc.local back the way it was. But then, it
  562.     never really *was* purely a "local" rc file. To have a real
  563.     "local" rc file with just your changes in it, copy this file
  564.     into /etc/init.d/rc.local, and ln it to /etc/rc3.d/S99rc.local.
  565.     Put your startup stuff in the "start" section.
  566.  
  567.     ----- Cut here -----
  568.     # /etc/init.d/rc.local - to be linked into /etc/rc3.d as 
  569.     # S99rc.local -- a place to hang local startup stuff.
  570.     # started after everything else when going multi-user.
  571.  
  572.     # Ian Darwin, Toronto, November, 1992
  573.     # As with all system changes, use at own risk!
  574.  
  575.     case "$1" in
  576.     'start')
  577.         echo "Starting local services...\c"
  578.  
  579.         if [ -f /usr/sbin/mydaemon ]; then
  580.             /usr/sbin/mydaemon 1>/dev/console 2>&1
  581.         fi
  582.         echo ""
  583.         ;;
  584.     'stop')
  585.         echo "$0: Not stopping any service - use ucb shutdown for that."
  586.         ;;
  587.     *)
  588.         echo "Usage: $0 { start | stop }"
  589.         ;;
  590.     esac
  591.     ------ End of Cut Here -----
  592.  
  593. Speaking of that, why are there two versions of shutdown?
  594.     SVR4 (hence SunOS 5.x) tries to make everybody happy. The
  595.     traditional (slow) System V "shutdown" runs all the rc?.d/*
  596.     shell scripts with "stop" as the argument; many of them run
  597.     ps(!) to look for processes to kill. The UCB "shutdown" tells
  598.     init to kill all non-single-user processes, which is about two
  599.     orders of magnitude faster. Unfortunately, the UCB version does
  600.     everything it should *except* actually halt or reboot in
  601.     SunOS5.1 (and some other SVR4 implementations).
  602.  
  603. When will somebody publish a package of the BSD (4.3BSD Net2) "init",
  604.     "getty", and "rc/rc.local", so we can go back to life in the
  605.     good old days?
  606.  
  607.     I dunno. It should be doable. Wanna fund me to develop it?
  608.     Don't try this at home, kids!!!!! Experienced UNIX hackers only.
  609.  
  610.     If you get it working reliably and securely, let me know so I
  611.     can mention it in this FAQ!
  612.  
  613. Speaking of what, what have they done to our old friend getty? What is this
  614. damn pmadm thing that keeps cropping up?
  615.  
  616.     I was hoping you wouldn't ask. PMadm stands for Port Monitor Admin,
  617.     and it's part of a ridiculously complicated bit of software
  618.     over-engineering that is destined to make everybody an expert.
  619.  
  620.     Best advice for workstations: don't touch it! It works out of the box.
  621.     For servers, you'll have to read the manual.
  622.     This should be in admintool in Solaris2.3.
  623.     For now, here are some basic instructions from Davy Curry.
  624.  
  625.     "Not guaranteed, but they worked for me."
  626.  
  627.     To add a terminal to a Solaris system:
  628.  
  629.     1. Do a "pmadm -l" to see what's running.  The serial ports on the 
  630.     CPU board are probably already being monitored by "zsmon".
  631.  
  632.     PMTAG          PMTYPE         SVCTAG         FLGS ID       <PMSPECIFIC>
  633.     zsmon          ttymon         ttya           u    root     \
  634.         /dev/term/a I - /usr/bin/login - 9600 ldterm,ttcompat ttya \
  635.         login:  - tvi925 y  #
  636.  
  637.     2. If the port you want is not being monitored, you need to create a
  638.     new port monitor with the command
  639.  
  640.         sacadm -a -p PMTAG -t ttymon -c /usr/lib/saf/ttymon -v VERSION
  641.  
  642.     where PMTAG is the name of the port monitor, e.g. "zsmon" or "alm1mon",
  643.     and VERSION is the output of "ttyadm -V".
  644.  
  645.     3. If the port you want is already being monitored, and you want to 
  646.     change something, you need to delete the current instance of the port
  647.     monitor.  To do this, use the command
  648.  
  649.         pmadm -r -p PMTAG -s SVCTAG
  650.  
  651.     where PMTAG and SVCTAG are as given in the output from "pmadm -l".  Note
  652.     that if the "I" is present in the <PMSPECIFIC> field (as it is above),
  653.     you need to get rid of it.
  654.  
  655.     4. Now, to create a specific instance of ttymon for a port, issue the
  656.     command:
  657.  
  658.     pmadm -a -p PMTAG -s SVCTAG -i root -fu -v 1 -m \
  659.         "`ttyadm -m ldterm,ttcompat -p 'PROMPT' -S YORN -T TERMTYPE \
  660.         -d DEVICE -l TTYID -s /usr/bin/login`"
  661.  
  662.     Note the assorted quotes.  In the above:
  663.  
  664.     PMTAG is the port monitor name you made with "sacadm", e.g. "zsmon".
  665.  
  666.     SVCTAG is the service tag, which can be the name of the port, e.g.,
  667.             "ttya" or "tty21".
  668.  
  669.     PROMPT is the prompt you want to print, e.g. "login: ".
  670.  
  671.     YORN is "y" to turn software carrier on (you want this for directly
  672.     connected terminals" and "n" to leave it off (you want this
  673.     for modems).
  674.  
  675.     TERMTYPE is the value you want in $TERM.
  676.  
  677.     DEVICE is the name of the device, e.g. "/dev/term/a" or "/dev/term/21".
  678.  
  679.     TTYID is the line you want from /etc/ttydefs that sets the baud rate
  680.         and stuff.  I suggest you use one of the "contty" ones for
  681.         directly connected terminals.
  682.  
  683.     5. To disable ("turn off") a terminal, run
  684.  
  685.         pmadm -d -p PMTAG -s SVCTAG
  686.  
  687.     To enable ("turn on") a terminal, run
  688.  
  689.     pmadm -e -p PMTAG -s SVCTAG
  690.  
  691.     Ports are enabled by default when you "create" them as above.
  692.  
  693.  
  694. How do I get the screen to blank when nobody's using it?
  695.  
  696.     Under 4.1.x you invoke screenblank in /etc/rc.local, but there's no
  697.     screenblank in Solaris 2.1.  Sun recommends that you
  698.     have everybody put `xset s on' in their .xinitrc, but this
  699.     may be hard to police, and in any event it won't work when nobody is
  700.     logged in.  The simplest workaround is to copy /usr/bin/screenblank
  701.     from 4.1.x and run it in binary compatibility mode.  See ``What
  702.     happened to /etc/rc and /etc/rc.local?'' for how to invoke it.
  703.  
  704.     Another possibility is to use xdm, but you'll have to use your own,
  705.     since the xdm shipped with Solaris 2.1 doesn't work.
  706.  
  707.     The 4.1.x screenblank didn't work for me; I use Jef Poskanzer's
  708.     freeware screenblank (FTP source from various archive sites).
  709.  
  710. And what about screendump and screenload?
  711.  
  712.     They're gone too. Screendump from 4.1.1 works, at least for some
  713.     frame buffers.
  714.  
  715. So how about etherfind?
  716.  
  717.     There is a replacement for etherfind, but it has changed name;
  718.     in fact it's a whole new program. It IS better. To find it,
  719.     though, you would have to realize that network snooping is not
  720.     really ethernet-specific.  To end the suspense :-), here it is:
  721.  
  722.     % man -k snoop
  723.     snoop    snoop (1m)    - capture network packets and inspect them
  724.     %
  725.  
  726.     It works differently - it has an immediate mode, a capture-to-disk mode,
  727.     and a playback-from-disk mode.  Read the man page for details.
  728.  
  729. Can I run SunOS4.1.x on my SPARC Classic or LX?
  730.  
  731.     Not according to Sun - they want you to use Solaris 2. But the
  732.     technology exists, and you can buy it - but you have to go "offshore".
  733.     Contact solaris@x1sun5.ccl.itri.org.tw for info. Note that "TW" is
  734.     the domain address for Taiwan.
  735.  
  736. The "find" program complains that my root directory doesn't exist - is it mad?
  737.  
  738.     Yes! Actually, messages like
  739.  
  740.     find : cannot open /: No such file or directory.
  741.  
  742.     are due to a bug in the tree walking function (nftw(3)).  If it
  743.     runs into problems traversing the tree, it gives up and
  744.     incorrectly complains about the top level directory of the
  745.     tree.  [The submitter seems] to recall that the most common
  746.     case which caused trouble was a directory somewhere in the
  747.     directory hierarchy which was readable but not executable.
  748.     With the fix it will just complain about the directory to which
  749.     it couldn't chdir and skip descending that subtree.
  750.  
  751.  
  752. I'm having troubles with high-speed input on the Sparc serial ports.
  753. What should I do?
  754.  
  755.     Try using UUCP.  The Solaris 2.x sparc serial driver has trouble
  756.     receiving data at or above 9600 bps.  Symptoms include sluggish
  757.     response, `NOTICE: zs0: silo overflow' console messages, sending
  758.     spurious control-Gs to the serial port, and applications that cannot be
  759.     killed even with `kill -9'.  This problem surfaces in many
  760.     applications, including Kermit and tip.  UUCP seems immune, though,
  761.     because its protocol throttles input sufficiently.
  762.  
  763. How do I make ksh or csh be the login shell for root?
  764.  
  765.     Root's shell is /sbin/sh, which is statically linked.
  766.     Don't just insert a 'c' before "sh" as previously, as that would
  767.     look for /sbin/csh, which doesn't exist.  Don't just change it to 
  768.     /bin/csh, since that's really /usr/bin/csh, which is dynamically
  769.     linked, because:
  770.         a) /usr may not be mounted initially, and then
  771.            you're in deep (the shared libraries are in /usr!), and
  772.         b) There is code in the startup scripts that assumes that
  773.            everything critical is in /etc/lib, not /usr/lib.
  774.     Approach with caution!
  775.  
  776.     Safer bet - have an alternate root account, like "rootcsh",
  777.     with uid 0, and /bin/csh as its shell. Put it after root's entry in
  778.     the passwd file.  Only drawback: you now have to remember to
  779.     change all of root's passwds at the same time.
  780.  
  781.     Third bet - in root's .profile, check if /usr is mounted and, if so,
  782.     exec /bin/ksh or whatever.
  783.  
  784. What is this message: "automount: No network locking on thathost,
  785.     contact administrator to install server change."?
  786.  
  787.     The other machine (an NFS server) is running 4.1.x and needs a
  788.     patch from Sun to update its network lock daemon (lockd). If
  789.     you don't install the patch on the server, file locking will
  790.     not work on files mounted from "thathost". The 100075-09 patch
  791.     fixes a bunch of other lock manager problems, so it may be a
  792.     Good Thing To Get; however, it may also cause the machine on
  793.     which the patch is installed to have trouble talking to servers
  794.     with no patch or older patches, so Be Warned.
  795.  
  796. How do I make Solaris2 use my Toshiba MK538FB drives?
  797.  
  798.     Append this line to /etc/system and reboot:
  799.  
  800.     set scsi_option=0x78
  801.  
  802.     This turns off Command Queueing, which upsets the Toshiba
  803.     something rotten.
  804.  
  805. How do I make Solaris2 use my old ADAPTEC ACB-4000 and Emulex MD-21 disks?
  806.  
  807.     As with any hardware addition, first try the obvious (boot -r
  808.     after installing and power-cycling everything).
  809.  
  810.     The adaptec is no longer supported; man -s7 sd no longer even
  811.     lists it!  So I guess they go over the cliff. Either that, or
  812.     take the drives out and put them on a PC, where ST506 MFM
  813.     drives are still supported.
  814.  
  815.     The MD21 should work.
  816.  
  817. PART FOUR - NETWORKING
  818.  
  819. Can I use DNS with Solaris 2.1?
  820.  
  821.     1) Instability of in.named on Solaris 2.1.
  822.  
  823.     It seems that the in.named included in the Solaris 2.1 distribution
  824.     is terribly unstable. The easiest solution for now I have discovered
  825.     is to use the OLD (SunOS 4.1.2 in my case) in binary compatibility
  826.     mode. This works just fine. If it's slower I can't tell.
  827.     There's also a patch (100902-01) available now for 2.1.
  828.  
  829.     2) Using a Solaris 2.1 host and the DNS for name resolution.
  830.  
  831.     Under SunOS 4.1 it was next to impossible to run DNS name resolution
  832.     without either a kludge fix or the NIS (V2 I guess). Under Solaris
  833.     2.1 it is incredibly simple, but you must ignore what the manual
  834.     (SunOS 5.1 Administering NIS+ and DNS) says (it should be fixed
  835.     in Solaris 2.2). All that is required to make a non-NIS host
  836.     use the DNS for name resolution is to change the host: line in
  837.     the /etc/nsswitch.conf file to the following:
  838.  
  839.     hosts:    files dns
  840.  
  841.     (i.e., when looking for hosts, look in /etc/hosts first, if not
  842.     found there, try DNS, if still not found then give up) and set
  843.     up a correct version of /etc/resolv.conf to tell the resolver
  844.     routines (like gethostbyname) how to contact the DNS
  845.     nameserver. You must have the names of machines which are
  846.     somehow contacted during boot in the files in /etc and files
  847.     must appear first in the hosts: line, otherwise the machine
  848.     will hang during boot (at least ours did). Make sure that
  849.     /etc/netconfig is using switch.so. (It does from the factory.)
  850.  
  851.  
  852. Speaking of nsswitch.conf, what is it?
  853.  
  854.     An idea whose time has come (it came to Ultrix a few years
  855.     ago).  You can control which of the "resolver" services are
  856.     read from NIS (formerly YP), which from NIS+, which from the
  857.     files in /etc, and which are from DNS (but only "hosts" can
  858.     come from DNS).
  859.  
  860.     A common example would be:
  861.  
  862.     hosts: nis files
  863.  
  864.     which means ask NIS for host info and, if it's not found, try
  865.     the local machine's host table as a fallback.
  866.  
  867.     Advice: if you're not using NIS or DNS, suninstall probably put the
  868.     right version in. If you are, ensure that hosts and passwd come from
  869.     the network. However, many of the other services seldom if ever change.
  870.     When was that last time *you* added a line in /etc/protocols? If your
  871.     workstation has a local disk, it may be better to have programs
  872.     on your machine look up these services locally, so use "files".
  873.  
  874.     Terminology: Sun worried over the term "resolver", which
  875.     technically means any "get info" routine (getpwent(3),
  876.     gethostbyname(3), etc), but is also specifically attached to
  877.     the DNS resolver.  Therefore they used the term "source" to
  878.     mean the things after the colon (files/DNS/NIS/NIS+) and
  879.     "database" to mean the thing before the colon
  880.     (passwd/group/hosts/services/netgroup etc).
  881.  
  882. So what does [NOTFOUND=return] in nsswitch.conf mean, and where does it go?
  883.  
  884.     Type "man nsswitch.conf" for more info.  There is too much
  885.     detail to summarize here.  Briefly, [NOTFOUND=return] means
  886.     that the name service whose entry it *follows* should be
  887.     considered authoritative (so that if it's up and it says such a
  888.     name doesn't exist, believe it and return instead of continuing
  889.     to hunt for an answer).
  890.  
  891. PART FIVE - SOFTWARE DEVELOPMENT
  892.  
  893. Where is the C compiler?
  894.  
  895.     Where have you been? :-) Sun has dropped their old K&R C
  896.     compiler, supposedly to create a market for multiple compiler
  897.     suppliers to provide better performance and features.  Here
  898.     are some of the contenders:
  899.  
  900.     1) SunPro C:
  901.  
  902.     SunPro, SMCC, and various distributors sell a new
  903.     ANSI-standard C compiler on the unbundled (extra cost)
  904.     SPARCcompiler/SPARCworks CD-ROM.  There are some other nice
  905.     tools there too, like a "make tool" and a visual idiff
  906.     (interactive diff).
  907.  
  908.     You have to license and pay per user.  Here's what seems to be
  909.     their current (June 93) prices per user, in various quantities:
  910.  
  911.  SunPro:          Q1      Q2      Q5      Q10     Q20     Q25     Q50    Q100
  912.  C, no supp       995     995     950     750     700     680     640     600
  913.  1yr C & supp    1355    1355    1310    1110    1080    1040    1000     960
  914.  2yr C & supp    1835    1835    1790    1590    1560    1520    1480    1440
  915.  3yr C & supp    2315    2315    2270    2070    2040    2000    1960    1920
  916.  
  917.     (The "no support" price actually includes three months of
  918.     support under warrantee.  One catch with Sun support is that
  919.     to get *any* support, you have to pay for support for *all*
  920.     the users at your site.  The quantity prices are only available
  921.     in fixed size chunks.  You don't actually buy multiple years
  922.     up front, but renew each year if desired.)
  923.  
  924.     One misfeature is that these tools use a floating license
  925.     manager, so your whole staff can't use them without paying
  926.     large sums of money.  Not only that, but as shipped, the tools
  927.     enforce a 15-minute minimum usage time, to "encourage" you to
  928.     buy a "floating" license for each and every actual user.  This
  929.     caused so much screaming and tearing of hair that Sun was
  930.     forced to fix it.  New compiler releases after May 1993 have a
  931.     default 5 minute setting, changeable all the way to zero by
  932.     having the sysadmin edit the "options file".  However, if you
  933.     set it to zero, the compiler slows down, since it has to talk
  934.     to the license daemon for every file you compile.  Old
  935.     compilers have a patch available from SunPro to eliminate the
  936.     15 minute limit; patch numbers: C: 100966-01; C++: 100967-01;
  937.     Fortran: 100968-01; Pascal: 100969-01.  However, these patches
  938.     don't seem to be available by anonymous FTP.
  939.  
  940.     2) Cygnus GCC:
  941.  
  942.     Cygnus Support and the Free Software Foundation make the GNU C
  943.     compiler for Solaris, a free software product.  Source code
  944.     and ready-to-run binaries are available by FTP from
  945.     ftp.uu.net:/vendor/cygnus, or can be installed from the CDware
  946.     CD (Volume 4 or 5).
  947.  
  948.     Like all GNU software, there are no restrictions on who can
  949.     use it, how many people can use it at a time, what machines it
  950.     can be run on, or how many copies you can install, run, give
  951.     away, or sell.
  952.  
  953.     Cygnus sells technical support for these tools, under annual
  954.     support contracts.  Price per user (June 93):
  955.  
  956.  Cygnus:          Q1      Q2      Q5      Q10     Q20     Q25     Q50    Q100
  957.  C, no supp         0       0       0       0       0       0       0       0
  958.  1yr C & supp    1400     700     580     540    ...                      504
  959.  2yr C & supp    2800    1400    1160    1080    ...                     1008
  960.  3yr C & supp    4200    2100    1740    1620    ...                     1512
  961.  
  962.     (If you get the compiler from one of the free distribution
  963.     sites, there is no cost but no warrantee.  Cygnus lets you buy
  964.     support for any number of users, at $500/user after the first
  965.     two users at $1400.  You don't actually buy multiple years up
  966.     front, but renew each year if desired.)
  967.  
  968.     The Cygnus distribution includes:
  969.     gcc (ansi C compiler), gdb (good debugger), byacc (yacc repl),
  970.     flex (lex repl), gprof, makeinfo, texindex, info, patch,
  971.     cc (a link to gcc)
  972.  
  973.     The Cygnus compiler on uunet is starting to show its age a
  974.     bit.  If you want to compile X11R5, you can get the latest
  975.     version of GCC in source code, from the usual places
  976.     (prep.ai.mit.edu or one of the many mirrored copies of it).
  977.     Build and install that compiler using the Cygnus gcc binaries.
  978.     Or get tech support from Cygnus; they produce a new version
  979.     for their customers every three months, and will fix any
  980.     bug you find.
  981.  
  982.     3) Info on Apogee, Lucid C, etc will be added if you send us some.
  983.  
  984. Speaking of that, what else do I need to compile X11R5?
  985.  
  986.     There are several "patch kits" for X11R5 under Solaris 2.1.
  987.     Most of them require gcc 2.3.3 and you must have
  988.     run "fixincludes" when you install the gcc software.
  989.  
  990. What happened to NIT? What new mechanisms exist for low-level network access?  
  991.  
  992.     See man page DLPI(7). Try NFSWATCH 4.0 for sample code using DLPI.
  993.         FTP from harbor.ecn.purdue.edu (128.46.128.76, 128.46.154.76):
  994.                 pub/davy/nfswatch4.0.tar.Z
  995.         or gatekeeper.dec.com (16.1.0.2):
  996.                 pub/net/ip/nfs/nfswatch4.0.tar.Z
  997.  
  998.     Better yet, FTP the paper "How to Use DLPI in Solaris 2.x" by
  999.     Neal Nuckolls of Sun Internet Engineering.  It's available from
  1000.     newstop.ebay.sun.com in /sun/SunOS5.0/dltest.tar.Z.
  1001.  
  1002. [Other questions as they get summarized.]
  1003.  
  1004. ACKNOWLEDGEMENTS
  1005.     Most of this material is either written by me or sent to me
  1006.     directly. Some of it is cribbed shamelessly (with collective
  1007.     credit below) from USENET postings in several groups.
  1008.  
  1009. Thanks to:
  1010.     Guy Harris <guy@auspex.com>
  1011.     Lee Quin <lee@sq.com>
  1012.     Dean Kemp at Sun Canada
  1013.     Jim Prescott
  1014.     Warren Strange, Sun Microsystems of Canada, Inc., Vancouver.
  1015.     Dave Miner  <dave.miner@east.sun.com>
  1016.     Pete Hartman <pwh@bradley.bradley.edu>
  1017.     eggert@twinsun.com (Paul Eggert)
  1018.     geertj@ica.philips.nl (Geert Jan de Groot)
  1019.     Steve Bellenot <bellenot@math.fsu.edu>
  1020.     Jennine Townsend <jennine@aimla.com>
  1021.     bill@access.com (Bill Hunter)
  1022.     Dave Miner <dave.miner@east.sun.com>
  1023.     elling@eng.auburn.edu (Richard Elling)
  1024.     jkp@anwsun.phya.utoledo.edu (Jens Petersohn)
  1025.     Carl.Smith@Eng.Sun.COM (Carl Smith)
  1026.     Thomas.Maslen@Eng.Sun.COM (Thomas Maslen)
  1027.     ctchang@hawk.cc.as.edu.tw (Chin-Tang Chang)
  1028.     Casper H.S. Dik, FWI, University of Amsterdam
  1029.     Richard.Mathews@West.Sun.COM
  1030.     Mike Kupfer  <kupfer@eng.sun.com>
  1031.     Bill Hunter <bill@access.com>
  1032.     ogpaik@cco.caltech.edu (Oon-Gil Paik)
  1033.     Dave Curry <davy@ecn.purdue.edu>
  1034.     Win Strickland <win@jmp.com>
  1035.     Tim Steele <tjfs@tadtec.co.uk>
  1036.     John Gilmore <gnu@cygnus.com>
  1037.  
  1038. ----- End of Solaris 2.x FAQ -- Maintained by Ian Darwin, ian@sq.com -----
  1039.