Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 May 1998 17:04:34 -0700 (PDT)
From:      Greg Lehey <grog>
To:        FreeBSD-questions@FreeBSD.ORG
Subject:   "The Complete FreeBSD", second edition: errata and addenda
Message-ID:  <199805230004.RAA21719@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help







          Errata and addenda for the Complete FreeBSD, second edition




                          Last revision: 12 May 1998

The trouble with books is that you can't update them the way you can a web page
or any other online documentation.  The result is that most leading  edge  com-
puter  books  are  out  of date almost before they are printed.  Unfortunately,
``The Complete FreeBSD'', published by Walnut Creek, is no exception.  The sec-
ond  edition  has  only  just  been published, but already a number of bugs and
changes have surfaced.

The following is a list of modifications which go beyond  simple  typos.   They
relate  to the second edition, formatted on 16 December 1997.  If you have this
book, please check this list.  If you have the first edition of 19  July  1996,
please  check  ftp://ftp.lemis.com/pub/cfbsd/errata-1.  This  same file is also
available via the web link http://www.lemis.com/.

This list is available in four forms:

o A    PostScript    version,     suitable     for     printing     out,     at
  ftp://ftp.lemis.com/pub/cfbsd/errata-2.ps.  See  page 222 of the book to find
  out how to print out PostScript.  If at all possible, please take this  docu-
  ment: it's closest to the original text.

  Be  careful selecting this file with a web browser: it is often impossible to
  reload the document, and you may see a previously cached version.

o An enhanced ASCII version at ftp://ftp.lemis.com/pub/cfbsd/errata-2.txt. When
  viewed with more or less, this version will show some highlighting and under-
  lining.  It's not suitable for direct viewing.

o An ASCII-only version at  ftp://ftp.lemis.com/pub/cfbsd/errata-2.ascii.  This
  version  is  posted  every  week to the FreeBSD-questions mailing list.  Only
  take this version if you have real problems with PostScript: I can't be  sure
  that the lack of different fonts won't confuse the meaning.

o A web version at http://www.lemis.com/errata-2.html.

All  these  modifications  have  been applied to the ongoing source text of the
book, so if you buy a later edition, they will be in it as well.  If you find a












bug or a suspected bug in the book, please contact me at <grog@FreeBSD.org.>

General changes
_______________


o In  a  number  of  places, I suggest the use of the following command to find
  process information:

  $ ps aux | grep foo

  Unfortunately, ps is sensitive to the column width of the  terminal  emulator
  upon  which  it  is working.  This command usually works fine on a relatively
  wide xterm, but if you're running on an 80-column terminal, it  may  truncate
  exactly  the  information  you're  looking for, so you end up with no output.
  You can fix that with the w option:

  $ ps waux | grep foo

  Thanks to Sue Blake <sue@welearn.com.au> for this information


Location of the sample files
____________________________

The 2.2.5 CD-ROM came out before the book, and it contains  the  files  on  the
third     (repository)    CD-ROM    as    a    single    gzipped    tar    file
/xperimnt/cfbsd/cfbsd.tar.gz.  It contains the following files:

drwxr-xr-x jkh/jkh           0 Oct 17 13:01 1997 cfbsd/
drwxr-xr-x jkh/jkh           0 Oct 17 13:01 1997 cfbsd/mutt/
-rw-r--r-- jkh/jkh         352 Oct 15 15:21 1997 cfbsd/mutt/.mail_aliases
-rw-r--r-- jkh/jkh        9394 Oct 15 15:22 1997 cfbsd/mutt/.muttrc
drwxr-xr-x jkh/jkh           0 Oct 17 14:02 1997 cfbsd/scripts/
-rw-r--r-- jkh/jkh       18281 Oct 16 16:52 1997 cfbsd/scripts/.fvwm2rc
-rwxr-xr-x jkh/jkh        1392 Oct 17 12:54 1997 cfbsd/scripts/install-desktop
-rw-r--r-- jkh/jkh         296 Oct 17 12:35 1997 cfbsd/scripts/.xinitrc
-rwxr-xr-x jkh/jkh         622 Oct 17 13:51 1997 cfbsd/scripts/install-rcfiles
-rw-r--r-- jkh/jkh        1133 Oct 17 13:00 1997 cfbsd/scripts/Uutry
-rw-r--r-- jkh/jkh        1028 Oct 17 14:02 1997 cfbsd/scripts/README
drwxr-xr-x jkh/jkh           0 Oct 18 19:32 1997 cfbsd/docs/
-rw-r--r-- jkh/jkh      199111 Oct 16 14:29 1997 cfbsd/docs/packages.txt
-rw-r--r-- jkh/jkh      189333 Oct 16 14:28 1997 cfbsd/docs/packages-by-category.txt












-rw-r--r-- jkh/jkh      188108 Oct 16 14:29 1997 cfbsd/docs/packages.ps
-rw-r--r-- jkh/jkh      226439 Oct 16 14:27 1997 cfbsd/docs/packages-by-category.ps
-rw-r--r-- jkh/jkh         788 Oct 16 15:01 1997 cfbsd/README
-rw-r--r-- jkh/jkh         248 Oct 17 11:52 1997 cfbsd/errata

To extract one of these files, say cfbsd/docs/packages.txt,  and  assuming  you
have the CD-ROM mounted as /cdrom, enter:

# cd /usr/share/doc
# tar xvzf /cdrom/xperimnt/cfbsd/cfbsd.tar.gz cfbsd/docs/packages.txt

See page 209 for more information on using tar.

These files are an early version of what is described in the book.  I'll put up
some updated versions on ftp://ftp.lemis.com/ in the near future.

Thanks to Frank McCormick <gfm@readybox.com> for drawing this to my  attention.

Page xxxiv
__________

Before the discussion of the shell prompts in the middle of the page, add:

In this book, I recommend the use of the Bourne shell or one of its descendents
(sh, bash, pdksh, ksh or zsh).  With the exception of sh, they are all  in  the
Ports Collection.  I personally use the bash shell.

This  is a personal preference, and a recommendation, but it's not the standard
shell.  The standard BSD shell is the C shell (csh), which  has  a  fuller-fea-
tured  descendent tcsh.  In particular, the standard installation sets the root
user up with a csh.  See page 152 (in this errata) for details of how to change
the shell.

Page 12: Printing the handbook
______________________________

The instructions for formatting the handbook are obsolete.  Replace the section
starting Alternatively, you can print out the handbook with the following text:

Alternatively, you can print out the handbook.  You need to have the documenta-
tion sources (/usr/doc) installed on your system.  You can  find  them  on  the
second  CD-ROM in the directory of the same name.  To install them, first mount
your CD-ROM (see page 175).  Then enter:












$ cd /cdrom/usr/doc/handbook
$ mkdir -p /usr/doc/handbook            you may need to be root for this operation
$ cp -pr * /usr/doc/handbook

You have a choice of formats for the output:

o ascii will give you plain 7-bit ASCII output, suitable for reading on a char-
  acter-mode terminal.

o html will give you HTML output, suitable for browsing with a web browser.

o latex  will  give  you LATEX format, suitable for further processing with TEX
  and LATEX.

o ps will give you PostScript output, probably the best choice for printing.

o roff will give you output in troff source.  You can process this output  with
  nroff or troff, but it's currently not very polished.  LATEX output is a bet-
  ter choice if you want to process it further.

Once you have decided your format, use make to create the document.  For  exam-
ple, if you decide on PostScript format, you would enter:

$ make FORMATS=ps

This creates a file handbook.ps which you can then print to a PostScript print-
er or with the aid of ghostscript (see page 222).

Thanks to Bob Beer <r-beer@onu.edu> for drawing this to my attention.

Page 45:  Preparing floppies for installation
_____________________________________________

Replace the paragraph below the list of file names (in the middle of the  page)
with:

The  floppy  set should contain the file bin.inf and the ones whose names start
with bin. followed by two letters.  These other  files  are  all  240640  bytes
long,  except  for the final one which is usually shorter.  Use the MS-DOS COPY
program to copy as many files as will fit onto each disk (5 or 6) until  you've
got  all  the distributions you want packed up in this fashion.  Copy each dis-
tribution into subdirectory corresponding to the base name--for  example,  copy
the bin distribution to the files A:\BIN\BIN.INF, A:\BIN\BIN.AA and so on.












Page 80 and 81
______________

In a couple of examples, the FreeBSD partition is shown as type 164.  It should
be 165.  Thanks to an unknown contributer for this correction  (sorry,  I  lost
your name).

Page 88: setting up for dumping
_______________________________

The  example mentions a variable savecore in /etc/rc.conf.  This variable is no
longer used--it's enough to set the variable dumpdev.

Page 92
_______

At the end of the section How to install a package add the text:

Alternatively, you can install packages from the /stand/sysinstall  Final  Con-
figuration Menu.  We saw this menu on page in figure 4-14 on page 71.  When you
start sysinstall from the command line, you get to this menu by  selecting  In-
dex, and then selecting Configure.


Page 93
_______

Before the heading Install ports from the first CD-ROM add:


Install ports when installing the system
________________________________________

The  file  ports/ports.tgz  on the first CD-ROM is a tar archive containing all
the ports.  You can install it with the base system if you  select  the  Custom
distribution  and  include the ports collection.  If you didn't install them at
the time, use the following method to install them all  (about  40  MB).   Make
sure your CD-ROM is mounted (in this example on /cdrom), and enter:

















Page 96
_______

After the example at the top of the page, add:

If you're using csh or tcsh, enter:

# cd /cdrom/ports/distfiles
# mkdir -p /usr/ports/distfiles              make sure you have a distfiles directory
# foreach i (*)
?   ln -s $i /usr/ports/distfiles/$i
? end

Thanks  to  Christopher Raven <gurab@lineone.net> for drawing this to my atten-
tion.

Page 128
________

Replace the complete text below the example with the following:

These values are defaults, and many are either incorrect for FreeBSD (for exam-
ple the device name /dev/com1) or do not apply at all (for example Xqueue).  If
you are configuring manually, select one Protocol and one Device entry from the
following selection.  If you must use a two-button mouse, uncomment the keyword
Emulate3Buttons--in this mode, pressing both mouse buttons simultaneously with-
in  Emulate3Timeout  milliseconds  causes  the server to report a middle button
press.

Section "Pointer"

    Protocol   "Microsoft"         for Microsoft protocol mice
    Protocol    "MouseMan"         for Logitech mice
    Protocol    "PS/2"             for a PS/2 mouse
    Protocol    "Busmouse"         for a bus mouse

    Device     "/dev/ttyd0"        for a mouse on the first serial port
    Device     "/dev/ttyd1"        for a mouse on the second serial port
    Device     "/dev/ttyd2"        for a mouse on the third serial port
    Device     "/dev/ttyd3"        for a mouse on the fourth serial port
    Device     "/dev/psm0"         for a PS/2 mouse
    Device     "/dev/mse0"         for a bus mouse













    Emulate3Buttons           only for a two-button mouse

EndSection

You'll notice that the protocol name does not always match  the  manufacturer's
name.   In  particular,  the  Logitech  protocol only applies to older Logitech
mice.  The newer ones use either the MouseMan or Microsoft  protocols.   Nearly
all modern serial mice run one of these two protocols, and most run both.

If  you are using a bus mouse or a PS/2 mouse, make sure that the device driver
is included in the kernel.  The GENERIC kernel contains drivers for both  mice,
but the PS/2 driver is disabled.  Use UserConfig (see page 50) to enable it.

Page 140
________

Just before the paragraph The super user add the following paragraph:

If  you  do  manage to lose the root password, all may not be lost.  Reboot the
machine to single user mode (see page 157), and enter:

# mount -u /             mount root file system read/write
# passwd root            change the password for root
Enter new password:
Enter password again:
# ^D                enter ctrl-D to continue with startup

Note that you should explicitly state the name root: in single user  mode,  the
system doesn't have the concept of user IDs.

Page 148
________

Replace the text at the top of the page with:

Modern  shells  supply  command  line editing which resembles the editors vi or
Emacs.  In bash, sh, ksh, and zsh you can make the choice by entering

Page 152
________

After figure 10-8, add the following text:













It would be tedious for every user to put settings in their private initializa-
tion files, so the shells also read a system-wide default file.  For the Bourne
shell family, it is /etc/profile, while the C shell  family  has  three  files:
/etc/csh.login  to  be  executed on login, /etc/csh.cshrc to be executed when a
new shell is started after you log in, and /etc/csh.logout to be executed  when
you  stop a shell.  The start files are executed before the corresponding indi-
vidual files.

In addition, login classes (page 141) offer another method of setting  environ-
ment variables at a global level.

Changing your shell
___________________

The  FreeBSD  installation  gives root a C shell, csh.  This is the traditional
Berkeley shell, but it has a number of disadvantages: command line  editing  is
very primitive, and the script language is significantly different from that of
the Bourne shell, which is the de facto standard for shell scripts: if you stay
with  the C shell, you may still need to understand the Bourne shell.  The lat-
est version of the Bourne shell sh also includes  some  command  line  editing.
See page 148 for details of how to enable it.

You  can  get  better  command line editing with tcsh, in the Ports Collection.
You can get both better command line editing and Bourne shell syntax with bash,
also in the Ports Collection.

If  you  have root access, you can use vipw to change your shell, but there's a
more general way: use chsh (Change Shell).  Simply run the program.  It  starts
your  favourite editor (as defined by the EDITOR environment variable).  Here's
an example before:

#Changing user database information for velte.
Shell: /bin/csh
Full Name: Jack Velte
Location:
Office Phone:
Home Phone:

You can change anything after the colons.  For example, you might  change  this
to:















#Changing user database information for velte.
Shell: /usr/local/bin/bash
Full Name: Jack Velte
Location: On the road
Office Phone: +1-408-555-1999
Home Phone:

chsh  checks and updates the password files when you save the modifications and
exit the editor.  The next time you log in, you get the new shell.  chsh  tries
to  ensure you don't make any mistakes--for example, it won't let you enter the
name of a shell which isn't mentioned in the file /etc/shells--but it's a  very
good  idea  to  check  the shell before logging out.  You can try this with su,
which you normally use to become super user:

bumble# su velte
Password:
su-2.00$                 note the new prompt

There are a couple of problems in using tcsh or bash as a root shell:

o The shell for root must be on the root file system,  otherwise  it  will  not
  work  in single user mode.  Unfortunately, most ports of shells put the shell
  in the directory /usr/local/bin, which is almost never on the root file  sys-
  tem.

o Most  shells  are  dynamically linked: they rely on library routines in files
  such as /usr/lib/libc.a.  These files are not available in single user  mode,
  so  the shells won't work.  You can solve this problem by creating statically
  linked versions of the shell, but this requires programming experience beyond
  the scope of this book.

If you can get hold of a statically linked version, perform the following steps
to install it:

o Copy the shell to /bin, for example:

  # cp /usr/local/bin/bash /bin

o Add the name of the shell to /etc/shells,  in this example the line  in  bold
  print:















  # List of acceptable shells for chpass(1).
  # Ftpd will not allow users to connect who are not using
  # one of these shells.
  /bin/sh
  /bin/csh
  /bin/bash


You can then change the shell for root as described above.

Thanks  to  Lars Koller  <Lars.Koeller@Uni-Bielefeld.DE> for drawing this to my
attention.

Page 160
________

Replace the text at the fourth bullet with the augmented text:

The second-level boot locates the kernel, by default the file  /kernel  on  the
root file system, and loads it into memory.  It prints the Boot: prompt at this
point so that you can influence this choice--see the man page on page  579  for
more details of what you can enter at this prompt.

Page 176
________

Add the following paragraph

Unmounting file systems

When you mount a file system, the system assumes it is going to stay there, and
in the interests of efficiency it delays writing data back to the file  system.
This  is the same effect we discussed on page 158.  As a result, if you want to
stop using a file system, you need to tell the system about it.   You  do  this
with  the umount command.  Note the spelling--there's no n in the command name.

You need to do this even with read-only media such as CD-ROMs: the  system  as-
sumes  it can access the data from a mounted file system, and it gets quite un-
happy if it can't.  Where possible, it locks removable media so that you  can't
remove them from the device until you unmount them.

Using  umount  is straightforward: just tell it what to unmount, either the de-
vice name or the directory name.  For example, to unmount the CD-ROM we mounted












in the example above, you could enter one of these commands:

# umount /dev/cd1a
# umount /cd1

Before  unmounting  a  file  system, umount checks that nobody is using it.  If
somebody is using it, it will refuse to unmount it with a message like  umount:
/cd1: Device busy.  This message often occurs because you have changed your di-
rectory to a directory on the file system you  want  to  remove.   For  example
(which also shows the usefulness of having directory names in the prompt):

=== root@freebie (/dev/ttyp2) /cd1 16 -> umount /cd1
umount: /cd1: Device busy
=== root@freebie (/dev/ttyp2) /cd1 17 -> cd
=== root@freebie (/dev/ttyp2) ~ 18 -> umount /cd1
=== root@freebie (/dev/ttyp2) ~ 19 ->

Thanks to Ken Deboy <glockr@locked_and_loaded.reno.nv.us> for pointing out this
omission.

Page 197, first line
____________________

The text of the first full sentence reads:

The first name, up the the  symbol, is the label.

In fact, it should read:

The first name, up to the | symbol, is the label.


Page 208, middle of page
________________________

The example shows the file name /dev/rst0 when  using  the  Bourne  shell,  and
/dev/nrst0  when  using  C  shell  and  friends.   This  is  inconsistent;  use
/dev/nrst0 with any shell if you want a non-rewinding tape, or /dev/rst0 if you
want a rewinding tape.

Thanks to Norman C Rice <nrice@emu.sourcee.com> for pointing out this one.














Page 219
________

Before the section Testing the spooler add the following section:

Starting the spooler
____________________

As  we  saw  above,  the  line  printer  daemon lpd is responsible for printing
spooled jobs.  If you're root, you can start it by name:

# lpd

Normally, however, you will want it to be started automatically when the system
starts up.  You do this by setting the variable lpd_enable in /etc/rc.conf:

lpd_enable="YES"              # Run the line printer daemon

See page 1609 for more details of /etc/rc.conf.

Thanks  to Tommy G. James <tgj@worldnet.att.net> for bringing this to my atten-
tion.

Page 242
________

The instructions for extracting the source files from CD-ROM in the  middle  of
page  242 are incorrect.  You'll find the kernel sources on the first CD-ROM in
the directory /src.  Replace the example with:

# mkdir -p /usr/src/sys
# ln -s /usr/src/sys /sys
# cd /
# cat /cdrom/src/sys.* | tar xzvf -

Thanks  to  Raymond   Noel   <raynoel@videotron.ca>   and   Suttipan   Limanond
<b0l6604@unix.tamu.edu> for finding this one.

Page 283, ``Creating the source tree''
______________________________________

Add a third point to what you need to know:













3.   Possibly,  the date of the last update that you want to be included in the
     checkout.  If you specify this date, cvs ignores any more recent  updates.
     This  option is often useful when somebody discovers a recently introduced
     bug in -CURRENT: you check out the modules as they were before the bug was
     introduced.   You  specify the date with the -D option, for example -D "10
     December 1997".


Page 285, after the second example.
___________________________________

Add the text:

If you need to check out an older version, for example if  there  are  problems
with the most recent version of -CURRENT, you could enter:

# cvs co  -D "10 December 1997" src/sys

This command checks out the kernel sources as of 10 December 1997.

Page 364, middle of page
________________________

Change the text from:

The names MYADDR and HISADDR are keywords which represent the addresses at each
end of the link.  They must be written as shown, though they may  be  in  lower
case.

to

The names MYADDR and HISADDR are keywords which represent the addresses at each
end of the link.  They must be written as shown, though newer versions  of  ppp
allow you to write them in lower case.

Thanks to Mark S. Reichman <mark@fang.cs.sunyit.edu> for this correction.

Page 368
________

Replace the paragraph after the second example with:

In  FreeBSD  version 3.0 and later, specify the options PPP_BSDCOMP and PPP_DE-












FLATE to enable two kinds of compression.  You'll also need to specify the cor-
responding  option  in  Kernel PPP's configuration file.  These options are not
available in FreeBSD version 2.

Thanks to Brian Somers <brian@Awfulhak.org> for this information.

Page 397
________

In the section ``Nicknames'', the example should read:

www       IN   CNAME          freebie
ftp       IN   CNAME          presto

In other words, there should be a space between CNAME and the system name.

Page 466, before the ps example
_______________________________

Add another bullet:

o Finally, you may find it convenient to let some other system handle all  your
  mail  delivery  for  you: you just send anything you can't deliver locally to
  this other host, which sendmail calls a smart  host.   This  is  particularly
  convenient if you send your mail with UUCP.

  To  tell  sendmail  to use a smart host (in our case, mail.example.net), find
  the following line in sendmail.cf:

  # "Smart" relay host (may be null)
  DS

  Change it to:

  # "Smart" relay host (may be null)
  DSmail.example.net


Page 478, ``Running Apache''
____________________________

The text describes the location of the server  as  /usr/local/www/server/httpd.
This  appears to depend on where you get the port from.  Some people report the












file being at the more likely location /usr/local/sbin/httpd (though  note  the
directory  sbin,  not  bin).   Check  both  locations  if you run into trouble.
Thanks to Sue Blake <sue@welearn.com.au> for this information.

Page 492
________

Replace references to nmdb with nmbd.

Page 493
________

Replace the last paragraph on the page with:

socket options is hardly mentioned in the documentation, but it's  very  impor-
tant:  many Microsoft implementations of TCP/IP are inefficient and establish a
new TCP more often than necessary.  Select the socket options  TCP_NODELAY  and
IPTOS_LOWDELAY,  which  can  speed up the response time of such applications by
over 95%.






























To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199805230004.RAA21719>