diff --git a/handbook/bibliography.sgml b/handbook/bibliography.sgml index ba65c63497..97603b6cef 100644 --- a/handbook/bibliography.sgml +++ b/handbook/bibliography.sgml @@ -1,148 +1,148 @@ - + Bibliography -

While the manual pages provide the definative reference +

While the manual pages provide the definitive reference for individual pieces of the FreeBSD operating system, they are notorious for not illustrating how to put the pieces together to make the whole operating system run smoothly. For this, there is no substitute for a good book on Unix system administration, and a good users' manual. Users' guides

Computer Systems Research Group, UC Berkeley. 4.4BSD User's Reference Manual. O'Reilly & Associates, Inc., 1994. ISBN 1-56592-075-9 Computer Systems Research Group, UC Berkeley. 4.4BSD User's Supplementary Documents. O'Reilly & Associates, Inc., 1994. ISBN 1-56592-076-7 Unix in a Nutshell. O'Reilly & Associates, Inc., 1990. ISBN 093717520X Administrators' guides

Albitz, Paul and Liu, Cricket. DNS and BIND. O'Reilly & Associates, Inc., 1993. ISBN 1-56592-010-4 Computer Systems Research Group, UC Berkeley. 4.4BSD System Manager's Manual. O'Reilly & Associates, Inc., 1994. ISBN 1-56592-080-5 Costales, Brian, et al. Sendmail. O'Reilly & Associates, Inc., 1993. ISBN 1-56592-056-2 Frisch, Æleen. Essential System Administration. O'Reilly & Associates, Inc., 1993. ISBN 0-937175-80-3 Hunt, Craig. TCP/IP Network Administration. O'Reilly & Associates, Inc., 1992. ISBN 0-937175-82-X Nemeth, Evi. Unix System Administration Handbook. 2nd ed. Prentice Hall, 1995. ISBN 0131510517 Programmers' guides

Asente, Paul. X Window System Toolkit. Digital Press. ISBN 1-55558-051-3 Computer Systems Research Group, UC Berkeley. 4.4BSD Programmer's Reference Manual. O'Reilly & Associates, Inc., 1994. ISBN 1-56592-078-3 Computer Systems Research Group, UC Berkeley. 4.4BSD Programmer's Supplementary Documents. O'Reilly & Associates, Inc., 1994. ISBN 1-56592-079-1 Ellis, Margaret A. and Stroustrup, Bjarne. The Annotated C++ Reference Manual. Addison-Wesley, 1990. ISBN 0-201-51459-1 Harbison, Samuel P. and Steele, Guy L. Jr. C: A Reference Manual. 3rd ed. Prentice Hall, 1991. ISBN 0-13-110933-2 Jolitz, William. "Porting UNIX to the 386". Dr. Dobb's Journal. January 1991-July 1992. Leffler, Samuel J. The Design and implementation of the 4.3BSD UNIX operating system. Addison-Wesley, 1989. Plauger, P. J. The Standard C Library. Prentice Hall, 1992. ISBN 0-13-131509-9 Wells, Bill. "Writing Serial Drivers for UNIX". Dr. Dobb's Journal. 19(15), December 1994. pp68-71, 97-99. Hardware reference

Stanley, Tom. ISA System - Architechure. 3rd ed. Reading, Mass. : + Architecture. 3rd ed. Reading, Mass. : Addison-Wesley, 1995. ISBN 0201409968 Stanley, Tom. PCI System - Architechure. 3rd ed. Reading, Mass. : + Architecture. 3rd ed. Reading, Mass. : Addison-Wesley, 1995. ISBN 0201409933 Van Gilluwe, Frank. The Undocumented PC. Reading, Mass: Addison-Wesley Pub. Co., 1994. ISBN 0-201-62277-7 Magazines and journals

The C/C++ Users Journal. R&D Publications Inc. ISSN 1075-2838 diff --git a/handbook/contrib.sgml b/handbook/contrib.sgml index 6bf5c46014..77c0c79992 100644 --- a/handbook/contrib.sgml +++ b/handbook/contrib.sgml @@ -1,303 +1,303 @@ - + FreeBSD contributor list Derived software contributors

This software was originally derived from William F. Jolitz's 386BSD release 0.1, though almost none of the original 386BSD specific code remains. This software has been essentially reimplemented from the 4.4 BSD Lite release provided by the Computer Science Research Group (CSRG) at the University of California, Berkeley and associated academic contributors. There are also portions of NetBSD that have been integrated into FreeBSD as well, and we would therefore like to thank all the contributors to NetBSD for their work. Despite some occasionally rocky moments in relations between the two groups, we both want essentially the same thing: More BSD based operating systems on people's computers! We wish - the NetBSD group every success in their endevors. + the NetBSD group every success in their endeavors. Hardware contributors

A special thank-you to Walnut Creek CDROM for providing the Pentium P5-90 and 486/DX2-66 EISA/VL systems that are being used for our development work, to say nothing of the network access and other donations of hardware resources. It would have been impossible to do this release without their support. TRW Financial Systems, Inc. provided 130 PCs, three 68 GB fileservers, twelve ethernets, two routers and an ATM switch for debugging the diskless code. They also keep a couple of FreeBSD hackers alive and busy. Thanks! Thanks also to Dermot McDonnell for his donation of a Toshiba XM3401B CDROM drive. It's been most useful! Thanks to Chuck Robey <chuckr@eng.umd.edu> who's been contributing his floppy tape streamer for experimental work. The FreeBSD core team

(in alphabetical order by first name): Andrey A. Chernov <ache@FreeBSD.org> Bruce Evans <bde@FreeBSD.org> David Greenman <davidg@FreeBSD.org> Garrett A. Wollman <wollman@FreeBSD.org> Gary Palmer <gpalmer@FreeBSD.org> Jörg Wunsch <joerg@FreeBSD.org> John Dyson <dyson@FreeBSD.org> Jordan K. Hubbard <jkh@FreeBSD.org> Justin Gibbs <gibbs@FreeBSD.org> Poul-Henning Kamp <phk@FreeBSD.org> Rich Murphey <rich@FreeBSD.org> Rodney W. Grimes <rgrimes@FreeBSD.org> Satoshi Asami <asami@FreeBSD.org> Søren Schmidt <sos@FreeBSD.org> Who is responsible for what

Additional FreeBSD contributors

(in alphabetical order by first name): Adam David <adam@veda.is> Adam Glass <glass@postgres.berkeley.edu> Akito Fujita <fujita@zoo.ncl.omron.co.jp> Alain Kalker <alain@Wit401402.student.utwente.nl> Andras Olah <olah@cs.utwente.nl> Andreas Klemm <andreas@knobel.GUN.de> Andrew Herbert <andrew@werple.apana.org.au> Andrew Moore <alm@FreeBSD.org> Anthony Yee-Hang Chan <yeehang@netcom.com> Atsushi Murai <amurai@spec.co.jp> Bill Fenner <fenner@parc.xerox.com> Bill Paul <wpaul@FreeBSD.org> Bob Wilcox <bob@obiwan.uucp> Brian Tao <taob@gate.sinica.edu.tw> Charles Hannum <mycroft@ai.mit.edu> Chris G. Demetriou <cgd@postgres.berkeley.edu> Chris Provenzano <proven@athena.mit.edu> Chris Stenton <jacs@gnome.co.uk> Chris Torek <torek@ee.lbl.gov> Christian Gusenbauer <cg@fimp01.fim.uni-linz.ac.at> Christoph Robitschko <chmr@edvz.tu-graz.ac.at> Chuck Hein <chein@cisco.com> Chuck Robey <chuckr@Glue.umd.edu> Cornelis van der Laan <nils@guru.ims.uni-stuttgart.de> Craig Struble <cstruble@vt.edu> Cristian Ferretti <cfs@riemann.mat.puc.cl> Curt Mayer <curt@toad.com> Danny J. Zerkel <dzerkel@feephi.phofarm.com> Dave Burgess <burgess@hrd769.brooks.af.mil> Dave Chapeskie <dchapes@zeus.leitch.com> Dave Rivers <rivers@ponds.uucp> David Dawes <dawes@physics.su.OZ.AU> Dean Huxley <dean@fsa.ca> Don Whiteside <dwhite@anshar.shadow.net> Eric L. Hernes <erich@lodgenet.com> Frank Bartels <knarf@nasim.cube.net> Frank Durda IV <bsdmail@nemesis.lonestar.org> Frank Maclachlan <fpm@crash.cts.com> Frank Nobis <fn@trinity.radio-do.de> Gary A. Browning <gab10@griffcd.amdahl.com> Gary Clark II <gclarkii@FreeBSD.ORG> Gary Jennejohn <gj%pcs.dec.com@inet-gw-1.pa.dec.com> Gene Stark <stark@cs.sunysb.edu> Guido van Rooij <guido@gvr.win.tue.nl> Havard Eidnes <Havard.Eidnes@runit.sintef.no> Holger Veit <Holger.Veit@gmd.de> Ishii Masahiro, R. Kym Horsell J.T. Conklin <jtc@winsey.com> James Clark <jjc@jclark.com> James da Silva <jds@cs.umd.edu> et al Janusz Kokot <janek@gaja.ipan.lublin.pl> Javier Martin Rueda <jmrueda@diatel.upm.es> Jim Wilson <wilson@moria.cygnus.com> Jonathan Bresler < jmb@FreeBSD.ORG> Josh MacDonald <jmacd@uclink.berkeley.edu> Julian Elischer <julian@dialix.oz.au> Julian Stacey <stacey@guug.de> (fallback: <julian@meepmeep.pcs.com>) Keith Bostic <bostic@toe.CS.Berkeley.EDU> Keith Moore <?> Kirk McKusick <mckusick@mckusick.com> Kurt Olsen <kurto@tiny.mcs.usu.edu> L Jonas Olsson <ljo@po.cwru.edu> Lars Fredriksen <fredriks@mcs.com> Lucas James <Lucas.James@ldjpc.apana.org.au> Marc Frajola <marc@dev.com> Marc Ramirez <mrami@mramirez.sy.yale.edu Marc van Kempen <wmbfmk@urc.tue.nl> Mark Murray <mark@grondar.za> Mark Tinguely <tinguely@plains.nodak.edu> <tinguely@hookie.cs.ndsu.NoDak.edu> Martin Birgmeier Martin Renters <martin@innovus.com> Matt Thomas <thomas@lkg.dec.com> Michael Smith <msmith@atrad.adelaide.edu.au> Mike Pritchard <mpp@mpp.minn.net> NIIMI Satoshi <sa2c@and.or.jp> Nate Williams <nate@FreeBSD.org> Nobuhiro Yasutomi <nobu@psrc.isac.co.jp> Nobuyuki Koganemaru <kogane@kces.koganemaru.co.jp> Ollivier Robert <roberto@FreeBSD.org> Paul Kranenburg <pk@cs.few.eur.nl> Paul Mackerras <paulus@cs.anu.edu.au> Paul Richards <paul@FreeBSD.org> Paul Traina <pst@cisco.com> Peter Dufault <dufault@hda.com> Peter Wemm <peter@haywire.DIALix.COM> Philippe Charnier <charnier@lirmm.fr> Richard Stallman <rms@gnu.ai.mit.edu> Rob Shady <rls@id.net> Rob Snow <rsnow@txdirect.net> Sascha Wildner <swildner@channelz.GUN.de> Scott Mace <smace@FreeBSD.org> Sean Eric Fagan <sef@kithrup.com> Serge V. Vakulenko <vak@zebub.msk.su> Stefan Esser <se@MI.Uni-Koeln.DE> Stephen McKay <syssgm@devetir.qld.gov.au> Steve Gerakines <steve2@genesis.tiac.net> Steven Wallace <swallace@ece.uci.edu> Tatsumi Hosokawa <hosokawa@mt.cs.keio.ac.jp> Terry Lee <terry@uivlsi.csl.uiuc.edu> Theo Deraadt <deraadt@fsa.ca> Thomas Gellekum <thomas@ghpc8.ihf.rwth-aachen.de> Tom Samplonius <tom@misery.sdf.com> Torbjorn Granlund <tege@matematik.su.se> Torsten Blum <torstenb@FreeBSD.ORG> Ugen J.S.Antsilevich <ugen@NetVision.net.il> Werner Griessl <werner@btp1da.phy.uni-bayreuth.de> Wolfgang Stanglmeier <wolf@kintaro.cologne.de> Wolfram Schneider <wosch@cs.tu-berlin.de> Yuval Yarom <yval@cs.huji.ac.il> Yves Fonk <yves@cpcoup5.tn.tudelft.nl> 386BSD Patch kit patch contributors

(in alphabetical order by first name): Adam Glass <glass@postgres.berkeley.edu> Adrian Hall <adrian@ibmpcug.co.uk> Andrey A. Chernov <ache@astral.msk.su> Andrew Herbert <andrew@werple.apana.org.au> Andrew Moore <alm@netcom.com> Andy Valencia <ajv@csd.mot.com> <jtk@netcom.com> Arne Henrik Juul <arnej@Lise.Unit.NO> Bakul Shah <bvs@bitblocks.com> Barry Lustig <barry@ictv.com> Bob Wilcox <bob@obiwan.uucp> Branko Lankester Brett Lymn <blymn@mulga.awadi.com.AU> Charles Hannum <mycroft@ai.mit.edu> Chris G. Demetriou <cgd@postgres.berkeley.edu> Chris Torek <torek@ee.lbl.gov> Christoph Robitschko <chmr@edvz.tu-graz.ac.at> Daniel Poirot <poirot@aio.jsc.nasa.gov> Dave Burgess <burgess@hrd769.brooks.af.mil> Dave Rivers <rivers@ponds.uucp> David Dawes <dawes@physics.su.OZ.AU> David Greenman <davidg@Root.COM> Eric J. Haug <ejh@slustl.slu.edu> Felix Gaehtgens <felix@escape.vsse.in-berlin.de> Frank Maclachlan <fpm@crash.cts.com> Gary A. Browning <gab10@griffcd.amdahl.com> Geoff Rehmet <csgr@alpha.ru.ac.za> Goran Hammarback <goran@astro.uu.se> Guido van Rooij <guido@gvr.win.tue.nl> Guy Harris <guy@auspex.com> Havard Eidnes <Havard.Eidnes@runit.sintef.no> Herb Peyerl <hpeyerl@novatel.cuc.ab.ca Holger Veit <Holger.Veit@gmd.de> Ishii Masahiro, R. Kym Horsell J.T. Conklin <jtc@winsey.com> Jagane D Sundar < jagane@netcom.com > James Clark <jjc@jclark.com> James Jegers <jimj@miller.cs.uwm.edu> James W. Dolter James da Silva <jds@cs.umd.edu> et al Jay Fenlason <hack@datacube.com> Jim Wilson <wilson@moria.cygnus.com> Joerg Lohse <lohse@tech7.informatik.uni-hamburg.de> Jörg Wunsch <joerg_wunsch@uriah.heep.sax.de> John Dyson - <formerly dyson@ref.tfs.com> John Woods <jfw@eddie.mit.edu> Jordan K. Hubbard <jkh@whisker.hubbard.ie> Julian Elischer <julian@dialix.oz.au> Julian Stacey <stacey@guug.de> (fallback: <julian@meepmeep.pcs.com>) Karl Lehenbauer <karl@NeoSoft.com> <karl@one.neosoft.com> Keith Bostic <bostic@toe.CS.Berkeley.EDU> Ken Hughes Kent Talarico <kent@shipwreck.tsoft.net> Kevin Lahey <kml%rokkaku.UUCP@mathcs.emory.edu> <kml@mosquito.cis.ufl.edu> Marc Frajola <marc@dev.com> Mark Tinguely <tinguely@plains.nodak.edu> <tinguely@hookie.cs.ndsu.NoDak.edu> Martin Renters <martin@innovus.com> Michael Galassi <nerd@percival.rain.com> Mike Durkin <mdurkin@tsoft.sf-bay.org> Nate Williams <nate@bsd.coe.montana.edu> Nick Handel <nhandel@NeoSoft.com> <nick@madhouse.neosoft.com> Pace Willisson <pace@blitz.com> Paul Kranenburg <pk@cs.few.eur.nl> Paul Mackerras <paulus@cs.anu.edu.au> Paul Popelka <paulp@uts.amdahl.com> Peter da Silva <peter@NeoSoft.com> Phil Sutherland <philsuth@mycroft.dialix.oz.au> Ralf Friedl <friedl@informatik.uni-kl.de> Rick Macklem <root@snowhite.cis.uoguelph.ca> Robert D. Thrush <rd@phoenix.aii.com> Rodney W. Grimes <rgrimes@cdrom.com> Rog Egge <?> Sascha Wildner <swildner@channelz.GUN.de> Scott Burris <scott@pita.cns.ucla.edu> Scott Reynolds <scott@clmqt.marquette.mi.us> Sean Eric Fagan <sef@kithrup.com> Simon J Gerraty <sjg@melb.bull.oz.au> <sjg@zen.void.oz.au> Stephen McKay <syssgm@devetir.qld.gov.au> Terry Lambert <terry@icarus.weber.edu> Terry Lee <terry@uivlsi.csl.uiuc.edu> Warren Toomey <wkt@csadfa.cs.adfa.oz.au> Wiljo Heinen <wiljo@freeside.ki.open.de> William Jolitz <withheld> Wolfgang Solfrank <ws@tools.de> Wolfgang Stanglmeier <wolf@dentaro.GUN.de> Yuval Yarom <yval@cs.huji.ac.il> Last, but not least, the release engineer would like to thank: His Wife, for chocolate chip cookies, and some other things. The DGB project @ TFS, for patience and tolerance. diff --git a/handbook/current.sgml b/handbook/current.sgml index 8171d69f72..1fcf0012ec 100644 --- a/handbook/current.sgml +++ b/handbook/current.sgml @@ -1,175 +1,175 @@ - + Staying current with FreeBSD

Contributed by &a.jkh;. What is FreeBSD-current?

FreeBSD-current is, quite literally, nothing more than a daily snapshot of the working sources for FreeBSD. These include work in progress, experimental changes, and transitional mechanisms that may or may not be present in the next official release of the software. While many of us compile almost daily from FreeBSD-current sources, there are periods of time when the sources are literally uncompilable. These problems are generally resolved as expeditiously as possible, but whether or not FreeBSD-current sources bring disaster or greatly desired functionality can literally be a matter of which part of any given 24 hour period you grabbed them in! Under certain circumstances we will sometimes make binaries for parts of FreeBSD-current available, but only because we're interested in getting something tested, not because we're in the business of providing binary releases of current. If we don't offer, please don't ask! It takes far too much time to do this as a general task. Who needs FreeBSD-current?

FreeBSD-current is made generally available for 3 primary interest groups: Members of the FreeBSD group who are actively working on one part or another of the source tree and for whom keeping `current' is an absolute requirement. Members of the FreeBSD group who are active ALPHA or BETA testers and willing to spend time working through problems in order to ensure that FreeBSD-current remains as sane as possible. These are also people who wish to make topical suggestions on changes and the general direction of FreeBSD. Peripheral members of the FreeBSD (or some other) group who merely wish to keep an eye on things and use the current sources for reference purposes (e.g. for reading, not running). These people also make the occasional comment or contribute code. What is FreeBSD-current NOT?

A fast-track to getting pre-release bits because there's something you heard was pretty cool in there and you want to be the first on your block to have it. A quick way of getting bug fixes. In any way ``officially supported'' by us. We do our best to help people genuinely in one of the 3 - ``legitimate'' FreeBSD-current catagories, but we simply do not + ``legitimate'' FreeBSD-current categories, but we simply do not have the time to help every person who jumps into FreeBSD-current with more enthusiasm than knowledge of how to deal with experimental system software. This is not because we're mean and nasty people who don't like helping people out (we wouldn't even be doing FreeBSD if we were), it's literally because we can't answer 400 messages a day and actually work on FreeBSD! I'm sure if given the choice between having us answer lots of questions or continue to improve FreeBSD, most of you would vote for us improving it. Using FreeBSD-current

Join the freebsd-current and cvs-all mailing lists. This is not just a good idea, it's essential. If you aren't on freebsd-current, you won't read the comments that people are making about the current state of the system and thus will end up stumbling over a lot of problems that others have already found and solved. Even more importantly, you will miss out on potentially critical information (e.g. ``Yo, Everybody! Before you rebuild /usr/src, you must rebuild the kernel or your system will crash horribly!"). The cvs-all mailing list will allow you to see the commit log entry for each change as it's made. This can also contain important information, and will let you know what parts of the system are being actively changed. To join these lists, send mail to `majordomo@FreeBSD.ORG' and say: subscribe current subscribe cvs-all In the body of your message. Optionally, you can also say `help' - and MajorDomo will send you full help on how to subscribe and + and Majordomo will send you full help on how to subscribe and unsubscribe to the various other mailing lists we support. Grab the sources from ftp.FreeBSD.ORG. You can do this in three ways: - Using the CTM facility desribed below. Unless you + Using the CTM facility described below. Unless you have a good TCP/IP connection at a flat rate, this is the way to do it. Use the CMU `sup' program (Software Update Protocol), also described below. This is the second most recommended method, since it allows you to grab the entire collection once and then only what's changed from then on. Many people run sup from cron and keep their sources up-to-date automatically. The problem is that sup does not use the bandwidth efficient, unless the round-trip is very fast. If the cost of connection or the duration of the session is a concern, use CTM. Use ftp. The source tree for FreeBSD-current is always "exported" on: ftp.FreeBSD.ORG:~ftp/pub/FreeBSD/FreeBSD-current We use `wu-ftpd' which allows compressed/tar'd grabbing of whole trees. e.g. you see: usr.bin/lex You can do: ftp> cd usr.bin ftp> get lex.tar.Z And it will get the whole directory for you as a compressed tar file. If you're grabbing the sources to run, and not just look at, then grab all of current, not just selected portions. The reason for this is that various parts of the source depend on updates elsewhere and trying to compile just a subset is almost guaranteed to get you into trouble. Before compiling current, read the Makefile in /usr/src carefully. You'll see one-time targets like `bootstrapld' which must be run as part of the upgrading process. Reading freebsd-hackers will keep you up-to-date on other bootstrapping procedures that sometimes become necessary as we move towards the next release. Be active! If you're running FreeBSD-current, we want to know what you have to say about it, especially if you have suggestions for enhancements or bug fixes. Suggestions with accompanying code are received most enthusiastically! diff --git a/handbook/eresources.sgml b/handbook/eresources.sgml index 1e661fea2f..8e07344d37 100644 --- a/handbook/eresources.sgml +++ b/handbook/eresources.sgml @@ -1,354 +1,354 @@ - + Resources on the Internet

The rapid pace of FreeBSD progress makes print media impractical as a means for following the latest developments. Electronic resources are the best, if not the only way stay informed of the latest advances. Also, since FreeBSD is a volunteer effort, the user community also serves as the technical support department and invariably, electronic mail and Usenet news are the most effective way of getting technical problems resolved. Below, the most important points of contact with the FreeBSD user community are outlined. If you are aware of other resources not included, please send them to doc@freebsd.org so they may be included. Mailing lists

Contributed by &a.dufalt;. 20 Jun 1995. Though many of the FreeBSD development members read USENET, we cannot always guarantee that we'll get to your questions in a timely fashion (or at all) if you post them only to one of the comp.unix.bsd.* groups. By addressing your questions to the appropriate mailing list you will reach both us and a concentrated FreeBSD audience, invariably assuring a better (or at least faster) response. There are list charters at the bottom of this document. Please read the list charter before joining a list. We must strive to keep the signal to noise ratio of the lists high, especially in the technical lists. Archives are kept for all of the mailing lists and can be searched using the the . The keyword searchable archive offers an excellent way to find answers to frequently asked questions and should be consulted before posting a question. List summary

General lists: The following are general lists that anyone is free to join: List Purpose ---------------------------------------------------------------------- freebsd-announce Important events / milestones freebsd-bugs Bug reports freebsd-chat Non technical items related to the community freebsd-policy Policy issues and suggestions freebsd-questions User questions freebsd-current Discussions about the use of FreeBSD-current Technical lists: The following are the technical lists. You should read the charter carefully before joining them, and you should keep your e-mail within the scope of the guidelines. List Purpose ---------------------------------------------------------------------- freebsd-doc Documentation project freebsd-fs Filesystems freebsd-hackers General Technical discussions freebsd-hardware General discussion of FreeBSD hardware freebsd-multimedia Multimedia discussions freebsd-platforms Porting to Non-Intel platforms freebsd-ports Discussion of "ports" freebsd-security Security issues freebsd-scsi SCSI subsystem Limited lists: The following are limited lists that you will need approval to join. Even though access to these lists is controled, anyone is free to send suggestions and comments to them. It is a good idea establish a presence in the technical lists before asking to join one of these limited lists. List Purpose ---------------------------------------------------------------------- freebsd-admin Administrative issues freebsd-arch Architecture and design discussions freebsd-core FreeBSD core team freebsd-install Installation development freebsd-user-groups User group coordination CVS lists: The following lists are for people seeing the log messages for source changes in specific areas: List name Source area Area Description (source for) ---------------------------------------------------------------------- cvs-CVSROOT /usr/src/[A-Z]* Top level /usr/src file changes cvs-all /usr/src All changes to the tree (superset) cvs-bin /usr/src/bin System binaries cvs-etc /usr/src/etc System files cvs-games /usr/src/games Games cvs-gnu /usr/src/gnu GPL'd utilities cvs-include /usr/src/include Include files cvs-kerberosIV /usr/src/kerberosIV Kerberos encryption code cvs-lib /usr/src/lib System libraries cvs-libexec /usr/src/libexec System binaries cvs-ports /usr/ports Ported software cvs-sbin /usr/src/sbin System binaries cvs-share /usr/src/share System shared files cvs-sys /usr/src/sys Kernel cvs-usrbin /usr/src/usr.bin Use binaries cvs-usrsbin /usr/src/usr.sbin System binaries How to subscribe

All mailing lists live on FreeBSD.ORG, so to post to a list you simply mail to listname@FreeBSD.ORG. It will then be redistributed to mailing list members throughout the world. To subscribe to a list, send mail to: majordomo@FreeBSD.ORG And include the keyword subscribe [] In the body of your message. For example, to subscribe yourself to freebsd-announce, you'd do: % mail majordomo@FreeBSD.ORG subscribe freebsd-announce ^D If you want to subscribe yourself under a different name, or submit a subscription request for a local mailing list (note: this is more efficient if you have several interested parties at one site, and highly appreciated by us!), you would do something like: % mail majordomo@FreeBSD.ORG subscribe freebsd-announce local-announce@somesite.com ^D Finally, it is also possible to unsubscribe yourself from a list, get a list of other list members or see the list of mailing lists again by sending other types of control messages to majordomo. For a complete list of available commands, do this: % mail majordomo@FreeBSD.ORG help ^D Finally, we again request that you keep the technical mailing lists on a technical track. If you're only interested in the "high points", then it's suggested that you join freebsd-announce, which will contain only infrequent traffic. List charters

Administrative issues Important events / milestones This is the mailing list for people interested only in occasional announcements of significant freebsd events. This includes announcements about snapshots and other releases. It contains announcements of new FreeBSD capabilities. It may contain calls for volunteers etc. This is a low volume list. Architecture and design discussions This is the mailing list for people discussing FreeBSD architectural issues. It is a closed list, and not for general subscription. Bug reports This is the mailing list for reporting bugs in FreeBSD Whenever possible, bugs should be submitted using "send-pr". Non technical items related to the community This list contains the overflow from the other lists about non-technical, social information. It includes discussion about whether Jordan looks like a tune ferret or not, whether or not to type in capitals, who is drinking too much coffee, where the best beer is brewed, who is brewing beer in their basement, and so on. Occasional announcements of important events (such as upcoming parties, weddings, births, new jobs, etc) can be made to the technical lists, but the follow ups should be directed to this -chat list. FreeBSD core team This is an internal mailing list for use by the core members. Discussions about the use of FreeBSD-current This is the mailing list for users of freebsd-current. It includes warnings about new features coming out in -current that will affect the users, and instructions on steps that must be taken to remain -current. Anyone running "current" must subscribe to this list. Discussions about the use of FreeBSD-current This is the digest version of the freebsd-current mailing list. The digest consists of all messages sent to freebsd-current bundled together and mailed out as a single message. The average digest size is about 40kB. Documentation project This mailing list belongs to the FreeBSD Doc Project and is for the discussion of documentation related issues and projects. Filesystems Discussions concerning FreeBSD filesystems. Technical discussions This is a forum for technical discussions related to FreeBSD. This is the primary technical mailing list. It is for individuals actively working on FreeBSD, to bring up problems or discuss alternative solutions. Individuals interested in following the technical discussion are also welcome. Technical discussions This is the digest version of the freebsd-hackers mailing list. The digest consists of all messages sent to freebsd-hackers bundled together and mailed out as a single message. The average digest size is about 40kB. General discussion of FreeBSD hardware General discussion about the types of hardware that FreeBSD runs on, various problems and suggestions concerning what to buy or avoid. Installation discussion This is the mailing list for people discussing FreeBSD installation development for the 2.0 release. Multimedia discussions This is a forum about multimedia applications using FreeBSD. Discussion center around multimedia applications, their installation, their development and their support within FreeBSD Porting to Non-Intel platforms Cross-platform freebsd issues, general discussion and proposals for non-Intel FreeBSD ports. Policy issues and suggestions This is a forum for policy discussions related to FreeBSD. This includes where FreeBSD is going, how to set up a consortium, whether or not and how to make FreeBSD pay for itself, how to attract more users, and so on. When a topic relates directly to FreeBSD but has little or no technical content then it should be sent to this list. Discussion of "ports" Discussions concerning FreeBSD's "ports collection" (/usr/ports), proposed ports, modifications to ports collection infrastructure and general coordination efforts. User questions This is the mailing list for questions about FreeBSD. You should not send "how to" questions to the technical lists unless you consider the question to be pretty technical. User questions This is the digest version of the freebsd-questions mailing list. The digest consists of all messages sent to freebsd-questions bundled together and mailed out as a single message. The average digest size is about 40kB. SCSI subsystem This is the mailing list for people working on the scsi subsystem for FreeBSD. Security issues FreeBSD computer security issues (DES, Kerberos, known security holes and fixes, etc). User Group Coordination List This is the mailing list for the coordinators from each of the -local area Users Groups to dicuss matters with each other and a +local area Users Groups to discuss matters with each other and a designated individual from the Core Team. This mail list should be limited to meeting synopsis and coordination of projects that span User Groups. Usenet newsgroups

In addition to two FreeBSD specific newsgroups, there are many others in which FreeBSD is discussed or are otherwise relevant to FreeBSD users. are available for some of these newsgroups from courtesy of Warren Toomey <wkt@cs.adfa.oz.au>. BSD specific newsgroups

comp.unix.bsd.freebsd.announce comp.unix.bsd.freebsd.misc Other Unix newsgroups of interest

comp.unix comp.unix.questions comp.unix.admin comp.unix.programmer comp.unix.shell comp.unix.user-friendly comp.security.unix comp.sources.unix comp.unix.advocacy comp.unix.misc comp.os.386bsd.announce comp.os.386bsd.apps comp.os.386bsd.bugs comp.os.386bsd.development comp.os.386bsd.misc comp.os.386bsd.questions comp.bugs.4bsd comp.bugs.4bsd.ucb-fixes comp.unix.bsd X-Window system

comp.windows.x.i386unix comp.windows.x comp.windows.x.apps comp.windows.x.announce comp.windows.x.intrinsics comp.windows.x.motif comp.windows.x.pex comp.emulators.ms-windows.wine Word Wide Web servers

diff --git a/handbook/handbook.sgml b/handbook/handbook.sgml index 9115464a58..4baa1b69a8 100644 --- a/handbook/handbook.sgml +++ b/handbook/handbook.sgml @@ -1,168 +1,168 @@ - + %authors; %sections; ]> FreeBSD Handbook <author> <name>The FreeBSD Documentation Project</name> </author> <date>September 24, 1995</date> <abstract>Welcome to FreeBSD! This handbook covers the installation and day to day use of <bf>FreeBSD Release 2.0.5</bf>. This manual is a <bf>work in progress</bf> and is the -work of many individials. Many sections do not yet exist +work of many individuals. Many sections do not yet exist and some of those that do exist need to be updated. If you are interested in helping with this project, send email to &a.jfieber; or to the FreeBSD Documentation Project mailing list <tt><htmlurl url="mailto:doc@freebsd.org" name="<doc@freebsd.org>"></tt>. The latest version of this document is always available from the <url url="http://www.freebsd.org/" name="FreeBSD World Wide Web server">. </abstract> <toc> <!-- ************************************************************ --> <part><heading>Basics</heading> <chapt><heading>Introduction</heading> &nutshell; &history; &relnotes; &install; &basics; <chapt><heading>Installing applications</heading> <sect><heading>* Installing packages</heading> &ports; &porting; <!-- ************************************************************ --> <part><heading>System Administration</heading> <chapt><heading>Reconfiguring the Kernel<label id="kernelconfig"></heading> <p>This section is in progress. Please contact Deborah Bennett <htmlurl url="mailto:deborah@gallifrey.microunity.com" name="<deborah@gallifrey.microunity.com>"> for more information. In the meantime, please refer to Kernel Configuration section of the <url url="../FAQ/freebsd-faq.html" name="FreeBSD FAQ">. <!-- &kernelconfig; --> <chapt><heading>Users, groups and security</heading> &crypt; &skey; &kerberos; <sect><heading>* Firewalls</heading> <chapt><heading>Printing</heading> <p>This section is in progress. Please contact Sean Kelly <url url="mailto:kelly@fsl.noaa.gov" name="kelley@fsl.noaa.gov"> for more information. <chapt><heading>The X-Window System</heading> <p>Pending the completion of this section, please refer to documentation supplied by the <url url="http://www.xfree86.org/" name="The XFree86 Project, Inc">. <chapt><heading>Managing hardware</heading> <sect><heading>* Adding and reconfiguring disks</heading> &scsi; &esdi; <sect><heading>* Tapes and backups</heading> <sect><heading>* Serial ports</heading> <sect><heading>* Sound cards</heading> <!-- ************************************************************ --> <part><heading>Network Communications</heading> <chapt><heading>Basic Networking</heading> <sect><heading>* Ethernet basics</heading> <sect><heading>* Serial basics</heading> <sect><heading>* Hardwired Terminals</heading> &dialup; <chapt><heading>PPP and SLIP</heading> <p>If your connection to the internet is through a modem, or you wish to provide other people with dialup connections to the internet using FreeBSD, you have the option of using PPP or SLIP. Furthermore, two varieties of PPP are provided: <em>user</em> (sometimes referred to as iijppp) and <em>kernel</em>. The procedures for configuring both types of PPP, and for setting up SLIP are described in this chapter. &userppp; &ppp; &slipc; &slips; <chapt><heading>Advanced networking</heading> <sect><heading>Gateways and routing</heading> <p>This section is in progress. Please contact Coranth Gryphon <htmlurl url="mailto:gryphon@healer.com" name="<gryphon@healer.com>"> for more information. &nfs; &diskless; <sect><heading>* Yellow Pages/NIS</heading> <sect><heading>* ISDN</heading> <chapt><heading>* Mail</heading> <!-- ************************************************************ --> <part><heading>Advanced topics</heading> ¤t; &ctm; ⊃ &kerneldebug; &submitters; &troubleshooting; <!-- ************************************************************ --> <part><heading>Appendices</heading> &mirrors; &bibliography; &eresources; &hw; <chapt><heading>Assorted technical topics</heading> &booting; &memoryuse; &dma; &contrib; &glossary; </book> </linuxdoc> diff --git a/handbook/history.sgml b/handbook/history.sgml index 8b96b326d6..1f1151c61c 100644 --- a/handbook/history.sgml +++ b/handbook/history.sgml @@ -1,92 +1,92 @@ -<!-- $Id: history.sgml,v 1.6 1995-09-14 21:57:08 jfieber Exp $ --> +<!-- $Id: history.sgml,v 1.7 1995-09-27 00:46:19 jmz Exp $ --> <!-- The FreeBSD Documentation Project --> <sect><heading>A brief history of FreeBSD<label id="history"></heading> <p><em>Contributed by &a.jkh;</em>. The FreeBSD project had its genesis in the early part of 1992, partially as an outgrowth of the "Unofficial 386BSD Patchkit" by the patchkit's last 3 coordinators: Nate Williams, Rod Grimes and myself. David Greenman and Julian Elischer were also lurking in the background around this time, though they didn't come fully into the project until a month or two after it was more or less officially launched. Our original goal was to produce an intermediate snapshot of 386BSD in order to fix a number of problems with it that the patchkit mechanism just wasn't capable of solving. Some of you may remember the early working title for the project being "386BSD 0.5" or "386BSD Interim" in reference to that fact. 386BSD was Bill Jolitz's operating system, which had been up to that point suffering rather severely from almost a year's worth of neglect. As the patchkit swelled ever more uncomfortably with each passing day, we were in unanimous agreement that something had to be done and decided to try and assist Bill by providing this interim "cleanup" snapshot. Those plans came to a rude halt when Bill Jolitz suddenly decided to withdraw his sanction from the project and without any clear indication of what would be done instead. It didn't take us long to decide that the goal remained worthwhile even without Bill's support, and so we adopted the name "FreeBSD", which was coined by David Greenman. Our initial objectives were set after consulting with the system's current users and once it became clear that the project was on the road to perhaps even becoming a reality, I contacted Walnut Creek CDROM with an eye towards improving FreeBSD's distribution channels to those many unfortunates without easy access to the Internet. Walnut Creek CDROM not only supported the idea of distributing FreeBSD on CD but went so far as to provide the project with a machine to work on and a fast Internet connection. -Without Walnut Creek CDROM's almost unprecidented degree of faith in +Without Walnut Creek CDROM's almost unprecedented degree of faith in what was, at the time, a completely unknown project, it is in fact very unlikely that FreeBSD would have gotten as far, as fast, as it has today. The first CDROM (and general net-wide) distribution was FreeBSD 1.0, released in December of '93. This was based on the 4.3 BSD Lite ("Net/2") tape from U.C. Berkeley with many components provided by 386BSD and the Free Software Foundation. It was a fairly reasonable success for a first offering, and we followed this release with the highly successful FreeBSD 1.1 version in May of 1994. Around this time, some rather unexpected storm clouds formed on our horizon as Novell and U.C. Berkeley settled their long-running lawsuit over the legal status of the Berkeley Net/2 tape. A condition of that settlement was U.C. Berkeley's concession that large parts of Net/2 -was "encumbered" code and property of Novell, who had in turn aquired +was "encumbered" code and property of Novell, who had in turn acquired it from AT&T some time previously. What Berkeley got in return was Novell's "blessing" that the 4.4 Lite release, when it was finally released, would be declared unencumbered and all existing Net/2 users would be strongly encouraged to switch. This included us, and we were given until the end of July 1994 to stop shipping our own Net/2 based product. Under the terms of that agreement, were were allowed one last release before the deadline and that became FreeBSD 1.1.5.1, the culmination of our year's work with Net/2 and generally considered by many to be a significant project milestone for stability and general performance.. We then set about the arduous task of literally re-inventing ourselves with a completely new and rather incomplete set of 4.4 Lite bits. The "Lite" releases were light in part because Berkeley's CSRG removed large chunks of code required for actually making a bootable running system out of it due to various legal requirements and the fact that the Intel port of 4.4 was highly incomplete. It took us until December of 1994 to make this transition, and in January of 1995 we released FreeBSD 2.0 to the net and on CDROM. Despite being still more than a little rough around the edges, the release was a significant success and has since been followed by the more robust and easier to install FreeBSD 2.0.5 release in June of 1995. Where to from here? Well, we intend to release FreeBSD 2.1 sometime in October of 1995 and have reasonable expectations that it will meet or exceed all of the standards for quality we set with FreeBSD 1.1.5.1 back in July of 1994. From there, we'll probably continue our now two-track scheme of a "stable" branch of FreeBSD and an "experimental" branch, where development can continue at its usually rapid pace without penalizing those who just want a working system without too much excitement. We also intend to focus on any remaining areas of weakness, like documentation or missing drivers, and steadily increase the overall quality and feature set of the system well into 1996 and beyond. Jordan diff --git a/handbook/install.sgml b/handbook/install.sgml index 69079d8cfb..0498d02882 100644 --- a/handbook/install.sgml +++ b/handbook/install.sgml @@ -1,798 +1,798 @@ -<!-- $Id: install.sgml,v 1.11 1995-09-26 17:47:02 jfieber Exp $ --> +<!-- $Id: install.sgml,v 1.12 1995-09-27 00:46:20 jmz Exp $ --> <!-- The FreeBSD Documentation Project --> <!-- <!DOCTYPE linuxdoc PUBLIC '-//FreeBSD//DTD linuxdoc//EN'> --> <chapt><heading>Installing FreeBSD<label id="install"></heading> <p>So, you would like to try out FreeBSD on your system? This section is a quick-start guide for what you need to do. FreeBSD can be installed from a variety of media including CD-ROM, floppy disk, magnetic tape, an MS-DOS partition, and if you have a network connection, via anonymous ftp or NFS. Regardless of the installation media you choose, you can get started by downleading the <bf>installation disk</bf> as described below. Booting your computer with disk will provide important information about compatibility between FreeBSD and your hardware which could dictate which installation options are possible. It can also provide early clues to compatibilty problems that could prevent FreeBSD running on your system at all. If you plan on installing via anonymous FTP, then this installation disk is all you need to download. For more information on obtaining the FreeBSD distribution itself, please see <ref id="mirrors" name="Obtaining FreeBSD"> in the Appendix. So, to get the show on the road, follow these steps: <enum> <item>Review the <ref id="install:hw" name="supported configurations"> section of this installation guide to be sure that your hardware is supported by FreeBSD. It may be helpful to make a list of any special cards you have installed, such as SCSI controllers, etherernet adapters or sound cards. This list should include relevant configuration parameters such as interrupts (IRQ) and IO port addresses. </item> <item>Download the <url url="ftp://ftp.freebsd.org/pub/FreeBSD/2.0.5-RELEASE/UPDATES/boot.flp" name="installation boot disk image"> file to your hard drive, and be sure to tell your browser to <em>save</em> rather than <em>display</em>. <bf>Note:</bf> This disk image can be used for <em>both</em> 1.44 megabyte 3.5 inch floppy disks and 1.2 megabyte 5.25 inch floppy disks.</item> <item>Make the installation boot disk from the image file: <itemize> <item>If you are using MS-DOS download <url url="ftp://ftp.freebsd.org/pub/FreeBSD/tools/dos-tools/rawrite.exe" name="rawrite.exe"> (tell your browser to <em>save</em> rather than <em>display</em>!), then run it: <tscreen><verb> C:\> rawrite </verb></tscreen> The program will prompt you for the floppy drive containing the disk you want to write to (A: or B:) and the name of the file to put on disk (boot.flp). </item> <item>If you are using a UNIX system: <tscreen> % dd if=boot.flp of=<em>disk_device</em> bs=18k </tscreen> where <em>disk_device</em> is the <tt>/dev</tt> entry for the floppy drive. On FreeBSD systems, this is <tt>/dev/rfd0</tt> for the A: drive and <tt>/dev/rfd1</tt> for the B: drive. </item> </itemize> </item> <item>With the installation disk in the A: drive, reboot your computer. You should get a boot prompt something like this: <tscreen> >> FreeBSD BOOT ...<newline> Use hd(1,a)/kernel to boot sd0 when wd0 is also installed.<newline> Usage: [[hd(1,a)]/kernel][-abcCdhrsv]<newline> Use ? for file list or press Enter for defaults<newline> Boot: </tscreen> If you do <em>not</em> type anything, FreeBSD will automatically boot with its default configuration after a delay of about five seconds. As FreeBSD boots, it probes your computer to determine what hardware is installed. The results of this probing is displayed on the screen. </item> <item>When the booting process is finished, The main FreeBSD installation menu will be displayed.</item> </enum> <p><bf>If something goes wrong...</bf> <p>Due to limitations of the PC architecture, it is impossible for probing to be 100 percent reliable. In the event that your hardware is incorrectly identified, or that the probing causes your computer to lock up, first check the <ref id="install:hw" name="supported configurations"> section of this installation guide to be sure that your hardware is indeed supported by FreeBSD. <p>If your hardware is supported, reset the computer and when the <tt>Boot:</tt> prompt comes up, type <bf>-c</bf>. This puts FreeBSD into a configuration mode where you can supply hints about your hardware. The FreeBSD kernel on the installation disk is configured assuming that most hardware devices are in their factory default configuration in terms of IRQs, IO addresses and DMA channels. If your hardware has been reconfigured, you will most likely need to use the <bf>-c</bf> option at boot to tell FreeBSD where things are. <p>It is also possible that a probe for a device not present will cause a later probe for another device that is present to fail. In that case, the probes for the conflicting driver(s) should be disabled. <p>In the configuration mode, you can: <itemize> <item>List the device drivers installed in the kernel.</item> <item>Disable device drivers for hardware not present in your system.</item> <item>Change the IRQ, DRQ, and IO port addresses used by a device driver.</item> </itemize> <p>While at the <tt>config></tt> prompt, type <tt>help</tt> for more information on the available commands. After adjusting the kernel to match how you have your hardware configured, type <tt>quit</tt> at the <tt>config></tt> prompt to continue booting with the new settings. After FreeBSD has been installed, changes made in the configuration mode will be permanent so you do not have to reconfigure every time you boot. Even so, it is likely that you will want to build a custom kernel to optimize the performance of your system. See <ref id="kernelconfig" name="Kernel configuration"> for more information on creating custom kernels. <sect><heading>MS-DOS user's Questions and Answers</heading> <p>Many FreeBSD users wish to install FreeBSD on PCs inhabited by MS-DOS. Here are some commonly asked questions about installing FreeBSD on such systems. <p><bf>Help! I have no space! Do I need to delete everything first?</bf> If your machine is already running MS-DOS and has little or no free space available for FreeBSD's installation, all is not lost! You may find the FIPS utility, provided in the <tt>tools</tt> directory on the FreeBSD CDROM or on the various FreeBSD ftp sites, to be quite useful. FIPS allows you to split an existing MS-DOS partition into two pieces, preserving the original partition and allowing you to install onto the second free piece. You first defragment your MS-DOS partition, using the DOS 6.xx DEFRAG utility or the Norton Disk tools, then run FIPS. It will prompt you for the rest of the information it needs. Afterwards, you can reboot and install FreeBSD on the new free slice. See the <em>Distributions</em> menu for an estimation of how much free space you'll need for the kind of installation you want. <bf>Can I use compressed MS-DOS filesystems from FreeBSD?</bf> No. If you are using a utility such as Stacker(tm) or DoubleSpace(tm), FreeBSD will only be able to use whatever portion of the filesystem you leave uncompressed. The rest of the filesystem will show up as one large file (the stacked/dblspaced file!). <bf>Do not remove that file!</bf> You will probably regret it greatly! It is probably better to create another uncompressed MS-DOS primary partition and use this for communications between MS-DOS and FreeBSD. <bf>Can I mount my MS-DOS extended partitions?</bf> This feature isn't in FreeBSD 2.0.5 but should be in 2.1. We've laid all the groundwork for making this happen, now we just need to do the last 1 percent of the work involved. <bf>Can I run MS-DOS binaries under FreeBSD?</bf> Not yet! We'd like to add support for this someday, but are still lacking anyone to actually do the work. Ongoing work with Linux's PCEMU utility may bring this much closer to being a reality sometime soon. Send mail to hackers@freebsd.org if you're interested in joining this effort! <sect><heading>Supported Configurations<label id="install:hw"></heading> <p>FreeBSD currently runs on a wide variety of ISA, VLB, EISA and PCI bus based PC's, ranging from 386sx to Pentium class machines (though the 386sx is not recommended). Support for generic IDE or ESDI drive configurations, various SCSI controller, network and serial cards is also provided. A minimum of four megabytes of RAM is required to run FreeBSD. To run the X-window system, eight megabytes of RAM is the recommended minimum. Following is a list of all disk controllers and ethernet cards currently known to work with FreeBSD. Other configurations may very well work, and we have simply not received any indication of this. <sect1><heading>Disk Controllers</heading> <p> <itemize> <item>WD1003 (any generic MFM/RLL) <item>WD1007 (any generic IDE/ESDI) <item>WD7000 <item>IDE <item>ATA <item>Adaptec 152x series ISA SCSI controllers <item>Adaptec 154x series ISA SCSI controllers <item>Adaptec 174x series EISA SCSI controller in standard and enhanced mode. <item>Adaptec 274X/284X/2940 <!-- 3940 (in 2.1) --> (Narrow/Wide/Twin) series EISA/VLB/PCI SCSI controllers <item>Adaptec AIC-6260 and AIC-6360 based boards, which includes the AHA-152x and SoundBlaster SCSI cards. <bf>Note:</bf> You cannot boot from the SoundBlaster cards as they have no on-board BIOS, which is necessary for mapping the boot device into the system BIOS I/O vectors. They are perfectly usable for external tapes, CDROMs, etc, however. The same goes for any other AIC-6x60 based card without a boot ROM. Some systems DO have a boot ROM, which is generally indicated by some sort of message when the system is first powered up or reset. Check your system/board documentation for more details. <item>Buslogic 545S & 545c <bf>Note:</bf> that Buslogic was formerly known as "Bustec". <item>Buslogic 445S/445c VLB SCSI controller <item>Buslogic 742A, 747S, 747c EISA SCSI controller. <item>Buslogic 946c PCI SCSI controller <item>Buslogic 956c PCI SCSI controller <item>NCR 53C810 and 53C825 PCI SCSI controller. <item>NCR5380/NCR53400 ("ProAudio Spectrum") SCSI controller. <item>DTC 3290 EISA SCSI controller in 1542 emulation mode. <item>UltraStor 14F, 24F and 34F SCSI controllers. <item>Seagate ST01/02 SCSI controllers. <item>Future Domain 8xx/950 series SCSI controllers. </itemize> With all supported SCSI controllers, full support is provided for SCSI-I & SCSI-II peripherals, including Disks, tape drives (including DAT) and CD ROM drives. The following CD-ROM type systems are supported at this time: <itemize> <item>SCSI (also includes ProAudio Spectrum and SoundBlaster SCSI) (cd) <item>Mitsumi proprietary interface (mcd) <item>Matsushita/Panasonic (Creative) proprietary interface (matcd) <item>Sony proprietary interface (scd) </itemize> <bf>Note:</bf> CD-Drives with IDE interfaces are not supported at this time. Some controllers have limitations with the way they deal with >16MB of memory, due to the fact that the ISA bus only has a DMA address space of 24 bits. If you do your arithmetic, you'll see that this makes it impossible to do direct DMA to any address >16MB. This limitation is even true of some EISA controllers (which are normally 32 bit) when they're configured to emulate an ISA card, which they then do in *all* respects. This problem is avoided entirely by IDE controllers (which do not use DMA), true EISA controllers (like the UltraStor, Adaptec 1742A or Adaptec 2742) and most VLB (local bus) controllers. In the cases where it's necessary, the system will use "bounce buffers" to talk to the controller so that you can still use more than 16Mb of memory without difficulty. <sect1><heading>Ethernet cards</heading> <p> <itemize> <item>SMC Elite 16 WD8013 ethernet interface, and most other WD8003E, WD8003EBT, WD8003W, WD8013W, WD8003S, WD8003SBT and WD8013EBT based clones. SMC Elite Ultra is also supported. <item>DEC EtherWORKS III NICs (DE203, DE204, and DE205) <item>DEC EtherWORKS II NICs (DE200, DE201, DE202, and DE422) <item>DEC DC21140 based NICs (SMC???? DE???) <item>DEC FDDI (DEFPA/DEFEA) NICs <item>Fujitsu MB86960A family of NICs <item>Intel EtherExpress <item>Isolan AT 4141-0 (16 bit) <item>Isolink 4110 (8 bit) <item>Novell NE1000, NE2000, and NE2100 ethernet interface. <item>3Com 3C501 cards <item>3Com 3C503 Etherlink II <item>3Com 3c505 Etherlink/+ <item>3Com 3C507 Etherlink 16/TP <item>3Com 3C509, 3C579, 3C589 (PCMCIA) Etherlink III <item>Toshiba ethernet cards <item>PCMCIA ethernet cards from IBM and National Semiconductor are also supported. </itemize> <sect1><heading>Miscellaneous devices</heading> <p> <itemize> <item>AST 4 port serial card using shared IRQ. <item>ARNET 8 port serial card using shared IRQ. <item>BOCA IOAT66 6 port serial card using shared IRQ. <item>Cyclades Cyclom-y Serial Board. <item>STB 4 port card using shared IRQ. <item>Mitsumi (all models) CDROM interface and drive. <item>SDL Communications Riscom/8 Serial Board. <item>Soundblaster SCSI and ProAudio Spectrum SCSI CDROM interface and drive. <item>Matsushita/Panasonic (Creative SoundBlaster) CDROM interface and drive. <item>Adlib, SoundBlaster, SoundBlaster Pro, ProAudioSpectrum, Gravis UltraSound and Roland MPU-401 sound cards. </itemize> FreeBSD currently does NOT support IBM's microchannel (MCA) bus, but support is apparently close to materializing. Details will be posted as the situation develops. <sect><heading>Preparing for the installation</heading> <p>There are a number of different methods by which FreeBSD can be installed. The following describes what preparation needs to be done for each type. <sect1><heading>Before installing from CDROM</heading> <p>If your CDROM is of an unsupported type, such as an IDE CDROM, then please skip to section 2.3: MS-DOS Preparation. There is not a lot of preparatory work that needs to be done to successfully install from one of Walnut Creek's FreeBSD CDROMs (other CDROM distributions may work as well, but I can't say for sure as I have no hand or say in their creation). You can either boot into the CD installation directly from MS-DOS using Walnut Creek's supplied "install" batch file or you can make a boot floppy by writing the supplied image (floppies/boot.flp) onto a floppy with the "go" command, which invokes the rawrite.exe command found in the tools/ subdirectory. If you're creating the boot floppy from a UNIX machine, you may find that ``dd if=floppies/boot.flp of=/dev/rfd0'' or ``dd if=floppies/boot.flp of=/dev/floppy'' works well, depending on your hardware and operating system environment. Once you've booted from MS-DOS or floppy, you should be able to select CDROM as the media type in the Media menu and load the entire distribution from CDROM. No other types of installation media should be required. After your system is fully installed and you have rebooted from the hard disk, you should find the CD mounted on the directory /cdrom. A utility called `lndir' comes with the XFree86 distribution which you may also find useful: It allows you to create "link tree" directories to things on Read-Only media like CDROM. One example might be something like this: <tscreen>mkdir /usr/ports<newline>lndir /cdrom/ports /usr/ports</tscreen> Which would allow you to then "cd /usr/ports; make" and get all the sources from the CD, but yet create all the intermediate files in /usr/ports, which is presumably on a more writable media! <sect1><heading>Before installing from Floppy</heading> <p>If you must install from floppy disks, either due to unsupported hardware or just because you enjoy doing things the hard way, you must first prepare some floppies for the install. The first floppy you'll need is ``floppies/root.flp'', which is somewhat special in that it's not a MS-DOS filesystem floppy at all, but rather an "image" floppy (it's actually a gzip'd cpio file). You can use the rawrite.exe program to do this under DOS, or ``dd'' to do it on a UNIX Workstation (see notes in section 2.1 concerning the ``floppies/boot.flp'' image). Once this floppy is made, put it aside. You'll be asked for it later. You will also need, at minimum, as many 1.44MB or 1.2MB floppies as it takes to hold all files in the bin (binary distribution) directory. THESE floppies *must* be formatted using MS-DOS, using with the FORMAT command in MS-DOS or the File Manager format command in Microsoft Windows(tm). Factory preformatted floppies will also work well, provided that they haven't been previously used for something else. Many problems reported by our users in the past have resulted from the use of improperly formatted media, so we simply take special care to mention it here! After you've MS-DOS formatted the floppies, you'll need to copy the files onto them. The distribution files are split into chunks conveniently sized so that 5 of them will fit on a conventional 1.44MB floppy. Go through all your floppies, packing as many files as will fit on each one, until you've got all the distributions you want packed up in this fashion. Select ``Floppy'' from the Media menu at installation time and you will be prompted for everything after that. <sect1><heading>Before installing from a MS-DOS partition</heading> <p>To prepare for installation from an MS-DOS partition, copy the files from the distribution into a directory called <tt>C:\FREEBSD</tt>. The directory tree structure of the CDROM must be partially reproduced within this directory so we suggest using the DOS <tt>xcopy</tt> command. For example, to prepare for a minimal installation of FreeBSD: <tscreen><verb> C> MD C:\FREEBSD C> XCOPY /S E:\FLOPPIES C:\FREEBSD\FLOPPIES\ C> XCOPY /S E:\DISTS\BIN C:\FREEBSD\BIN\ </verb></tscreen> - asssuming that <tt>C:</tt> is where you have free space + assuming that <tt>C:</tt> is where you have free space and <tt>E:</tt> is where your CDROM is mounted. Note that you need the <tt>FLOPPIES</tt> directory because the <tt>root.flp</tt> image is needed during an MS-DOS installation. For as many `DISTS' you wish to install from MS-DOS (and you have free space for), install each one under <tt>C:\FREEBSD</tt> - the <tt>BIN</tt> dist is only the minimal requirement. If you have room on your MS-DOS partition for all the distributions, you could replace the last line above with: <tscreen><verb> C> XCOPY /S E:\DISTS C:\FREEBSD\ </verb></tscreen> which would copy all the subdirectories of <tt>E:\DISTS</tt> to <tt>C:\FREEBSD</tt>. <sect1><heading>Before installing from QIC/SCSI Tape</heading> <p>Installing from tape is probably the easiest method, short of an on-line install using FTP or a CDROM - instal. The installation program expects the files to + install. The installation program expects the files to be simply tar'ed onto the tape, so after getting all of the files for distribution you're interested in, simply tar them onto the tape with a command like: <tscreen> cd /freebsd/distdir<newline> tar cvf /dev/rwt0 (or /dev/rst0) dist1 .. dist2 </tscreen> Make sure that the `floppies/' directory is one of the "dists" given above, since the installation will look for `floppies/root.flp' on the tape. When you go to do the installation, you should also make sure that you leave enough room in some temporary directory (which you'll be allowed to choose) to accommodate the FULL contents of the tape you've created. Due to the non-random access nature of tapes, this method of installation requires quite a bit of temporary storage! You should expect to require as much temporary storage as you have stuff written on tape. <sect1><heading>Before installing over a network</heading> <p>You can do network installations over 3 types of communications links: <descrip> <tag>Serial port</tag> SLIP or PPP <tag>Parallel port</tag> PLIP (laplink cable) <tag>Ethernet</tag> A standard ethernet controller (includes some PCMCIA). </descrip> SLIP support is rather primitive, and limited primarily to hard-wired links, such as a serial cable running between a laptop computer and another computer. The link should be hard-wired as the SLIP installation doesn't currently offer a dialing capability; that facility is provided with the PPP utility, which should be used in preference to SLIP whenever possible. If you're using a modem, then PPP is almost certainly your only choice. Make sure that you have your service provider's information handy as you'll need to know it fairly soon in the installation process. You will need to know, at the minimum, your service provider's IP address and possibly your own (though you can also leave it blank and allow PPP to negotiate it with your ISP). You also need to know how to use the various "AT commands" to dial the ISP with your particular modem as the PPP dialer provides only a very simple terminal emulator. If a hard-wired connection to another FreeBSD (2.0R or later) machine is available, you might also consider installing over a "laplink" parallel port cable. The data rate over the parallel port is much higher than is what's typically possible over a serial line (up to 50k/sec), thus resulting in a quicker installation. Finally, for the fastest possible network installation, an ethernet adaptor is always a good choice! FreeBSD supports most common PC ethernet cards, a table of supported cards (and their required settings) provided as part of the FreeBSD Hardware Guide - see the Documentation menu on the boot floppy. If you are using one of the supported PCMCIA ethernet cards, also be sure that it's plugged in _before_ the laptop is powered on! FreeBSD does not, unfortunately, currently support "hot insertion" of PCMCIA cards. You will also need to know your IP address on the network, the "netmask" value for your address class and the name of your machine. Your system administrator can tell you which values to use for your particular network setup. If you will be referring to other hosts by name rather than IP address, you'll also need a name server and possibly the address of a gateway (if you're using PPP, it's your provider's IP address) to use in talking to it. If you do not know the answers to all or most of these questions, then you should really probably talk to your system administrator _first_ before trying this type of installation! Once you have a network link of some sort working, the installation can continue over NFS or FTP. <sect2><heading>Preparing for NFS installation</heading> <p>NFS installation is fairly straight-forward: Simply copy the FreeBSD distribution files you're interested onto a server somewhere and then point the NFS media selection at it. If this server supports only "privileged port" access (as is generally the default for Sun workstations), you will need to set this option in the Options menu before installation can proceed. If you have a poor quality ethernet card which suffers from very slow transfer rates, you may also wish to toggle the appropriate Options flag. In order for NFS installation to work, the server must support "subdir mounts", e.g. if your FreeBSD 2.0.5 distribution directory lives on: ziggy:/usr/archive/stuff/FreeBSD Then ziggy will have to allow the direct mounting of /usr/archive/stuff/FreeBSD, not just /usr or /usr/archive/stuff. In FreeBSD's /etc/exports file, this is controlled by the ``-alldirs'' option. Other NFS servers may have different conventions. If you are getting `Permission Denied' messages from the server then it's likely that you don't have this enabled properly! <sect2><heading>Preparing for FTP Installation</heading> <p>FTP installation may be done from any mirror site containing a reasonably up-to-date version of FreeBSD 2.0.5, a full menu of reasonable choices from almost anywhere in the world being provided by the FTP site menu. If you are installing from some other FTP site not listed in this menu, or you are having troubles getting your name server configured properly, you can also specify your own URL by selecting the ``Other'' choice in that menu. A URL can also be a direct IP address, so the following would work in the absence of a name server: <tscreen> ftp://192.216.222.4/pub/FreeBSD/2.0.5-RELEASE</tscreen> <em><bf>NOTE:</bf> Substitute "ALPHA" for "RELEASE" during the ALPHA test period!</em> If you are installing through a firewall then you should probably select ``Passive mode'' ftp, which is the default. If you are talking to a server which does not support passive mode for some reason, see the Options menu to select Active mode transfers. <sect><heading>Installing FreeBSD</heading> <p>Once you've taken note of the appropriate preinstallation steps, you should be able to install FreeBSD without any further trouble. Should this not be true, then you may wish to go back and re-read the relevant preparation section (section 2.x) for the installation media type you're trying to use - perhaps there's a helpful hint there that you missed the first time? If you're having hardware trouble, or FreeBSD refuses to boot at all, read the Hardware Guide provided on the boot floppy for a list of possible solutions. The FreeBSD boot floppy contains all the on-line documentation you should need to be able to navigate through an installation and if it doesn't then I'd like to know what you found most confusing! It is the objective of the FreeBSD installation program (sysinstall) to be self-documenting enough that painful "step-by-step" guides are no longer necessary. It may take us a little while to reach that objective, but that's the objective! Meanwhile, you may also find the following "typical installation sequence" to be helpful: <enum> <item>Boot the boot floppy. After a boot sequence which can take anywhere from from 30 seconds to 3 minutes, depending on your hardware, you should be presented with a menu of initial choices. If the floppy doesn't boot at all, or the boot hangs at some stage, go read the Q&A section of the Hardware Guide for possible causes. <item>Press F1. You should see some basic usage instructions on the menu system and general navigation. If you haven't used this menu system before then PLEASE read this thoroughly! <item>If English is not your native language, you may wish to proceed directly to the Language option and set your preferred language. This will bring up some of the documentation in that language instead of - english. + English. <item>Select the Options item and set any special preferences you may have. <item>Select Proceed, bringing you to the Installation Menu. </enum> <sect1><heading>The installation menu</heading> <p>You can do anything you like in this menu without altering your system <em>except</em> for "Commit", which will perform any requests to alter your system you may have made. If you're confused at any point, the F1 key usually pulls up the right information for the screen you're in. <enum> <item>The first step is generally `Partition', which allows you to chose how your drives will be used for FreeBSD. <item>Next, with the `Label' editor, you can specify how the space in any allocated FreeBSD partitions should be used by FreeBSD, or where to mount a non-FreeBSD partition (such as DOS). <item>Next, the `Distributions' menu allows you to specify which parts of FreeBSD you wish to load. A good choice is "User" for a small system or "Developer" for someone wanting a bit more out of FreeBSD. If none of the existing collections sound applicable, select Custom. <item>Next, the `Media' menu allows you to specify what kind of media you wish to install from. If a desired media choice is found and configured automatically then this menu will simply return, otherwise you'll be asked for additional details on the media device type. <item>Finally, the Commit command will actually perform all the actions at once (nothing has been written to your disk so far, nor will it until you give the final confirmation). All new or changed partition information will be written out, file systems will be created and/or non-destructively labelled (depending on how you set their newfs flags in the Label editor) and all selected distributions will be extracted. - <item>The Configure menu choice allows you to furthur + <item>The Configure menu choice allows you to further configure your FreeBSD installation by giving you menu-driven access to various system defaults. Some items, like networking, may be especially important if you did a CDROM/Tape/Floppy installation and have not yet configured your network interfaces (assuming you have some). Properly configuring your network here will allow FreeBSD to come up on the network when you first reboot from the hard disk. <item>Exit returns you to the top menu. </enum> At this point, you're generally done with the sysinstall utility and can select the final `Quit'. If you're running it as an installer (e.g. before the system is all the way up) then the system will now reboot. If you selected the boot manager option, you will see a small boot menu with an `F?' prompt. Press the function key for BSD (it will be shown) and you should boot up into FreeBSD off the hard disk. If this fails to happen for some reason, see the Q&A section of the Hardware Guide for possible clues! diff --git a/handbook/kerberos.sgml b/handbook/kerberos.sgml index ce4e72c15b..32dad91242 100644 --- a/handbook/kerberos.sgml +++ b/handbook/kerberos.sgml @@ -1,480 +1,480 @@ -<!-- $Id: kerberos.sgml,v 1.4 1995-07-10 20:14:08 markm Exp $ --> +<!-- $Id: kerberos.sgml,v 1.5 1995-09-27 00:46:21 jmz Exp $ --> <!-- The FreeBSD Documentation Project --> <sect><heading>Kerberos<label id="kerberos"></heading> <p><em>Contributed by &a.mark; (based on contribution by &a.md;).</em> Kerberos is a network add-on system/protocol that allows users to authenticate themselves through the services of a secure server. Services such as remote login, remote copy, secure inter-system file copying and other high-risk tasks are made considerably safer and more controllable. The following instructions can be used as a guide on how to set up Kerberos as distributed for FreeBSD. However, you should refer to the relevant manual pages for a complete description. In FreeBSD, the Kerberos is not that from the original 4.4 BSD, distribution, but eBones, which had been previously ported to FreeBSD 1.1.5.1, and was sourced from outside the USA/Canada, and is thus available to system owners outside those countries. For those needing to get a legal foreign distribution of this software, please <em>DO NOT</em> get it from a USA or Canada site. You will get that site in <em>big</em> trouble! A legal copy of this is available from <tt>skeleton.mikom.csir.co.za</tt>, which is in South Africa. <sect1> <heading>Creating the initial database</heading> <p>This is done on the Kerberos server only. First make sure that your don't have any old Kerberos databases around. You should change to the directory <tt>/etc/kerberosIV</tt> and check that only the following files are present: <tscreen><verb> grunt# cd /etc/kerberosIV grunt# ls README krb.conf krb.realms </verb></tscreen> <p>If any additional files (such as <tt>principal.*</tt> or <tt>master_key</tt>) exist, then use the <tt>kdb_destroy</tt> command to destroy the old Kerberos database, of if Kerberos is not running, simply delete the extra files with <tt>rm</tt>. You should now edit the <tt>krb.conf</tt> and <tt>krb.realms</tt> files to define your Kerberos realm. In this case the realm will be <it>GRONDAR.ZA</it> and the server is <it>grunt.grondar.za</it>. We edit or create the <tt>krb.conf</tt> file: <tscreen><verb> grunt# cat krb.conf GRONDAR.ZA GRONDAR.ZA grunt.grondar.za admin server CS.BERKELEY.EDU okeeffe.berkeley.edu ATHENA.MIT.EDU kerberos.mit.edu ATHENA.MIT.EDU kerberos-1.mit.edu ATHENA.MIT.EDU kerberos-2.mit.edu ATHENA.MIT.EDU kerberos-3.mit.edu LCS.MIT.EDU kerberos.lcs.mit.edu TELECOM.MIT.EDU bitsy.mit.edu ARC.NASA.GOV trident.arc.nasa.gov </verb></tscreen> <p>In this case, the other realms do not need to be there. They are here as an example of how a machine may be made aware of multiple realms. You may wish to not include them for simplicity. The first line names the realm in which this system works. The other lines contain realm/host entries. The first item on a line is a realm, and the second is a host in that realm that is acting as a ``key distribution centre''. The words ``admin server'' following a hosts name means that host also provides an administrative database server. For further explanation of these terms, please consult the Kerberos man pages. Now we have to add <it>grunt.grondar.za</it> to the <it>GRONDAR.ZA</it> realm and also add an entry to put all hosts in the <it>.grondar.za</it> domain in the <it>GRONDAR.ZA</it> realm. The <tt>krb.realms</tt> file would be updated as follows: <tscreen><verb> grunt# cat krb.realms grunt.grondar.za GRONDAR.ZA .grondar.za GRONDAR.ZA .berkeley.edu CS.BERKELEY.EDU .MIT.EDU ATHENA.MIT.EDU .mit.edu ATHENA.MIT.EDU </verb></tscreen> <p>Again, the other realms do not need to be there. They are here as an example of how a machine may be made aware of multiple realms. You may wish to remove them to simplify things. The first line puts the <it>specific</it> system into the named realm. The rest of the lines show how to default systems of a particular subdomain to a named realm. Now we're ready to create the database. This only needs to run on the Kerberos server (or Key Distribution Centre). Issue the <tt>kdb_init</tt> command to do this: <tscreen><verb> grunt# kdb_init Realm name [default ATHENA.MIT.EDU ]: GRONDAR.ZA You will be prompted for the database Master Password. It is important that you NOT FORGET this password. Enter Kerberos master key: </verb></tscreen> <p>Now we have to save the key so that servers on the local machine can pick it up. Use the <tt>kstash</tt> command to do this. <tscreen><verb> grunt# kstash Enter Kerberos master key: Current Kerberos master key version is 1. Master key entered. BEWARE! </verb></tscreen> <p>This saves the encrypted master password in <tt>/etc/kerberosIV/master_key</tt>. <sect1> <heading>Making it all run</heading> <p>Two principals need to be added to the database for <it>each</it> system that will be secured with Kerberos. Their names are <tt>kpasswd</tt> and <tt>rcmd</tt> These two principals are made for each system, with the instance being the name of the individual system. These daemons, <tt>kpasswd</tt> and <tt>rcmd</tt> allow other systems to change Kerberos passwords and run commands like <tt>rcp</tt>, <tt>rlogin</tt> and <tt>rsh</tt>. Now lets add these entries: <tscreen><verb> grunt# kdb_edit Opening database... Enter Kerberos master key: Current Kerberos master key version is 1. Master key entered. BEWARE! Previous or default values are in [brackets] , enter return to leave the same, or new value. Principal name: passwd Instance: grunt <Not found>, Create [y] ? y Principal: passwd, Instance: grunt, kdc_key_ver: 1 New Password: <---- enter RANDOM here Verifying password New Password: <---- enter RANDOM here Random password [y] ? y Principal's new key version = 1 Expiration date (enter yyyy-mm-dd) [ 2000-01-01 ] ? Max ticket lifetime (*5 minutes) [ 255 ] ? Attributes [ 0 ] ? Edit O.K. Principal name: rcmd Instance: grunt <Not found>, Create [y] ? Principal: rcmd, Instance: grunt, kdc_key_ver: 1 New Password: <---- enter RANDOM here Verifying password New Password: <---- enter RANDOM here Random password [y] ? Principal's new key version = 1 Expiration date (enter yyyy-mm-dd) [ 2000-01-01 ] ? Max ticket lifetime (*5 minutes) [ 255 ] ? Attributes [ 0 ] ? Edit O.K. Principal name: <---- null entry here will cause an exit </verb></tscreen> <sect1> <heading>Creating the server file</heading> <p>We now have to extract all the instances which define the services on each machine. For this we use the <tt>ext_srvtab</tt> command. This will create a file which must be copied or moved <it>by secure means</it> to each Kerberos client's /etc/kerberosIV directory. This file must be present on each server and client, and is crucial to the operation of Kerberos. <tscreen><verb> grunt# ext_srvtab grunt Enter Kerberos master key: Current Kerberos master key version is 1. Master key entered. BEWARE! Generating 'grunt-new-srvtab'.... </verb></tscreen> <p>Now, this command only generates a temporary file which must be renamed to <tt>srvtab</tt> so that all the server can pick it up. Use the <tt>mv</tt> command to move it into place on the original system: <tscreen><verb> grunt# mv grunt-new-srvtab srvtab </verb></tscreen> <p>If the file is for a client system, and the network is not deemed safe, then copy the <tt><client>-new-srvtab</tt> to - removeable media and transport it by secure physical means. Be + removable media and transport it by secure physical means. Be sure to rename it to <tt>srvtab</tt> in the client's <tt>/etc/kerberosIV</tt> directory, and make sure it is mode 600: <tscreen><verb> grumble# mv grumble-new-srvtab srvtab grumble# chmod 600 srvtab </verb></tscreen> <sect1> <heading>Populating the database</heading> <p>We now have to add some user entries into the database. First lets create an entry for the user <it>jane</it>. Use the <tt>kdb_edit</tt> command to do this: <tscreen><verb> grunt# kdb_edit Opening database... Enter Kerberos master key: Current Kerberos master key version is 1. Master key entered. BEWARE! Previous or default values are in [brackets] , enter return to leave the same, or new value. Principal name: jane Instance: <Not found>, Create [y] ? y Principal: jane, Instance: , kdc_key_ver: 1 New Password: <---- enter a secure password here Verifying password New Password: <---- re-enter the password here Principal's new key version = 1 Expiration date (enter yyyy-mm-dd) [ 2000-01-01 ] ? Max ticket lifetime (*5 minutes) [ 255 ] ? Attributes [ 0 ] ? Edit O.K. Principal name: <---- null entry here will cause an exit </verb></tscreen> <sect1> <heading>Testing it all out</heading> <p>First we have to start the Kerberos daemons. NOTE that if you have correctly edited your <tt>/etc/sysconfig</tt> then this will happen automatically when you reboot. This is only necessary on the Kerberos server. Kerberos clients will automagically get what they need from the <tt>/etc/kerberosIV</tt> directory. <tscreen><verb> grunt# kerberos & grunt# Kerberos server starting Sleep forever on error Log file is /var/log/kerberos.log Current Kerberos master key version is 1. Master key entered. BEWARE! Current Kerberos master key version is 1 Local realm: GRONDAR.ZA grunt# kadmind -n & grunt# KADM Server KADM0.0A initializing Please do not use 'kill -9' to kill this job, use a regular kill instead Current Kerberos master key version is 1. Master key entered. BEWARE! </verb></tscreen> <p>Now we can try using the <tt>kinit</tt> command to get a ticket for the id <it>jane</it> that we created above: <tscreen><verb> grunt$ kinit jane MIT Project Athena (grunt.grondar.za) Kerberos Initialization for "jane" Password: </verb></tscreen> <p>Try listing the tokens using <tt>klist</tt> to see if we really have them: <tscreen><verb> grunt$ klist Ticket file: /tmp/tkt245 Principal: jane@GRONDAR.ZA Issued Expires Principal Apr 30 11:23:22 Apr 30 19:23:22 krbtgt.GRONDAR.ZA@GRONDAR.ZA </verb></tscreen> <p>Now try changing the password using <tt>passwd</tt> to check if the - kpasswd daemon can get authorisation to the Kerberos database: + kpasswd daemon can get authorization to the Kerberos database: <tscreen><verb> grunt$ passwd realm GRONDAR.ZA Old password for jane: New Password for jane: Verifying password New Password for jane: Password changed. </verb></tscreen> <sect1> <heading>Adding <tt>su</tt> privileges</heading> <p>Kerberos allows us to give <it>each</it> user who needs root privileges their own <it>separate</it> <tt>su</tt>password. We - could now add an id which is authorised to <tt>su</tt> to <it>root</it>. + could now add an id which is authorized to <tt>su</tt> to <it>root</it>. This is controlled by having an instance of <it>root</it> associated with a principal. Using <tt>kdb_edit</tt> we can create the entry <it>jane.root</it> in the Kerberos database: <tscreen><verb> grunt# kdb_edit Opening database... Enter Kerberos master key: Current Kerberos master key version is 1. Master key entered. BEWARE! Previous or default values are in [brackets] , enter return to leave the same, or new value. Principal name: jane Instance: root <Not found>, Create [y] ? y Principal: jane, Instance: root, kdc_key_ver: 1 New Password: <---- enter a SECURE password here Verifying password New Password: <---- re-enter the password here Principal's new key version = 1 Expiration date (enter yyyy-mm-dd) [ 2000-01-01 ] ? Max ticket lifetime (*5 minutes) [ 255 ] ? 12 <--- Keep this short! Attributes [ 0 ] ? Edit O.K. Principal name: <---- null entry here will cause an exit </verb></tscreen> <p>Now try getting tokens for it to make sure it works: <tscreen><verb> grunt# kinit jane.root MIT Project Athena (grunt.grondar.za) Kerberos Initialization for "jane.root" Password: </verb></tscreen> <p>Now we need to add the user to root's <tt>.klogin</tt> file: <tscreen><verb> grunt# cat /root/.klogin jane.root@GRONDAR.ZA </verb></tscreen> <p>Now try doing the <tt>su</tt>: <tscreen><verb> [jane@grunt 10407] su Password: grunt# </verb></tscreen> and take a look at what tokens we have: <tscreen><verb> grunt# klist Ticket file: /tmp/tkt_root_245 Principal: jane.root@GRONDAR.ZA Issued Expires Principal May 2 20:43:12 May 3 04:43:12 krbtgt.GRONDAR.ZA@GRONDAR.ZA </verb></tscreen> <sect1> <heading>Using other commands</heading> <p>In an earlier example, we created a principal called <tt>jane</tt> with an instance <tt>root</tt>. This was based on a user with the same name as the principal, and this is a Kerberos default; that a <em><principal>.<instance></em> of the form <em><username>.</em><tt>root</tt> will allow that <em><username></em> to <tt>su</tt> to root if the necessary entries are in the <tt>.klogin</tt> file in <tt>root</tt>'s home directory: <tscreen><verb> grunt# cat /root/.klogin jane.root@GRONDAR.ZA </verb></tscreen> <p>Likewise, if a user has in their own home directory lines of the form: <tscreen><verb> [jane@grunt 10543] cat ~/.klogin jane@GRONDAR.ZA jack@GRONDAR.ZA </verb></tscreen> <p>This allows anyone in the <em>GRONDAR.ZA</em> realm who has authenticated themselves to <em>jane</em> or <em>jack</em> (via <tt>kinit</tt>, see above) access to <tt>rlogin</tt> to <em>jane</em>'s account or files on this system (<em>grunt</em>) via <tt>rlogin</tt>, <tt>rsh</tt> or <tt>rcp</tt>. For example, Jane now logs into another system, using Kerberos: <tscreen><verb> [jane@grumble 573] kinit MIT Project Athena (grunt.grondar.za) Password: [jane@grumble 574] rlogin grunt Last login: Mon May 1 21:14:47 from grumble Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD BUILT-19950429 (GR386) #0: Sat Apr 29 17:50:09 SAT 1995 [jane@grunt 10567] </verb></tscreen> <p>Or Jack logs into Jane's account on the same machine (Jane having set up the <tt>.klogin</tt> file as above, and the person in charge of Kerberos having set up principal <em>jack</em> with a null instance: <tscreen><verb> [jack@grumble 573] kinit [jack@grumble 574] rlogin grunt -l jane MIT Project Athena (grunt.grondar.za) Password: Last login: Mon May 1 21:16:55 from grumble Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD BUILT-19950429 (GR386) #0: Sat Apr 29 17:50:09 SAT 1995 [jane@grunt 10578] </verb></tscreen> diff --git a/handbook/kerneldebug.sgml b/handbook/kerneldebug.sgml index 7208d09df9..d3ad199dc0 100644 --- a/handbook/kerneldebug.sgml +++ b/handbook/kerneldebug.sgml @@ -1,425 +1,425 @@ -<!-- $Id: kerneldebug.sgml,v 1.3 1995-07-31 01:18:46 jfieber Exp $ --> +<!-- $Id: kerneldebug.sgml,v 1.4 1995-09-27 00:46:22 jmz Exp $ --> <!-- The FreeBSD Documentation Project --> <chapt><heading>Kernel Debugging<label id="kerneldebug"></heading> <p><em>Contributed by &a.paul; and &a.joerg;</em> <sect><heading>Debugging a kernel crash dump with kgdb</heading> <p>Here are some instructions for getting kernel debugging working on a crash dump, it assumes that you have enough swap space for a crash dump. If you have multiple swap partitions and the first one is too small to hold the dump, you can configure your kernel to use an alternate dump device (in the <tt>config kernel</tt> line), or you can specify an alternate using the dumpon(8) command. Dumps to non-swap devices, tapes for example, are currently not supported. Config your kernel using <tt>config -g</tt>. See <ref id="kernelconfig" name="Kernel Configuration"> for details on configuring the FreeBSD kernel. Use the <tt>dumpon(8)</tt> command to tell the kernel where to dump to (note that this will have to be done after configuring the partition in question as swap space via <tt>swapon(8)</tt>). This is normally arranged via <tt>/etc/sysconfig</tt> and <tt>/etc/rc</tt>. Alternatively, you can hard-code the dump device via the `dump' clause in the `config' line of your kernel config file. This is deprecated, but might be the only chance to get a crash dump from a kernel that's not booting at all, so that you didn't had the ability to run any command before it used to crash. <em><bf>Note:</bf> In the following, the term `<tt>kgdb</tt>' refers to <tt>gdb</tt> run in `kernel debug mode'. This can be accomplished by either starting the <tt>gdb</tt> with the option <tt>-k</tt>, or by linking and starting it under the name <tt>kgdb</tt>. This is not being done by default, however.</em> When the kernel has been built make a copy of it, say <tt>kernel.debug</tt>, and then run <tt>strip -x</tt> on the original. Install the original as normal. You may also install the unstripped kernel, but symbol table lookup time for some programs will drastically increase, and since the whole kernel is loaded entirely at boot time and cannot be swapped out later, several megabytes of - physical RAM willl be wasted. + physical RAM will be wasted. If you are testing a new kernel, for example by typing the new kernel's name at the boot prompt, but need to boot a different one in order to get your system up and running again, boot it only into single user state using the <tt>-s</tt> flag at the boot prompt, and then perform the following steps: <tscreen><verb> fsck -p mount -a -t ufs # so your file system for /var/crash is writable savecore -N /kernel.panicked /var/crash exit # ...to multi-user </verb></tscreen> This instructs <tt>savecore(8)</tt> to use another kernel for symbol name extraction. It would otherwise default to the currently running kernel. Now, after a crash dump, go to <tt>/sys/compile/WHATEVER</tt> and run <tt>kgdb</tt>. From <tt>kgdb</tt> do: <tscreen><verb> symbol-file kernel.debug exec-file /var/crash/system.0 core-file /var/crash/ram.0 </verb></tscreen> and voila, you can debug the crash dump using the kernel sources just like you can for any other program. If your kernel panicked due to a trap, perhaps the most common case for getting a core dump, the following trick might help you. Examine the stack using <tt>kgdb</tt>'s `where' command, and look for the stack frame in the function <tt>trap()</tt>. Go `up' to that frame, and then type: <tscreen><verb> frame frame->tf_ebp frame->tf_eip </verb></tscreen> This will tell <tt>kgdb</tt> to go to the stack frame explicitly named by a frame pointer and instruction pointer, which is the location where the trap occured. There are still some bugs in <tt>kgdb</tt> (you can go `up' from there, but not `down'; the stack trace will still remain as it was before going to here), but generally this method will lead you much closer to the failing piece of code. Here's a script log of a <tt>kgdb</tt> session illustrating the above. Long lines have been folded to improve readability, and the lines are numbered for reference. Despite of this, it's a real-world error trace taken during the development of the pcvt console driver. <tscreen><verb> 1:Script started on Fri Dec 30 23:15:22 1994 2:uriah # cd /sys/compile/URIAH 3:uriah # kgdb kernel /var/crash/vmcore.1 4:Reading symbol data from /usr/src/sys/compile/URIAH/kernel...done. 5:IdlePTD 1f3000 6:panic: because you said to! 7:current pcb at 1e3f70 8:Reading in symbols for ../../i386/i386/machdep.c...done. 9:(kgdb) where 10:#0 boot (arghowto=256) (../../i386/i386/machdep.c line 767) 11:#1 0xf0115159 in panic () 12:#2 0xf01955bd in diediedie () (../../i386/i386/machdep.c line 698) 13:#3 0xf010185e in db_fncall () 14:#4 0xf0101586 in db_command (-266509132, -266509516, -267381073) 15:#5 0xf0101711 in db_command_loop () 16:#6 0xf01040a0 in db_trap () 17:#7 0xf0192976 in kdb_trap (12, 0, -272630436, -266743723) 18:#8 0xf019d2eb in trap_fatal (...) 19:#9 0xf019ce60 in trap_pfault (...) 20:#10 0xf019cb2f in trap (...) 21:#11 0xf01932a1 in exception:calltrap () 22:#12 0xf0191503 in cnopen (...) 23:#13 0xf0132c34 in spec_open () 24:#14 0xf012d014 in vn_open () 25:#15 0xf012a183 in open () 26:#16 0xf019d4eb in syscall (...) 27:(kgdb) up 10 28:Reading in symbols for ../../i386/i386/trap.c...done. 29:#10 0xf019cb2f in trap (frame={tf_es = -260440048, tf_ds = 16, tf_\ 30:edi = 3072, tf_esi = -266445372, tf_ebp = -272630356, tf_isp = -27\ 31:2630396, tf_ebx = -266427884, tf_edx = 12, tf_ecx = -266427884, tf\ 32:_eax = 64772224, tf_trapno = 12, tf_err = -272695296, tf_eip = -26\ 33:6672343, tf_cs = -266469368, tf_eflags = 66066, tf_esp = 3072, tf_\ 34:ss = -266427884}) (../../i386/i386/trap.c line 283) 35:283 (void) trap_pfault(&frame, FALSE); 36:(kgdb) frame frame->tf_ebp frame->tf_eip 37:Reading in symbols for ../../i386/isa/pcvt/pcvt_drv.c...done. 38:#0 0xf01ae729 in pcopen (dev=3072, flag=3, mode=8192, p=(struct p\ 39:roc *) 0xf07c0c00) (../../i386/isa/pcvt/pcvt_drv.c line 403) 40:403 return ((*linesw[tp->t_line].l_open)(dev, tp)); 41:(kgdb) list 42:398 43:399 tp->t_state |= TS_CARR_ON; 44:400 tp->t_cflag |= CLOCAL; /* cannot be a modem (:-) */ 45:401 46:402 #if PCVT_NETBSD || (PCVT_FREEBSD >= 200) 47:403 return ((*linesw[tp->t_line].l_open)(dev, tp)); 48:404 #else 49:405 return ((*linesw[tp->t_line].l_open)(dev, tp, flag)); 50:406 #endif /* PCVT_NETBSD || (PCVT_FREEBSD >= 200) */ 51:407 } 52:(kgdb) print tp 53:Reading in symbols for ../../i386/i386/cons.c...done. 54:$1 = (struct tty *) 0x1bae 55:(kgdb) print tp->t_line 56:$2 = 1767990816 57:(kgdb) up 58:#1 0xf0191503 in cnopen (dev=0x00000000, flag=3, mode=8192, p=(st\ 59:ruct proc *) 0xf07c0c00) (../../i386/i386/cons.c line 126) 60: return ((*cdevsw[major(dev)].d_open)(dev, flag, mode, p)); 61:(kgdb) up 62:#2 0xf0132c34 in spec_open () 63:(kgdb) up 64:#3 0xf012d014 in vn_open () 65:(kgdb) up 66:#4 0xf012a183 in open () 67:(kgdb) up 68:#5 0xf019d4eb in syscall (frame={tf_es = 39, tf_ds = 39, tf_edi =\ 69: 2158592, tf_esi = 0, tf_ebp = -272638436, tf_isp = -272629788, tf\ 70:_ebx = 7086, tf_edx = 1, tf_ecx = 0, tf_eax = 5, tf_trapno = 582, \ 71:tf_err = 582, tf_eip = 75749, tf_cs = 31, tf_eflags = 582, tf_esp \ 72:= -272638456, tf_ss = 39}) (../../i386/i386/trap.c line 673) 73:673 error = (*callp->sy_call)(p, args, rval); 74:(kgdb) up 75:Initial frame selected; you cannot go up. 76:(kgdb) quit 77:uriah # exit 78:exit 79: 80:Script done on Fri Dec 30 23:18:04 1994 </verb></tscreen> Comments to the above script: <descrip> <tag/line 6:/ This is a dump taken from within DDB (see below), hence the panic comment ``because you said to!'', and a rather long stack trace; the initial reason for going into DDB has been a page fault trap though. <tag/line 20:/ This is the location of function <tt>trap()</tt> in the stack trace. <tag/line 36:/ Force usage of a new stack frame, kgdb responds and displays the source line where the trap happened; from looking at the code, there's a high probability that either the pointer access for ``tp'' was messed up, or the array access was out of bounds. <tag/line 52:/ The pointer looks suspicious, but happens to be a valid address. <tag/line 56:/ However, it obviously points to garbage, so we have found our error! (For those unfamiliar with that particular piece of code: <tt>tp->t_line</tt> refers to the line discipline of the console device here, which must be a rather small integer number.) </descrip> <sect><heading>Post-mortem analysis of a dump</heading> <p>What do you do if a kernel dumped core but you did not expect it, and it's therefore not compiled using <tt>config -g</tt>? Not everything is lost here. Don't panic! Of course, you still need to enable crash dumps. See above on the options you've got to do this. (This is for safety reasons in the default kernels, to avoid them trying to dump e.g. during system installation where there's no FreeBSD partition at all and valuable data on the disk could be destroyed.) Go to your kernel compile directory, and edit the line containing <tt>COPTFLAGS?=-O</tt>. Add the <tt>-g</tt> option there (but <em>don't</em> change anything on the level of optimization). If you do already know roughly the probable location of the failing piece of code (e.g., the <tt>pcvt</tt> driver in the example above), remove all the object files for this code. Rebuild the kernel. Due to the time stamp change on the Makefile, there will be some other object files rebuild, for example <tt>trap.o</tt>. With a bit of luck, the added <tt>-g</tt> option won't change anything for the generated - code, so you'll finally get a new kernel with similiar code to + code, so you'll finally get a new kernel with similar code to the faulting one but some debugging symbols. You should at least verify the old and new sizes with the <tt>size(1)</tt> command. If there is a mismatch, you probably need to give up here. Go and examine the dump as described above. The debugging symbols might be incomplete for some places, as can be seen in the stack trace in the example above where some functions are displayed without line numbers and argument lists. If you need more debugging symbols, remove the appropriate object files and repeat the <tt>kgdb</tt> session until you know enough. All this is not guaranteed to work, but it will do it fine in most cases. <sect><heading>On-line kernel debugging using DDB</heading> <p>While <tt>kgdb</tt> as an offline debugger provides a very high level of user interface, there are some things it cannot do. The most important ones being breakpointing and single-stepping kernel code. If you need to do low-level debugging on your kernel, there's an on- line debugger available called DDB. It allows to setting breakpoints, single-steping kernel functions, examining - and changeing kernel variables, etc. However, it cannot not + and changing kernel variables, etc. However, it cannot not access kernel source files, and only has access to the global and static symbols, not to the full debug information like <tt>kgdb</tt>. To configure your kernel to include DDB, add the option line <tscreen><verb> options DDB </verb></tscreen> to your config file, and rebuild. (See <ref id="kernelconfig" name="Kernel Configuration"> for details on configuring the FreeBSD kernel. Note that if you have an older version of the boot blocks, your debugger symbols might not be loaded at all. Update the boot blocks, the recent ones do load the DDB symbols automagically.) Once your DDB kernel is running, there are several ways to enter DDB. The first, and earliest way is to type the boot flag <tt>-d</tt> right at the boot prompt. The kernel will start up in debug mode and enter DDB prior to any device probing. Hence you are able to even debug the device probe/attach functions. The second scenario is a hot-key on the keyboard, usually Ctrl-Alt-ESC. For syscons, this can be remapped, and some of the distributed maps do this, so watch out. There's an option available for a COMCONSOLE kernel (``options BREAK_TO_DEBUGGER'') that allows the use of a serial line BREAK on the console line to enter DDB. The third way is that any panic condition will branch to DDB if the kernel is configured to use it. It is not wise to configure a kernel with DDB for a machine running unattended for this reason. The DDB commands roughly resemble some <tt>gdb</tt> commands. The first you probably need is to set a breakpoint: <tscreen><verb> b function-name b address </verb></tscreen> Numbers are taken hexadecimal by default, but to make them distinct from symbol names, hexadecimal numbers starting with the letters <tt>a</tt>-<tt>f</tt> need to be preceded with <tt>0x</tt> (for other numbers, this is optional). Simple expressions are allowed, for example: <tt>function-name + 0x103</tt>. To continue the operation of an interrupted kernel, simply type <tscreen><verb> c </verb></tscreen> To get a stack trace, use <tscreen><verb> trace </verb></tscreen> Note that when entering DDB via a hot-key, the kernel is currently servicing an interrupt, so the stack trace might be not of much use for you. If you want to remove a breakpoint, use <tscreen><verb> del del address-expression </verb></tscreen> The first form will be accepted immediately after a breakpoint hit, and deletes the current breakpoint. The second form can remove any breakpoint, but you need to specify the exact address, as it can be obtained from <tscreen><verb> show b </verb></tscreen> To single-step the kernel, try <tscreen><verb> s </verb></tscreen> This will step into functions, but you can make DDB trace them until the matching return statement is reached by <tscreen><verb> n </verb></tscreen> Note: this is different from <tt>gdb</tt>'s `next' statement, it's like <tt>gdb</tt>'s `finish'. To examine data from memory, use (for example): <tscreen><verb> x/wx 0xf0133fe0,40 x/hd db_symtab_space x/bc termbuf,10 x/s stringbuf </verb></tscreen> for word/halfword/byte access, and hexadecimal/decimal/character/ string display. The number after the comma is the object count. To display the next 0x10 items, simply use <tscreen><verb> x ,10 </verb></tscreen> Similiarly, use <tscreen><verb> x/ia foofunc,10 </verb></tscreen> to disassemble the first 0x10 instructions of <tt>foofunc</tt>, and display them along with their offset from the beginning of <tt>foofunc</tt>. To modify the memory, use the write command: <tscreen><verb> w/b termbuf 0xa 0xb 0 w/w 0xf0010030 0 0 </verb></tscreen> The command modifier (<tt>b</tt>/<tt>h</tt>/<tt>w</tt>) - specifies the size of the data to be writtten, the first + specifies the size of the data to be written, the first following expression is the address to write to, the remainder is interpreted as data to write to successive memory locations. If you need to know the current registers, use <tscreen><verb> show reg </verb></tscreen> Alternatively, you can display a single register value by e.g. <tscreen><verb> print $eax </verb></tscreen> and modify it by <tscreen><verb> set $eax new-value </verb></tscreen> Should you need to call some kernel functions from DDB, simply say <tscreen><verb> call func(arg1, arg2, ...) </verb></tscreen> The return value will be printed. For a <tt>ps(1)</tt> style summary of all running processes, use <tscreen><verb> ps </verb></tscreen> Now you have now examined why your kernel failed, and you wish to reboot. Remember that, depending on the severity of previous malfunctioning, not all parts of the kernel might still be working as expected. Perform one of the following actions to shut down and reboot your system: <tscreen><verb> call diediedie() </verb></tscreen> will cause your kernel to dump core and reboot, so you can later analyze the core on a higher level with kgdb. This command usually must be followed by another `<tt>continue</tt>' statement. There is now an alias for this: `<tt>panic</tt>'. <tscreen><verb> call boot(0) </verb></tscreen> might be a good way to cleanly shut down the running system, <tt>sync()</tt> all disks, and finally reboot. As long as the disk and file system interfaces of the kernel are not damaged, this might be a good way for an almost clean shutdown. <tscreen><verb> call cpu_reset() </verb></tscreen> is the final way out of disaster and almost the same as hitting the Big Red Button. <sect><heading>Debugging a console driver</heading> <p>Since you need a console driver to run DDB on, things are more complicated if the console driver itself is flakey. You might remember the <tt>options COMCONSOLE</tt> line, and hook up a standard terminal onto your first serial port. DDB works on any configured console driver, of course it also works on a <tt>COMCONSOLE</tt>. diff --git a/handbook/nfs.sgml b/handbook/nfs.sgml index 5f0e7f27ae..2a9b604233 100644 --- a/handbook/nfs.sgml +++ b/handbook/nfs.sgml @@ -1,79 +1,79 @@ -<!-- $Id: nfs.sgml,v 1.2 1995-06-30 17:37:43 jfieber Exp $ --> +<!-- $Id: nfs.sgml,v 1.3 1995-09-27 00:46:23 jmz Exp $ --> <!-- The FreeBSD Documentation Project --> <sect><heading>NFS<label id="nfs"></heading> <p><em>Contributed by &a.john;.</em> Certain Ethernet adapters for ISA PC systems have limitations which can lead to serious network problems, particularly with NFS. This difficulty is not specific to FreeBSD, but FreeBSD systems are affected by it. The problem nearly always occurs when (FreeBSD) PC systems are networked with high-performance workstations, such as those made by Silicon Graphics, Inc., and Sun Microsystems, Inc. The NFS mount will work fine, and some operations may succeed, but suddenly the server will seem to become unresponsive to the client, even though requests to and from other systems continue to be processed. This happens to the client system, whether the client is the FreeBSD system or the workstation. On many systems, there is no way to shut down the client gracefully once this problem has manifested itself. The only solution is often to reset the client, because the NFS situation cannot be resolved. Though the "correct" solution is to get a higher performance and capacity Ethernet adapter for the FreeBSD system, there is a simple workaround that will allow satisfactory operation. If the FreeBSD system is the SERVER, include the option "wsize=1024" on the mount from the client. If the FreeBSD system is the CLIENT, then mount the NFS file system with the option "rsize=1024". These options may be specified using the fourth field of the fstab entry on the client for automatic mounts, or by using the "-o" parameter of the mount command for manual mounts. In the following examples, "fastws" is the host (interface) name of a high-performance workstation, and "freebox" is the host (interface) name of a FreeBSD system with a lower-performance Ethernet adapter. Also, "/sharedfs" will be the exported NFS filesystem (see "man exports"), and "/project" will be the mount point on the client for the exported file system. In all cases, note that additional options, such as "hard" or -"soft" and "bg" may be desireable in your application. +"soft" and "bg" may be desirable in your application. Examples for the FreeBSD system ("freebox") as the client: in /etc/fstab on freebox: fastws:/sharedfs /project nfs rw,rsize=1024 0 0 as a manual mount command on freebox: mount -t nfs -o rsize=1024 fastws:/sharedfs /project Examples for the FreeBSD system as the server: in /etc/fstab on fastws: freebox:/sharedfs /project nfs rw,wsize=1024 0 0 as a manual mount command on fastws: mount -t nfs -o wsize=1024 freebox:/sharedfs /project Nearly any 16-bit Ethernet adapter will allow operation without the above restrictions on the read or write size. For anyone who cares, here is what happens when the failure occurs, which also explains why it is unrecoverable. NFS typically works with a "block" size of 8k (though it may do fragments of smaller sizes). Since the maximum Ethernet packet is around 1500 bytes, the NFS "block" gets split into multiple Ethernet packets, even though it is still a single unit to the upper-level code, and must be received, assembled, and ACKNOWLEDGED as a unit. The high-performance workstations can pump out the packets which comprise the NFS unit one right after the other, just as close together as the standard allows. On the smaller, lower capacity cards, the later packets overrun the earlier packets of the same unit before they can be transferred to the host and the unit as a whole cannot be reconstructed or acknowledged. As a result, the workstation will time out and try again, but it will try again with the entire 8K unit, and the process will be repeated, ad infinitum. By keeping the unit size below the Ethernet packet size limitation, we ensure that any complete Ethernet packet received can be acknowledged individually, avoiding the deadlock situation. Overruns may still occur when a high-performance workstations is slamming data out to a PC system, but with the better cards, such overruns are -not guarranteed on NFS "units". When an overrun occurs, the units affected +not guaranteed on NFS "units". When an overrun occurs, the units affected will be retransmitted, and there will be a fair chance that they will be received, assembled, and acknowledged. diff --git a/handbook/porting.sgml b/handbook/porting.sgml index 172874064d..dc860468fc 100644 --- a/handbook/porting.sgml +++ b/handbook/porting.sgml @@ -1,978 +1,978 @@ -<!-- $Id: porting.sgml,v 1.4 1995-08-19 15:38:25 jfieber Exp $ --> +<!-- $Id: porting.sgml,v 1.5 1995-09-27 00:46:24 jmz Exp $ --> <!-- The FreeBSD Documentation Project --> <sect><heading>Porting applications<label id="porting"></heading> <p><em>Contributed by &a.jkh;, &a.gpalmer; and &a.asami;.<newline>19 August 1995.</em> Here are the guidelines one should follow in creating a new port for FreeBSD 2.x . This documentation will change as this process is progressively refined, so watch this space for details. The <tt>${..}</tt> variable names you see in this document all refer to various user-overridable defaults used (and documented) by <tt>/usr/share/mk/bsd.port.mk</tt>. Please refer to that file for more details. <sect1> <heading>Before Starting the Port</heading> <p>Note: Only a fraction of the overridable variables are mentioned in this document. Most (if not all) are documented at the start of the <tt>bsd.port.mk</tt> file which can be found in <tt>/usr/share/mk</tt>. This file uses a non-standard tab - setting. <tt>Emacs</tt> should recognise the setting on + setting. <tt>Emacs</tt> should recognize the setting on loading the file. <tt>vi</tt> or <tt>ex</tt> can be set to using the correct value by typing `<tt>:set tabstop=4</tt>' once the file has been loaded. <p>You may come across code that needs modifications or conditional compilation based upon what version of UNIX it's running under. If you need to make such changes to the code for conditional compilation, make sure you make the changes as general as possible so that we can back-port code to FreeBSD 1.x systems and cross-port to other BSD systems such as 4.4BSD from CSRG, BSD/386, 386BSD and NetBSD. <p>The preferred way to tell 4.3BSD/Reno and newer versions of the BSD code apart is by using the `<tt>BSD</tt>' macro defined in <tt><sys/param.h></tt>. Hopefully that file is already included; if not, add the code: <tscreen><verb> #ifdef _HAVE_PARAM_H #include <sys/param.h> #endif </verb></tscreen> to the proper place in the <tt>.c</tt> file and add <tt>-D_HAVE_PARAM_H</tt> to the <tt>CFLAGS</tt> in the Makefile. Then, you may use: <tscreen><verb> #if (defined(BSD) && (BSD >= 199103)) </verb></tscreen> to detect if the code is being compiled on a 4.3 Net2 code base or newer (e.g. FreeBSD 1.x, 4.3/Reno, NetBSD 0.9, 386BSD, BSD/386 1.1 and below). Use: <tscreen><verb> #if (defined(BSD) && (BSD >= 199306)) </verb></tscreen> to detect if the code is being compiled on a 4.4 code base or newer (e.g. FreeBSD 2.x, 4.4, NetBSD 1.0, BSD/386 2.0 or above). <p>Use sparingly: <itemize> <item><tt>__FreeBSD__</tt> is defined in all versions of FreeBSD. Use it if the change you are making ONLY affects FreeBSD. Porting gotchas like the use of <tt>sys_errlist[]</tt> vs <tt>strerror()</tt> are Berkeleyisms, not FreeBSD changes. <item>In FreeBSD 2.x, <tt>__FreeBSD__</tt> is defined to be <tt>2</tt>. In earlier versions, it's <tt>1</tt>. <item>If you need to tell the difference between a FreeBSD 1.x system and a FreeBSD 2.x system, usually the right answer is to use the <tt>BSD</tt> macros described above. If there actually is a FreeBSD specific change (such as special shared library options when using `<tt>ld</tt>') then it's OK to use <tt>__FreeBSD__</tt> and `<tt>#if __FreeBSD_ > 1</tt>' to detect a FreeBSD 2.x system. </itemize> <p>In the dozens of ports that have been done, there have only been one or two cases where <tt>__FreeBSD__</tt> should have been used. Just because an earlier port screwed up and used it in the wrong place doesn't mean you should do so too. <sect1> <heading>Quick Porting</heading> <p>This section tells you how to do a quick port. In many cases, it is not enough, but we'll see. <p>First, get the original tarball and put it into <tt>${DISTDIR}</tt>, which defaults to <tt>/usr/ports/distfiles</tt>. <p>Note: The following assumes that the software compiled out-of-the-box, i.e., there was absolutely no change required for the port to work on your FreeBSD box. If you needed to change something, you'll have to refer to the next section too. <sect2> <heading>Writing the Makefile</heading> <p>The minimal <tt>Makefile</tt> would look something like this: <tscreen><verb> # New ports collection makefile for: oneko # Version required: 1.1b # Date created: 5 December 1994 # Whom: asami # -# $Id: porting.sgml,v 1.4 1995-08-19 15:38:25 jfieber Exp $ +# $Id: porting.sgml,v 1.5 1995-09-27 00:46:24 jmz Exp $ # DISTNAME= oneko-1.1b CATEGORIES+= games MASTER_SITES= ftp://ftp.cs.columbia.edu/archives/X11R5/contrib/ MAINTAINER= asami@FreeBSD.ORG USE_IMAKE= yes .include <bsd.port.mk> </verb></tscreen> <p>See if you can figure it out. Don't worry about the contents of the <tt>$Id$</tt> line, it will be filled in automatically by CVS when the port is imported to our main ports tree. <sect2> <heading>Writing the description files</heading> <p>There are three required description files that are required for any port, whether they actually package or not. They are <tt>COMMENT</tt>, <tt>DESCR</tt>, and <tt>PLIST</tt>, and reside in the <tt>pkg</tt> subdirectory. <sect3> <heading>COMMENT</heading> <p>This is the one-line description of the port. It is recommended to have the name of the package at the beginning, as in: <tscreen><verb> oneko-1.1b, a cat chasing a mouse all over the screen </verb></tscreen> <sect3> <heading>DESCR</heading> <p>This is a longer description of the port. One to a few paragraphs concisely explaining what the port does is sufficient. Note: This is <em>not</em> a manual nor an in-depth description on how to use or compile the port. In particular, please do not just copy the <tt>README</tt> file here, unless, of course, it's a concise description of the port. <p>It is recommended that you sign the name at the end of this file, and also state the version number, as in: <tscreen><verb> This is a port of oneko, in which a cat chases a poor mouse all over the screen. : (etc.) : This is version 1.1b. - Satoshi asami@cs.berkeley.edu </verb></tscreen> <sect3> <heading>PLIST</heading> <p>This file lists all the files installed by the port. It is also called the `packing list' because the package is generated by packing the files listed here. The pathnames are relative to the installation prefix (usually <tt>/usr/local</tt> or <tt>/usr/X11R6</tt>). <p>Here is a small example: <tscreen><verb> bin/oneko man/man1/oneko.1.gz lib/X11/app-defaults/Oneko lib/X11/oneko/cat1.xpm lib/X11/oneko/cat2.xpm lib/X11/oneko/mouse.xpm </verb></tscreen> <sect2> <heading>Creating the checksum file</heading> <p>Just type `<tt>make makesum</tt>'. The ports make rules will automatically generate the file <tt>files/md5</tt>. <sect2> <heading>Testing the port</heading> <p>You should make sure that the port rules do exactly what you want it to do, including packaging up the port. Try doing `<tt>make install</tt>', `<tt>make package</tt>' and then `<tt>pkg_delete -d <pkgname></tt>' and see if all the files are correctly deleted. Then do a `<tt>pkg_add <pkgname>.tgz</tt>' and see if everything re-appears and works correctly. <sect2> <heading>Submitting the port</heading> <p>Now that you're happy with your port, the only thing remaining is to put it in the main FreeBSD ports tree and make everybody else happy about it too. To accomplish this, pack the necessary files (everything described in this section -- in particular do <em>not</em> include the original source tarball or the `<tt>work</tt>' subdirectory) into a <tt>.tar.gz</tt> file, stick it in the directory <tscreen><verb> ftp://ftp.freebsd.org/pub/FreeBSD/incoming/ </verb></tscreen> and send mail to <tt>ports@freebsd.org</tt>. We will take a look, get back to you if necessary, and put it in the tree. Your name will also appear in the list of `Additional FreeBSD contributors' on the FreeBSD Handbook and other files. Isn't that great?!? <tt>:)</tt> <sect1> <heading>Slow Porting</heading> <p>Ok, so it wasn't that simple, and the port required some modifications to get it to work. In this section, we'll explain, step by step, how to modify it to get it to work with the ports paradigm. <sect2> <heading>How things work</heading> <p>First, this is the sequence of events which occurs when the user first types `<tt>make</tt>' in your port's directory, and you may find that having <tt>bsd.port.mk</tt> in another window while you read this really helps to understand it. <p>But don't worry if you don't really understand what <tt>bsd.port.mk</tt> is doing, not many people do... <tt>:></tt> <enum> <item>The fetch target is run. The fetch target is responsible for making sure that the tarball exists locally in <tt>${DISTDIR}</tt>. If fetch cannot find the required files in <tt>${DISTDIR}</tt> it will look up the ftp-URL <tt>${MASTER_SITES}</tt>, which is set in the Makefile. It will then attempt to fetch the named distribution file with <tt>${NCFTP}</tt>, assuming that the requesting site has direct access to the Internet. If that succeeds, it will save the file in <tt>${DISTDIR}</tt> for future use and proceed. <item>The extract target is run. It looks for your ports' distribution file in <tt>${DISTDIR}</tt> (typically a gzip'd tarball) and unpacks it into a temporary subdirectory specified by <tt>${WRKDIR}</tt> (defaults to <tt>work</tt>). <item>The patch target is run. First, any patches defined in <tt>${PATCHFILES}</tt> are applied. Second, if any patches are found in <tt>${PATCHDIR}</tt> (defaults to the <tt>patches</tt> subdirectory), they are applied at this time in alphabetical order. <item>The configure target is run. This can do any one of many different things. <enum> <item>If it exists, <tt>scripts/configure</tt> is run. <item>If <tt>${HAS_CONFIGURE}</tt> or <tt>${GNU_CONFIGURE}</tt> is set, <tt>${WRKSRC}/configure</tt> is run. <item>If <tt>${USE_IMAKE}</tt> is set, <tt>${XMKMF}</tt> (default: `<tt>xmkmf -a</tt>') is run. </enum> <item>The build target is run. This is responsible for descending into the ports' private working directory (<tt>${WRKSRC}</tt>) and building it. If <tt>${USE_GMAKE}</tt> is set, GNU <tt>make</tt> will be used, otherwise the system <tt>make</tt> will be used. </enum> <p>The above are the default actions. In addition, you can define targets `<tt>pre-<something></tt>' or `<tt>post-<something></tt>', or put scripts with those names, in the <tt>scripts</tt> subdirectory, and they will be run before or after the default actions are done. <p>For example, if you have a <tt>post-extract</tt> target defined in your Makefile, and a file <tt>pre-build</tt> in the <tt>scripts</tt> subdirectory, the <tt>post-extract</tt> target will be called after the regular extraction actions, and the <tt>pre-build</tt> script will be executed before the default build rules are done. It is recommended that you use Makefile targets if possible, because it will be easier for someone to figure out what kind of non-default action the port requires. <p>The default actions are done by the <tt>bsd.port.mk</tt> targets `<tt>do-<something></tt>'. For example, the commands to extract a port are in the target `<tt>do-extract</tt>'. If you are not happy with the default target, and you can't fix it by redefining the `<tt>do-<something></tt>' target in your Makefile. <p>Note that the `main' targets (e.g., <tt>extract</tt>, <tt>configure</tt>, etc.) do nothing more than make sure all the stages up to that one is completed and call the real targets or scripts, and they are not intended to be changed. If you want to fix the extraction, fix <tt>do-extract</tt>, but never ever touch <tt>extract</tt>! <p>Now that you understand what goes on when the user types `<tt>make</tt>', let's go through the recommended steps to create the perfect port. <sect2> <heading>Getting the original sources</heading> <p>Get the original sources (normally) as a compressed tarball (<tt><foo>.tar.gz</tt> or <tt><foo>.tar.Z</tt>) and copy it into <tt>${DISTDIR}</tt>. Always use <em>mainstream</em> sources when and where you can. <p>If you can't find a ftp site that is well-connected to the net, or can only find sites that have irritatingly non-standard formats, we can `house' it ourselves by putting it on <tscreen><verb> ftp://freefall.freebsd.org/pub/FreeBSD/LOCAL_PORTS/ </verb></tscreen> as the last resort. Send mail to <tt>ports@freebsd.org</tt> if you are not sure what to do. <p>If your port requires some additional `patches' that are available on the Internet, fetch them too and put them in <tt>${DISTDIR}</tt>. Don't worry if they come from site other than where you got the the main source tarball, we have a way to handle these situations (see the description of <tt>${PATCHFILES}</tt> below). <sect2> <heading>Modifying the port</heading> <p>Unpack a copy of the tarball in a private directory and make whatever changes are necessary to get the port to compile properly under the current version of FreeBSD. Keep <em>careful track</em> of everything you do, as you will be automating the process shortly. Everything, including the deletion, addition or modification of files should be doable using an automated script or patch file when your port is finished. <p>If your port requires significant user interaction/customization to compile or install, you should take a look at one of Larry Wall's classic Configure scripts and perhaps do something similar yourself. The goal of the new ports collection is to make each port as `plug-and-play' as possible for the end-user while using a minimum of disk space. <sect2> <heading>Patching</heading> <p>In the preparation of the port, files that have been added or changed can be picked up with a recursive diff for later feeding to patch. This is the easiest kind of change to make as it doesn't involve any mucking around with configuration files. Each set of patches you wish to apply should be collected into a file named `<tt>patch-<xx></tt>' where <tt><xx></tt> denotes the sequence in which the patches will be applied -- these are done in <em>alphabetical order</em>, thus `<tt>aa</tt>' first, `<tt>ab</tt>' second and so on. These files should be stored in <tt>${PATCHDIR}</tt>, from where they will be automatically applied. All patches should be relative to <tt>${WRKSRC}</tt> (generally the directory your port's tarball unpacks itself into, that being where the make is done). To make fixes and upgrades easier you should avoid having more than one patch fix the same file (e.g., patch-ab and patch-ab both changing <tt>${WRKSRC}</tt>/foobar.c). <sect2> <heading>Configuring</heading> <p>Include any additional customization commands to your <tt>configure</tt> script and save it in the `<tt>scripts</tt>' subdirectory. As mentioned above, you can also do this as Makefile targets and/or scripts with the name <tt>pre-configure</tt> or <tt>post-configure</tt>. <sect2> <heading>Handling user input</heading> <p>If your port requires user input to build, configure or install, then set <tt>IS_INTERACTIVE</tt> in your Makefile. This will allow `overnight builds' to skip your port if the user sets the variable <tt>BATCH</tt> in his environment (and if the user sets the variable <tt>INTERACTIVE</tt>, then <em>only</em> those ports requiring interaction are built). <sect1> <heading>Configuring the Makefile</heading> <p>Configuring the Makefile is pretty simple, and again we suggest that you look at existing examples before starting. Consider the following problems in sequence as you design your new Makefile: <sect2> <heading>The original source</heading> <p>Does it live in <tt>${DISTDIR}</tt> as a standard gzip'd tarball? If so, you can go on to the next step. If not, you should look at overriding any of the <tt>${EXTRACT_CMD}</tt>, <tt>${EXTRACT_BEFORE_ARGS}</tt>, <tt>${EXTRACT_AFTER_ARGS}</tt>, <tt>${EXTRACT_SUFX}</tt>, or <tt>${DISTFILE}</tt> variables, depending on how alien a format your port's distribution file is. (The most common case is `<tt>EXTRACT_SUFX=.tar.Z</tt>', when the tarball is condensed by regular compress, not gzip.) <p>In the worst case, you can simply create your own `<tt>do-extract</tt>' target to override the default, though this should be rarely, if ever, necessary. <sect2> <heading>DISTNAME</heading> <p>You should set <tt>${DISTNAME}</tt> to be the base name of your port. The default rules expect the distribution file list (<tt>${DISTFILES}</tt>) to be named <tt>${DISTFILE}${EXTRACT_SUFX}</tt> by default which, if it's a normal tarball, is going to be something like: <tscreen><verb> foozolix-1.0.tar.gz </verb></tscreen> for a setting of `<tt>DISTNAME=foozolix-1.0</tt>'. The default rules also expect the tarball(s) to extract into a subdirectory called <tt>work/${DISTNAME}</tt>, e.g. <tscreen><verb> work/foozolix-1.0/ </verb></tscreen> All this behavior can be overridden, of course, it simply represents the most common time-saving defaults. For a port requiring multiple distribution files, simply set <tt>${DISTFILES}</tt> explicitly. If only a subset of <tt>${DISTFILES}</tt> are actual extractable archives, then set them up in <tt>${EXTRACT_ONLY}</tt>, which will override the <tt>${DISTFILES}</tt> list when it comes to extraction, and the rest will be just left in <tt>${DISTDIR}</tt> for later use. <sect2> <heading>CATEGORIES and KEYWORDS</heading> <p>When a package is created, it is put under <tt>/usr/ports/packages/All</tt> and links are made from one or more subdirectories of <tt>/usr/ports/packages</tt>. The names of these subdirectories are specified by the variable <tt>${CATEGORIES}</tt>. It is intended to make life easier for the user when he is wading through the pile of packages on the ftp site or the CD-ROM. Please take a look at the existing categories (some of them have different names from subdirectories of <tt>/usr/ports</tt>) and pick the ones that are suitable for your port. If your port truly belongs to something that is different from all the existing ones, you can even create a new category name. <p>If you want to add more information than just the category names, add them to <tt>${KEYWORDS}</tt>. The value of this variable defaults to that of <tt>${CATEGORIES}</tt>. This is currently used only as a field of the <tt>/usr/ports/INDEX</tt> file. <sect2> <heading>MASTER_SITES</heading> <p>If you have a ftp-URL pointing at the the original tarball, record the directory containing the tarball in <tt>${MASTER_SITES}</tt>. This will provide a backup site, as well as a direct pointer to the original source location. Don't forget the trailing slash (<tt>/</tt>)! <p>The make macros will try to use this specification for grabbing the distribution file with <tt>${NCFTP}</tt> if they can't find it already on the system. <p>It is recommended that you put multiple sites on this list, preferably from different continents. This will safeguard against wide-area network problems, and we are even planning to add support for automatically determining the closest master site and fetching from there! <sect2> <heading>PATCHFILES</heading> <p>If your port requires some additional patches that are available by ftp, set <tt>${PATCHFILES}</tt> to the names of the files and <tt>${PATCH_SITES}</tt> to the URL of the directory that contains them (the format is the same as <tt>${MASTER_SITES}</tt>). <p>If the patch is not relative to the top of the source tree (i.e., <tt>${WKRSRC}</tt>) because it contains some extra pathnames, set <tt>${PATCH_DIST_STRIP}</tt> accordingly. For instance, if all the pathnames in the patch has an extra `<tt>foozolix-1.0/</tt>' in front of the filenames, then set `<tt>PATCH_DIST_STRIP=-p1</tt>'. <p>Don't worry if the patches are compressed, they will be decompressed automatically if the filenames end with `<tt>.gz</tt>' or `<tt>.Z</tt>'. <sect2> <heading>MAINTAINER</heading> <p>Set your mail-address here. Please. <tt>:)</tt> <sect2> <heading>Dependencies</heading> <p>Many ports depend on other ports. There are three variables that you can use to ensure that all the required bits will be on the user's machine. <sect3> <heading>LIB_DEPENDS</heading> <p>This variable specifies the shared libraries this port depends on. It is a list of `<tt>lib:dir</tt>' pairs where <tt>lib</tt> is the name of the shared library, and <tt>dir</tt> is the directory in which to find it in case it's not available. For example, <tscreen><verb> LIB_DEPENDS= tcl\\.7\\.:${PORTSDIR}/lang/tcl </verb></tscreen> will check for a shared tcl library with major version 7, and descend into the <tt>lang/tcl</tt> subdirectory of your ports tree to build and install it if it's not found. Note that the <tt>lib</tt> part is just an argument given to `<tt>ldconfig -r | grep</tt>', so periods should be escaped by two backslashes like in the example above. <sect3> <heading>EXEC_DEPENDS</heading> <p>This variable specifies executables this port depends on. It is a list of `<tt>exec:dir</tt>' pairs where <tt>exec</tt> is the name of the executable, and <tt>dir</tt> is the directory in which to find it in case it's not available. For example, <tscreen><verb> EXEC_DEPENDS= wish:${PORTSDIR}/x11/tk </verb></tscreen> will check for an executable called `<tt>wish</tt>', and descend into the <tt>x11/tk</tt> subdirectory of your ports tree to build and install it if it's not found. <sect3> <heading>DEPENDS</heading> <p>If there is a dependency that doesn't fall into either of the above two categories, or your port requires to have the source of the other port extracted (i.e., having them installed is not enough), then use this variable. This is just a list of directories, as there is nothing to check, unlike the previous two. <sect2> <heading>Building mechanisms</heading> <p>If your package uses GNU <tt>make</tt>, set `<tt>USE_GMAKE=yes</tt>'. If your package uses GNU <tt>configure</tt>, set `<tt>GNU_CONFIGURE=yes</tt>'. If you want to override the default GNU <tt>configure</tt> arguments from `<tt>--prefix=${PREFIX}</tt>' to something else, set those arguments in <tt>${CONFIGURE_ARGS}</tt>. <p>If your package uses <tt>imake</tt> (e.g. is an X application that has an <tt>Imakefile</tt>), then set `<tt>USE_IMAKE=yes</tt>'. This will cause the configure stage to automatically do an <tt>xmkmf -a</tt>. If the `<tt>-a</tt>' flag is a problem for your port, set `<tt>XMKMF=xmkmf</tt>'. <p>If your port's source Makefile has something else than `<tt>all</tt>' as the main build target, set <tt>${ALL_TARGET}</tt> accordingly. Same goes for `<tt>install</tt>' and <tt>${INSTALL_TARGET}</tt>. <sect2> <heading>NO_INSTALL_MANPAGES</heading> <p>If the port uses imake but doesn't understand the `<tt>install.man</tt>' target, `<tt>NO_INSTALL_MANPAGES=yes</tt>' should be set. In addition, the author of the original port should be shot. <sect1> <heading>Licensing Problems</heading> <p>Some software packages have restrictive licenses or are in violation to the law (PKP's patent on public key crypto, ITAR (export of crypto software) to name just two of them). What we can do with them vary a lot, depending on the exact wordings of the respective licenses. <p>Note that it is your responsibility as a porter to read the licensing terms of the software and make sure that the FreeBSD project won't held accountable of violating them by redistributing the source or compiled binaries either via ftp or CD-ROM. If in doubt, please contact <tt>ports@freebsd.org</tt>. <p>We usually get around this problem by setting <tt>${NO_PACKAGE}</tt> in the Makefile, and not putting the distfile up for ftp. However, for most cases, you should at least be able to make a port, so don't let the license scare you away! <p>Note: The GNU General Public License (GPL), both version 1 and 2, shouldn't be a problem for ports. - <p>Note: If you are a commiter, make sure you update the + <p>Note: If you are a committer, make sure you update the <tt>ports/LEGAL</tt> file too. <sect1> <heading>* Upgrading</heading> <p>This section is still under construction, sorry. <sect1> <heading>Do's and Dont's</heading> <p>Here's a list of common do's and dont's that you encounter during the porting process. <sect2> <heading>WRKDIR</heading> <p>Don't leave anything valuable lying around in the `<tt>work</tt>' subdirectory, `<tt>make clean</tt>' will <em>nuke</em> it completely! If you need auxiliary files that aren't scripts or patches, put them in the subdirectory `<tt>files</tt>' and use the <tt>post-extract</tt> target to copy them to the `<tt>work</tt>' subdirectory. <sect2> <heading>Package information</heading> <p>Do install package information, i.e., the three files in <tt>pkg</tt>. Note that these files are not used only for packaging anymore, and are <em>mandatory</em> now, even if <tt>${NO_PACKAGE}</tt> is set. <sect2> <heading>Compress manpages, strip binaries</heading> <p>Do compress manpages and strip binaries. If the original source already does that, fine; otherwise, you can add a <tt>post-install</tt> rule to do it yourself. Make sure that you check the variable <tt>NOMANCOMPRESS</tt> that the user can set in <tt>/etc/make.conf</tt> to disable man page compression. Here's an example: <tscreen><verb> post-install: strip ${PREFIX}/bin/xdl .if !defined(NOMANCOMPRESS) gzip -9nf ${PREFIX}/man/man1/xdl.1 .endif </verb></tscreen> <p>Use the <tt>file</tt> command on the installed executable to check whether the binary is stripped or not. If it doesn't say `not stripped', it is stripped. <sect2> <heading>Custom utilities</heading> <p>Don't rely on custom utilities in your local configure script or anything -- they may not be there on the user's system! If you really need something else to be installed before you can work, detect this from your configure script, print a helpful message and exit with a non-zero status! At least you'll have given the user some idea of what's needed. If the custom utility or package is actually part of the ports tree, this should be dealt by the dependency mechanism of ports. <p>Actually, if this utility is not part of the ports tree you should probably make a port of this utility (this is how many of the ports made it into the tree!). Depending on something that is not part of the main FreeBSD distribution or the ports tree is a bad idea, and the user should be able to go to any subdirectory of <tt>/usr/ports</tt> and type `<tt>make</tt>' and have that port, as well as everything it requires, built automatically. <sect2> <heading>Feedback</heading> <p>Do send applicable changes/patches to the original author/maintainer for inclusion in next release of the code. This will only make your job that much easier for the next release. <sect2> <heading>RCS strings</heading> <p>Don't put RCS strings in patches. CVS will mangle them when we put the files into the ports tree, and when we check them out again, they will come out different and the patch will fail. RCS strings are surrounded by dollar (`<tt>$</tt>') signs, and typically start with `<tt>$Id</tt>' or `<tt>$RCS</tt>'. <sect2> <heading>Recursive diff</heading> <p>Using the recurse (`<tt>-r</tt>') option to <tt>diff</tt> to generate patches is fine, but please take a look at the resulting patches to make sure you don't have any unnecessary junk in there. In particular, diffs between two backup files, Makefiles when the port uses imake or GNU configure, etc., are unnecessary and should be deleted. Also, if you had to delete a file, then you can do it in the <tt>post-extract</tt> target rather than as part of the patch. <sect2> <heading>PREFIX</heading> <p>Do try to make your port install relative to <tt>${PREFIX}</tt> in your Makefiles. This will normally be set to <tt>/usr/local</tt>, or <tt>/usr/X11R6</tt> if <tt>${USE_IMAKE}</tt> or <tt>${USE_X11}</tt> is set, though it can be reassigned in your Makefile or in the users environment, if need be. <p>Not hard-coding <tt>/usr/local</tt> anywhere in your installation will make the port much more flexible and cater to the needs of other sites. Note that this doesn't count for package `packing list' files since they have their own scheme for relocating themselves and can be left independent of <tt>${PREFIX}</tt> unless the package is one that hard-codes itself to a compiled-in location. <sect2> <heading>Subdirectories</heading> <p>Try to let the port put things in the right subdirectories of <tt>${PREFIX}</tt>. Some ports lump everything and put it in the subdirectory with the port's name, which is incorrect. Also, many ports put everything except binaries, header files and manual pages in the a subdirectory of `<tt>lib</tt>', which does not bode well with the BSD paradigm. Many of the files should me moved to one of the following: `<tt>etc</tt>' (setup/configuration files), `<tt>libexec</tt>' (executables started internally), `<tt>sbin</tt>' (executables for superusers/managers) or `<tt>share</tt>' (architecture independent files). See <tt>hier(7)</tt> for details, the rule governing <tt>/usr</tt> pretty much applies to <tt>/usr/local</tt> too. <sect2> <heading>ldconfig</heading> <p>If your port installs a shared library, add a <tt>post-install</tt> target to your Makefile that runs `<tt>ldconfig -m</tt>' on the directory where the new library is installed (usually <tt>${PREFIX}/lib</tt>) to register it into the shared library cache. <p>Also, add an <tt>@exec</tt> line to your <tt>pkg/PLIST</tt> file so that a user who installed the package can start using the shared library immediately. This line should immediately follow the line for the shared library itself, as in: <tscreen><verb> lib/libtcl.so.7.3 @exec ldconfig -m %D/%F </verb></tscreen> <p>Note: the `-m' option is new since 2.0.5 and 2.1.0-950726-SNAP, so don't be alarmed if it doesn't work on your machine. <p>Never, ever, <em>ever</em> add a line that says `<tt>ldconfig</tt>' without any arguments to your Makefile or pkg/PLIST. This will reset the shared library cache to the contents of <tt>/usr/lib</tt> only, and will royally screw up the user's machine ("Help, xinit doesn't run anymore after I install this port!"). Anybody who does this will be shot and cut into 65,536 pieces by a rusty knife and have his liver chopped out by a bunch of crows and will eternally rot to death in the deepest bowels of hell (not necessarily in that order).... <sect2> <heading>If you are stuck....</heading> <p>Do look at existing examples and the <tt>bsd.port.mk</tt> file before asking us questions! <tt>;)</tt> <p>Do ask us questions if you have any trouble! Don't just beat your head against a wall! <tt>:)</tt> <sect1> <heading>A Sample Makefile</heading> <p>Here is a sample Makefile that you can use to create a new port. Make sure you remove all the extra comments (ones between brackets)! <p>It is recommended that you follow this format (ordering of variables, etc.). Not all of the existing Makefiles are in this format (mostly old ones), but we are trying to uniformize how they look. This format is designed so that the most important information is easy to locate. <tscreen><verb> [the header...just to make it easier for us to identify the ports] # New ports collection makefile for: xdvi # Version required: 2.2 [things like "1.5alpha" are fine here too] # Date created: 26 May 1995 [this is the person who did the original port to FreeBSD, in particular, the person who wrote this Makefile] # Whom: Satoshi Asami <asami@FreeBSD.ORG> # -# $Id: porting.sgml,v 1.4 1995-08-19 15:38:25 jfieber Exp $ +# $Id: porting.sgml,v 1.5 1995-09-27 00:46:24 jmz Exp $ [ ^^^^ don't worry about this...it will be automatically filled in by CVS when it is committed to our repository] # [section to describe the package itself and main ftp site - DISTNAME is always first, followed by PKGNAME (if necessary), CATEGORIES, KEYWORDs (if necessary) and then MASTER_SITES, and optionally EXTRACT_SUFX or DISTFILES] DISTNAME= xdvi PKGNAME= xdvi-pl18 CATEGORIES+= printing [don't forget the trailing slash ("/")!] MASTER_SITES= ftp://crl.dec.com/pub/X11/contrib/applications/ [set this if the source is not in the standard ".tar.gz" form] EXTRACT_SUFX= .tar.Z [section for distributed patches -- can be empty] PATCH_SITES= ftp://ftp.sra.co.jp/pub/X11/japanese/ PATCHFILES= xdvi-18.patch1.gz xdvi-18.patch2.gz [maintainer; *mandatory*! This is the person (preferably with commit privileges) who a user can contact for questions and bug reports - this person should be the porter or someone who can forward questions to the original porter reasonably promptly. If you really don't want to have your address here, set it to "ports@FreeBSD.ORG".] MAINTAINER= asami@FreeBSD.ORG [dependencies -- can be empty] EXEC_DEPENDS= gs:${PORTSDIR}/print/ghostscript LIB_DEPENDS= Xpm\\.4\\.:${PORTSDIR}/graphics/xpm [this section is for other standard bsd.port.mk variables that don't belong to any of the above] [If it extracts to a directory other than ${DISTNAME}...] WRKSRC= ${WRKDIR}/xdvi-new [If it asks questions during configure, build, install...] IS_INTERACTIVE= yes [If it requires "configure" in the distributed source directory to be run...] HAS_CONFIGURE= yes [If it requires GNU make, not /usr/bin/make, to build...] USE_GMAKE= yes [If it is an X application and requires "xmkmf -a" to be run...] USE_IMAKE= yes [et cetera.] [non-standard variables to be used in the rules below] MY_FAVORITE_RESPONSE= "yeah, right" [then the special rules, in the order they are called] pre-fetch: i go fetch something, yeah post-patch: i need to do something after patch, great pre-install: and then some more stuff before installing, wow [and then the epilogue] .include <bsd.port.mk> </verb></tscreen> <sect1> <heading>Package Names</heading> <p>The following are the conventions you should follow in naming your packages. This is to have our package directory easy to scan, as there are already lots and lots of packages and users are going to turn away if they hurt their eyes! <p>If your <tt>${DISTNAME}</tt> does not look like `<tt><name>-<version.string.numbers></tt>', set <tt>${PKGNAME}</tt> to something in that format. <enum> <item>The `<tt><name></tt>' part should be all lowercases, except for a really large package (with lots of programs in it). Things like XFree86 (yes there really is a package of it, check it out) and ImageMagick fall into this category. Otherwise, convert the name (or at least the first letter) to lowercase. If the software in question really is called that way, you can have numbers, hyphens and underscores in the name too. <item>The version string should be a period-separated list of integers and single lowercase alphabets. The only exception is the string `pl' (meaning `patchlevel'), which can be used <em>only</em> when there are no major and minor version numbers in the software. </enum> <p>Here are some (real) examples on how to convert a <tt>${DISTNAME}</tt> into a suitable <tt>${PKGNAME}</tt>: <tscreen><verb> DISTNAME PKGNAME Reason mule-2.2.2 mule-2.2.2 no prob at all XFree86-3.1.2 XFree86-3.1.2 ditto EmiClock-1.0.2 emiclock-1.0.2 no uppercase names for single programs gmod1.4 gmod-1.4 need hyphen after `<name>' xmris.4.02 xmris-4.02 ditto rdist-1.3alpha rdist-1.3a no strings like `alpha' allowed es-0.9-beta1 es-0.9b1 ditto v3.3beta021.src jpeg-5a what the heck was that anyway? ;) tvtwm tvtwm-pl11 version string always required piewm piewm-1.0 ditto xvgr-2.10pl1 xvgr-2.10.1 `pl' allowed only when no maj/minor numbers </verb></tscreen> <p>If there is absolutely no trace of version information in the original source and it is unlikely that the original author will ever release another version, just set the version string to `1.0' (like the piewm example above). Otherwise, ask the original author or use the date string (`yy.mm.dd') as the version. <sect1> <heading>That's It, Folks!</heading> <p>Boy, this sure was a long tutorial, wasn't it? Thanks for following us to here, really. <p>Well, now that you know how to do a port, let's go at it and convert everything in the world into ports! That is the easiest way to start contributing to the FreeBSD Project! <tt>:)</tt> diff --git a/handbook/ports.sgml b/handbook/ports.sgml index d9007d0851..2dff50c791 100644 --- a/handbook/ports.sgml +++ b/handbook/ports.sgml @@ -1,239 +1,239 @@ -<!-- $Id: ports.sgml,v 1.6 1995-07-12 15:01:38 jfieber Exp $ --> +<!-- $Id: ports.sgml,v 1.7 1995-09-27 00:46:26 jmz Exp $ --> <!-- The FreeBSD Documentation Project --> <sect><heading>The Ports collection<label id="ports"></heading> <p><em>Contributed by &a.gpalmer; and &a.jkh;.</em> Unfortunately, there are more variations of UN*X than most people know of, and hence not all software for UN*X available on the Internet will work on all versions of UN*X (in fact, I can guarantee it!). Hence, some software needs modifications to work under some UN*Xs. The process of making those modifications is known as ``porting'' and the result known as a ``port'' (not to be confused with the sockets on the back of your computer!). <sect1><heading>What is the FreeBSD Ports Collection?</heading> <p> When 2.0 was released, the FreeBSD Project decided to attempt to automate the process of ``porting'' such software to FreeBSD, and the result is the Ports Collection. The general idea was that a combination of various programming tools already available in the base FreeBSD installation would allow you to simply type `make' for a given port and have the underlying ports mechanism automatically fetch the port from a FreeBSD mirror site, apply any special configuration knowledge to it and then build it to result in a fully working version of the program. The ports collection itself normally doesn't have any of the original source code necessary for the compilation in the tree, just those shell scripts, Makefiles and source code ``diffs'' that are necessary to configure and compile the program under FreeBSD. This keeps the entire system down to a manageable size, with the current system having over 300 ports in the master source tree and yet taking up less than ten megabytes. <sect1><heading>How does the system compile with no source code?</heading> <p> The Makefile for a port automatically looks in a central location on your system (usually /usr/ports/distfiles, though this value can be customized) for the associated set of original distribution files that have been ``ported''. Those not found locally are searched for wherever they're generally provided on the Internet. If you have a CDROM distribution of FreeBSD then you've already got them available on your CD for ease of use. See <ref id="ports:cd" name="Compiling ports from CD"> if you have such a CDROM distribution, otherwise skip to <ref id="ports:inet" name="Compiling ports using an Internet connection">. <sect1><heading>Compiling ports from CDROM<label id="ports:cd"></heading> <p>The ports collection is easy to use from CDROM, and all you need to do is to create a "link tree" to it using the <tt>lndir(1)</tt> command that comes with the <em>XFree86</em> distribution. Find a location with some free space and create a directory there, and make a symbolic link from <tt>/usr/ports</tt> to that directory. Then invoke the <tt>lndir(1)</tt> command with the full pathname of the ``ports'' directory on the CDROM as an argument (this might be, for example, something like: <tt>lndir /cdrom/ports</tt>). Then you can build ports directly off the CDROM by building them in the link tree you've created. Note that there are some ports for which we can't provide the original source in the CDROM due to licensing limitations. In that case, you'll need to look at the next section (<ref id="ports:inet" name="Compiling ports using an Internet connection">). <sect1><heading>Compiling ports using an Internet connection<label id="ports:inet"></heading> <p> The ports collection can also use an auto-fetch system to keep your ports collection source tree up to date, updating the central ``distfiles'' version for you the next time you compile the port. Of course, this assumes you have a permanent network link or don't mind heavy usage of your telephone. If you don't want heavy network usage when you compile your ports tree, you can pre-fetch the necessary tarballs beforehand and put them into /usr/ports/distfiles by hand. A good way to see what files a port is going to need is to cd to that ports' directory and do a <tt>make fetch-list</tt> to see what it does. The output of <tt>make fetch-list</tt> can also be used as a shell script to fetch the ports' tarballs at a well-connected machine. You can also chose to get the source files either from the master FTP site as defined in the relevant Makefile (in the MASTER_SITES line), or some FreeBSD mirror site also carrying a set of distfiles, as does the master FTP site on ftp.FreeBSD.org (aka ftp.cdrom.com) in the directory <tt>/pub/FreeBSD/distfiles</tt>. Note that the files in -that directory are not guarenteed to be kept up to date - this is a +that directory are not guaranteed to be kept up to date - this is a volunteer project! We can't make any guarantees about the mirror -sites either - they are obviously under independant control and don't +sites either - they are obviously under independent control and don't even have to mirror the distfiles directory. - If you have a non-permanant link, you can fetch all the distfiles by + If you have a non-permanent link, you can fetch all the distfiles by going to the top of the tree and typing ``make fetch''. <sect1><heading>It doesn't work?!</heading> <p>Oh. You can do one of four (4) things : <enum> <item> Fix it yourself. Technical details can be found in <ref id="porting" name="Porting applications">. <item> Gripe. This is done by e-mail *ONLY*! The people at Walnut Creek are in no way responsible for the functionality (or lack thereof) of the FreeBSD system as a whole, and especially the ports system, which is mainly contributed by 3rd parties. (If you don't believe me, check the catalogue, especially the line saying "We cannot offer tech-support on this product") The e-mail address is Ports@FreeBSD.org. Please include details of the port, where you got both the port source & distfile(s) from, and what the error was. Note: At time of writing, lang/Sather doesn't seem to work on Pentium machines due to the Intel Curse (aka the Floating Point Division Bug). Please don't tell us about this - gripe to Intel instead - it's their bug! <item> Forget it. This is the easiest for most - very few of the programs in ports can be classified as `essential'! <item> Grab the pre-compiled package from a ftp server. The ``master'' package collection is in: ftp://ftp.FreeBSD.org/pub/FreeBSD/packages/ though check your local mirror first, please! These are more likely to work (on the whole) than trying to compile from source, and a lot faster! Use the <tt>pkg_add(1)</tt> or <tt>pkg_manage(1)</tt> program to install them to your system. </enum> <sect1><heading>I've ported a program and I want to make a port out of it. What now?</heading> <p> See the file GUIDELINES, in: ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/GUIDELINES This contains details of the procedure and structure involved. <sect1><heading>I've got a good port, what now?</heading> <p>Upload the fixed version to <tt>ftp://freefall.cdrom.com/pub/incoming</tt> or <tt>ftp://ftp.FreeBSD.org/pub/FreeBSD/incoming</tt> and send e-mail to ports@FreeBSD.org with the filename and details. Someone on the all-volunteer `ports committee' will (hopefully) look it over and commit it to the ports collection if they like the looks of it. <sect1><heading>I want to leave the compile going overnight, but some ports don't like this.</heading> <p> There is a way around this. Before starting the compilation, type: <verb> setenv BATCH yes # (if you use csh/tcsh) or BATCH=yes; export BATCH # (for sh/bash) </verb> This should skip ports which need user interaction to build. To compile those ports left out by doing the above, using a different login shell (or unsetting the above BATCH variable), set the INTERACTIVE variable instead (you can use the same statements as above except replace ``BATCH'' with ``INTERACTIVE'') and re-run make. This should now compile only those ports which will definitely ask for user interaction. <sect1><heading>The ports collection is weak. What can I do to help?</heading> <p> First read the bsd.port.mk file (which may be found in /usr/share/mk/) and the associated bsd.port.subdir.mk file. A lot of the weirdness can be explained properly in there (most of the current weirdness is due to the lack of assumptions about anything, which is necessary due to the generic nature of these files). Also check that you have an up-to-date copy, as the file can change from minute to minute. The most up-to-date copy can be found in: <url url="ftp://ftp.freebsd.org/pub/FreeBSD/FreeBSD-current/src/share/mk"> If you find that you still need to go in there and alter things, by all means do so, and then send the diffs to ports@FreeBSD.org if you'd like them to be a part of the default distribution. Please also -remember that any changes must respect backwards-compatability with +remember that any changes must respect backwards-compatibility with any and all older Makefiles, unless you want a real nightmare of /usr/ports munging ahead of you! Large scale changes will generally not be warmly welcomed unless all the existing makefiles work without alteration. Sorry! <sect1><heading>This FAQ is weak. What can I do?</heading> <p> Send changes to ports@FreeBSD.org. Changes are most welcome! This FAQ is also very green and should be considered no more than a `good start' for now. Authors? You can come out of hiding any time now! :-) <sect1><heading>How do I get more information on all the ports?</heading> <p> One good method is to cd to the top of the ports tree (say /usr/ports) and type: <verb> make print-index </verb> This will print a summary of all ports in the tree. <sect1><heading>I've heard of a new checksum system. What is this for?</heading> <p> For various reasons, when using FTP over the Internet to obtain the source code, you may not always end up with the same copy of the code -that the origional porter worked from, and this can lead to problems. +that the original porter worked from, and this can lead to problems. So a simple checksumming system has been employed to try and highlight problems in this area. To check the entire system, go to the top of the ports tree (defaults to /usr/ports) and type <verb> make checksum </verb> This will give a report on the validity of the files you have FTP'd. If some are missing, the system will attempt to retrieve them before running the checksum routine. The same technique can be applied to a single port. The system will complain if there is no pre-computed checksum available for that port. Not all ports currently have checksums, but this should be cured soon. - Some older versions of the system don't recognise the ``checksum'' + Some older versions of the system don't recognize the ``checksum'' target. In that case, try the command <verb> make check-md5 </verb> (``check-md5'' was the pre-cursor to the ``checksum'' target). If neither work, get the latest copies of bsd.port.mk and bsd.port.subdir.mk from <url url="ftp://ftp.freebsd.org/pub/FreeBSD/FreeBSD-current/src/share/mk"> and install them in /usr/share/mk. This will get you the latest version of the ports system. diff --git a/handbook/ppp.sgml b/handbook/ppp.sgml index f9a5476bbc..882adf57d5 100644 --- a/handbook/ppp.sgml +++ b/handbook/ppp.sgml @@ -1,372 +1,372 @@ -<!-- $Id: ppp.sgml,v 1.4 1995-07-29 13:08:01 jfieber Exp $ --> +<!-- $Id: ppp.sgml,v 1.5 1995-09-27 00:46:27 jmz Exp $ --> <!-- The FreeBSD Documentation Project --> <sect><heading>Setting up kernel PPP<label id="ppp"></heading> <p><em>Contributed by &a.gena;.</em> Before you start setting up PPP on your machine make sure that pppd is located in /usr/sbin and directory /etc/ppp exists. pppd can work in two modes: <enum> <item> as a "client" , i.e. you want to connect your machine to outside world via PPP serial connection or modem line. <item> as a "server" , i.e. your machine is located on the network and used to connect other computers using PPP. </enum> In both cases you will need to set up an options file ( /etc/ppp/options or ~/.ppprc if you have more then one user on your machine that uses PPP ). You also will need some modem/serial software ( preferably kermit ) so you can dial and establish connection with remote host. <sect1><heading>Working as a PPP client</heading> <p>I used the following /etc/ppp/options to connect to CISCO terminal server PPP line. <verb> crtscts # enable hardware flow control modem # modem control line noipdefault # remote PPP server must supply your IP address. # if the remote host doesn't send your IP during IPCP # negotiation , remove this option passive # wait for LCP packets domain ppp.foo.com # put your domain name here :<remote_ip> # put the IP of remote PPP host here # it will be used to route packets via PPP link # if you didn't specified the noipdefault option # change this line to <local_ip>:<remote_ip> defaultroute # put this if you want that PPP server will be your # default router </verb> To connect: <enum> <item> Dial to the remote host using kermit ( or other modem program ) enter your user name and password ( or whatever is needed to enable PPP on the remote host ) <item> Exit kermit. ( without hanging up the line ) <item> enter: <verb> /usr/src/usr.sbin/pppd.new/pppd /dev/tty01 19200 </verb> ( put the appropriate speed and device name ) </enum> Now your computer is connected with PPP. If the connection fails for some reasons you can add the "debug" option to the /etc/ppp/options file and check messages on the console to track the problem Following /etc/ppp/pppup script will make all 3 stages automatically: <verb> #!/bin/sh ps ax |grep pppd |grep -v grep pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'` if [ "X${pid}" != "X" ] ; then echo 'killing pppd, PID=' ${pid} kill ${pid} fi ps ax |grep kermit |grep -v grep pid=`ps ax |grep kermit |grep -v grep|awk '{print $1;}'` if [ "X${pid}" != "X" ] ; then echo 'killing kermit, PID=' ${pid} kill -9 ${pid} fi ifconfig ppp0 down ifconfig ppp0 delete kermit -y /etc/ppp/kermit.dial pppd /dev/tty01 19200 </verb> /etc/ppp/kermit.dial is kermit script that dials and makes all necessary authorization on the remote host. ( Example of such script is attached to the end of this document ) -Use the follwing /etc/ppp/pppdown script to disconnect the PPP line: +Use the following /etc/ppp/pppdown script to disconnect the PPP line: <verb> #!/bin/sh pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'` if [ X${pid} != "X" ] ; then echo 'killing pppd, PID=' ${pid} kill -TERM ${pid} fi ps ax |grep kermit |grep -v grep pid=`ps ax |grep kermit |grep -v grep|awk '{print $1;}'` if [ "X${pid}" != "X" ] ; then echo 'killing kermit, PID=' ${pid} kill -9 ${pid} fi /sbin/ifconfig ppp0 down /sbin/ifconfig ppp0 delete kermit -y /etc/ppp/kermit.hup /etc/ppp/ppptest </verb> Check if PPP is still running (/usr/etc/ppp/ppptest): <verb> #!/bin/sh pid=`ps ax| grep pppd |grep -v grep|awk '{print $1;}'` if [ X${pid} != "X" ] ; then echo 'pppd running: PID=' ${pid-NONE} else echo 'No pppd running.' fi set -x netstat -n -I ppp0 ifconfig ppp0 </verb> Hangs up modem line (/etc/ppp/kermit.hup): <verb> set line /dev/tty01 ; put your modem device here set speed 19200 set file type binary set file names literal set win 8 set rec pack 1024 set send pack 1024 set block 3 set term bytesize 8 set command bytesize 8 set flow none pau 1 out +++ inp 5 OK out ATH0\13 echo \13 exit </verb> <sect1><heading>Working as a PPP server</heading> <p>/etc/ppp/options: <verb> crtscts # Hardware flow control netmask 255.255.255.0 # netmask ( not required ) 192.114.208.20:192.114.208.165 # ip's of local and remote hosts # local ip must be different from one # you assigned to the ethernet ( or other ) # interface on your machine. # remote IP is ip address that will be # assigned to the remote machine domain ppp.foo.com # your domain passive # wait for LCP modem # modem line </verb> Following /etc/ppp/pppserv script will enable ppp server on your machine <verb> #!/bin/sh ps ax |grep pppd |grep -v grep pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'` if [ "X${pid}" != "X" ] ; then echo 'killing pppd, PID=' ${pid} kill ${pid} fi ps ax |grep kermit |grep -v grep pid=`ps ax |grep kermit |grep -v grep|awk '{print $1;}'` if [ "X${pid}" != "X" ] ; then echo 'killing kermit, PID=' ${pid} kill -9 ${pid} fi # reset ppp interface ifconfig ppp0 down ifconfig ppp0 delete # enable autoanswer mode kermit -y /etc/ppp/kermit.ans # run ppp pppd /dev/tty01 19200 </verb> Use this /etc/ppp/pppservdown script to stop ppp server: <verb> #!/bin/sh ps ax |grep pppd |grep -v grep pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'` if [ "X${pid}" != "X" ] ; then echo 'killing pppd, PID=' ${pid} kill ${pid} fi ps ax |grep kermit |grep -v grep pid=`ps ax |grep kermit |grep -v grep|awk '{print $1;}'` if [ "X${pid}" != "X" ] ; then echo 'killing kermit, PID=' ${pid} kill -9 ${pid} fi ifconfig ppp0 down ifconfig ppp0 delete kermit -y /etc/ppp/kermit.noans </verb> Following kermit script will enable/disable autoanswer mode on your modem (/etc/ppp/kermit.ans): <verb> set line /dev/tty01 set speed 19200 set file type binary set file names literal set win 8 set rec pack 1024 set send pack 1024 set block 3 set term bytesize 8 set command bytesize 8 set flow none pau 1 out +++ inp 5 OK out ATH0\13 inp 5 OK echo \13 out ATS0=1\13 ; change this to out ATS0=0\13 if you want to disable ; autoanswer mod inp 5 OK echo \13 exit </verb> This /etc/ppp/kermit.dial script is used for dialing and authorizing on remote host. You will need to customize it for your needs. Put your login and password in this script , also you'll need -to change input statement depending on responces from your modem +to change input statement depending on responses from your modem and remote host. <verb> ; ; put the com line attached to the modem here: ; set line /dev/tty01 ; ; put the modem speed here: ; set speed 19200 set file type binary ; full 8 bit file xfer set file names literal set win 8 set rec pack 1024 set send pack 1024 set block 3 set term bytesize 8 set command bytesize 8 set flow none set modem hayes set dial hangup off set carrier auto ; Then SET CARRIER if necessary, set dial display on ; Then SET DIAL if necessary, set input echo on set input timeout proceed set input case ignore def \%x 0 ; login prompt counter goto slhup :slcmd ; put the modem in command mode echo Put the modem in command mode. clear ; Clear unread characters from input buffer pause 1 output +++ ; hayes escape sequence input 1 OK\13\10 ; wait for OK if success goto slhup output \13 pause 1 output at\13 input 1 OK\13\10 if fail goto slcmd ; if modem doesn't answer OK, try again :slhup ; hang up the phone clear ; Clear unread characters from input buffer pause 1 echo Hanging up the phone. output ath0\13 ; hayes command for on hook input 2 OK\13\10 if fail goto slcmd ; if no OK answer, put modem in command mode :sldial ; dial the number pause 1 echo Dialing. output atdt9,550311\13\10 ; put phone number here assign \%x 0 ; zero the time counter :look clear ; Clear unread characters from input buffer increment \%x ; Count the seconds input 1 {CONNECT } if success goto sllogin reinput 1 {NO CARRIER\13\10} if success goto sldial reinput 1 {NO DIALTONE\13\10} if success goto slnodial reinput 1 {\255} if success goto slhup reinput 1 {\127} if success goto slhup if < \%x 60 goto look else goto slhup :sllogin ; login assign \%x 0 ; zero the time counter pause 1 echo Looking for login prompt. :slloop increment \%x ; Count the seconds clear ; Clear unread characters from input buffer output \13 ; ; put your expected login prompt here: ; input 1 {Username: } if success goto sluid reinput 1 {\255} if success goto slhup reinput 1 {\127} if success goto slhup if < \%x 10 goto slloop ; try 10 times to get a login prompt else goto slhup ; hang up and start again if 10 failures :sluid ; ; put your userid here: ; output ppp-login\13 input 1 {Password: } ; ; put your password here: ; output ppp-password\13 input 1 {Entering SLIP mode.} echo quit :slnodial echo \7No dialtone. Check the telephone line!\7 exit 1 ; local variables: ; mode: csh ; comment-start: "; " ; comment-start-skip: "; " ; end: </verb> <!-- ################################################################### Gennady B. Sorokopud ( gena@NetVision.net.il ) 24/10/94 12:00 --> diff --git a/handbook/scsi.sgml b/handbook/scsi.sgml index 497cc00573..a2b4b57b6d 100644 --- a/handbook/scsi.sgml +++ b/handbook/scsi.sgml @@ -1,765 +1,765 @@ -<!-- $Id: scsi.sgml,v 1.4 1995-09-05 21:07:15 jfieber Exp $ --> +<!-- $Id: scsi.sgml,v 1.5 1995-09-27 00:46:28 jmz Exp $ --> <!-- The FreeBSD Documentation Project --> <!-- <title>An introduction to SCSI and its use with FreeBSD (c) 1995, Wilko Bulte, Sun Sep 3 17:14:48 MET DST 1995 Copyright 1995, Wilko C. Bulte, Arnhem, The Netherlands This document attempts to describe the background of SCSI, its (mis)use with FreeBSD and some common pitfalls. --> SCSI

© 1995, &a.wilko;.3 September 1995. SCSI is an acronym for Small Computer Systems Interface. It is an ANSI standard that has become one of the leading I/O buses in the computer industry. The foundation of the SCSI standard was laid by Shugart Associates (the same guys that gave the world the first mini floppy disks) when they introduced the SASI bus (Shugart Associates Standard Interface). After some time an industry effort was started to come to a more strict standard allowing devices from different vendors to work together. - This effort was recognised in the ANSI SCSI-1 standard. The SCSI-1 + This effort was recognized in the ANSI SCSI-1 standard. The SCSI-1 standard (approx 1985) is now more or less obsolete. The current standard is SCSI-2 (see ), with SCSI-3 on the drawing boards. In addition to a physical interconnection standard, SCSI defines a logical (command set) standard to which disk devices must adhere. This standard is called the Common Command Set (CCS) and was developed more or less in parallel with ANSI SCSI-1. SCSI-2 includes the (revised) CCS as part of the standard itself. The commands are dependent on the type of device at hand. It does not make much sense of course to define a Write command for a scanner. The SCSI bus is a parallel bus, which comes in a number of variants. The oldest and most used is an 8 bit wide bus, with single-ended signals, carried on 50 wires. (If you don't know what single-ended means, don't worry, that is what this document is all - about.) Modern designs also use 16 bit wides buses, with + about.) Modern designs also use 16 bit wide buses, with differential signals. This allows transfer speeds of 20Mbytes/second, on cables lengths of up to 25 meters. SCSI-2 - allows a maximum buswidth of 32 bits, using an additional cable. + allows a maximum bus width of 32 bits, using an additional cable. Of course the SCSI bus not only has data lines, but also a number of control signals. A very elaborate protocol is part of the standard to allow multiple devices to share the bus in an efficient - manner. In SCSI-2, the data is always checked using a seperate + manner. In SCSI-2, the data is always checked using a separate parity line. In pre-SCSI-2 designs parity was optional. - In SCSI-3 even faster bustypes are introduced, along with a serial + In SCSI-3 even faster bus types are introduced, along with a serial SCSI bus that reduces the cabling overhead and allows a higher - maximum buslength. + maximum bus length. As you could have guessed from the description above, SCSI devices are intelligent. They have to be to adhere to the SCSI standard (which is over 2 inches thick BTW). So, for a hard disk drive for instance you do not specify a head/cylinder/sector to address a particular block, but simply the number of the block you want. - Elaborate caching schemes, automatic badblock replacement etc + Elaborate caching schemes, automatic bad block replacement etc are all made possible by this 'intelligent device' approach. On a SCSI bus, each possible pair of devices can communicate. If their function allows this is another matter, but the standard does not restrict it. To avoid signal contention, the 2 devices have to arbitrate for the bus before using it. The philosophy of SCSI is to have a standard that allows older-standard devices to work with newer-standard ones. So, an old SCSI-1 device should normally work on a SCSI-2 bus. Normally, because it is not absolutely sure that the implementation of an old device follows the (old) standard closely enough to be acceptable on a new bus. Modern devices are usually more well-behaved, - because the standardisation has become more strict and is better + because the standardization has become more strict and is better adhered to by the device manufacturers. Generally speaking, the chances of getting a working set of devices on a single bus is better when all the devices are SCSI-2 or newer. This does not imply that you have to dump all your old stuff when you get that shiny 2Gb disk: I own a system on which a pre-SCSI-1 disk, a SCSI-2 QIC tape unit, a SCSI-1 helical scan tape unit and 2 SCSI-1 disks work together quite happily. Components of SCSI

As said before, SCSI devices are smart. The idea is to put the knowledge about intimate hardware details onto the SCSI device itself. In this way, the host system does not have to worry about things like how many heads are hard disks has, or how many tracks there are on a specific tape device. If you are curious, the standard specifies commands with which you can query your devices on their hardware particulars. The advantage of intelligent devices is obvious: the device drivers on the host can be made in a much more generic fashion, there is no longer a need to change (and qualify!) drivers for every odd new device that is introduced. For cabling and connectors there is a golden rule: get good stuff. With bus speeds going up all the time you will save yourself a lot of grief by using good material. So, gold plated connectors, shielded cabling, sturdy connector hoods with strain reliefs etc are the way to go. Second golden rule: don't use cables longer than necessary. I once spent 3 days hunting down a problem with a flaky machine only to discover that shortening the SCSI bus with 1 meter solved the problem. And the original bus length was well within the SCSI specification. SCSI bus types

From an electrical point of view, there are two incompatible bus types: single-ended and differential. This means that there are two different main groups of SCSI devices and controllers, which cannot be mixed on the same bus. It is possible however to use special converter hardware to transform a single-ended bus into a differential one (and vice versa). The differences between the bus types are explained in the next sections. In lots of SCSI related documentation there is a sort of jargon in use to abbreviate the different bus types. A small list: FWD: Fast Wide Differential FND: Fast Narrow Differential SE: Single Ended FN: Fast Narrow etc. With a minor amount of imagination one can usually imagine what is meant. Wide is a bit ambiguous, it can indicate 16 or 32 bit buses. As far as I know, the 32 bit variant is not (yet) in use, so wide normally means 16 bit. Fast means that the timing on the bus is somewhat different, so that on a narrow (8 bit) bus 10 Mbytes/sec are possible instead of 5 Mbytes/sec for 'slow' SCSI. More on this later. - It should be noted that the datalines > 8 are only used for - datatransfers and device addressing. The transfers of commands + It should be noted that the data lines > 8 are only used for + data transfers and device addressing. The transfers of commands and status messages etc are only performed on the lowest 8 - datalines. The standard allows narrow devices to operate on - a wide bus. The usable buswidth is negotiated + data lines. The standard allows narrow devices to operate on + a wide bus. The usable bus width is negotiated between the devices. You have to watch your device addressing closely when mixing wide and narrow. Single ended buses

A single-ended SCSI bus uses signals that are either 5 Volts or 0 Volts (indeed, TTL levels) and are relative to a COMMON ground reference. A singled ended 8 bit SCSI bus has approximately 25 ground lines, who are all tied to a single 'rail' on all devices. A standard single ended bus has a maximum length of 6 meters. If the same bus is used with fast-SCSI devices, the maximum length allowed drops to 3 meters. Fast-SCSI means that instead of 5Mbytes/sec the bus allows 10Mbytes/sec transfers. Please note that this means that if some devices on your bus use 'fast' to communicate your bus must adhere to the length restrictions for fast buses! It is obvious that with the newer fast-SCSI devices the - buslength can become a real bottleneck. This is why the + bus length can become a real bottleneck. This is why the differential SCSI bus was introduced in the SCSI-2 standard. For connector pinning and connector types please refer to the SCSI-2 standard (see ) itself, connectors etc are listed there in painstaking detail. Beware of devices using non-standard cabling. For instance Apple uses a 25pin D-type connecter (like the one on serial ports and parallel printers). Considering that the official SCSI bus needs 50 pins you can imagine the use of this connector needs some 'creative cabling'. The reduction of the number of ground wires they used is a bad idea, you better stick to 50 pins cabling in accordance with the SCSI standard. Differential buses

A differential SCSI bus has a maximum length of 25 meters. Quite a difference from the 3 meters for a single-ended fast-SCSI bus. The idea behind differential signals is that each bus signal has it's own return wire. So, each signal is carried on a (preferably twisted) pair of wires. The voltage difference between these two wires determines whether the signal is asserted or de-asserted. To a certain extent the voltage difference between ground and the signal wire pair is not relevant (don't try 10 kVolts though..). It is beyond the scope of this document to explain why this differential idea is so much better. Just accept that electrically seen the use of differential signals gives a much better noise margin. You will normally find differential buses in use for inter-cabinet connections. Because of the lower cost single ended is mostly used for shorter buses like inside cabinets. There is nothing that stops you from using differential stuff with FreeBSD, as long as you use a controller that has device driver support in FreeBSD. As an example, Adaptec marketed the AH1740 as a single ended board, whereas the AH1744 was differential. The software interface to the host is identical for both. Terminators

Terminators in SCSI terminology are resistor networks that are used to get a correct impedance matching. Impedance matching is important to get clean signals on the bus, without reflections or ringing. If you once made a long distance telephone call on a bad line you probably know what reflections are. With 20Mbytes/sec travelling over your SCSI bus, you don't want signals echoing back. Terminators come in various incarnations, with more or less sophisticated designs. Of course, there are internal and external variants. Almost every SCSI device comes with a number of sockets in which a number of resistor networks can (must be!) installed. If you remove terminators from a device, carefully stock 'm. You will need them when you ever decide to reconfigure your SCSI bus. There is enough variation in even these simple tiny things to make finding the exact replacement a frustrating business. There are also SCSI devices that have - a single jumper to enable or disable a builtin terminator. - There are special terminators you can stick onto a flatcable + a single jumper to enable or disable a built-in terminator. + There are special terminators you can stick onto a flat cable bus. Others look like external connectors, so a connector hood without a cable. So, lots of choice as you can see. There is much debate going on if and when you should switch from simple resistor (passive) terminators to active terminators. Active terminators contain more or less elaborate circuits to give more clean bus signals. The general consensus - seems to be that the usefullnes of active termination increases + seems to be that the usefulness of active termination increases when you have long buses and/or fast devices. If you ever have problems with your SCSI buses you might consider trying an active terminator. Try to borrow one first, they reputedly are quite expensive. Please keep in mind that terminators for differential and single-ended buses are not identical. You should not mix the two variants. OK, and now where should you install your terminators? This is by far the most misunderstood part of SCSI. And it is by far the simplest.. The rule is: every SCSI bus has 2 (two) terminators, one at each end of the bus. So, two and not one or three or whatever. Do yourself a favour and stick to this rule. It will save you endless grief, because wrong termination has the potential to introduce highly mysterious bugs. A common pitfall is to have an internal (flat)cable in a machine and also an external cable attached to the controller. It seems almost everybody forgets to remove the terminators from the controller. The terminator must now be on the last external device, and not on the controller! In general, every reconfiguration of a SCSI bus must pay attention to this. What I did myself is remove all terminators from my SCSI devices and controllers. I own a couple of external terminators, for both the Centronics-type external cabling and for the internal flat cable connectors. This makes reconfiguration much easier. Terminator power

The terminators discussed in the previous chapter need power to operate properly. On the SCSI bus, a line is dedicated to this purpose. So, simple huh? Not so. Each device can provide it's own terminator power to the terminator sockets it has on-device. But if you have external terminators, or when the device supplying the terminator power to the SCSI bus line is switched off you are in trouble. The idea is that initiators (these are devices that initiate actions on the bus, a discussion follows) must supply terminator power. All SCSI devices are allowed (but not required) to supply terminator power. To allow for switched-off devices on a bus, the terminator power must be supplied to the bus via a diode. This prevents the backflow of current to switched-off devices. To prevent all kinds of nastiness, the terminator power is usually fused. As you can imagine, fuses might blow. This can, but does not have to, lead to a non functional bus. If multiple devices supply terminator power, a single blown fuse will not put you out of business. A single supplier with a blown fuse certainly will. Clever external terminators sometimes have a LED indication that shows whether terminator power is present. In newer designs auto-restoring fuses are used who 'reset' themselves after some time. On modern devices, sometimes integrated terminators are used. These things are special purpose integrated circuits that can be dis/en-abled with a control pin. It is not necessary to physically remove them from a device. You may find them on newer host adapters, sometimes they even are software configurable, using some sort of setup tool. Consult you documentation! Device addressing

Because the SCSI bus is, ehh, a bus there must be a way to distinguish or address the different devices connected to it. This is done by means of the SCSI or target ID. Each device has a unique target ID. You can select the ID to which a device - must respond using a set of jumpers, or a dipswitch, or + must respond using a set of jumpers, or a dip switch, or something similar. Consult the documentation of your device for more information. Beware of multiple devices configured to use the same ID. Chaos normally reigns in this case. For an 8 bit bus, a maximum of 8 targets is possible. The maximum is 8 because the selection is done bitwise using the 8 - datalines on the bus. For wide this increases to the number of - datalines. + data lines on the bus. For wide this increases to the number of + data lines. The higher the SCSI target ID, the higher the priority the devices has. When it comes to arbitration between devices that want to use the bus at the same time, the device that has the highest SCSI ID will win. This also means that the SCSI - hostadapter usually uses target ID 7 (for narrow buses). + host adapter usually uses target ID 7 (for narrow buses). For a further subdivision, the standard allows for Logical Units or LUNs for short. A single target ID may have multiple LUNs. For example, a tape device including a tape changer may have LUN 0 for the tape device itself, and LUN 1 for the - tapechanger. In this way, the host system can address each of + tape changer. In this way, the host system can address each of the parts of the tape unit as desired. Bus layout

SCSI buses are linear. So, not shaped like Y-junctions, star - topologies, cobwebbs or whatever else people might want to + topologies, cobwebs or whatever else people might want to invent. You might notice that the terminator issue discussed earlier becomes rather hairy if your bus is not linear.. The electrical characteristics, it's noise margins and ultimately the reliability of it all are tightly related to linear bus rule. Stick to the linear bus rule! Using SCSI with FreeBSD

About translations, BIOSes and magic...

As stated before, you should first make sure that you have a electrically sound bus. When you want to use a SCSI disk on your PC as boot disk, you must aware of some quirks related to PC BIOSes. The PC BIOS in it's first incarnation used a low level physical interface to the - harddisk. So, you had to tell the BIOS (using a setup tool or a - BIOS builtin setup) how your disk physically looked like. This + hard disk. So, you had to tell the BIOS (using a setup tool or a + BIOS built-in setup) how your disk physically looked like. This involved stating number of heads, number of cylinders, number of sectors per track, obscure things like precompensation and reduced write current cylinder etc. One might be inclined to think that since SCSI disks are smart you can forget about this. Alas, the arcane setup issue is still present today. The system BIOS needs to know how to access your SCSI disk with the head/cyl/sector method. The SCSI host adapter or SCSI controller you have put in your AT/EISA/PCI/whatever bus to connect your disk therefore has it's - own onboard BIOS. During system startup, the SCSI BIOS takes over - the harddisk interface routines from the system BIOS. To fool the - system BIOS, the system setup is normally set to No harddisk + own on-board BIOS. During system startup, the SCSI BIOS takes over + the hard disk interface routines from the system BIOS. To fool the + system BIOS, the system setup is normally set to No hard disk present. Obvious, isn't it? The SCSI BIOS itself presents to the system a so called translated drive. This means that a fake drive table is constructed that allows the PC to boot the drive. This translation is often (but not always) done using a pseudo drive with 32 heads and 64 sectors per track. By varying the number of cylinders, the SCSI BIOS adapts to the actual drive size. It is useful to note that 32 * 64 / 2 = the size of your drive in megabytes. The division by 2 is to get from disk blocks that are normally 512 bytes in size to Kbytes. Right.. All is well now?! No, it isn't. The system BIOS has another quirk you might run into. The number of cylinders of a - bootable harddisk cannot be greater than 1024. Using the - translation above, this is a showstopper for disks greater than + bootable hard disk cannot be greater than 1024. Using the + translation above, this is a show-stopper for disks greater than 1 Gb. With disk capacities going up all the time this is causing problems. Fortunately, the solution is simple: just use another translation, e.g. with 128 heads instead of 32. In most cases new SCSI BIOS versions are available to upgrade older SCSI host adapters. Some newer adapters have an option, in the form of a jumper or software setup selection, to switch the translation the SCSI BIOS uses. It is very important that all operating systems on the disk use the same translation to get the right idea about where to find the relevant partitions. So, when installing FreeBSD you must answer any questions about heads/cylinders etc using the translated values your host adapter uses. Failing to observe the translation issue might be un-bootable systems or - operating systems overwriting eachothers partitions. Using fdisk + operating systems overwriting each others partitions. Using fdisk you should be able to see all partitions. As promised earlier: what is this talk about 'lying' devices? As you might already know, the FreeBSD kernel reports the geometry of SCSI disks when booting. An example from one of my systems: Feb 9 19:33:46 yedi /386bsd: aha0 targ 0 lun 0: Feb 9 19:33:46 yedi /386bsd: sd0: 636MB (1303250 total sec), 1632 cyl, 15 head, 53 sec, bytes/sec 512 This info is retrieved from the SCSI disk itself. Newer disks often use a technique called zone bit recording. The idea is that on the outer cylinders of the drive there is more space so more sectors per track can be put on them. This results in disks that have more tracks on outer cylinders than on the inner cylinders and, last but not least, have more capacity. You can imagine that the value reported by the drive when inquiring about the geometry now becomes fake. SCSI subsystem design

FreeBSD uses a layered SCSI subsystem. For each different controller card a device driver is written. This driver knows all the intimate details about the hardware it controls. The driver has a interface to the upper layers of the SCSI subsystem through which it receives it's commands and reports back any status. On top of the card drivers there are a number of more generic drivers for a class of devices. More specific: a driver for tape devices (abbreviation: st), magnetic disks (sd), cdroms (cd) etc. In case you are wondering where you can find this stuff, it all lives in /sys/scsi. See the man pages in section 4 for more details. The multi level design allows a decoupling of low-level bit banging and more high level stuff. Adding support for another - piece of hardware is a much more managable problem. + piece of hardware is a much more manageable problem. Kernel configuration

Dependent on your hardware, the kernel configuration file must - contain one or more lines describing your hostadapter(s). + contain one or more lines describing your host adapter(s). This includes I/O addresses, interrupts etc. Consult the man page for your adapter driver to get more info. Apart from that, check out /sys/i386/conf/LINT for an overview of a kernel config file. LINT contains every possible option you can dream of. It does not imply LINT will actually get you to a working kernel at all. Although it is probably stating the obvious: the kernel config file should reflect your actual hardware setup. So, interrupts, I/O addresses etc must match the kernel config file. During system boot messages will be displayed to indicate whether the configured hardware was actually found. An example based on the FreeBSD 2.0.5-Release kernel config file LINT with some added comments (between []): # SCSI host adapters: `aha', `ahb', `aic', `bt', `nca' # # aha: Adaptec 154x # ahb: Adaptec 174x # ahc: Adaptec 274x/284x/294x # aic: Adaptec 152x and sound cards using the Adaptec AIC-6360 (slow!) # bt: Most Buslogic controllers # nca: ProAudioSpectrum cards using the NCR 5380 or Trantor T130 # uha: UltraStore 14F and 34F # sea: Seagate ST01/02 8 bit controller (slow!) # wds: Western Digital WD7000 controller (no scatter/gather!). # # Note that the order is important in order for Buslogic cards to be # probed correctly. # [For a Bustek controller] controller bt0 at isa? port "IO_BT0" bio irq ? vector btintr [For an Adaptec AHA274x, 284x etc controller] controller ahc0 at isa? bio irq ? vector ahcintr # port??? iomem? [For an Adaptec AHA174x controller] controller ahb0 at isa? bio irq ? vector ahbintr [For an Adaptec AHA154x controller] controller aha0 at isa? port "IO_AHA0" bio irq ? drq 5 vector ahaintr [For an Ultrastor adapter] controller uha0 at isa? port "IO_UHA0" bio irq ? drq 5 vector uhaintr controller scbus0 #base SCSI code disk sd0 at scbus0 target 0 unit 0 [SCSI disk 0 is at scbus 0, LUN 0] disk sd1 at scbus0 target 1 [implicit LUN 0 if omitted] disk sd2 at scbus0 target 3 disk sd3 at scbus0 target 4 tape st1 at scbus0 target 6 [SCSI tape at target 6] device cd0 at scbus? [the first ever CDROM found, no wiring] The example above tells the kernel to look for a bt (Bustek) controller, then for an Adaptec 274x, 284x etc board, and so on. The lines following the controller specifications tell the kernel to configure specific devices but only attach them when they match the target ID and LUN specified. So, if you had a SCSI tape at target ID 2 it would not be configured, but it will attach when it is at target ID 6. Below is another example of a kernel config file as used by FreeBSD version < 2.0.5. The difference with the first example is that devices are not 'wired down'. 'Wired down' means that you specify which SCSI target belongs to which device. A kernel built to the config file below will attach the first SCSI disk it finds to sd0, the second disk to sd1 etc. If you ever removed or added a disk, all other devices of the same type (disk in this case) would 'move around'. This implies you have to change /etc/fstab each time. Although the old style still works, you are strongly recommended to use this new feature. It will save you a lot of grief whenever you shift your hardware around on the SCSI buses. So, when you re-use your old trusty config file after upgrading from a pre-FreeBSD2.0.5.R system check this out. controller ahb0 at isa? bio irq 11 vector ahbintr [driver for Adaptec 174x] controller aha0 at isa? port "IO_AHA0" bio irq 11 drq 5 vector ahaintr [for Adaptec 154x] controller sea0 at isa? bio irq 5 iomem 0xc8000 iosiz 0x2000 vector seaintr [for Seagate ST01/02] controller scbus0 device sd0 [support for 4 SCSI harddisks, sd0 up sd3] device sd1 device sd2 device sd3 device st0 [support for 2 SCSI tapes] device st1 device cd0 #Only need one of these, the code dynamically grows [for the cdrom] Both examples support 4 SCSI disks. If during boot more devices of a specific type (e.g. sd disks) are found than are configured in the booting kernel, the system will complain. You will have to build and boot a new kernel (after adapting the kernel configuration file) before you can use all of the devices. It does not hurt to have 'extra' devices in the kernel, the example above will work fine when you have only 2 SCSI disks. Use man 4 scsi to check for the latest info on the SCSI - subsystem. For more detailed info on hostadapter drivers use eg + subsystem. For more detailed info on host adapter drivers use eg man 4 aha for info on the Adaptec 154x driver. Tuning your SCSI kernel setup

Experience has shown that some devices are slow to respond to INQUIRY commands after a SCSI bus reset. An INQUIRY command is sent by the kernel on boot to see what kind of device (disk, tape, cdrom etc) is connected to a specific target ID. This process is called device probing by the way. To work around this problem, FreeBSD allows a tunable delay time before the SCSI devices are probed following a SCSI bus reset. You can set this - delaytime in your kernel configuration file using a line like: + delay time in your kernel configuration file using a line like: options "SCSI_DELAY=15" #Be pessimistic about Joe SCSI device This line sets the delay time to 15 seconds. On my own system I had to - use 3 seconds minimum to get my trusty old CDROM drive to be recognised. + use 3 seconds minimum to get my trusty old CDROM drive to be recognized. Start with a high value (say 30 seconds or so) when you have problems with device recognition. If this helps, tune it back until it just stays working. Rogue SCSI devices

Although the SCSI standard tries to be complete and concise, it is a complex standard and implementing things correctly is no easy task. Some vendors do a better job then others. This is exactly where the 'rogue' devices come into view. Rogues are - devices that are recognised by the FreeBSD kernel as behaving slightly + devices that are recognized by the FreeBSD kernel as behaving slightly (...) non-standard. Rogue devices are reported by the kernel when booting. An example for two of my cartridge tape units: Feb 25 21:03:34 yedi /386bsd: ahb0 targ 5 lun 0: Feb 25 21:03:34 yedi /386bsd: st0: Tandberg tdc3600 is a known rogue Mar 29 21:16:37 yedi /386bsd: aha0 targ 5 lun 0: Mar 29 21:16:37 yedi /386bsd: st1: Archive Viper 150 is a known rogue For instance, there are devices that respond to all LUNs on a certain target ID, even if they are actually only one device. It is easy to see that the kernel might be fooled into believing that there are 8 LUNs at that particular target ID. The confusion this causes is left as an exercise to the user. - The SCSI subsystem of FreeBSD recognises devices with bad habits by + The SCSI subsystem of FreeBSD recognizes devices with bad habits by looking at the INQUIRY response they send when probed. Because the INQUIRY response also includes the version number of the device firmware, it is even possible that for different firmware versions different workarounds are used. This scheme works fine, but keep in mind that it of course only works for devices that are KNOWN to be weird. If you are the first to connect your bogus Mumbletech SCSI cdrom you might be the one that has to define which workaround is needed. Busmaster host adapters

Most, but not all, SCSI host adapters are bus mastering controllers. This means that they can do I/O on their own without putting load onto the host CPU for data movement. This is of course an advantage for a multitasking operating system like FreeBSD. It must be noted however that there might be some rough edges. For instance an Adaptec 1542 controller can be set to use different - transferspeeds on the host bus (ISA or AT in this case). The controller + transfer speeds on the host bus (ISA or AT in this case). The controller is settable to different rates because not all motherboards can handle the higher speeds. Problems like hangups, bad data etc might be the result of using a higher data transfer rate then your motherboard can stomach. The solution is of course obvious: switch to a lower data transfer rate and try if that works better. In the case of a Adaptec 1542, there is an option that can be put into the kernel config file to allow dynamic determination of the right, read: fastest feasible, transfer rate. This option is disabled by default: options "TUNE_1542" #dynamic tune of bus DMA speed Check the man pages for the host adapter that you use. Or better still, use the ultimate documentation (read: driver source). Tracking down problems

The following list is an attempt to give a guideline for the most common SCSI problems and their solutions. It is by no means complete. Check for loose connectors and cables. Check and doublecheck the location and number of your terminators. Check if your bus has at least one supplier of terminator power (especially with external terminators. Check if no double target IDs are used. Check if at least one device provides terminator power to the bus. Check if all devices to be used are powered up. Make a minimal bus config with as little devices as possible. - If possible, configure your hostadapter to use slow bus speeds. + If possible, configure your host adapter to use slow bus speeds. Further reading

If you intend to do some serious SCSI hacking, you might want to have the official standard at hand: Approved American National Standards can be purchased from ANSI at 11 West 42nd Street, 13th Floor, New York, NY 10036, Sales Dept: (212) 642-4900. You can also buy many ANSI standards and most committee draft documents from Global Engineering Documents, 15 Inverness Way East, Englewood, CO 80112-5704, Phone: (800) 854-7179, Outside USA and Canada: (303) 792-2181, FAX: (303) 792- 2192. Many X3T10 draft documents are available electronically on the SCSI BBS (719-574-0424) and on the ncrinfo.ncr.com anonymous ftp site. Latest X3T10 committee documents are: AT Attachment (ATA or IDE) [X3.221-1994] (Approved) ATA Extensions (ATA-2) [X3T10/948D Rev 2i] Enhanced Small Device Interface (ESDI) [X3.170-1990/X3.170a-1991] (Approved) Small Computer System Interface - 2 (SCSI-2) [X3.131-1994] (Approved) SCSI-2 Common Access Method Transport and SCSI Interface Module (CAM) [X3T10/792D Rev 11] Other publications that might provide you with additional information are: "SCSI: Understanding the Small Computer System Interface", written by NCR Corporation. Available from: Prentice Hall, Englewood Cliffs, NJ, 07632 Phone: (201) 767-5937 ISBN 0-13-796855-8 "Basics of SCSI", a SCSI tutorial written by Ancot Corporation Contact Ancot for availability information at: Phone: (415) 322-5322 Fax: (415) 322-0455 "SCSI Interconnection Guide Book", an AMP publication (dated 4/93, Catalog 65237) that lists the various SCSI connectors and suggests cabling schemes. Available from AMP at (800) 522-6752 or (717) 564-0100 "Fast Track to SCSI", A Product Guide written by Fujitsu. Available from: Prentice Hall, Englewood Cliffs, NJ, 07632 Phone: (201) 767-5937 ISBN 0-13-307000-X "The SCSI Bench Reference", "The SCSI Encyclopedia", and the "SCSI Tutor", ENDL Publications, 14426 Black Walnut Court, Saratoga CA, 95070 Phone: (408) 867-6642 "Zadian SCSI Navigator" (quick ref. book) and "Discover the Power of SCSI" (First book along with a one-hour video and tutorial book), Zadian Software, Suite 214, 1210 S. Bascom Ave., San Jose, CA 92128, (408) 293-0800 On Usenet the newsgroups and are noteworthy places to look for more info. You can also find the SCSI-Faq there, which is posted periodically. - Most major SCSI device and hostadapter suppliers operate ftp sites + Most major SCSI device and host adapter suppliers operate ftp sites and/or BBS systems. They may be valuable sources of information about the devices you own. diff --git a/handbook/submitters.sgml b/handbook/submitters.sgml index bacc97eb5d..903f842a57 100644 --- a/handbook/submitters.sgml +++ b/handbook/submitters.sgml @@ -1,222 +1,222 @@ - + Contributing to FreeBSD

Contributed by &a.jkh;. -This guide is intended for those who are moderately familar with +This guide is intended for those who are moderately familiar with FreeBSD and have reached a point where they have some locally developed customizations or fixes to the system which they'd like to incorporate back into the mainstream sources. Submitting something to the FreeBSD project ensures that you won't have to continually reintegrate it with each subsequent release and is also an excellent way of getting your code seriously tested! Many people have seen an original concept develop far beyond what they might have originally envisioned simply due to the flood of feedback and ideas generated by the many thousands of users of FreeBSD. Contributions are also what FreeBSD lives and grows from, so your contributions are very important to the continued survival of this communal effort of ours---we're very glad to see you reading this document! -Submissions to FreeBSD can generally be classified into four catagories: +Submissions to FreeBSD can generally be classified into four categories: Ideas, general suggestions, bug reports. Changes to existing sources. -Significant contribution of a large body of independant work. +Significant contribution of a large body of independent work. Porting of freely available software. -A submission in any of these catagories is highly welcomed as they +A submission in any of these categories is highly welcomed as they are each, in their own way, quite significant to the project. Ideas and suggestions

An idea, suggestion or fix can be communicated in one of the following ways: An idea or suggestion of general technical interest should be mailed to <hackers@freebsd.org>. Likewise, people with an interest in such things (and a tolerance for a high volume of mail!) may - subscribe to the hackers mailing list by sendimg mail to + subscribe to the hackers mailing list by sending mail to <majordomo@freebsd.org>. See for more information about this and other mailing lists. An actual bug report should be filed by using the send-pr(1) program. This will prompt you for various fields to fill in. Simply go to the fields surrounded by <>'s and fill in your own information in place of what's suggested there. You should receive confirmation of your bug report and a tracking number. Keep this tracking number and use it in any subsequent correspondence. If you do not receive confirmation in a timely fashion (3 days to a week, depending on your email connection) or are, for some reason, unable to use the send-pr(1) command, then you may also file a bug report by sending mail to <bugs@freebsd.org>. Changes to the existing code

An addition or change to the existing source code is a somewhat trickier affair and depends a lot on how far out of date you are with the current state of the core FreeBSD development. There is a special on-going release of FreeBSD known as ``FreeBSD-current'' which is made available in a variety of ways for the convenience of developers working actively on the system. See for more information about getting and using FreeBSD-current. Working from older sources unfortunately means that your changes may sometimes be too obsolete or too divergent for easy re-integration into FreeBSD. Chances of this can be minimized somewhat by subscribing to the <announce@freebsd.org> and <current@freebsd.org> mailing lists, where discussions on the current state of the system take place. Assuming that you can manage to secure fairly up-to-date sources to base your changes on, the next step is to produce a set of diffs to send to the FreeBSD maintainers. This is done with the diff(1) command, with the `context diff' form being preferred. For example: diff -c <oldfile> <newfile> or diff -c -r <olddir> <newdir> would generate such a set of context diffs for the given source file or directory hierarchy. See the man page for diff(1) for more details. Once you have a set of diffs (which you may test with the patch(1) command), you should bundle them up in an email message and send it, along with a brief description of what the diffs are for, to <hackers@freebsd.org>. Someone will very likely get back in touch with you in 24 hours or less, assuming of course that your diffs are interesting! :-) If your changes don't express themselves well as diffs alone (e.g. you've perhaps added, deleted or renamed files as well) then you may be better off bundling any new files, diffs and instructions for deleting/renaming others into a tar file and running the uuencode(1) program on it before sending the output of that to <hackers@freebsd.org>. See the man pages on tar(1) and uuencode(1) for more information on bundling files this way. If your change is of a potentially sensitive nature, e.g. you're unsure of copyright issues governing its further distribution or you're simply not ready to release it without a tighter review first, then you should send it to <core@freebsd.org> rather than <hackers@freebsd.org>. The core mailing list reaches a much smaller group of people who do much of the day-to-day work on FreeBSD. Note that this group is also very busy and so you should only send mail to them in cases where mailing to hackers is truly impractical. Contributions of new code

In the case of a significant contribution of a large body work, or the addition of an important new feature to FreeBSD, it becomes almost always necessary to either send changes as uuencoded tar files or upload them to our ftp site . When working with large amounts of code, the touchy subject of copyrights also invariably comes up. Acceptable copyrights for code included in FreeBSD are: The BSD copyright. This copyright is most preferred due to its ``no strings attached'' nature and general attractiveness to commercial enterprises. Far from discouraging such commercial use, the FreeBSD Project actively encourages such participation by commercial interests who might eventually be inclined to invest something of their own into FreeBSD. The GNU Public License, or ``GPL''. This license isn't quite as popular with us due to the amount of extra effort demanded of anyone using the code for commercial purposes, but given the sheer quantity of GPL'd code we currently require (compiler, assembler, text formatter, etc) it would be silly to refuse additional contributions under this license. Code under the GPL also goes into a different part of the tree, that being /sys/gnu or /usr/src/gnu, and is therefore - easily identifable to anyone for whom the GPL presents a problem. + easily identifiable to anyone for whom the GPL presents a problem.

Contributions coming under any other type of copyright must be carefully reviewed before their inclusion into FreeBSD will be considered. Contributions for which particularly restrictive commercial copyrights apply are generally rejected, though the authors are always encouraged to make such changes available through their own channels. To place a ``BSD-style'' copyright on your work, include the following text at the very beginning of every source code file you wish to protect, replacing the text between the `%%' with the appropriate information. Copyright (c) %%proper_years_here%% %%your_name_here%%, %%your_state%% %%your_zip%%. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer as the first lines of this file unmodified. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. All advertising materials mentioning features or use of this software must display the following acknowledgment: This product includes software developed by %%your_name_here%%. 4. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY %%your_name_here%% ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL %%your_name_here%% BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - $Id: submitters.sgml,v 1.6 1995-08-12 21:33:24 jkh Exp $ + $Id: submitters.sgml,v 1.7 1995-09-27 00:46:29 jmz Exp $ For your convenience, a copy of this text can be found in /usr/share/examples/etc/bsd-style-copyright. Porting of software

The porting of freely available software, while perhaps not as gratifying as developing your own from scratch, is still a vital part of FreeBSD's growth and of great usefulness to those who wouldn't otherwise know where to turn for it. All ported software is organized into a carefully organized hierarchy know as ``the ports collection''. The collection enables a new user to get a quick and complete overview of what's available for FreeBSD in an easy-to-compile form. It also saves considerable space by not actually containing the the majority of the sources being ported, but merely those differences required for running under FreeBSD. See for more information on using the ports collection and for guidelines on creating new ports. You may also send mail to <ports@freebsd.org>. Whichever way you decide to contribute, we hope you'll find it an enjoyable and rewarding process. Such contributions are also very valuable to FreeBSD's continued progress, and as a free software effort, the more we all put in the more we all get back out of it! diff --git a/handbook/sup.sgml b/handbook/sup.sgml index a3b24c45b4..eb0ae3097e 100644 --- a/handbook/sup.sgml +++ b/handbook/sup.sgml @@ -1,91 +1,91 @@ - + SUP

Contributed by &a.jkh; and &a.gclarkii;. SUP is a network based software update tool developed at CMU. The purpose of this document is get the beginner up and running with sup. Getting setup

First off you will need to pick up the sup binaries. The easiest way of doing this is to grab the sup.tgz package from: ftp://ftp.FreeBSD.ORG:/pub/FreeBSD/packages/sup.tgz Install the sup package using pkg_add and add the following line to your /etc/services file: sup 871/tcp #sup SUP gets the information it needs to run from a configuration file called a supfile. This file tells sup what collections it will be updating and/or installing and where they go. The supfile in this directory will -sup both the source and ports collection - look for the blank line seperating +sup both the source and ports collection - look for the blank line separating the two collections; if you don't want ports, you can simply delete all the ports entries. If you're inside the United States, you may also uncomment the `secure' collection line to grab the DES code. If you're outside the U.S., you should NOT sup this code from FreeBSD.ORG as this will violate U.S. export restrictions. Simply sup everything but the secure collection and then go look on braae.ru.ac.za, where it's available for anonymous ftp for those outside the U.S. Any other distributions you do not wish to receive can be commented out -with a # at the begining of the distribution line. +with a # at the beginning of the distribution line. Once this is setup, you're ready to go. To start sup type: sup supfile If you wish to see what sup is doing "verbosely", give it the -v option, like so: sup -v supfile Thats all there is to it! Remember that if you're running current, which is what you will have if you sup, please join the freebsd-current mailing list. You should also be sure to read for important information on just what we can and cannot do for you as a -current user. Description of FreeBSD SUP distributions

For the main FreeBSD distribution: base: /usr/src/... misc files at the top of /usr/src bin: /usr/src/bin system binaries secure: /usr/src/secure DES Sources. U.S./Canada only! etc: /usr/src/etc system files games: /usr/src/games games gnu: /usr/src/gnu sources under the GNU Public License include: /usr/src/include include files sys: /usr/src/sys kernel sources lib: /usr/src/lib libraries libexec: /usr/src/libexec more system binaries share: /usr/src/share various shared resources sbin: /usr/src/sbin even more system binaries usrbin: /usr/src/usr.bin user binaries usrsbin: /usr/src/usr.sbin that's it for the system binaries And for the ports collection: ports-base: /usr/ports/... misc files at the top of /usr/ports ports-editors: /usr/ports/editors text editors ports-game: /usr/ports/games games ports-lang: /usr/ports/lang programming languages ports-mail: /usr/ports/mail mail software ports-math: /usr/ports/math math software ports-net: /usr/ports/net networking software ports-news: /usr/ports/news USENET news software ports-print: /usr/ports/print printing software ports-russian: /usr/ports/russian russian software ports-shells: /usr/ports/shells various UN*X shells ports-utils: /usr/ports/utils miscellaneous utilities ports-x11: /usr/ports/x11 X11 software