Web pages, may I introduce you to CVS. CVS, these are the web pages.

Yes, this is supposed to be a new top level in the repository.

For the moment any changes to this area must be cleared by myself
or Jordan.  Once the kinks are worked out, the policy will probably
be relaxed.
This commit is contained in:
John Fieber 1996-09-24 17:46:04 +00:00
parent 173d5ff9c8
commit f285ed5bf8
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=543
37 changed files with 6519 additions and 0 deletions

4
en/tutorials/Makefile Normal file
View file

@ -0,0 +1,4 @@
DOCS= index.sgml
SUBDIR= disklessx
DOCSUBDIR= ddwg devel fonts mh multios newuser
.include "../web.mk"

View file

@ -0,0 +1 @@
WEBBASE?= /data/tutorials

View file

@ -0,0 +1,5 @@
DOC= ddwg
SRCS= ddwg.sgml
SGMLOPTS= -ssi
.include <bsd.sgml.mk>

1128
en/tutorials/ddwg/ddwg.sgml Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,6 @@
DOC= devel
SRCS= devel.sgml
SGMLOPTS= -ssi
.include <bsd.sgml.mk>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,3 @@
DOCS= disklessx.sgml
.include "../../web.mk"

View file

@ -0,0 +1,264 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN" [
<!ENTITY base CDATA "../..">
<!ENTITY date "$Date: 1996-09-24 17:46:00 $">
<!ENTITY title "Diskless X Server: a how to guide">
<!ENTITY copyright " ">
<!ENTITY % includes SYSTEM "../../includes.sgml"> %includes;
]>
<html>
&header;
<H3>By Jerry Kendall</H3>
<H3>(<a href="mailto:jerry@kcis.com">jerry@kcis.com</a>)</H3>
<p>With the help of some 'friends' on the FreeBSD-hackers list, I have
been able to create a diskless X terminal... The creation of the X terminal
required first creating a diskless system with minimal utilities mounted
via NFS. These same steps were used to create 2 seperate diskless systems.
The first is 'altair.kcis.com'. A diskless X terminal that I run on my
old 386DX-40. It has a 340Meg hard disk but, I did not want to change it.
So, it boots from 'antares.kcis.com' across a ethernet. The second system
is a 486DX2-66. I setup a diskless FreeBSD (complete) that uses no local
disk. The server in that case is a Sun 670MP running
SunOS 4.1.3. The same setup configuration was needed for both.</p>
<hr>
NOTE: I am sure that there is stuff that needs to be added to this. Please send me any comments....
<hr>
<h2>Creating the boot floppy (On the diskless system)</h2>
<p>Since the network boot loaders will not work with some of
the TSR's and such that MS-DOS uses, it is best to create
a dedicated boot floppy OR, if you can, create an MS-DOS menu
that will (via the config.sys/autoexec.bat files) ask what
configuration to load when the system starts. The later is the
method that I use and it works great. My MS-DOS (6.x) menu is below.</p>
<pre>
---- config.sys ----
[menu]
menuitem=normal, normal
menuitem=unix, unix
[normal]
....
normal config.sys stuff
...
[unix]
----
---- autoexec.bat ----
@ECHO OFF
goto %config%
:normal
...
normal autoexec.bat stuff
...
goto end
:unix
cd \netboot
nb8390.com
:end
----</pre>
<h2>Getting the network boot programs (On the server)</h2>
<p>Compile the 'net-boot' programs that are located in
/usr/src/sys/i386/boot/netboot. You should read the comments
at the top of the makefile. Adjust as required. !!!! make a
backup of the original in case it gets fobar'd !!! When the build
is done, there should be 2 MS-DOS executables, 'nb8390.com' and
'nb3c509.com'. One of these two programs will be what you need
to run on the diskless server. It will load the kernel from the
boot server. At this point, put both programs on the MS-DOS
boot floppy created earlier.
<h2>Determine which program to run (On the diskless system)</h2>
<p>If you know the chipset that your ethernet adapter uses, this is
easy. If you have the NS8390 chipset, or a NS8390 based chipset,
use NB8390.COM. If you have a 3Com 509 based chipset, use the
NB3C509.COM boot program. If you are not sure which you have,
try using one, if it says 'No adapter found', try the other.
Beyond that, you are pretty much on your own.
<h2>Booting across the network</h2>
<p>Boot the diskless system with out any config.sys/autoexec.bat
files. try running the boot program for your ethernet adapter.</p>
<pre>
My ethernet adapter is running in WD8013 16bit mode so
I run NB8390.COM
C:> cd \netboot
C:> nb8390
Boot from Network (Y/N) ? Y
BOOTP/TFTP/NFS bootstrap loader ESC for menu
Searching for adapter..
WD8013EBT base 0x0300, memory 0x000D8000, addr 00:40:01:43:26:66
Searching for server..</pre>
<p>At this point, my diskless system is trying to find a machine to act
as a boot server. Make note of the addr line above, you will need this
number later. Reset the diskless system and modify your config.sys and
autoexec.bat files to do these steps automatically for you. Perhaps in
a menu. If you had to run 'nb3c509.com' instead of 'nb8390.com' the
output is the same as above. If you got 'No adapter found' at the
'Searching for adapter..' message, verify that you did indeed set the
compile time defines in the makefile correctly.</p>
<h2>Allowing systems to boot across the network (On the
server)</h2>
<p>Make sure the /etc/inetd.conf file has entries for tftp and bootps.
Mine are listed below:</p>
<pre>
---- /etc/inetd.conf ----
tftp dgram udp wait nobody /usr/libexec/tftpd tftpd
#
# Additions by who ever you are
bootps dgram udp wait root /usr/libexec/bootpd bootpd /etc/bootptab
----
</pre>
<p>If you have to change the /etc/inetd.conf file, send a HUP signal to
inetd. To do this, get the process ID of inetd with 'ps -ax | grep
inetd | grep -v grep'. Once you have it, send it a HUP signal. Do this
by 'kill -HUP &lt;pid&gt;'. This will force inetd to re-read its config file.</p>
<p>Did you remember to note the 'addr' line from the output of the boot
loader on the diskless system???? Guess what, here is where you need it.</p>
<p>Add an entry to /etc/bootptab (maybe creating the file). It should be
laid out identical to this:</p>
<pre>
altair:\
:ht=ether:\
:ha=004001432666:\
:sm=255.255.255.0:\
:hn:\
:ds=199.246.76.1:\
:ip=199.246.76.2:\
:gw=199.246.76.1:\
:vm=rfc1048:
The lines are as follows:
'altair' the diskless systems name without the domain name.
'ht=ether' the hardware type of 'ethernet'.
'ha=004001432666' the hardware address (the number noted above).
'sm=255.255.255.0' the subnet mask.
'hn' tells server to send client's hostname to the client.
'ds=199.246.76.1' tells the client who the domain server is.
'ip=199.246.76.2' tells the client what it's IP address is.
'gw=199.246.76.1' tells the client what the default gateway is.
'vm=...' just leave it there...
</pre>
<p>NOTE:
****** Be sure to setup the IP addresses correctly, the addresses
above are my own......</p>
<p>Create the directory '/tftpboot' on the server it will contain the
configuration files for the diskless systems that the server will
serve. These files will be named 'cfg.&lt;ip&gt;' where &lt;ip&gt; is the IP
address of the diskless system. The config file for 'altair' is
/tftpboot/cfg.199.246.76.2. The contents is:</p>
<pre>
---- /tftpboot/cfg.199.246.76.2 ----
rootfs 199.246.76.1:/DiskLess/rootfs/altair
hostname altair.kcis.com
----
</pre>
<p>The line 'hostname altair.kcis.com' simply tells the diskless
system what its fully qualified domain name is.</p>
<p>The line 'rootfs 199.246.76.1:/DiskLess/rootfs/altair' tells the
diskless system where its NFS mountable root filesystem is located.</p>
<p>NOTE:!!!!! The NFS mounted root filesystem will be mounted READ ONLY.</p>
<p>The hierarchy for the diskless system can be re-mounted allowing
read-write operations if required.</p>
<p>I use my spare 386DX-40 as a dedicated X terminal...</p>
<p>The hierarchy for 'altair' is:</p>
<pre>
/
/bin
/etc
/tmp
/sbin
/dev
/dev/fd
/usr
/var
/var/run
</pre>
<p>The actual list of files is:</p>
<pre>
-r-xr-xr-x 1 root wheel 779984 Dec 11 23:44 ./kernel
-r-xr-xr-x 1 root bin 299008 Dec 12 00:22 ./bin/sh
-rw-r--r-- 1 root wheel 499 Dec 15 15:54 ./etc/rc
-rw-r--r-- 1 root wheel 1411 Dec 11 23:19 ./etc/ttys
-rw-r--r-- 1 root wheel 157 Dec 15 15:42 ./etc/hosts
-rw-r--r-- 1 root bin 1569 Dec 15 15:26 ./etc/XF86Config.altair
-r-x------ 1 bin bin 151552 Jun 10 1995 ./sbin/init
-r-xr-xr-x 1 bin bin 176128 Jun 10 1995 ./sbin/ifconfig
-r-xr-xr-x 1 bin bin 110592 Jun 10 1995 ./sbin/mount_nfs
-r-xr-xr-x 1 bin bin 135168 Jun 10 1995 ./sbin/reboot
-r-xr-xr-x 1 root bin 73728 Dec 13 22:38 ./sbin/mount
-r-xr-xr-x 1 root wheel 1992 Jun 10 1995 ./dev/MAKEDEV.local
-r-xr-xr-x 1 root wheel 24419 Jun 10 1995 ./dev/MAKEDEV
</pre>
<p>Don't forget to 'MAKEDEV all' in the 'dev' directory.</p>
<p>My /etc/rc for 'altair' is:</p>
<pre>
#!/bin/sh
#
PATH=/bin:/sbin
export PATH
#
# configure the localhost
/sbin/ifconfig lo0 127.0.0.1
#
# configure the ethernet card
/sbin/ifconfig ed0 199.246.76.2 netmask 0xffffff00
#
# mount the root filesystem via NFS
/sbin/mount antares:/DiskLess/rootfs/altair /
#
# mount the /usr filesystem via NFS
/sbin/mount antares:/DiskLess/usr /usr
#
/usr/X11R6/bin/XF86_SVGA -query antares -xf86config /etc/XF86Config.altair > /dev/null 2>&1
#
# Reboot after X exits
/sbin/reboot
#
# We blew up....
exit 1
</pre>
<hr>
<p>Any comments and ALL questions welcome....</p>
<address>
Jerry Kendall<br>
<a href="mailto:jerry@kcis.com">jerry@kcis.com</a>
</address>
&footer;
</body>
</html>

8
en/tutorials/doc.ftr Normal file
View file

@ -0,0 +1,8 @@
<hr>
<a href="../../"><img src="../../gifs/home.gif" alt="FreeBSD Home
Page" border="0" align="right"></a>
<address>
@@UPDATE@@<br>
<a href="../../mailto.html">www@freebsd.org</a>
</address>

0
en/tutorials/doc.hdr Normal file
View file

View file

@ -0,0 +1,6 @@
DOC= fonts
SRCS= fonts.sgml
SGMLOPTS= -ssi
.include <bsd.sgml.mk>

View file

@ -0,0 +1,517 @@
<!DOCTYPE linuxdoc PUBLIC "-//FreeBSD//DTD linuxdoc//EN">
<!-- Recently, I wanted to figure out how to use some additional fonts that
I had accumulated. I finally figured out *how to do it* from the various
man pages and documentation. Since it might be of use to other users,
and I didn't see any reference to this topic in the FAQ or handbook, I
thought I'd try my hand at a simple cookbook tutorial addressing the
use of fonts. I have included my unanswered questions at the end of
the document.
Anyway, here's what I put together. This is my present understanding of
fonts and how to use them with FreeBSD. I am sure that there are errors or
misunderstandings, but it contains enough valid information to allow the
use of additional fonts with Ghostscript, X11 and Groff. This is my first
attempt to write anything along the lines of a tutorial/FAQ, so I am sure
it is pretty raw. There are probably better ways to do some of this stuff,
and I would welcome being corrected.
-->
<article>
<title>Fonts and FreeBSD &mdash; A Tutorial
<author>Dave Bodenstab, &lt;imdave@synet.net&gt;
<date>Wed Aug 7, 1996
<abstract>
This document contains a description of the various font files that may
be used with FreeBSD and the syscons driver, X11, Ghostscript and Groff.
Cookbook examples are provided for switching the syscons display to
80x60 mode, and for using type 1 fonts with the above application programs.
</abstract>
<sect>Introduction
<p>
There are many sources of fonts available, and one might ask how they might
be used with FreeBSD.
The answer can be found by carefully searching the documentation for the
component that one would like to use.
This is very time consuming, so this tutorial is an attempt to provide a shortcut
for others who might be interested.
<sect>Basic terminology
<p>
There are many different font formats and associated font file suffixes.
A few that will be addressed here are:
<descrip>
<tag/.pfa .pfb/ Postscript type 1 fonts. The <em/.pfa/ is the <bf/A/scii form
and <em/.pfb/ the <bf/B/inary form.
<tag/.afm/ The font metrics associated with a type 1 font.
<tag/.pfm/ The printer font metrics associated with a type 1 font.
<tag/.ttf/ A TrueType font
<tag/.fot/ An indirect reference to a TrueType font (not an actual font)
<tag/.fon .fnt/ Bitmapped screen fonts
</descrip>
<p>
The <em/.fot/ file is used by Windows as sort of a symbolic link to the actual
TrueType font (<em/.ttf/) file. The <em/.fon/ font files are also used by Windows.
I know of no way to use this font format with FreeBSD.
<sect>What font formats can I use?
<p>
Which font file format is useful depends on the application being used.
FreeBSD by itself uses no fonts. Application programs and/or drivers may
make use of the font files. Here is a small cross reference of
application/driver to the font type suffixes:
<descrip>
<tag/Driver/
<descrip>
<tag/syscons/ .fnt
</descrip>
<tag/Application/
<descrip>
<tag/Ghostscript/ <em/.pfa/ <em/.pfb/ <em/.ttf/
<tag/X11/ <em/.pfa/ <em/.pfb/
<tag/Groff/ <em/.pfa/ <em/.afm/
<tag/Povray/ <em/.ttf/
</descrip>
</descrip>
<p>
The <em/.fnt/ suffix is used quite frequently. I suspect that whenever someone
wanted to create a specialized font file for their application, more often
than not they chose this suffix. Therefore, it is likely that files with
this suffix are not all the same format; specifically, the <em/.fnt/ files used
by syscons under FreeBSD may not be the same format as a <em/.fnt/ file one
encounters in the MSDOS/Windows environment. I have not made any attempt
at using other <em/.fnt/ files other than those provided with FreeBSD.
<sect>Setting a virtual console to 80x60 line mode
<p>
First, a 8x8 font must be loaded. <tt>/etc/sysconfig</tt> should contain the lines:
<tscreen><verb>
# Choose font 8x8 from /usr/share/syscons/fonts/* (or NO for default)
font8x8=/usr/share/syscons/fonts/cp437-8x8.fnt
</verb></tscreen>
<p>
The command to actually switch the mode is <em/vidcontrol/(1):
<tscreen><verb>
bash$ vidcontrol VGA_80x60
</verb></tscreen>
<p>
Various screen orientated programs, such as <em/vi/(1), must be able to determine
the current screen dimensions. These can be set with <em/stty/(1):
<tscreen><verb>
bash$ stty crt rows 60 columns 80
</verb></tscreen>
<p>
To make this more seamless, one can embed these commands in the startup
scripts so it takes place when the system boots. One way to do this is:
<enum>
<item> Modify <tt>/etc/sysconfig</tt> as above
<item> Add to <tt>/etc/rc.local</tt>:
<tscreen><verb>
for tty in /dev/ttyv?
do
vidcontrol VGA_80x60 <$tty >/dev/null 2>&1
done
</verb></tscreen>
<item> Add to <tt>/etc/profile</tt>:
<tscreen><verb>
TTYNAME=`basename \`tty\``
if expr "$TTYNAME" : 'ttyv' >/dev/null
then
stty crt rows 60 columns 80
fi
</verb></tscreen>
</enum>
<p>
References: <em/stty/(1), <em/vidcontrol/(1)
<sect>Using type 1 fonts with X11
<p>
X11 can use either the <em/.pfa/ or the <em/.pfb/ format fonts. The X11 fonts are
located in various subdirectories under <tt>/usr/X11R6/lib/X11/fonts</tt>. Each
font file is cross referenced to
its X11 name by the contents of the <tt/fonts.dir/ file in each directory.
<p>
There is already a directory named <tt/Type1/.
The most straight forward way to add a
new font is to put it into this directory. A better way is to keep all new
fonts in a separate directory and use a symbolic link to the additional
font. This allows one to more easily keep track of ones fonts without
confusing them with the fonts that were originally provided. For example:
<tscreen><verb>
# Create a directory to contain the font files
bash$ mkdir -p /usr/local/share/fonts/type1
bash$ cd /usr/local/share/fonts/type1
# Place the .pfa, .pfb and .afm files here
# One might want to keep readme files, and other documentation
# for the fonts here also
bash$ cp /cdrom/fonts/atm/showboat/showboat.pfb .
bash$ cp /cdrom/fonts/atm/showboat/showboat.afm .
# Maintain an index to cross reference the fonts
bash$ echo showboat - InfoMagic CICA, Dec 1994, /fonts/atm/showboat >>INDEX
</verb></tscreen>
<p>
Now, to use a new font with X11, one must make the font file available and
update the font name files. The X11 font names look like:
<tscreen><verb>
-bitstream-charter-medium-r-normal-xxx-0-0-0-0-p-0-iso8859-1
| | | | | | | | | | | | \ \
| | | | | \ \ \ \ \ \ \ +----+- character set
| | | | \ \ \ \ \ \ \ +- average width
| | | | \ \ \ \ \ \ +- spacing
| | | \ \ \ \ \ \ +- vertical res.
| | | \ \ \ \ \ +- horizontal res.
| | | \ \ \ \ +- points
| | | \ \ \ +- pixels
| | | \ \ \
foundry family weight slant width additional style
</verb></tscreen>
<p>
A new name needs to be created for each new font. If you have some information
from the documentation that accompanied the font, then it could serve as the basis
for creating the name. If there is no information, then you can get some idea
by using <em/strings/(1) on the font file. For example:
<tscreen><verb>
bash$ strings showboat.pfb | more
%!FontType1-1.0: Showboat 001.001
%%CreationDate: 1/15/91 5:16:03 PM
%%VMusage: 1024 45747
% Generated by Fontographer 3.1
% Showboat
1991 by David Rakowski. Alle Rechte Vorbehalten.
FontDirectory/Showboat known{/Showboat findfont dup/UniqueID known{dup
/UniqueID get 4962377 eq exch/FontType get 1 eq and}{pop false}ifelse
{save true}{false}ifelse}{false}ifelse
12 dict begin
/FontInfo 9 dict dup begin
/version (001.001) readonly def
/FullName (Showboat) readonly def
/FamilyName (Showboat) readonly def
/Weight (Medium) readonly def
/ItalicAngle 0 def
/isFixedPitch false def
/UnderlinePosition -106 def
/UnderlineThickness 16 def
/Notice (Showboat
1991 by David Rakowski. Alle Rechte Vorbehalten.) readonly def
end readonly def
/FontName /Showboat def
--stdin--
</verb></tscreen>
<p>
Using this information, a possible name might be:
<tscreen><verb>
-type1-Showboat-medium-r-normal-decorative-0-0-0-0-p-0-iso8859-1
</verb></tscreen>
The components of our name are:
<itemize>
<item>Foundry - lets just name all the new fonts <tt/type1/.
<item>Family - the name of the font.
<item>Weight - normal, bold, medium, semibold, etc. From the <em/strings/(1) output
above, it appears that this font has a weight of <em/medium/.
<item>Slant - <bf/r/oman, <bf/i/talic, <bf/o/blique, etc. Since the <em/ItalicAngle/
is zero, <em/roman/ will be used.
<item>Width - normal, wide, condensed, extended, etc. Until it can be examined,
the assumption will be <em/normal/.
<item>Additional style - usually omitted, but this will indicate that
the font contains decorative capital letters.
<item>Spacing - proportional or monospaced. <em/Proportional/ is used since <em/isFixedPitch/ is false.
</itemize>
<p>
All of these names are arbitrary, but one should strive to be compatible
with the existing conventions. A font is referenced by name with possible
wild cards by an X11 program, so the name chosen should make some sense.
One might begin by simply using
<descrip>
<tt/...-normal-r-normal-...-p-.../
</descrip>
as the name,
and then use <em/xfontsel/(1) to examine it and adjust the name based on
the appearance of the font.
<p>
So, to complete our example:
<tscreen><verb>
# Make the font accessible to X11
bash$ cd /usr/X11R6/lib/X11/fonts/Type1
bash$ ln -s /usr/local/share/fonts/type1/showboat.pfb .
# Edit fonts.dir and fonts.scale, adding the line describing the font
# and incrementing the number of fonts which is found on the first line.
bash$ ex fonts.dir
:1p
25
:1c
26
.
:$a
showboat.pfb -type1-showboat-medium-r-normal-decorative-0-0-0-0-p-0-iso8859-1
.
:wq
# fonts.scale seems to be identical to fonts.dir...
bash$ cp fonts.dir fonts.scale
# Tell X11 that things have changed
bash$ xset fp rehash
# Examine the new font
bash$ xfontsel -pattern -type1-*
</verb></tscreen>
<p>
References: <em/xfontsel/(1), <em/xset/(1), <em/The X Windows System in a Nutshell/,
O'Reilly & Associates
<sect>Using type 1 fonts with Ghostscript
<p>
Ghostscript references a font via its <tt/Fontmap/ file. This must be modified
in a similar way to the X11 <tt/fonts.dir/ file. Ghostscript can use either the
<em/.pfa/ or the <em/.pfb/ format fonts. Using the font from the previous example,
here is how to use it with Ghostscript:
<tscreen><verb>
# Put the font in Ghostscript's font directory
bash$ cd /usr/local/share/ghostscript/fonts
bash$ ln -s /usr/local/share/fonts/type1/showboat.pfb .
# Edit Fontmap so Ghostscript knows about the font
bash$ cd /usr/local/share/ghostscript/4.01
bash$ ex Fontmap
:$a
/Showboat (showboat.pfb) ; % From CICA /fonts/atm/showboat
.
:wq
# Use Ghostscript to examine the font
bash$ gs prfont.ps
Aladdin Ghostscript 4.01 (1996-7-10)
Copyright (C) 1996 Aladdin Enterprises, Menlo Park, CA. All rights
reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Loading Times-Roman font from /usr/local/share/ghostscript/fonts/tir_____.pfb...
/1899520 581354 1300084 13826 0 done.
GS>Showboat DoFont
Loading Showboat font from /usr/local/share/ghostscript/fonts/showboat.pfb...
1939688 565415 1300084 16901 0 done.
>>showpage, press <return> to continue<<
>>showpage, press <return> to continue<<
>>showpage, press <return> to continue<<
GS>quit
</verb></tscreen>
<p>
References: <tt/fonts.txt/ in the Ghostscript 4.01 distribution
<sect>Using type 1 fonts with Groff
<p>
Now that the new font can be used by both X11 and Ghostscript, how can one
use the new font with groff? First of all, since we are dealing with type 1
postscript fonts, the groff device that is applicable is the <em/ps/ device.
A font file must be created for each font that groff can use. A groff font
name is just a file in <tt>/usr/share/groff_font/devps</tt>. With our example, the
font file could be <tt>/usr/share/groff_font/devps/SHOWBOAT</tt>. The file must be
created using tools provided by groff.
<p>
The first tool is <em/afmtodit/. This is not normally installed, so it must be
retrieved from the source distribution. I found I had to change the first
line of the file, so I did:
<tscreen><verb>
bash$ cp /usr/src/gnu/usr.bin/groff/afmtodit/afmtodit.pl /tmp
bash$ ex /tmp/afmtodit.pl
:1c
#!/usr/bin/perl -P-
.
:wq
</verb></tscreen>
<p>
This tool will create the groff font file from the metrics file (<em/.afm/ suffix.)
Continuing with our example:
<tscreen><verb>
# Many .afm files are in Mac format... ^M delimited lines
# We need to convert them to unix style ^J delimited lines
bash$ cd /tmp
bash$ cat /usr/local/share/fonts/type1/showboat.afm |
tr '\015' '\012' >showboat.afm
# Now create the groff font file
bash$ cd /usr/share/groff_font/devps
bash$ /tmp/afmtodit.pl -d DESC -e text.enc /tmp/showboat.afm generate/textmap SHOWBOAT
</verb></tscreen>
<p>
The font can now be referenced with the name SHOWBOAT.
<p>
If ghostscript is used to drive the printers on the system, then nothing
more needs to be done. However, if true postscript printers are used, then
the font must be down loaded to the printer in order for the font to be used
(unless the printer happens to have the showboat font built in or on an
accessible font disk.) The final step is to create a down loadable font.
The <em/pfbtops/ tool is used to create the <em/.pfa/ format of the font, and the
<tt/download/ file is modified to reference the new font. The <tt/download/ file
must reference the internal name of the font. This can easily be determined
from the groff font file as illustrated:
<tscreen><verb>
# Create the .pfa font file
bash$ pfbtops /usr/local/share/fonts/type1/showboat.pfb >showboat.pfa
</verb></tscreen>
<p>
Of course, if the <em/.pfa/ file is already available, just use a symbolic link
to reference it.
<tscreen><verb>
# Get the internal font name
bash$ fgrep internalname SHOWBOAT
internalname Showboat
# Tell groff that the font must be down loaded
bash$ ex download
:$a
Showboat showboat.pfa
.
:wq
</verb></tscreen>
<p>
To test the font:
<tscreen><verb>
bash$ cd /tmp
bash$ cat >example.t <<EOF
.sp 5
.ps 16
This is an example of the Showboat font:
.br
.ps 48
.vs (\n(.s+2)p
.sp
.ft SHOWBOAT
ABCDEFGHI
.br
JKLMNOPQR
.br
STUVWXYZ
.sp
.ps 16
.vs (\n(.s+2)p
.fp 5 SHOWBOAT
.ft R
To use it for the first letter of a paragraph, it will look like:
.sp 50p
\s(48\f5H\s0\fRere is the first sentence of a paragraph that uses the
showboat font as its first letter.
Additional vertical space must be used to allow room for the larger
letter.
EOF
bash$ groff -Tps example.t >example.ps
# To use ghostscript/ghostview
bash$ ghostview example.ps
# To print it
bash$ lpr -Ppostscript example.ps
</verb></tscreen>
<p>
References: <tt>/usr/src/gnu/usr.bin/groff/afmtodit/afmtodit.man</tt>, <em/groff_font/(1),
<em/groff_char/(1), <em/pfbtops/(1)
<sect>Can TrueType fonts be used?
<p>
The TrueType font format is used by Windows, Windows 95, Mac's,... It is
quite popular and there are a great number of fonts available in this format.
Unfortunately, there are only two applications that I am aware of that can
use this format: Ghostscript and povray. Ghostscript's support, according
to the documentation, is rudimentary and the results are likely to be inferior
to type 1 fonts.
<p>
However, groff would need a font description file, and I know of no tools
to construct the metrics from a TrueType font. In addition, the font would
have to be down loaded to postscript printers in the appropriate format,
and again, groff cannot handle TrueType fonts in this fashion.
<p>
X11 has no support for TrueType fonts that I am aware of.
<p>
The only program that I know of that has the ability to use TrueType fonts
is povray version 3, but I rather doubt many people will be creating documents
as a series of raytraced pages! :-)
<sect>Where can additional fonts be obtained?
<p>
Many fonts are available on the Internet. They are either entirely
free, or are share-ware. In addition, there are many inexpensive CDROMs
available that contain many fonts. Some Internet locations (as of August
1996) are:
<tscreen><verb>
ftp://ftp.winsite.com (Formerly CICA)
http://www.simtel.net/simcgi-bin/dosfind.cgi
ftp://ftp.coast.net/
http://af-pc-plloyd.ecel.uwa.edu.au/fonts/index.html
http://www.esselte.com/letraset/index.html
http://www.inil.com/users/elfring/esf.htm
</verb></tscreen>
<sect>Additional questions
<p>
<itemize>
<item>What use are the <em/.pfm/ files?
<item>Can one generate the <em/.afm/ file from a <em/.pfa/ or <em/.pfb/?
<item>How to generate the groff character mapping files for postscript fonts
with non-standard character names?
<item>Can xditview and devX?? devices be setup to access all the new fonts?
<item>It would be good to have examples of using TrueType fonts with povray and
ghostscript.
</itemize>
</article>

35
en/tutorials/index.sgml Normal file
View file

@ -0,0 +1,35 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN" [
<!ENTITY base CDATA "..">
<!ENTITY date "$Date: 1996-09-24 17:45:57 $">
<!ENTITY title "FreeBSD Tutorials">
<!ENTITY % includes SYSTEM "../includes.sgml"> %includes;
]>
<html>
&header;
<p>Here lie assorted documents on various aspects of FreeBSD,
FreeBSD software, and hardare. If you have comments or
would like to contribute a document, please contact us at
<a href="mailto:doc@freebsd.org">doc@FreeBSD.org</a>.</p>
<ul>
<li><a href="newuser/newuser.html">For People New to Both FreeBSD <em>and</em> Unix</a>
(<a href="newuser/newuser-html.tar.gz">gzipd tar file</a>)</li>
<li><a href="mh/mh.html">An introduction to the MH mail software</a>
(<a href="mh/mh-html.tar.gz">gzipd tar file</a>)</li>
<li><a href="devel/devel.html">A User's Guide to FreeBSD Programming Tools</a>
(<a href="devel/devel-html.tar.gz">gzipd tar file</a>)</li>
<li><a href="ddwg/ddwg.html">Writing device drivers for FreeBSD</a>
(<a href="ddwg/ddwg-html.tar.gz">gzipd tar file</a>)</li>
<li><a href="multios/multios.html">Using FreeBSD with other operating systems</a>
(<a href="multios/multios-html.tar.gz">gzipd tar file</a>)</li>
<li><a href="fonts/fonts.html">Fonts and FreeBSD</a>
(<a href="fonts/fonts-html.tar.gz">gzipd tar file</a>)</li>
<li><a href="http://www.cypher.net/~black/ipalias.html">IP Aliasing</a></li>
</ul>
&footer;
</body>
</html>

6
en/tutorials/mh/Makefile Normal file
View file

@ -0,0 +1,6 @@
DOC= mh
SRCS= mh.sgml
SGMLOPTS= -ssi
.include <bsd.sgml.mk>

572
en/tutorials/mh/mh.sgml Normal file
View file

@ -0,0 +1,572 @@
<!--
From matt@garply.com Wed May 22 08:25:18 1996
Date: Tue, 23 Jan 1996 11:02:50 -0600
From: Matt Midboe <matt@garply.com>
To: jfieber@freebsd.org
Subject: Introduction to MH for FreeBSD Handbook
Okay I've diverged from my original plan on the handbook and condensed it a
bit. If I find some time I am going to start working on something about how
to use sendmail, since I imagine that would be a bit more useful. Here is my
guide to using mh on freebsd. Let me know what changes it might need or
things that need to be clearer or shorter.
-->
<!DOCTYPE linuxdoc PUBLIC "-//FreeBSD//DTD linuxdoc//EN">
<!-- This document explains some about the MUA MH -->
<article>
<title>An MH Primer
<author>Matt Midboe, <url url="mailto:matt@garply.com"
name="matt@garply.com">
<date>v1.0, 16 January 1996
<abstract>This document contains an introduction to using MH on
FreeBSD</abstract>
<toc>
<sect>Introduction<label id="mhintro">
<p>
<!-- This section is here to explain the philosophy behind MH Also
make sure that the user has installed the mh package -->
MH started back in 1977 at the RAND Corporation, where the initial
philosophies behind MH were developed. MH isn't so much a monolithic
email program but a philosophy about how best to develop tools for
reading email. The MH developers have done a great job adhering to the
KISS principle: Keep It Simple Stupid. Rather than have one large
program for reading, sending and handling email they have written
specialized programs for each part of your email life. One might liken
MH to the specialization that one finds in insects and nature. Each
tool in MH does one thing, and does it very well.
Beyond just the various tools that one uses to handle their email MH
has done an excellent job keeping the configuration of each of these
tools consistent and uniform. In fact, if you are not quite sure how
something is supposed to work or what the arguments for some command
are supposed to be then you can generally guess and be right. Each MH
command is consistent about how it handles reading the configuration
files and how it takes arguments on the command line. One useful thing
to remember is that you can always add a <tt/-help/ to the command to
have it display the options for that command.
The first thing that you need to do is to make sure that you have
installed the MH package on your FreeBSD machine. If you installed
from CDROM you should be able to execute the following to load mh:
<tscreen><verb>
pkg_add /cdrom/packages/mh-6.8.3.tgz
</verb></tscreen>
You will notice that it created a /usr/local/lib/mh directory for you
as well as adding several binaries to the /usr/local/bin directory. If
you would prefer to compile it yourself then you can anonymous ftp it
from <url url="ftp://ftp.ics.uci.edu/" name="ftp.ics.uci.edu"> or <url
url="ftp://louie.udel.edu/" name="louie.udel.edu">.
This primer is not a full comprehensive explanation of how MH
works. This is just intended to get you started on the road to
happier, faster mail reading. You should read the man pages for the
various commands. Also you might want to read the <url
url="news:comp.mail.mh" name="comp.mail.mh"> newsgroup. Also you can
read the <url
url="http://www.cis.ohio-state.edu/hypertext/faq/usenet/mh-faq/part1/faq.html"
name="FAQ"> for MH. The best resource for MH is the O'Reilly and
Associates book written by Jerry Peek.
<sect>Reading Mail
<p>
<!-- This section covers how to use inc, msgchk, next, prev, rmm, and rmf -->
This section covers how to use <tt/inc/, <tt/show/, <tt/scan/,
<tt/next/, <tt/prev/, <tt/rmm/, <tt/rmf/, and <tt/msgchk/.
One of the best things about MH is the consistent interface between
programs. A few things to keep in mind when using these commands is
how to specify message lists. In the case of <em/inc/ this doesn't
really make any sense but with commands like <em/show/ it is useful to
know.
A message list can consist of something like <tt/23 20 16/ which will
act on messages 23, 20 and 16. This is fairly simple but you can do
more useful things like <tt/23-30/ which will act on all the messages
between 23 and 30. You can also specify something like <tt/cur:10/
which will act on the current message and the next 9 messages. The
<tt/cur/, <tt/last/, and <tt/first/ messages are special messages that
refer to the current, last or first message in the folder.
<sect1><heading>inc, msgchk - read in your new email or check it<label id="inc"></>
<p>
If you just type in <em>inc</em> and hit return you will be well on your
way to getting started with MH. The first time you run <em>inc</em> it
will setup your account to use all the MH defaults and ask you about
creating a Mail directory. If you have mail waiting to be downloaded
you will see something that looks like:
<tscreen><verb>
29 01/15 Doug White Re: Another Failed to boot problem<<On Mon, 15 J
30 01/16 "Jordan K. Hubbar Re: FBSD 2.1<<> Do you want a library instead of
31 01/16 Bruce Evans Re: location of bad144 table<<>> >It would appea
32 01/16 "Jordan K. Hubbar Re: video is up<<> Anyway, mrouted won't run, ev
33 01/16 Michael Smith Re: FBSD 2.1<<Nate Williams stands accused of sa
</verb></tscreen>
This is the same thing you will see from a ``<ref id="scan">''. If you
just run <em>inc</em> with no arguments it will look on your computer for email
that is supposed to be coming to you.
A lot of people like to use POP for grabbing their email. MH can do
POP to grab your email. You will need to give <em>inc</em> a few command
line arguments.
<tscreen><verb>
inc -host mail.pop.org -user username -norpop
</verb></tscreen>
That tells <em>inc</> to go to <bf/mail.pop.org/ to download your
email, and that your username on their system is <bf/username/. The
<tt>-norpop</tt> option tells <em>inc</em> to use plain POP3 for
downloading your email. MH has support for a few different dialects of
POP. More than likely you will never ever need to use them
though. While you can do more complex things with inc such as audit
files and scan format files this will get you going.
The <em/msgchk/ command is used to get information on whether or not
you have new email. <em/msgchk/ takes the same <tt/-host/ and
<tt/-user/ options that <em/inc/ takes.
<sect1><heading>show, next and prev - displaying and moving through emails
<label id="show"></>
<p>
<em/show/ is to show a letter in your current folder. Like inc,
<em/show/ is a fairly straightfoward command. If you just type
<em/show/ and hit return then it displays the current message. You can
also give specific message numbers to show:
<tscreen><verb>
show 32 45 56
</verb></tscreen>
This would display message numbers 32, 45 and 56 right after each
other. Unless you change the default behavior <em/show/ basically just
does a more on the email message.
<em/next/ is used to move onto the next message and <em/prev/ will go
to the previous message. Both commands have an implied <em/show/
command so that when you go to the next message it automatically
displays it.
<sect1><heading>scan - shows you a scan of your messages<label id="scan"></>
<p>
<em/scan/ will display a brief listing of the messages in your current
folder. This is an example of what the <em/scan/ command will give you.
<tscreen><verb>
30+ 01/16 "Jordan K. Hubbar Re: FBSD 2.1<<> Do you want a library instead of
31 01/16 Bruce Evans Re: location of bad144 table<<>> >It would appea
32 01/16 "Jordan K. Hubbar Re: video is up<<> Anyway, mrouted won't run, ev
33 01/16 Michael Smith Re: FBSD 2.1<<Nate Williams stands accused of sa
</verb></tscreen>
Like just about everything in MH this display is very
configurable. This is the typical default display. It gives you the
message number, the date on the email, the sender, the subject line,
and a sentence fragment from the very beginning of the email if it can
fit it. The + means that message is the current message, so if you do
a <em/show/ it will display that message.
One useful option for scan is the <tt/-reverse/ option. This will list
your messages with the highest message number first and lowest message
number last. Another useful option with <em/scan/ is to to have it
read from a file. If you want to scan your incoming mailbox on FreeBSD
without having to <em/inc/ it you can do <tt>scan -file
/var/mail/username</tt>. This can be used with any file that is in the
<bf/mbox/ format.
<sect1><heading>rmm and rmf - remove the current message or folder
<label id="rmm"></>
<p>
<em/rmm/ is used to remove a mail message. The default is typically to
not actually remove the message but to rename the file to one that is
ignored by the MH commands. You will need to through periodically and
physically delete the "removed" messages.
The <em/rmf/ command is used to remove folders. This doesn't just
rename the files but actually removes the from the hard drive so you
should be careful when you use this command.
<sect1><heading>A typical session of reading with MH<label id="samplereading"></>
<p>
The first thing that you will want to do is <em/inc/ your new mail. So
at a shell prompt just type in <em/inc/ and hit return.
<tscreen><verb>
tempest% inc
Incorporating new mail into inbox...
36+ 01/19 "Stephen L. Lange Request...<<Please remove me as contact for pind
37 01/19 Matt Thomas Re: kern/950: Two PCI bridge chips fail (multipl
38 01/19 "Amancio Hasty Jr Re: FreeBSD and VAT<<>>> Bill Fenner said: > In
tempest%
</verb></tscreen>
This shows you the new email that has been added to your mailbox. So
the next thing to do is <em/show/ the email and move around.
<tscreen><verb>
tempest% show
Received: by sashimi.wwa.com (Smail3.1.29.1 #2)
id m0tdMZ2-001W2UC; Fri, 19 Jan 96 13:33 CST
Date: Fri, 19 Jan 1996 13:33:31 -0600 (CST)
From: "Stephen L. Lange" <stvlange@wwa.com>
To: matt@garply.com
Subject: Request...
Message-Id: <Pine.BSD.3.91.960119133211.824A-100000@sashimi.wwa.com>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Please remove me as contact for pindat.com
tempest% rmm
tempest% next
Received: from localhost (localhost [127.0.0.1]) by whydos.lkg.dec.com (8.6.11/8
.6.9) with SMTP id RAA24416; Fri, 19 Jan 1996 17:56:48 GMT
Message-Id: <199601191756.RAA24416@whydos.lkg.dec.com>
X-Authentication-Warning: whydos.lkg.dec.com: Host localhost didn't use HELO pro
tocol
To: hsu@clinet.fi
Cc: hackers@FreeBSD.org
Subject: Re: kern/950: Two PCI bridge chips fail (multiple multiport ethernet
boards)
In-Reply-To: Your message of "Fri, 19 Jan 1996 00:18:36 +0100."
<199601182318.AA11772@Sysiphos>
X-Mailer: exmh version 1.5omega 10/6/94
Date: Fri, 19 Jan 1996 17:56:40 +0000
From: Matt Thomas <matt@lkg.dec.com>
Sender: owner-hackers@FreeBSD.org
Precedence: bulk
This is due to a typo in pcireg.h (to
which I am probably the guilty party).
</verb></tscreen>
The <em/rmm/ removed the current message and the <em/next/ command
moved me on to the next message. Now if I wanted to look at ten most
recent messages so I could read one of them here is what I would do:
<tscreen><verb>
tempest% scan last:10
26 01/16 maddy Re: Testing some stuff<<yeah, well, Trinity has
27 01/17 Automatic digest NET-HAPPENINGS Digest - 16 Jan 1996 to 17 Jan 19
28 01/17 Evans A Criswell Re: Hey dude<<>From matt@tempest.garply.com Tue
29 01/16 Karl Heuer need configure/make volunteers<<The FSF is looki
30 01/18 Paul Stephanouk Re: [alt.religion.scientology] Raw Meat (humor)<
31 01/18 Bill Lenherr Re: Linux NIS Solaris<<--- On Thu, 18 Jan 1996 1
34 01/19 John Fieber Re: Stuff for the email section?<<On Fri, 19 Jan
35 01/19 support@foo.garpl [garply.com #1138] parlor<<Hello. This is the Ne
37+ 01/19 Matt Thomas Re: kern/950: Two PCI bridge chips fail (multipl
38 01/19 "Amancio Hasty Jr Re: FreeBSD and VAT<<>>> Bill Fenner said: > In
tempest%
</verb></tscreen>
Then if I wanted to read message number 27 I would do a <tt/show 27/
and it would be displayed. As you can probably tell from this sample
session MH is pretty easy to use and looking through emails and
displaying them is fairly intuitive and easy.
<sect>Folders and Mail Searching
<p>
Anybody who gets lots of email definately wants to be able to
prioritize, stamp, brief, de-brief, and number their emails in a
variety of different ways. MH can do this better than just about
anything. One thing that we haven't really talked about is the concept
of folders. You have undoubtedly come across the folders concept using
other email programs. MH has folders too. MH can even do sub-folders
of a folder. One thing you should keep in mind with MH is that when
you ran <em/inc/ for the first time and it asked you if it could
create a Mail directory it began storing everything in that
directory. If you look at that directory you will find a directory
named <bf/inbox/. The <bf/inbox/ directory houses all of your incoming
mail that hasn't been thrown anywhere else.
Whenever you create a new folder a new directory is going to be
created underneath your MH Mail directory, and messages in that folder
are going to be stored in that directory. When new email comes in that
new email is thrown into your inbox directory with a file name that is
equivalent to the message number. So even if you didn't have any of
the MH tools to read your email you could still use standard unix
commands to munge around in those directories and just more your
files. It's this simplicity that really gives you a lot of power with
what you can do with your email.
Just as you can use message lists like <tt/23 16 42/ with most MH
commands there is a folder option you can specify with just about
every MH command. If you do a <tt/scan +freebsd/ it will scan your
freebsd folder, and your current folder will be changed to freebsd. If
you do a <tt/show +freebsd 23 16 42/ <em/show/ is going to switch to
your freebsd folder and display messages 23, 16 and 42. So remember
that +folder syntax. You will need to make sure you use it to make
commands process different folders. Remember you default folder for
mail is inbox so doing a <tt/folder +inbox/ should always get you back
to your mail. Of course, in MH's infinite flexibility this can be
changed but most places have probably left it as inbox.
<!-- This section covers how to use pick, folder{s}, and slocal
This needs to cover the general +folder format and an overview on the
directory structure here. -->
<sect1>pick - search email that matches certain criteria
<p>
<em/pick/ is one of the more complex commands in the MH system. So you
might want to read the pick man page for a more thorough
understanding. At its simplest level you can do something like
<tscreen><verb>
tempest% pick -search pci
15
42
55
56
57
</verb></tscreen>
This will tell <em/pick/ to look through every single line in every
message in your current folder and tell you which message numbers it
found the word pci in. You can then <em/show/ those messages and read
them if you wish or <em/rmm/ them. You would have to specify something
like <tt/show 15 42 55-57/ to display them though. A slightly more
useful thing to do is this:
<tscreen><verb>
tempest% pick -search pci -seq pick
5 hits
tempest% show pick
</verb></tscreen>
This will show you the same messages you just didn't have to work as
hard to do it. The <tt/-seq/ option is really an abbreviation of
<tt/-sequence/ and <bf/pick/ is just a sequence which contains the
message numbers that matched. You can use sequences with just about
any MH command. So you could have done an <tt/rmm pick/ and all those
messages would be removed instead. You sequence can be named
anything. If you run pick again it will overwrite the old sequence if
you use the same name.
Doing a <tt/pick -search/ can be a bit more time consuming than just
searching for message from someone, or to someone. So <em/pick/ allows
you to use the following predefined search criteria:
<itemize>
<item><tt/-to/ search based upon who the message is to
<item><tt/-cc/ search based on who is in the cc list
<item><tt/-from/ search for who sent the message
<item><tt/-subject/ search for emails with this subject
<item><tt/-date/ find emails with a matching dat
<item><tt>--<em>component</em></tt> search for any other component in
the header. (i.e. --reply-to to find all emails with a certain
reply-to in the header)
</itemize>
This allows you to do things like
<tscreen><verb>
pick -to freebsd-hackers@freebsd.org -seq hackers
</verb></tscreen>
to get a list of all the email send to the FreeBSD hackers mailing
list. <em/pick/ also allows you to group these criteria in differents
ways using the following options:
<itemize>
<item>... <tt/-and/ ...
<item>... <tt/-or/ ...
<item><tt/-not/ ...
<item><tt/-lbrace/ ... <tt/-rbrace/
</itemize>
These commands allow you to do things like
<tscreen><verb>
pick -to freebsd-hackers -and -cc freebsd-hackers
</verb></tscreen>
That will grab all the email in your inbox that was sent to
freebsd-hackers or cc'd to that list. The brace options allow you to
group search criteria together. This is sometimes very necessary as
in the following example
<tscreen><verb>
pick -lbrace -to freebsd-hackers -and -not -cc freebsd-questions -rbrace
-and -subject pci
</verb></tscreen>
Basically this says pick (to freebsd-hackers and not cc'd on
freebsd-questions) and the subject is pci. It should look through your
folder and find all messages send to the freebsd-hackers list that
aren't cc'd to the freebsd-questions list that contain something on
pci in the subject line. Ordinarily you might have to worry about
something called operator precedence. Remember in math how you
evaluate from left to right and you do multiplication and division
first and addition and subtraction second? MH has the same type of
rules for <em/pick/. It's fairly complex so you might want to study
the man page. This document is just to help you get acquainted with
MH.
<sect1>folder, folders, refile - three useful programs for folder maintenance
<p>
There are three programs which are primarily just for manipulating
your folders. The <em/folder/ program is used to switch between
folders, pack them, and list them. At its simplest level you can do a
<tt/folder +newfolder/ and you will be switched into
<bf/newfolder/. From there on out all your MH commands like <em/comp/,
<em/repl/, <em/scan/, and <em/show/ will act on that <bf/newfolder/
folder. Sometimes when you are reading and deleting messages you will
develop ``holes'' in your folders.
If you do a <em/scan/ you might just see messages
34, 35, 36, 43, 55, 56, 57, 80. If you do a <tt/folder -pack/ this
will renumber all your messages so that there are no holes. It doesn't
actually delete any messages though. So you may need to periodically
go through and physically delete <em/rmm/'d messages.
If you need statistics on your folders you can do a <em/folders/ or
<tt/folder -all/ to list all your folders, how many messages they
have, what the current message is in each one and so on. This line of
stats it displays for all your folders is the same one you get when
you change to a folder with <tt/folder +foldername/. A <em/folders/
command looks like this:
<tscreen><verb>
Folder # of messages ( range ); cur msg (other files)
announce has 1 message ( 1- 1).
drafts has no messages.
f-hackers has 43 messages ( 1- 43).
f-questions has 16 messages ( 1- 16).
inbox+ has 35 messages ( 1- 38); cur= 37.
lists has 8 messages ( 1- 8).
netfuture has 1 message ( 1- 1).
out has 31 messages ( 1- 31).
personal has 6 messages ( 1- 6).
todo has 58 messages ( 1- 58); cur= 1.
TOTAL= 199 messages in 13 folders.
</verb></tscreen>
The <em/refile/ command is what you use to move messages between
folders. When you do something like <tt/refile 23 +netfuture/ message
number 23 is moved into the netfuture folder. You could also do
something like <tt/refile 23 +netfuture/latest/ which would put
message number 23 in a subfolder called latest under the netfuture
folder. If you want to keep a message in the current folder and link
it you can do a <tt/refile -link 23 +netfuture/ which would keep 23 in
your current inbox but also list in your netfuture folder. You are
probably beginning to realize some of the really powerful things you
can do with MH.
<sect>Sending Mail
<p>
<!-- This section covers how to use comp, repl and forw -->
Email is a two way street for most people so you want to be able to
send something back. The way MH handles sending mail can be a bit
difficult to follow at first, but it allows for incredible
flexibility. The first thing MH does is to copy a components file into
your outgoing email. A components file is basically a skeleton email
letter with stuff like the To: and Subject: headers already in it.
You are then sent into your editor where you fill in the header
information and then type the body of your message below the dashed
lines in the message. Then to the <em/whatnow/ program. When you are at the
``What now?'' prompt you can tell it to <bf/send/, <bf/list/,
<bf/edit/, <bf/edit/, <bf/push/, and <bf/quit/. Most of these commands
are self-explanatory. So the message sending process involves copying
a component file, editing your email, and then telling the
<em/whatnow/ program what to do with your email.
<sect1><heading>comp, forw, reply - compose, forward or reply to a message to someone</>
<p>
The <em/comp/ program has a few useful command line options. The most
important one to know right now is the <tt/-editor/ option. When MH is
installed the default editor is usually a program called <em/prompter/
which comes with MH. It's not a very exciting editor and basically
just gets the job done. So when you go to compose a message to someone
you might want to use <tt/comp -editor /usr/bin/vi/ or <tt/comp
-editor /usr/local/bin/pico/ instead. Once you have run <em/comp/ you
are in your editor and you see something that looks like this:
<tscreen><verb>
To:
cc:
Subject:
--------
</verb></tscreen>
You need to put the person you are sending the mail to after the To:
line. It works the same way for the other headers also, so you would
need to put your subject after the Subject: line. Then you would just
put the body of your message after the dashed lines. It may seem a bit
simplistic since a lot of email programs have special requesters that
ask you for this information but there really isn't any point to
that. Plus this really gives you excellent flexibility.
<tscreen><verb>
To:freebsd-rave@freebsd.org
cc:
Subject:And on the 8th day God created the FreeBSD core team
--------
Wow this is an amazing operating system. Thanks!
</verb></tscreen>
You can now save this message and exit your editor. You will see the
<tt/What now?/ prompt and you can type in <tt/send/ or <tt/s/ and hit
return. Then the freebsd core team will receive their just rewards. As
I mentioned earlier you can also send other commands, for example
<tt/quit/ if you don't want to send the message.
The <em/forw/ command is stunningly similar. The big difference
being that the message you are forwarding is automatically included in
the outgoing message. When you run <em/forw/ it will forward your
current message. You can always tell it to forward something else by
doing something like <tt/forw 23/ and then message number 23 will be
put in your outgoing message instead of the current message. Beyond
those small differences <em/forw/ functions exactly the same as
<em/comp/. You go through the exact same message sending process.
The <em/repl/ command will reply to whatever your current message is,
unless you give it a different message to reply to. <em/repl/ will do
its best to go ahead and fill in some of the email headers already. So
you will notice that the To: header already has the address of the
recipient in there. Also the Subject: line will already be filled
in. You then go about the normal message composition process and you
are done. One useful command line option to know here is the <tt/-cc/
option. You can use <bf/all/, <bf/to/, <bf/cc/, <bf/me/ after the
<tt/-cc/ option to have <em/repl/ automatically add the various
addresses to the cc list in the message. You have probably noticed
that the original message isn't included. This is because most MH
setups are configured to do this from the start.
<sect1> components, and replcomps - components files for comp and repl
<p>
The <em/components/ file is usually in <tt>/usr/local/lib/mh</tt>. You
can copy that file into your MH Mail directory and edit to contain
what you want it to contain. It is a fairly basic file. You have
various email headers at the top, a dashed line and then nothing. The
<em/comp/ command just copies this <em/components/ file and then edits
it. You can any kind of valid RFC822 header you want. For instance you
could have something like this in your <em/components/ file:
<tscreen><verb>
To:
Fcc: out
Subject:
X-Mailer: MH 6.8.3
X-Home-Page: http://www.freebsd.org/
-------
</verb></tscreen>
MH would then copy this components file and throw you into your
editor. The <em/components/ file is fairly simple. If you wanted to
have a signature on those messages you would just put your signature
in that <em/components/ file.
The <em/replcomps/ file is a bit more complex. The default
<em/replcomps/ looks like this:
<tscreen><verb>
%(lit)%(formataddr %<{reply-to}%?{from}%?{sender}%?{return-path}%>)\
%<(nonnull)%(void(width))%(putaddr To: )\n%>\
%(lit)%(formataddr{to})%(formataddr{cc})%(formataddr(me))\
%<(nonnull)%(void(width))%(putaddr cc: )\n%>\
%<{fcc}Fcc: %{fcc}\n%>\
%<{subject}Subject: Re: %{subject}\n%>\
%<{date}In-reply-to: Your message of "\
%<(nodate{date})%{date}%|%(pretty{date})%>."%<{message-id}
%{message-id}%>\n%>\
--------
</verb></tscreen>
It's in the same basic format as the <em/components/ file but it
contains quite a few extra formatting codes. The %(lit) command makes
room for the address. The %(formataddr is a function that returns a
proper email address. The next part is %< which means if and the
{reply-to} means the reply-to field in the original message. So that
might be translated this way:
<tscreen>
%<<bf/if/ {reply-to} <bf/the original message has a reply-to/
then give that to formataddr, %? <bf/else/ {from} <bf/take the
from address/, %? <bf/else/ {sender} <bf/take the sender address/, %?
<bf/else/ {return-path} <bf/take the return-path from the original
message/, %> <bf/endif/.
</tscreen>
As you can tell MH formatting can get rather involved. You can
probably decipher what most of the other functions and variables
mean. All of the information on writing these format strings is in the
MH-Format man page. The really nice thing is that once you have built
your customized <em/replcomps/ file you won't need to touch it
again. No other email program really gives you the power and
flexibility that MH gives you.
</article>

View file

@ -0,0 +1,6 @@
DOC= multios
SRCS= multios.sgml
SGMLOPTS= -ssi
.include <bsd.sgml.mk>

View file

@ -0,0 +1,436 @@
<!-- LinuxDoc file was created by LyX 0.8 (C) 1995 by Matthias Ettrich -->
<!-- Export filter v0.5 by Pascal Andre -->
<!doctype linuxdoc PUBLIC "-//FreeBSD//DTD linuxdoc//EN">
<article>
<title>Installing and Using FreeBSD With Other Operating Systems
<author><url name="Jay Richmond (jayrich@in.net)" url=
"http://www.in.net/~jayrich/doc/mailme.html">
<date>08/06/96
<abstract>This document discusses how to make FreeBSD coexist nicely with
other popular operating systems such as <BF>Linux</BF>, <BF>MS-DOS</BF>,
<BF>OS/2</BF>, and <BF>Windows 95</BF>. Special thanks to: Annelise
Anderson <htmlurl url="andrsn@stanford.edu" name="<andrsn@stanford.edu>"> Randall Hopper
<htmlurl url="rhh@ct.picker.com" name="<rhh@ct.picker.com>">and Jordan K.
Hubbard <htmlurl url="jkh@time.cdrom.com" name="<jkh@time.cdrom.com>">
</abstract>
<toc>
<sect>Overview
<p>Most people can't fit these operating systems together comfortably
without having a larger hard disk, so special information on large EIDE drives is included. Because there are so many combinations of possible operating systems and hard disk configurations, the <ref name="examples section" id="5"> may be of the most use to you. It contains descriptions of specific working computer setups that use multiple operating systems.
<p>This document assumes that you have already made room on your hard disk
for an additional operating system. Any time you repartition your hard
drive, you run the risk of destroying the data on the original partitions. However, if your hard drive is completely occupied by DOS, you might find the FIPS utility (included on the FreeBSD CD-ROM in the &bsol;TOOLS directory or via ftp at <htmlurl
url="ftp://ftp.freebsd.org/pub/FreeBSD/2.1.5-RELEASE/tools" name="ftp://ftp.freebsd.org/pub/FreeBSD/2.1.5-RELEASE/tools">) useful. It lets you repartition your hard disk without destroying the data already on it. There is also a commercial program available called
Partition Magic, which lets you size and delete partitions without consequence.
<sect>Overview of Boot Managers
<label id="2"><p>These are just brief descriptions of some of the different boot managers you may encounter. Depending on your computer setup, you may find it useful to use more than one of them on the same system.
<p>Boot Easy: This is the default boot manager used with FreeBSD. It has
the ability to boot most anything, including BSD, OS/2 (HPFS), Windows 95 (FAT and FAT32**), and Linux. Partitions are selected with the function keys.
<p>OS/2 Boot Manager: This will boot FAT, HPFS, FFS (FreeBSD), and EXT2
(Linux). It will also boot FAT32** partitions. Partitions are selected using arrow keys. The OS/2 Boot Manager is the only one to use its own separate partition, unlike the others which
use the master boot record (MBR). Therefore, it must be installed below the 1024th cylinder to avoid booting problems. It can boot Linux using LILO when it is part of the boot sector, not the MBR. Go to
<htmlurl url="http://www.ssc.com/linux/howto.html" name="http://www.ssc.com/linux/howto.html"> on the World Wide Web for more information on booting Linux with OS/2's boot manager.
<p>OS-BS: This is an alternative to Boot Easy. It gives you more control
over the booting process, with the ability to set the default partition to boot and the booting timeout. The 'beta' version of this programs allows you to boot by selecting the OS with
your arrow keys. It is included on the FreeBSD CD in the &bsol;TOOLS directory, and via ftp at <htmlurl url="ftp://ftp.freebsd.org/pub/FreeBSD/2.1.5-RELEASE/tools" name="ftp://ftp.freebsd.org/pub/FreeBSD/2.1.5-RELEASE/tools">
<p>LILO, or LInux LOader: This is a limited boot manager. Will boot
FreeBSD, though some customization work is required in the LILO configuration file.
<p>** FAT32 is the replacement to the FAT filesystem included in
Microsoft's OEM SR2 Beta release, which is expected to utilitized on computers pre-loaded with Windows 95 towards the end of 1996. It converts the normal FAT file system and allows you to use smaller cluster sizes for larger hard drives. FAT32 also modifies the traditional FAT boot sector and allocation table,
making it incompatible with some boot managers.
<sect>A Typical Installation
<label id="3"><P>Let's say I have two large EIDE hard drives, and I want to install FreeBSD, Linux, and Windows 95 on them.
<P>Here's how I might do it using these hard disks:
<enum>
<item>/dev/wd0 (first physical hard disk)
<item>/dev/wd1 (second hard disk)
</enum>
<P>Both disks have 1416 cylinders.
<P>1. I boot from a MS-DOS or Windows 95 boot disk that contains the
FDISK.EXE utility and make a small 50 meg primary partition (35-40 for
Windows 95, plus a little breathing room) on the first disk. Also create
a larger partition on the second hard disk for my Windows applications
and data.
<P>2. I reboot and install Windows 95 (easier said than done) :) on the
"C:" partition.
<P>3. The next thing I do is install Linux. I'm not sure about all the
distributions of Linux, but slackware includes LILO (see <ref name="section 2" id="2">). When I am partitioning out my hard disk with Linux "fdisk," I would put all of Linux on
the first drive (maybe 300 megs for a nice root partition and some
swap space).
<P>4. After I install Linux, and are prompted about installing LILO,
make SURE that I install it on the boot sector of my root Linux
partition, not in the MBR (master boot record).
<P>5. The remaining hard disk space can go to FreeBSD. I also make
sure that my FreeBSD root slice does not go beyond the 1024th
cylinder. (The 1024th cylinder is 528 megs into the disk with our
hypothetical 720MB disks). I will use the rest of the hard drive
(about 270 megs) for the "/usr" and "/" slices if I wish. The rest
of the second hard disk (size depends on the amount of my
Windows application/data partition that I created in step 1 can go
to the "/usr/src" slice and swap space.
<P><VERB>
---------------------------------------------------------------------
When viewed with the Windows 95 "fdisk" utility, my hard drives
should now look something like this:
Display Partition Information
Current fixed disk drive: 1
Partition Status Type Volume_Label Mbytes System Usage
C: 1 A PRI DOS 50 FAT** 7%
2 A Non-DOS (Linux) 300 43%
Total disk space is 696 Mbytes (1 Mbyte = 1048576 bytes)
Press Esc to continue
---------------------------------------------------------------------
Display Partition Information
Current fixed disk drive: 2
Partition Status Type Volume_Label Mbytes System Usage
D: 1 A PRI DOS 420 FAT** 60%
Total disk space is 696 Mbytes (1 Mbyte = 1048576 bytes)
Press Esc to continue
** May say FAT16 or FAT32 if you are using the OEM SR2 update
(see <ref name="section 2" id="2">).
---------------------------------------------------------------------
</VERB>
<P>6. Install FreeBSD. I make sure to boot with my first hard disk
set at "NORMAL" in the BIOS. If it is not, I'll have the enter my
true disk geometry at boot time (to get this, boot Windows 95 and
consult Microsoft Diagnostics (MSD.EXE), or check your BIOS) with
the parameter "hd0=1416,16,63" where 1416 is the number of
cylinders on my hard disk, 16 is the number of heads per track,
and 63 is the number of sectors per track on the drive.
<P>7. When partitioning out the hard disk, I make sure to install
"Boot Easy" on the first disk. I don't worry about the second disk,
nothing is booting off of it.
<P>8. When I reboot, "Boot Easy" should recognize my three
bootable partitions as DOS (Windows 95), Linux, and BSD (FreeBSD).
<sect>Special Considerations
<label id="4"><P>Most operating systems are very picky about where and how they are
placed on the hard disk. Windows 95 and DOS need to be on the first
primary partition on the first hard disk. OS/2 is the exception. It
can be installed on the first or second disk in a primary or extended
partition. If you are not sure, keep the beginning of the bootable
partitions below the 1024th cylinder.
<P>If you install Windows 95 on an existing BSD system, it will "destroy"
the MBR, and you will have to reinstall your previous boot manager.
Boot Easy can be reinstalled by using the BOOTINST.EXE utility
included in the &bsol;TOOLS directory on the CD-ROM, and via ftp at <htmlurl
url="ftp://ftp.freebsd.org/pub/FreeBSD/2.1.5-RELEASE/tools"
name="ftp://ftp.freebsd.org/pub/FreeBSD/2.1.5-RELEASE/tools">. You can also
re-start the installation process and go to the partition editor.
>From there, mark the FreeBSD partition as bootable, select Boot Manager,
and then type W to (W)rite out the information to the MBR. You can now reboot, and
"Boot Easy" should then recognize Windows 95 as "DOS."
<P>Please keep in mind that OS/2 can read FAT and HPFS partitions,
but not FFS (FreeBSD) or EXT2 (Linux) partitions. Likewise,
Windows 95 can only read and write to FAT and FAT32 (see <ref name="section 2" id="2">) partitions.
FreeBSD can read most file systems, but currently cannot read HPFS
partitions. Linux can read HPFS partitions, but can't write to them.
Recent versions of the Linux kernel (2.x) can read and write to
Windows 95 VFAT partitions (VFAT is what gives Windows 95
long file names - it's pretty much the same as FAT). Linux can read and write to
most file systems. Got that? I hope so.
<sect>Examples
<label id="5"><P><EM>(section needs work, please send your example to <htmlurl
url="mailto:jayrich@in.net" name="jayrich@in.net">)</EM>.
<P>FreeBSD+Win95: If you installed FreeBSD after Windows 95, you
should see 'DOS' on the "Boot Easy" menu. This is Windows 95.
If you installed Windows 95 after FreeBSD, read <ref name="section 4" id="4"> above.
As long as your hard disk does not have 1024 cylinders you should not
have a problem booting. If one of your partitions goes beyond the
1024th cylinder however, and you get messages like "invalid system
disk" under DOS (Windows 95) and FreeBSD will not boot, try looking
for a setting in your BIOS called "&gt; 1024 cylinder support" or
"NORMAL/LBA" mode. DOS may need LBA (Logical Block Addressing) in
order to boot correctly. If the idea of switching BIOS settings every
time you boot up doesn't appeal to you, you can boot FreeBSD through
DOS via the FBSDBOOT.EXE utility on the CD (It should find your FreeBSD
partition and boot it.)
<P>FreeBSD+OS/2+Win95: Nothing new here. OS/2's boot manger
can boot all of these operating systems, so that shouldn't be a
problem.
<P>FreeBSD+Linux: You can also use "Boot Easy" to boot both operating
systems.
<P>FreeBSD+Linux+Win95: (see <ref name="section 3" id="3">)
<label id="sources"><sect>Other Sources of Help
<P>There are many Linux HOW-TO's that deal with multiple operating
systems on the same hard disk. They are available on the World
Wide Web at <htmlurl url="http://www.ssc.com/linux/howto.html"
name="http://www.ssc.com/linux/howto.html">.
<P>The Linux+OS/2+DOS Mini-HOWTO offers help on configuring the
OS/2 boot manager. It is also available on the WWW at:
<htmlurl url="http://sunsite.unc.edu/mdw/HOWTO/mini/Linux+OS2+DOS"
name="http://sunsite.unc.edu/mdw/HOWTO/mini/Linux+OS2+DOS">.
And the <htmlurl url="http://www.in.net/~jkatz/win95/Linux-HOWTO.html" name="http://www.in.net/~jkatz/Linux-HOWTO.html"> is also helpful.
<P>The NT Loader Hacking Guide provides good information on multibooting
Windows NT, '95, and DOS with other operating systems. It's available at
<htmlurl url="http://www.dorsai.org/~dcl/publications/NTLDR_Hacking"
name="http://www.dorsai.org/~dcl/publications/NTLDR_Hacking">.
<P>And Hale Landis's "How It Works" document pack contains some good info
on all sorts of disk geometry and booting related topics. Here are a few
links that might help you find it: <htmlurl
url="ftp://fission.dt.wdc.com/pub/otherdocs/pc_systems/how_it_works/allhiw.zip"
name="ftp://fission.dt.wdc.com/pub/otherdocs/pc_systems/how_it_works/allhiw.zip">,
<htmlurl url="http://www.cs.yorku.ca/People/frank/docs/"
name="http://www.cs.yorku.ca/People/frank/docs/">.
<P>Finally, don't overlook FreeBSD's kernel documentation on the booting
procedure, available in the kernel source distribution (it unpacks to
<htmlurl url="file:/usr/src/sys/i386/boot/biosboot/README.386BSD"
name="file:/usr/src/sys/i386/boot/biosboot/README.386BSD">.
<sect>Technical Details
<P><EM>(Contributed by Randall Hopper <htmlurl
url="rhh@ct.picker.com" name="<rhh@ct.picker.com>">)</EM>
<P>This section attempts to give you enough basic information about
your hard disks and the disk booting process so that you can
troubleshoot most problems you might encounter when getting set up to
boot several operating systems. It starts in pretty basic terms, so you may want
to skim down in this section until it begins to look unfamiliar and then start
reading.
<sect1>Disk Primer
<P>Three fundamental terms are used to describe the location of
data on your hard disk: Cylinders, Heads, and Sectors. It's not
particularly important to know what these terms relate to except to
know that, together, they identify where data is physically on your
disk.
<P>Your disk has a particular number of cylinders, number of heads,
and number of sectors per cylinder-head (a cylinder-head also known
nown as a track). Collectively this information defines the
"physical disk geometry" for your hard disk. There are typically 512
bytes per sector, and 63 sectors per track, with the number of
cylinders and heads varying widely from disk to disk. Thus you can
figure the number of bytes of data that'll fit on your own disk by
calculating:
<VERB>
(# of cylinders) * (# heads) * (63 sectors/track) * (512 bytes/sect)
</VERB>
<P>For example, on my 1.6 Gig Western Digital AC31600 EIDE hard disk,that's:
<VERB>
(3148 cyl) * (16 heads) * (63 sectors/track) * (512 bytes/sect)
</VERB>
<P>which is 1,624,670,208 bytes, or around 1.6 Gig.
<P>You can find out the physical disk geometry (number of
cylinders, heads, and sectors/track counts) for your hard disks using
ATAID or other programs off the net. Your hard disk probably came
with this information as well. Be careful though: if you're using
BIOS LBA (see <ref name="section 7.3" id="limits">), you
can't use just any program to get the physical geometry. This is because
many programs (e.g. MSD.EXE or FreeBSD fdisk) don't identify the physical
disk geometry; they instead report the "translated geometry" (virtual
numbers from using LBA). Stay tuned for what that means.
<P>One other useful thing about these terms. Given 3 numbers -- a
cylinder number, a head number, and a sector-within-track number --
you identify a specific absolute sector (a 512 byte block of data) on
your disk. Cylinders and Heads are numbered up from 0, and Sectors
are numbered up from 1.
<P>For those that are interested in more technical details, information on
disk geometry, boot sectors, BIOSes, etc. can be found all over the net.
Query Lycos, Yahoo, etc. for "boot sector" or "master boot record".
Among the useful info you'll find are Hale Landis's "How It Works"
document pack. See the <ref name="Other Sources of Help" id="sources">
section for a few pointers to this pack.
<P>Ok, enough terminology. We're talking about booting here.
<sect1><heading>The Booting Process<label id="booting"></heading>
<P>On the first sector of your disk (Cyl 0, Head 0, Sector 1) lives
the Master Boot Record (MBR). It contains a map of your disk. It
identifies up to 4 "partitions", each of which is a contiguous chunk
of that disk. FreeBSD calls partitions "slices" to avoid confusion
with it's own partitions, but we won't do that here. Each partition
can contain its own operating system.
<P>Each partition entry in the MBR has a "Partition ID", a "Start
Cylinder/Head/Sector", and an "End Cylinder/Head/Sector". The
Partition ID tells what type of partition it is (what OS) and the
Start/End tells where it is. Here's a smattering of some common
Partition IDs:
<VERB>
ID (hex) DESCRIPTION
01 ...... Primary DOS12 (12-bit FAT)
04 ...... Primary DOS16 (16-bit FAT)
05 ...... Extended DOS
06 ...... Primary big DOS (&gt; 32MB)
0A ...... OS/2
83 ...... Linux (EXT2FS)
A5 ...... FreeBSD, NetBSD, 386BSD (UFS)
</VERB>
<P>Note that not all partitions are bootable (e.g. Extended DOS).
Some are -- some aren't. What makes a partition bootable is the
configuration of the "Partition Boot Sector" that exists at the
beginning of each partition.
<P>When you configure your favorite boot manager, it looks up the entries
in the MBR partition tables of all your hard disks and lets you name the
entries in that list. Then when you boot, the boot manager is invoked by
special code in the Master Boot Sector of the first probed hard disk on
your system. It looks at the MBR partition table entry corresponding to
the partition choice you made, uses the Start Cylinder/Head/Sector
information for that partition, loads up the Partition Boot Sector for that
partition, and gives it control. That Boot Sector for the partition itself
contains enough information to start loading the operating system on that
partition.
<P>One thing we just brushed past that's important to know. All of your
hard disks have MBRs. However, the one that's important is the one on the
disk that's first probed by the BIOS. If you have only IDE hard disks, its
the first IDE disk (e.g. primary disk on first controller). Similarly for
SCSI only systems. If you have both IDE and SCSI hard disks though, the
IDE disk is typically probed first by the BIOS, so the first IDE disk is
the first probed disk. The boot manager you will install will be hooked into
the MBR on this first probed hard disk that we've just described.
<sect1>Booting Limitations and Warnings
<label id="limits"><P>Now the interesting stuff that you need to watch out for.
<P><BF>1. The dreaded 1024 cylinder limit and how BIOS LBA helps</BF>
<P>The first part of the booting process is all done through the
BIOS, (if that's a new term to you, the BIOS is a software chip on
your system motherboard which provides startup code for your
computer). As such, this first part of the process is subject to the
limitations of the BIOS interface.
<P>The BIOS interface used to read the hard disk during this period
(INT 13H, Subfunction 2) allocates 10 bits to the Cylinder Number, 8
bits to the Head Number, and 6 bits to the Sector Number. This
restricts users of this interface (i.e. boot managers hooked into
your disk's MBR as well as OS loaders hooked into the Boot Sectors)
to the following limits:
<VERB>
1024 cylinders, max
256 heads , max
64 cylinders, max (actually 63 -- "0" isn't available)
</VERB>
<P>Now big hard disks have lots of cylinders but not a lot of
heads, so invariably with big hard disks the number of cylinders is
greater than 1024. Given this and the BIOS interface as is, you
can't boot off just anywhere on your hard disk. The boot code (the
boot manager and the OS loader hooked into all bootable partitions'
Boot Sectors) has to reside below cylinder 1024. In fact, if your
hard disk is typical and has 16 heads, this equates to:
<VERB>
1024 cyl/disk * 16 heads/disk * 63 sect/(cyl-head) * 512 bytes/sector
</VERB>
<P>which is around the often-mentioned 528MB limit.
<P>This is where BIOS LBA (Logical Block Addressing) comes in. BIOS LBA
gives the user of the BIOS API calls access to physical cylinders above
1024 though the BIOS interfaces by "redefining" a cylinder. That is, it
remaps your cylinders and heads, making it appear through the BIOS as
though the disk has "fewer" cylinders and "more" heads than it actually
does. In other words, it takes advantage of the fact that hard disks have
relatively few heads and lots of cylinders by shifting the balance between
number of cylinders and number of heads so that both numbers lie below the
above-mentioned limits (1024 cylinders, 256 heads).
<P>With BIOS LBA, the hard disk size limitation is virtually
removed (well, pushed up to 8 Gigabytes anyway). If you have an LBA
BIOS, you can put FreeBSD or any OS anywhere you want and not hit the
1024 cylinder limit.
<P>To use my my 1.6 Gig Western Digital as an example again, it's
physical geometry is:
<VERB>
(3148 cyl, 16 heads, 63 sectors/track, 512 bytes/sector)
</VERB>
<P>However, my BIOS LBA remaps this to:
<VERB>
( 787 cyl, 64 heads, 63 sectors/track, 512 bytes/sector)
</VERB>
<P>giving the same effective size disk, but with cylinder and head
counts within the BIOS API's range (Incidentally, I have both Linux and
FreeBSD existing on one of my hard disks above the 1024th physical
cylinder, and both operating systems boot fine, thanks to BIOS LBA).
<P><BF>2. Boot Managers and Disk Allocation</BF>
<P>Another gotcha to watch out when installing boot managers is
allocating space for your boot manager. It's best to be aware of
this issue up front to save yourself from having to reinstall one or
more of your OSs.
<P>If you followed the discussion in <ref name="section 7.2" id="booting">
about the Master Boot Sector (where the MBR is), Partition Boot Sectors, and the booting
process, you may have been wondering just exactly where on your hard
disk that nifty boot manager is going to live. Well, some boot
managers are small enough to fit entirely within the Master Boot
Sector (Cylinder 0, Head 0, Sector 0) along with the partition table.
Others need a bit more room and actually extend a few sectors past
the Master Boot Sector in the Cylinder 0 Head 0 track, since that's
typically free...typically.
<P>That's the catch. Some operating systems (FreeBSD included) let
you start their partitions right after the Master Boot Sector at
Cylinder 0, Head 0, Sector 2 if you want. In fact, if you give
FreeBSD's sysinstall a disk with an empty chunk up front or the whole
disk empty, that's where it'll start the FreeBSD partition by default
(at least it did when I fell into this trap :-). Then when you go to
install your boot manager, if it's one that occupies a few extra
sectors after the MBR, it'll overwrite the front of the first
partition's data. In the case of FreeBSD, this overwrites the
disk label, and renders your FreeBSD partition unbootable.
<P>The easy way to avoid this problem (and leave yourself the
flexibility to try different boot managers later) is just to always
leave the first full track on your disk unallocated when you
partition your disk. That is, leave the space from Cylinder 0, Head
0, Sector 2 through Cylinder 0, Head 0, Sector 63 unallocated, and
start your first partition at Cylinder 0, Head 1, Sector 1.
For what it's worth, when you create a DOS partition at the
front of your disk, DOS leaves this space open by default (this is
why some boot managers assume it's free). So creating a DOS
partition up at the front of your disk avoids this problem
altogether. I like to do this myself, creating 1 Meg DOS partition
up front, because it also avoids my primary DOS drive letters
shifting later when I repartition.
<P>For reference, the following boot managers use the
Master Boot Sector to store their code and data:
<itemize>
<item>OS-BS 1.35
<item>Boot Easy
<item>LILO
</itemize>
<P>These boot managers use a few additional sectors after the
Master Boot Sector:
<itemize>
<item>OS-BS 2.0 Beta 8 (sectors 2-5)
<item>OS/2's boot manager
</itemize>
<P><BF>3. What if your machine won't boot?</BF>
<P>At some point when installing boot managers, you might leave the
MBR in a state such that your machine won't boot. This is unlikely,
but possible when re-FDISKing underneath an already-installed boot
manager.
<P>If you have a bootable DOS partition on your disk, you can boot
off a DOS floppy, and run:
<VERB>
FDISK /MBR
</VERB>
<P>to put the original, simple DOS boot code back into the system. You can
then boot DOS (and DOS only) off the hard drive. Alternatively, just
re-run your boot manager installation program off a bootable floppy.
</article>

View file

@ -0,0 +1,5 @@
DOC= newuser
SRCS= newuser.sgml
.include <bsd.sgml.mk>

View file

@ -0,0 +1,537 @@
<!DOCTYPE linuxdoc PUBLIC "-//FreeBSD//DTD linuxdoc//EN">
<article>
<title>For People New to Both FreeBSD <em>and</em> Unix
<author>Annelise Anderson
<htmlurl url="mailto:andrsn@hoover.stanford.edu"
name="&lt;andrsn@hoover.stanford.edu&gt;">
<date>June 30, 1996
<abstract>Congratulations on installing FreeBSD!
This introduction is for people new to both FreeBSD
<em>and</em> Un*x---so it starts with basics. It assumes you're using
version 2.0.5 or later of FreeBSD as distributed by Walnut Creek
or FreeBSD.ORG, your system (for now) has a single user
(you)---and you're probably pretty good with DOS/Windows or OS/2.
</abstract>
<toc>
<!-- ************************************************************ -->
<sect>Logging in and Getting Out
<p>Log in (when you see <tt>login:</tt>) as a user you created during
installation or as <em>root</em>. (Your FreeBSD installation will already
have an account for root; root can go anywhere and do anything,
including deleting essential files, so be careful!)
To log out (and get a new <tt>login</tt> prompt) type
<tscreen>
exit
</tscreen>
as often as necessary. Yes, press <em>enter</em> after commands, and remember
that Unix is case-sensitive---<tt>exit</tt>, not <tt>EXIT</tt>.
To shut down the machine type:
<tscreen>
/sbin/shutdown -h now
</tscreen>
Or to reboot type
<tscreen>
/sbin/shutdown -r now
</tscreen>
or
<tscreen>
/sbin/reboot
</tscreen>
You can also reboot with
<tt>Ctrl-Alt-Delete</tt>. Give it a little time to do its work. This is
equivalent to <tt>/sbin/reboot</tt> in recent releases of FreeBSD, and is
much, much better than hitting the reset button. You don't want to
have to reinstall this thing, do you?
<!-- ************************************************************ -->
<sect>Adding A User with Root Privileges
<p>If you didn't create any users when you installed the system and
are thus logged in as root, you should probably create a user now with
<tscreen>
adduser
</tscreen>
Don't use the <tt>-verbose</tt> option; the defaults are what you
want. Suppose you create a user <em>jack</em> with full name
<em>Jack Benimble</em>. Give jack a password if security (even
kids around who might pound on the keyboard) is an issue. When
it asks you if you want to invite jack into other groups, type
<tscreen>
wheel
</tscreen>
This will make it possible to log in as <em>jack</em> and use the <tt>su</tt> command to
become root. Then you won't get scolded any more for logging in as
root, and as root you'll have the same environment as jack
(this is good).
You can quit <tt>adduser</tt> any time by typing <tt>Ctrl-C</tt>, and at the end
you'll have a chance to approve your new user or simply type <tt>n</tt> for no.
You might want to create a second newuser (jill?) so that when you edit
jack's login files, you'll have a hot spare in case something goes wrong.
Once you've done this, use <tt>exit</tt> to get back to a login prompt and log
in as <em>jack</em>. In general, it's a good idea to do as
much work as possible as an ordinary user who doesn't have the
power---and risk---of root.
If you already created a user and you want the user to be able to <tt>su</tt>
to root, you can log in as root and edit the file <tt>/etc/group</tt>, adding
jack to the first line (the group wheel). But first you need to
practice <tt>vi</tt>, the text editor.
<!-- ************************************************************ -->
<sect>Looking Around
<p>Logged in as an ordinary user, look around and try out some commands that
will access the sources of help and information within FreeBSD.
Here are some commands and what they do:
<descrip>
<tag/<tt>id</tt>/ Tells you who you are!
<tag/<tt>pwd</tt>/ Shows you where you are---the current
working directory.
<tag/<tt>ls</tt>/ Lists the files in the current directory.
<tag/<tt>ls -F</tt>/ Lists the files in the current directory
with a * after
executables, a / after directories, and an @ after symbolic
links.
<tag/<tt>ls -l</tt>/ Lists the files in long format---size,
date, permissions.
<tag/<tt>ls -a</tt>/ Lists hidden (unless you're root) ``dot''
files with the others.
<tag/<tt>cd</tt>/ Changes directories. <tt>cd ..</tt> backs up
one level; note the
space after <tt>cd</tt>. <tt>cd /usr/local</tt>
goes there. <tt>cd ~</tt> goes to
the home directory of the person logged in---e.g.,
<tt>/usr/home/jack</tt>. Try <tt>cd /cdrom</tt>,
and then <tt>ls</tt>, to find out
if your cdrom is mounted and working.
<tag/<tt>view <em>filename</em></tt>/
Lets you look at a file (named <em>filename</em>
without changing
it. Try <tt>view /etc/fstab</tt>. <tt>:q</tt> to quit.
<tag/<tt>cat <em>filename</em></tt>/
Displays <em>filename</em> on screen. If it's too long and you
can see only the end of it, press <tt>ScrollLock</tt> and use
the <tt>up-arrow</tt> to move backward; you can
use <tt>ScrollLock</tt> with
man pages too. Press <tt>ScrollLock</tt> again
to quit scrolling.
You might want to try <tt>cat</tt> on some of the
dot files in your
home directory---<tt>cat .cshrc</tt>, <tt>cat .login</tt>,
<tt>cat .profile</tt>.
</descrip>
You'll notice aliases in <tt>.cshrc</tt>
for some of the <tt>ls</tt> commands (they're very convenient). You can create
other aliases by editing <tt>.cshrc</tt>. You can make these aliases
available to all users on the system by putting them in the system-wide
csh configuration file, <em>/etc/csh.cshrc</em>.
<!-- ************************************************************ -->
<sect>Getting Help and Information
<p>Here are some useful sources of help. ``text'' stands for something of
your choice that you type in---usually a command or filename.
<descrip>
<tag/<tt>apropos <em>text</em></tt>/
Everything containing string <em>text</em>
in the whatis database.
<tag/<tt>man <em>text</em></tt>/
The man page for <em>text</em>.
The major source of documentation
for Un*x systems. <tt>man ls</tt> will tell you
all the ways to
use the <tt>ls</tt> command. Press <tt>Enter</tt> to
move through text, <tt>Ctrl-b</tt>
to go back a page, <tt>Ctrl-f</tt> to go forward,
<tt>q</tt> or <tt>Ctrl-c</tt> to quit.
<tag/<tt>which <em>text</em></tt>/
Tells you where in the user's path the command
<em>text</em> is found.
<tag/<tt>locate <em>text</em></tt>/
All the paths where the string <tt>text</tt> is found.
<tag/<tt>whatis <em>text</em></tt>/
Tells you what the command <tt>text</tt> does and its man page.
<tag/<tt>whereis <em>text</em></tt>/
Finds the file <em>text</em>, giving its full path.
</descrip>
You might want to try using <tt>whatis</tt> on some common useful
commands like <tt>cat</tt>, <tt>more</tt>, <tt>grep</tt>,
<tt>mv</tt>, <tt>find</tt>, <tt>tar</tt>, <tt>chmod</tt>,
<tt>chown</tt>, <tt>date</tt>, and <tt>script</tt>.
<tt>more</tt> lets you read a page at a time as it does in DOS,
e.g., <tt>ls -l | more</tt> or <tt>more <em>filename</em></tt>. The
<tt>*</tt> works as a wildcard---e.g., <tt>ls w*</tt> will show
you files beginning with w.
Are some of these not working very well? Both <tt>locate</tt>
and <tt>whatis</tt> depend on a database that's rebuilt weekly.
If your machine isn't going to be left on over the weekend (and
running FreeBSD), you might want to run the commands for daily,
weekly, and monthly maintenance now and then. Run them as root
and give each one time to finish before you start the next one,
for now.
<tscreen>
/etc/daily<newline>
/etc/weekly<newline>
/etc/monthly
</tscreen>
If you get tired waiting, press <tt>Alt-F2</tt> to get another
virtual console, and log in again. After all, it's a multi-user,
multi-tasking system. Nevertheless these commands will probably
flash messages on your screen while they're running; you can type
<tt>clear</tt> at the prompt to clear the screen. Once they've run, you
might want to look at <tt>/var/mail/root</tt> and
<tt>/var/log/messages</tt>.
Basically running such commands is part of system administration---and as
a single user of a Unix system, you're your own system administrator.
Virtually everything you need to be root to do is system administration.
Such responsibilities aren't covered very well even in those big fat books
on Unix, which seem to devote a lot of space to pulling down menus in
windows managers. You might want to get one of the two leading books
on systems administration, either Evi Nemeth et.al.'s <em>UNIX System
Administration Handbook</em> (Prentice-Hall, 1995, ISBN 0-13-15051-7)---the
second edition with the red cover; or &AElig;leen Frisch's <em>Essential System
Administration</em> (O'Reilly &amp; Associates, 1993, ISBN 0-937175-80-3).
I used Nemeth.
<!-- ************************************************************ -->
<sect>Editing Text
<p>To configure your system, you need to edit text files. Most
of them will be in the <tt>/etc</tt> directory; and you'll need
to <tt>su</tt> to root to be able to change them. The text
editor is <tt>vi</tt>. Before you edit a file, you should
probably back it up. Suppose you want to edit
<tt>/etc/sysconfig</tt>. You could just use <tt>cd /etc</tt> to
get to the <tt>/etc</tt> directory and do:
<tscreen>
cp sysconfig sysconfig.orig
</tscreen>
This would copy <tt>sysconfig</tt> to <tt>sysconfig.orig</tt>,
and you could later copy <tt>sysconfig.orig</tt> to
<tt>sysconfig</tt> to recover the original. But even better
would be moving (renaming) and then copying back:
<tscreen>
mv sysconfig sysconfig.orig<newline>
cp sysconfig.orig sysconfig
</tscreen>
because the <tt>mv</tt> command preserves the original date and
owner of the file. You can now edit <tt>sysconfig</tt>. If you
want the original back, you'd then <tt>mv sysconfig syconfig.myedit</tt>
(assuming you want to preserve your edited version) and then
<tscreen>
mv sysconfig.orig sysconfig
</tscreen>
to put things back the way they were.
To edit a file, type
<tscreen>
vi filename
</tscreen>
Move through the text with the arrow keys. <tt>Esc</tt> (the
escape key) puts <tt>vi</tt> in command mode. Here are some
commands:
<descrip>
<tag/<tt>x</tt>/ delete letter the cursor is on
<tag/<tt>dd</tt>/ delete the entire line (even if
it wraps on the screen)
<tag/<tt>i</tt>/ insert text at the cursor
<tag/<tt>a</tt>/ insert text after the cursor
</descrip>
Once you type <tt>i</tt> or <tt>a</tt>, you can enter text.
<tt>Esc</tt> puts you back in command mode where you can type
<descrip>
<tag/<tt>:w</tt>/ to write your changes to disk and continue editing
<tag/<tt>:wq</tt>/ to write and quit
<tag/<tt>:q!</tt>/ to quit without saving changes
<tag><tt>/<em>text</em></tt></tag> to move the cursor
to <em>text</em>; <tt>/Enter</tt> (the enter
key) to find the next instance of <em>text</em>.
<tag/<tt>G</tt>/ to go to the end of the file
<tag/<tt><em>n</em>G</tt>/ to go to line <em>n</em> in
the file, where <em>n</em> is a number
<tag/<tt>Ctrl-L</tt>/ to redraw the screen
<tag/<tt>Ctrl-b</tt> and <tt>Ctrl-f</tt>/ go back
and forward a screen, as they
do with <tt>more</tt> and <tt>view</tt>.
</descrip>
Practice with <tt>vi</tt> in your home directory by creating a
new file with <tt>vi filename</tt> and adding and deleting text,
saving the file, and calling it up again. <tt>vi</tt> delivers
some surprises because it's really quite complex, and sometimes
you'll inadvertently issue a command that will do something you
don't expect. (Some people actually like <tt>vi</tt>---it's more
powerful than DOS EDIT---find out about the <tt>:r</tt> command.)
Use <tt>Esc</tt> one or more times to be sure you're in command
mode and proceed from there when it gives you trouble, save often
with <tt>:w</tt>, and use <tt>:q!</tt> to get out and start over
(from your last <tt>:w</tt>) when you need to.
Now you can <tt>cd</tt> to <tt>/etc</tt>, <tt>su</tt> to root,
use <tt>vi</tt> to edit the file <tt>/etc/group</tt>, and add a
user to wheel so the user has root privileges. Just add a comma
and the user's login name to the end of the first line in the
file, press <tt>Esc</tt>, and use <tt>:wq</tt> to write the file
to disk and quit. Instantly effective. (You didn't put a space
after the comma, did you?)
<!-- ************************************************************ -->
<sect>Printing Files from DOS
<p>At this point you probably don't have the printer working, so here's a
way to create a file from a man page, move it to a floppy, and then
print it from DOS. Suppose you want to read carefully about changing
permissions on files (pretty important). You can use the command
man chmod to read about it. The command
<tscreen>
man chmod &gt; chmod.txt
</tscreen>
will send the man page to the <tt>chmod.txt</tt> file instead of showing it on
your screen. Now put a dos-formatted diskette in your floppy drive a,
<tt>su</tt> to root, and type
<tscreen>
/sbin/mount -t msdos /dev/fd0 /mnt
</tscreen>
to mount the floppy drive on <tt>/mnt</tt>.
Now (you no longer need to be root, and you can type <tt>exit</tt> to get
back to being user jack) you can go to the directory where you created
chmod.txt and copy the file to the floppy with:
<tscreen>
cp chmod.txt /mnt
</tscreen>
and use <tt>ls /mnt</tt> to get a directory listing of
<tt>/mnt</tt>, which should show the file <tt>chmod.txt</tt>.
You might especially want to make a file from <tt>/sbin/dmesg</tt> by typing
<tscreen>
/sbin/dmesg &gt; dmesg.txt
</tscreen>
and copying <tt>dmesg.txt</tt> to the floppy. <tt>/sbin/dmesg</tt> is the boot
log record,
and it's useful to understand it because it shows what FreeBSD found
when it booted up. If you ask questions on questions@freebsd.org or on
a USENET group---like ``FreeBSD isn't finding my tape drive, what do I
do?''---people will want to know what <tt>dmesg</tt> has to say.
You can now dismount the floppy drive (as root) to get the disk out with
<tscreen>
/sbin/umount /mnt
</tscreen>
or reboot to go to DOS. Copy these files to a DOS directory, call them
up with DOS EDIT, Windows Notepad, or a word processor, make a minor
change so the file has to be saved, and print as you normally would
from DOS or Windows. Hope it works! man pages come out best if printed
with the dos <tt>print</tt> command. (Copying files from FreeBSD to a mounted
dos partition is in some cases still a little risky.)
Getting the printer printing from FreeBSD involves
creating an appropriate entry in <tt>/etc/printcap</tt> and creating
a matching spool directory in <tt>/var/spool/output</tt>. If your
printer is on lpt0 (what dos calls LPT1), you may only need to
go to <tt>/var/spool/output</tt> and (as root) create the directory
lpd by typing:
<tscreen>
mkdir lpd
</tscreen>
Then the printer should respond if it's turned on when the
system is booted, and lp or lpr should send a file to the printer.
Whether or not the file actually prints depends on configuring it, which is
covered in the FreeBSD handbook.
<!-- ************************************************************ -->
<sect>Other Useful Commands
<p><descrip>
<tag/<tt>df</tt>/ shows file space and mounted systems.
<tag/<tt>ps aux</tt>/ shows processes running. <tt>ps ax</tt> is a narrower form.
<tag/<tt>lsdev</tt>/ lists configured devices
<tag/<tt>devmenu</tt>/ a menu of devices---in color!
<tag/<tt>rm <em>filename</em></tt>/ remove <tt>filename</tt>
<tag/<tt>rm -R <em>dir</em></tt>/ removes a directory <tt>dir</tt> and all
subdirectories---careful!
<tag/<tt>ls -R</tt>/ lists files in the current
directory and all subdirectories;
I used a variant, <tt>ls -AFR &gt; where.txt</tt>,
to get a list of all
the files in <tt>/</tt> and (separately)
<tt>/usr</tt> before I found better
ways to find files.
<tag/<tt>passwd</tt>/ to change user's password (or root's password)
<tag/<tt>man hier</tt>/ man page on the Unix file system
</descrip>
Use find to locate filename in <tt>/usr</tt> or any of its subdirectories with
<tscreen>
find /usr -name "<em>filename</em>"
</tscreen>
You can use <tt>*</tt> as a wildcard in <tt>"<em>filename</em>"</tt>
(which should be in quotes). If you tell find to search in
<tt>/</tt> instead of <tt>/usr</tt> it will look for the file(s)
on all mounted file systems, including the cdrom and the dos
partition.
An excellent book that explains Unix commands and utilities is
Abrahams &amp; Larson, <em>Unix for the Impatient</em> (2nd ed.,
Addison-Wesley, 1996). There's also a lot of Unix information on
the Internet. Try the <url
url="http://www.eecs.nwu.edu/unix.html" name="Unix Reference
Desk">.
<!-- ************************************************************ -->
<sect>Next Steps
<p>You should now have the tools you need to get around and edit
files, so you can get everything up and running. There is a
great deal of information in the FreeBSD handbook (which is
probably on your hard drive) and <url
url="http://www.freebsd.org" name="FreeBSD's web site">. A wide
variety of packages and ports are on the <htmlurl
url="http://www.cdrom.com" name="Walnut Creek"> cdrom as well as
the web site. The handbook tells you more about how to use them
(get the package if it exists, with <tt>pkg_add
/cdrom/packages/All/<em>packagename</em></tt>, where
<em>packagename</em> is the filename of the package). The cdrom
has lists of the packages and ports with brief descriptions in
<tt>cdrom/packages/index</tt>, <tt>cdrom/packages/index.txt</tt>,
and <tt>cdrom/ports/index</tt>, with fuller descriptions in
<tt>/cdrom/ports/*/*/pkg/DESCR</tt>, where the <tt>*</tt>s
represent subdirectories of kinds of programs and program names
respectively.
If you find the handbook too sophisticated (what with
<tt>lndir</tt> and all) on installing ports from the cdrom,
here's what usually works:
Find the port you want, say <tt>kermit</tt>. There will be a directory
for it on the cdrom. Copy the subdirectory to
<tt>/usr/local</tt> (a good place for software you add that
should be available to all users) with:
<tscreen>
cp -R /cdrom/ports/comm/kermit /usr/local
</tscreen>
This should result in a <tt>/usr/local/kermit</tt> subdirectory
that has all the files that the <tt>kermit</tt> subdirectory on
the cdrom has.
Next, check <tt>/cdrom/ports/distfiles</tt> for a file with a name
that indicates it's the port you want. Copy that file to
<tt>/usr/ports/distfiles</tt>. (Create <tt>/usr/ports/distfiles</tt>
if it doesn't exist using <em>mkdir</em>.) In the case of <tt>kermit</tt>,
there is no distfile.
Then <tt>cd</tt> to the subdirectory of
<tt>/usr/local/kermit</tt> that has the file Makefile. Type
<tscreen>
make all install
</tscreen>
During this process the port will ftp to get any compressed files it
needs that it didn't find in <tt>/usr/ports/distfiles</tt>. If you
don't have your network running yet and there was no file for the
port in <tt>/cdrom/ports/distfiles</tt>, you will have to get the
distfile using another machine and copy it to
<tt>/usr/ports/distfiles</tt> from a floppy or your dos partition.
Read <tt>Makefile</tt> (with <tt>cat</tt> or <tt>more</tt> or
<tt>view</tt>) to find out where to go (the master distribution site)
to get the file and what its name is. Its name will be truncated
when downloaded to DOS, and after you get it into
<tt>/usr/ports/distfiles</tt> you'll have to rename it (with the
<tt>mv</tt> command) to its original name so it can be found. (Use
binary file transfers!) Then go back to <tt>/usr/local/kermit</tt>,
find the directory with <tt>Makefile</tt>, and type <tt>make all
install</tt>.
The other thing that happens when installing ports or packages is that
some other program is needed. If the installation stops with a message
"can't find unzip" or whatever, you might need to install the package
or port for unzip before you continue.
Once it's installed type <tt>rehash</tt> to make FreeBSD
<tt>reread</tt> the files in the path so it knows what's there.
(If you get a lot of "path not found" messages when you use
<tt>whereis</tt> or which, you might want to make additions to
the list of directories in the path statement in <tt>.cshrc</tt>
in your home directory. The path statement in Unix does the same
kind of work it does in DOS, except the current directory is not
(by default) in the path for security reasons; if
the command you want is in the directory you're in, you need to
type <tt>./</tt> before the command to make it work; no space after the
slash.)
You might want to get the most recent version of Netscape from their
<url url="ftp://ftp.netscape.com" name="ftp site">. (Netscape
requires the X window sytem.) The version you want is the "unknown
bsd" version. Just use <tt>gunzip <em>filename</em></tt> and <tt>tar
xvf <em>filename</em></tt> on it, move the binary to
<tt>/usr/local/bin</tt> or some other place binaries are kept,
<tt>rehash</tt>, and then put the following lines in <tt>.cshrc</tt>
in each user's home directory or (easier) in
<tt>/etc/csh.cshrc</tt>, the system-wide csh start-up file:
<tscreen>
setenv XKEYSYMDB /usr/X11R6/lib/X11/XKeysymDB<newline>
setenv XNLSPATH /usr/X11R6/lib/X11/nls
</tscreen>
This assumes that the file <tt>XKeysymDB</tt> and the directory
<tt>nls</tt> are in
<tt>/usr/X11R6/lib/X11</tt>; if they're not, find them and put them there.
If you originally got Netscape as a port using the cdrom (or ftp),
don't replace <tt>/usr/local/bin/netscape</tt> with the new netscape binary;
this is just a shell script that sets up the environmental variables
for you. Instead rename the new binary to <tt>netscape.bin</tt> and replace the
old
binary, which is <tt>/usr/local/lib/netscape/netscape.bin</tt>.
<!-- ************************************************************ -->
<sect>Other
<p>As root, you can dismount the cdrom with <tt>/sbin/umount
/cdrom</tt>, take it out of the drive, insert another one, and
mount it with <tt>/sbin/mount_cd9660 /dev/cd0a /cdrom</tt>
assuming <tt>cd0a</tt> is the device name for your cdrom drive.
Using the live file system---the second of FreeBSD's cdrom disks---is
useful if you've got limited space. You might try using
<tt>emacs</tt> or playing games from the cdrom. This involves using
<tt>lndir</tt>, which gets installed with the X Window System, to tell the
program(s) where to find the necessary files, because they're in the
<tt>/cdrom</tt> file system instead of in <tt>/usr</tt> and its
subdirectories, which is where they're expected to be. Read <tt>man
lndir</tt>.
You can delete a user (say, jack) by using the command <tt>vipw</tt>
to bring up the <tt>master.passwd</tt> file (do not use vi directly
on master.passwd); delete the line for jack and save the file. Then
edit <tt>/etc/group</tt>, eliminating jack wherever it appears.
Finally, go to <tt>/usr/home</tt> and use <tt>rm -R</tt> jack (to
get rid of user jack's home directory files).
<!-- ************************************************************ -->
<sect>Comments Welcome
<p>If you use this guide I'd be interested in knowing where it was
unclear and what was left out that you think should be included, and
if it was helpful. My thanks to Eugene W. Stark, professor of
computer science at SUNY-Stony Brook, and John Fieber for helpful
comments.
Annelise Anderson <htmlurl url="mailto:andrsn@hoover.stanford.edu"
name="&lt;andrsn@hoover.stanford.edu&gt;">
</article>

View file

@ -0,0 +1,6 @@
DOC= fonts
SRCS= fonts.sgml
SGMLOPTS= -ssi
.include <bsd.sgml.mk>

View file

@ -0,0 +1,6 @@
DOC= mh
SRCS= mh.sgml
SGMLOPTS= -ssi
.include <bsd.sgml.mk>

View file

@ -0,0 +1,6 @@
DOC= multios
SRCS= multios.sgml
SGMLOPTS= -ssi
.include <bsd.sgml.mk>

View file

@ -0,0 +1,5 @@
DOC= newuser
SRCS= newuser.sgml
.include <bsd.sgml.mk>

View file

@ -0,0 +1,6 @@
DOC= devel
SRCS= devel.sgml
SGMLOPTS= -ssi
.include <bsd.sgml.mk>

View file

@ -0,0 +1,6 @@
DOC= fonts
SRCS= fonts.sgml
SGMLOPTS= -ssi
.include <bsd.sgml.mk>

View file

@ -0,0 +1,6 @@
DOC= mh
SRCS= mh.sgml
SGMLOPTS= -ssi
.include <bsd.sgml.mk>

View file

@ -0,0 +1,6 @@
DOC= multios
SRCS= multios.sgml
SGMLOPTS= -ssi
.include <bsd.sgml.mk>

View file

@ -0,0 +1,5 @@
DOC= newuser
SRCS= newuser.sgml
.include <bsd.sgml.mk>

View file

@ -0,0 +1,6 @@
DOC= devel
SRCS= devel.sgml
SGMLOPTS= -ssi
.include <bsd.sgml.mk>

View file

@ -0,0 +1,4 @@
DOCS= index.sgml
SUBDIR= disklessx
DOCSUBDIR= ddwg devel fonts mh multios newuser
.include "../web.mk"

View file

@ -0,0 +1 @@
WEBBASE?= /data/tutorials

View file

@ -0,0 +1,5 @@
DOC= ddwg
SRCS= ddwg.sgml
SGMLOPTS= -ssi
.include <bsd.sgml.mk>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,3 @@
DOCS= disklessx.sgml
.include "../../web.mk"

View file

@ -0,0 +1,8 @@
<hr>
<a href="../../"><img src="../../gifs/home.gif" alt="FreeBSD Home
Page" border="0" align="right"></a>
<address>
@@UPDATE@@<br>
<a href="../../mailto.html">www@freebsd.org</a>
</address>

View file

View file

@ -0,0 +1,35 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN" [
<!ENTITY base CDATA "..">
<!ENTITY date "$Date: 1996-09-24 17:45:57 $">
<!ENTITY title "FreeBSD Tutorials">
<!ENTITY % includes SYSTEM "../includes.sgml"> %includes;
]>
<html>
&header;
<p>Here lie assorted documents on various aspects of FreeBSD,
FreeBSD software, and hardare. If you have comments or
would like to contribute a document, please contact us at
<a href="mailto:doc@freebsd.org">doc@FreeBSD.org</a>.</p>
<ul>
<li><a href="newuser/newuser.html">For People New to Both FreeBSD <em>and</em> Unix</a>
(<a href="newuser/newuser-html.tar.gz">gzipd tar file</a>)</li>
<li><a href="mh/mh.html">An introduction to the MH mail software</a>
(<a href="mh/mh-html.tar.gz">gzipd tar file</a>)</li>
<li><a href="devel/devel.html">A User's Guide to FreeBSD Programming Tools</a>
(<a href="devel/devel-html.tar.gz">gzipd tar file</a>)</li>
<li><a href="ddwg/ddwg.html">Writing device drivers for FreeBSD</a>
(<a href="ddwg/ddwg-html.tar.gz">gzipd tar file</a>)</li>
<li><a href="multios/multios.html">Using FreeBSD with other operating systems</a>
(<a href="multios/multios-html.tar.gz">gzipd tar file</a>)</li>
<li><a href="fonts/fonts.html">Fonts and FreeBSD</a>
(<a href="fonts/fonts-html.tar.gz">gzipd tar file</a>)</li>
<li><a href="http://www.cypher.net/~black/ipalias.html">IP Aliasing</a></li>
</ul>
&footer;
</body>
</html>