diff --git a/en_US.ISO8859-1/books/fdp-primer/docbook-markup/chapter.xml b/en_US.ISO8859-1/books/fdp-primer/docbook-markup/chapter.xml
index 9cf9617c8b..1fea4515bc 100644
--- a/en_US.ISO8859-1/books/fdp-primer/docbook-markup/chapter.xml
+++ b/en_US.ISO8859-1/books/fdp-primer/docbook-markup/chapter.xml
@@ -1,2631 +1,2641 @@
DocBook MarkupIntroductionThis chapter is an introduction to DocBook as it is used for
&os; documentation. DocBook is a large and complex markup
system, but the subset described here covers the parts that are
most widely used for &os; documentation. While a moderate
subset is covered, it is impossible to anticipate every
situation. Please post questions that this document does
not answer to the &a.doc;.DocBook was originally developed by HaL Computer Systems and
O'Reilly & Associates to be a Document Type Definition
(DTD) for writing technical documentation
A short history
can be found under
http://www.oasis-open.org/docbook/intro.shtml#d0e41..
Since 1998 it is maintained by the
DocBook Technical Committee. As such, and unlike
LinuxDoc and XHTML, DocBook is very heavily
oriented towards markup that describes what
something is, rather than describing how it
should be presented.The DocBook DTD is available from the
Ports Collection in the
textproc/docbook-xml-450
port. It is automatically installed as part of the
textproc/docproj
port.Formal Versus InformalSome elements may exist in two forms,
formal and informal.
Typically, the formal version of the element will consist of a
title followed by the informal version of the element. The
informal version will not have a title.Inline Versus BlockIn the remainder of this document, when describing
elements, inline means that the element
can occur within a block element, and does not cause a line
break. A block element, by comparison,
will cause a line break (and other processing) when it is
encountered.&os; ExtensionsThe &os; Documentation Project has extended the
DocBook DTD with additional elements and
entities. These additions serve to make some of the markup
easier or more precise.Throughout the rest of this document, the term
DocBook is used to mean the &os;-extended
DocBook DTD.Most of these extensions are not unique to &os;,
it was just felt that they were useful
enhancements for this particular project. Should anyone
from any of the other *nix camps (NetBSD, OpenBSD, Linux,
…) be interested in collaborating on a standard
DocBook extension set, please contact
&a.doceng;.&os; ElementsThe additional &os; elements are not (currently) in the
Ports Collection. They are stored in the &os; Subversion
tree, as head/share/xml/freebsd.dtd.&os;-specific elements used in the examples below are
clearly marked.&os; EntitiesThis table shows some of the most useful entities
available in the FDP. For a complete list,
see the *.ent files in
doc/share/xml.&os; Name Entities&os;&os;&os.stable;&os.stable;&os.current;&os.current;
+
+ Manual Page Entities&man.ls.1;&man.ls.1;Usage: &man.ls.1; is the manual page for commandlscommand.&man.cp.1;&man.cp.1;Usage: The manual page for commandcpcommand is &man.cp.1;.&man.command.sectionnumber;link to
command manual page in
section
sectionnumberEntities are defined for all the &os; manual
pages.
+
+ &os; Mailing List Entities&a.doc;&a.doc;Usage: A link to the &a.doc;.&a.questions;&a.questions;Usage: A link to the &a.questions;.&a.listname;link to
listnameEntities are defined for all the &os;
mailing lists.
+
+ &os; Document Link Entities&url.books.handbook;&url.books.handbook;Usage: A link to the ulink
url="&url.books.handbook;/advanced-networking.html"Advanced
Networkingulink
chapter of the Handbook.&url.books.bookname;relative path to
booknameEntities are defined for all the &os;
books.&url.articles.committers-guide;&url.articles.committers-guide;Usage: A link to the ulink
url="&url.articles.committers-guide;"Committer's
Guideulink
article.&url.articles.articlename;relative path to
articlenameEntities are defined for all the &os;
articles.
+
+ Other Operating System Name Entities&linux;&linux;The &linux; operating system.&unix;&unix;The &unix; operating system.&windows;&windows;The &windows; operating system.
+
+ Miscellaneous Entities&prompt.root;
- &prompt.root;
+ &prompt.root;The root user
prompt.&prompt.user;
- &prompt.user;
+ &prompt.user;A prompt for an unprivileged user.&postscript;&postscript;The
&postscript; programming language.&tex;&tex;The
&tex; typesetting language.&xorg;&xorg;The &xorg; open source X
Window System.Formal Public Identifier (FPI)In compliance with the DocBook guidelines for writing
FPIs for DocBook customizations, the
FPI for the &os; extended DocBook
DTD is:PUBLIC "-//FreeBSD//DTD DocBook V4.2-Based Extension//EN"Document StructureDocBook allows structuring documentation in several ways.
The &os; Documentation Project uses two primary types of DocBook
document: the book and the article.Books are organized into chapters.
This is a mandatory requirement. There may be
parts between the book and the chapter to
provide another layer of organization. For example, the
Handbook is arranged in this way.A chapter may (or may not) contain one or more sections.
These are indicated with the sect1 element.
If a section contains another section then use the
sect2 element, and so on, up to
sect5.Chapters and sections contain the remainder of the
content.An article is simpler than a book, and does not use
chapters. Instead, the content of an article is organized into
one or more sections, using the same sect1
(and sect2 and so on) elements that are used
in books.The nature of the document being written should be used to
determine whether it is best marked up as a book or an article.
Articles are well suited to information that does not need to be
broken down into several chapters, and that is, relatively
speaking, quite short, at up to 20-25 pages of content. Books
are best suited to information that can be broken up into
several chapters, possibly with appendices and similar content
as well.The &os; tutorials
are all marked up as articles, while this
document, the
FreeBSD FAQ,
and the FreeBSD
Handbook are all marked up as books, for
example.Starting a BookThe content of a book is contained within the
book element. As well as containing
structural markup, this element can contain elements that
include additional information about the book. This is either
meta-information, used for reference purposes, or additional
content used to produce a title page.This additional information is contained within
bookinfo.Boilerplate book with
bookinfobookbookinfotitleYour Title HeretitleauthorfirstnameYour first namefirstnamesurnameYour surnamesurnameaffiliationaddressemailYour email addressemailaddressaffiliationauthorcopyrightyear1998yearholder role="mailto:your email address"Your nameholdercopyrightreleaseinfo$&os;$releaseinfoabstractparaInclude an abstract of the book's contents here.paraabstractbookinfo
…
bookStarting an ArticleThe content of the article is contained within the
article element. As well as containing
structural markup, this element can contain elements that
include additional information about the article. This is
either meta-information, used for reference purposes, or
additional content used to produce a title page.This additional information is contained within
articleinfo.Boilerplate article with
articleinfoarticlearticleinfotitleYour title heretitleauthorfirstnameYour first namefirstnamesurnameYour surnamesurnameaffiliationaddressemailYour email addressemailaddressaffiliationauthorcopyrightyear1998yearholder role="mailto:your email address"Your nameholdercopyrightreleaseinfo$&os;$releaseinfoabstractparaInclude an abstract of the article's contents here.paraabstractarticleinfo
…
articleIndicating ChaptersUse chapter to mark up your chapters.
Each chapter has a mandatory title.
Articles do not contain chapters, they are reserved for
books.A Simple ChapterchaptertitleThe Chapter's Titletitle
...
chapterA chapter cannot be empty; it must contain elements in
addition to title. If you need to
include an empty chapter then just use an empty
paragraph.Empty ChapterschaptertitleThis is An Empty ChaptertitleparaparachapterSections Below ChaptersIn books, chapters may (but do not need to) be broken up
into sections, subsections, and so on. In articles, sections
are the main structural element, and each article must contain
at least one section. Use the
sectn element.
The n indicates the section number,
which identifies the section level.The first
sectn is
sect1. You can have one or more of these
in a chapter. They can contain one or more
sect2 elements, and so on, down to
sect5.Sections in ChapterschaptertitleA Sample ChaptertitleparaSome text in the chapter.parasect1titleFirst Sectiontitle
…
sect1sect1titleSecond Sectiontitlesect2titleFirst Sub-Sectiontitlesect3titleFirst Sub-Sub-Sectiontitle
…
sect3sect2sect2titleSecond Sub-Section (1.2.2)title
…
sect2sect1chapterSection numbers are automatically generated and
prepended to titles when the document is rendered to an
output format. The generated section numbers and titles
from the example above will be:1.1. First Section1.2. Second Section1.2.1. First Sub-Section1.2.1.1. First Sub-Sub-Section1.2.2. Second Sub-SectionSubdividing Using part
Elementsparts introduce another level of
organization between book and
chapter with one or more
parts. This cannot be done in an
article.parttitleIntroductiontitlechaptertitleOverviewtitle
...
chapterchaptertitleWhat is FreeBSD?title
...
chapterchaptertitleHistorytitle
...
chapterpartBlock ElementsParagraphsDocBook supports three types of paragraphs:
formalpara, para, and
simpara.Almost all paragraphs in &os; documentation use
para. formalpara
includes a title element, and
simpara disallows some elements from
within para. Stick with
para.paraUsage:paraThis is a paragraph. It can contain just about any
other element.paraAppearance:This is a paragraph. It can contain just about any
other element.Block QuotationsA block quotation is an extended quotation from another
document that should not appear within the current paragraph.
These are rarely needed.Blockquotes can optionally contain a title and an
attribution (or they can be left untitled and
unattributed).blockquoteUsage:paraA small excerpt from the US Constitution:parablockquotetitlePreamble to the Constitution of the United StatestitleattributionCopied from a web site somewhereattributionparaWe the People of the United States, in Order to form a more
perfect Union, establish Justice, insure domestic Tranquility,
provide for the common defence, promote the general Welfare, and
secure the Blessings of Liberty to ourselves and our Posterity, do
ordain and establish this Constitution for the United States of
America.parablockquoteAppearance:A small excerpt from the US Constitution:
Preamble to the Constitution of the United
StatesCopied from a web site
somewhereWe the People of the United States, in Order to form
a more perfect Union, establish Justice, insure domestic
Tranquility, provide for the common defence, promote the
general Welfare, and secure the Blessings of Liberty to
ourselves and our Posterity, do ordain and establish
this Constitution for the United States of
America.
Tips, Notes, Warnings, Cautions, Important Information
and SidebarsExtra information may need to be separated from
the main body of the text. Typically this is
meta information of which the user should be
aware.Depending on the nature of the information, one of
tip, note,
warning, caution, and
important should be used. Alternatively,
if the information is related to the main text but is not
one of the above, use sidebar.The circumstances in which to choose one of these
elements over another is loosely defined by the DocBook
documentation, which suggests:A Note is for information that should be heeded by
all readers.An Important element is a variation on Note.A Caution is for information regarding possible data
loss or software damage.A Warning is for information regarding possible
hardware damage or injury to life or limb.warningUsage:warningparaInstalling FreeBSD may make you want to delete Windows from your
hard disk.parawarningAppearance:Installing FreeBSD may make you want to delete Windows
from your hard disk.Lists and ProceduresInformation often needs to be presented as lists, or as a
number of steps that must be carried out in order to
accomplish a particular goal.To do this, use itemizedlist,
orderedlist, or
procedureThere are other
types of list element in DocBook, but we are not
concerned with those at the
moment.itemizedlist and
orderedlist are similar to their
counterparts in HTML, ul
and ol. Each one consists of one or more
listitem elements, and each
listitem contains one or more block
elements. The listitem elements are
analogous to HTML's li
tags. However, unlike HTML, they are required.procedure is slightly different. It
consists of steps, which may in turn
consists of more steps or
substeps. Each step
contains block elements.itemizedlist,
orderedlist, and
procedureUsage:itemizedlistlistitemparaThis is the first itemized item.paralistitemlistitemparaThis is the second itemized item.paralistitemitemizedlistorderedlistlistitemparaThis is the first ordered item.paralistitemlistitemparaThis is the second ordered item.paralistitemorderedlistprocedurestepparaDo this.parastepstepparaThen do this.parastepstepparaAnd now do this.parastepprocedureAppearance:This is the first itemized item.This is the second itemized item.This is the first ordered item.This is the second ordered item.Do this.Then do this.And now do this.Showing File SamplesFragments of a file (or perhaps a complete file) are shown
by wrapping them in the programlisting
element.White space and line breaks within
programlistingare
significant. In particular, this means that the opening tag
should appear on the same line as the first line of the
output, and the closing tag should appear on the same line
as the last line of the output, otherwise spurious blank
lines may be included.programlistingUsage:paraWhen finished, the program will look like
this:paraprogramlisting#include <stdio.h>
int
main(void)
{
printf("hello, world\n");
}programlistingNotice how the angle brackets in the
#include line need to be referenced by
their entities instead of being included literally.Appearance:When finished, the program will look like this:#include <stdio.h>
int
main(void)
{
printf("hello, world\n");
}CalloutsA callout is a visual marker for referring to a
piece of text or specific position within an
example.Callouts are marked with the co
element. Each element must have a unique
id assigned to it. After the example,
include a calloutlist that describes each
callout.co and
calloutlistparaWhen finished, the program will look like
this:paraprogramlisting#include <stdio.h> co id="co-ex-include"
int co id="co-ex-return"
main(void)
{
printf("hello, world\n"); co id="co-ex-printf"
}programlistingcalloutlistcallout arearefs="co-ex-include"paraIncludes the standard IO header file.paracalloutcallout arearefs="co-ex-return"paraSpecifies that functionmain()function returns an
int.paracalloutcallout arearefs="co-ex-printf"paraThe functionprintf()function call that writes
literalhello, worldliteral to standard output.paracalloutcalloutlistAppearance:When finished, the program will look like this:#include <stdio.h>
int
main(void)
{
printf("hello, world\n");
}Includes the standard IO header file.Specifies that main() returns
an int.The printf() call that writes
hello, world to standard
output.TablesUnlike HTML, DocBook does not need
tables for layout purposes, as the stylesheet handles those
issues. Instead, just use tables for marking up tabular
data.In general terms (and see the DocBook documentation for
more detail) a table (which can be either formal or informal)
consists of a table element. This contains
at least one tgroup element, which
specifies (as an attribute) the number of columns in this
table group. Within the tablegroup there is one
thead element, which contains elements for
the table headings (column headings), and one
tbody which contains the body of the
table.Both tgroup and
thead contain row
elements, which in turn contain entry
elements. Each entry element specifies
one cell in the table.informaltableUsage:informaltable pgwide="1"tgroup cols="2"theadrowentryThis is Column Head 1entryentryThis is Column Head 2entryrowtheadtbodyrowentryRow 1, column 1entryentryRow 1, column 2entryrowrowentryRow 2, column 1entryentryRow 2, column 2entryrowtbodytgroupinformaltableAppearance:This is Column Head 1This is Column Head 2Row 1, column 1Row 1, column 2Row 2, column 1Row 2, column 2Always use the pgwide attribute with
a value of 1 with the
informaltable element. A bug in Internet
Explorer can cause the table to render incorrectly if this
is omitted.Table borders can be suppressed by setting the
frame attribute to none
in the informaltable element. For example,
informaltable
frame="none".Tables Where frame="none"Appearance:This is Column Head 1This is Column Head 2Row 1, column 1Row 1, column 2Row 2, column 1Row 2, column 2Examples for the User to FollowExamples for the user to follow are often necessary.
Typically, these will consist of dialogs with the computer;
the user types in a command, the user gets a response back,
the user types another command, and so on.A number of distinct elements and entities come into
play here.screenEverything the user sees in this example will be
on the computer screen, so the next element is
screen.Within screen, white space is
significant.prompt,
&prompt.root; and
&prompt.user;Some of the things the user will be seeing on the
screen are prompts from the computer (either from the
operating system, command shell, or application). These
should be marked up using
prompt.As a special case, the two shell prompts for the
normal user and the root user have been provided as
entities. To indicate the user is at a shell prompt,
use one of &prompt.root; and
&prompt.user; as necessary. They
do not need to be inside
prompt.&prompt.root; and
&prompt.user; are &os;
extensions to DocBook, and are not part of the
original DTD.userinputWhen displaying text that the user should type in,
wrap it in userinput tags. It will
be displayed differently than system output text.screen, prompt,
and userinputUsage:screen&prompt.user; userinputls -1userinput
foo1
foo2
foo3
&prompt.user; userinputls -1 | grep foo2userinput
foo2
&prompt.user; userinputsuuserinputpromptPassword: prompt
&prompt.root; userinputcat foo2userinput
This is the file called 'foo2'screenAppearance:&prompt.user; ls -1
foo1
foo2
foo3
&prompt.user; ls -1 | grep foo2
foo2
&prompt.user; suPassword:
&prompt.root; cat foo2
This is the file called 'foo2'Even though we are displaying the contents of the file
foo2, it is not
marked up as programlisting. Reserve
programlisting for showing fragments of
files outside the context of user actions.In-line ElementsEmphasizing InformationTo emphasize a particular word or phrase, use
emphasis. This may be presented as
italic, or bold, or might be spoken differently with a
text-to-speech system.There is no way to change the presentation of the
emphasis within the document, no equivalent of
HTML's b and
i. If the information being presented is
important, then consider presenting it in
important rather than
emphasis.emphasisUsage:paraFreeBSD is without doubt emphasistheemphasis
premiere &unix;-like operating system for the Intel
architecture.paraAppearance:FreeBSD is without doubt the
premiere &unix;-like operating system for the Intel
architecture.AcronymsMany computer terms are acronyms,
words formed from the first letter of each word in a
phrase. Acronyms are marked up into
acronym elements. It is helpful to the
reader when an acronym is defined on the first use, as shown
in the example below.AcronymsUsage:paraRequest For Comments (acronymRFCacronym) 1149
defined the use of avian carriers for transmission of
Internet Protocol (acronymIPacronym) data. The
quantity of acronymIPacronym data currently
transmitted in that manner is unknown.paraAppearance:Request For Comments (RFC) 1149
defined the use of avian carriers for transmission of
Internet Protocol (IP) data. The
quantity of IP data currently
transmitted in that manner is unknown.QuotationsTo quote text from another document or source, or to
denote a phrase that is used figuratively, use
quote. Most of the markup tags available
for normal text are also available from within a
quote.QuotationsUsage:paraHowever, make sure that the search does not go beyond the
quoteboundary between local and public administrationquote,
as acronymRFCacronym 1535 calls it.paraAppearance:However, make sure that the search does not go beyond
the boundary between local and public
administration, as RFC 1535
calls it.Keys, Mouse Buttons, and CombinationsTo refer to a specific key on the keyboard, use
keycap. To refer to a mouse button, use
mousebutton. And to refer to
combinations of key presses or mouse clicks, wrap them all
in keycombo.keycombo has an attribute called
action, which may be one of
click, double-click,
other, press,
seq, or simul. The
last two values denote whether the keys or buttons should be
pressed in sequence, or simultaneously.The stylesheets automatically add any connecting
symbols, such as +, between the key
names, when wrapped in keycombo.Keys, Mouse Buttons, and CombinationsUsage:paraTo switch to the second virtual terminal, press
keycombo action="simul"keycapAltkeycapkeycapF1keycapkeycombo.paraparaTo exit commandvicommand without saving changes, type
keycombo action="seq"keycapEsckeycapkeycap:keycapkeycapqkeycapkeycap!keycapkeycombo.paraparaMy window manager is configured so that
keycombo action="simul"keycapAltkeycapmousebuttonrightmousebuttonkeycombo mouse button is used to move windows.paraAppearance:To switch to the second virtual terminal, press
AltF1.To exit vi without saving changes,
type Esc:q!.My window manager is configured so that
Altright mouse button
is used to move windows.Applications, Commands, Options, and CitesBoth applications and commands are frequently referred to
when writing documentation. The distinction between them is
that an application is the name of a program or suite of
programs that fulfill a particular task. A command is the
filename of a program that the user can type and run at a
command line.It is often necessary to show some of the options that a
command might take.Finally, it is often useful to list a command with its
manual section number, in the command(number)
format so common in Unix manuals.Mark up application names with
application.To list a command with its manual section
number (which should be most of the time) the DocBook
element is citerefentry. This will
contain a further two elements,
refentrytitle and
manvolnum. The content of
refentrytitle is the name of the command,
and the content of manvolnum is the
manual page section.This can be cumbersome to write, and so a series of
general
entities have been created to make this easier.
Each entity takes the form
&man.manual-page.manual-section;.The file that contains these entities is in
doc/share/xml/man-refs.ent, and can be
referred to using this FPI:PUBLIC "-//FreeBSD//ENTITIES DocBook Manual Page Entities//EN"Therefore, the introduction to &os; documentation will
usually include this:<!DOCTYPE book PUBLIC "-//FreeBSD//DTD DocBook V4.1-Based Extension//EN" [
<!ENTITY % man PUBLIC "-//FreeBSD//ENTITIES DocBook Manual Page Entities//EN">
%man;
…
]>Use command when to include a command
name in-line but present it as something the
user should type in.Use option to mark up the options
which will be passed to a command.When referring to the same command multiple times in
close proximity, it is preferred to use the
&man.command.section;
notation to markup the first reference and use
command to markup subsequent references.
This makes the generated output, especially
HTML, appear visually better.Applications, Commands, and OptionsUsage:paraapplicationSendmailapplication is the most
widely used Unix mail application.paraparaapplicationSendmailapplication includes the
citerefentryrefentrytitlesendmailrefentrytitlemanvolnum8manvolnumciterefentry, &man.mailq.1;, and &man.newaliases.1;
programs.paraparaOne of the command line parameters to citerefentryrefentrytitlesendmailrefentrytitlemanvolnum8manvolnumciterefentry, option-bpoption, will display the current
status of messages in the mail queue. Check this on the command
line by running commandsendmail -bpcommand.paraAppearance:Sendmail is the most widely
used Unix mail application.Sendmail includes the
sendmail8, &man.mailq.1;, and &man.newaliases.1;
programs.One of the command line parameters to
sendmail8, , will display the
current status of messages in the mail queue. Check this
on the command line by running
sendmail -bp.Notice how the
&man.command.section;
notation is easier to follow.Files, Directories, ExtensionsTo refer to the name of a file, a directory, or a file
extension, use filename.filenameUsage:paraThe XML source for the Handbook in English is
found in filename class="directory"/usr/doc/en_US.ISO8859-1/books/handbook/filename. The first
file is called filenamebook.xmlfilename in that
directory. There is also a filenameMakefilefilename
and a number of files with a filename.entfilename
extension.paraAppearance:The XML source for the Handbook in English can be
found in /usr/doc/en/handbook/. The
first file is called handbook.xml in
that directory. There is also a
Makefile and a number of files with a
.ent extension.The Name of Ports&os; ExtensionThese elements are part of the &os; extension to
DocBook, and do not exist in the original DocBook
DTD.To include the name of a program from the &os;
Ports Collection in the document, use the
filename tag with the
role attribute set to
package. Since ports can be installed in
any number of locations, only include the category and the
port name; do not include
/usr/ports.filename Tag with
package RoleUsage:paraInstall the filename role="package"net/wiresharkfilename port to view network traffic.paraAppearance:Install the net/wireshark port to view
network traffic.Devices&os; ExtensionThese elements are part of the &os; extension to
DocBook, and do not exist in the original DocBook
DTD.There are two names for devices: the device name as it
appears in /dev, or the name of the
device as it appears in the kernel. For this latter course,
use devicename.Sometimes there is no choice. Some devices, such as
network cards, do not have entries in
/dev, or the entries are markedly
different from their kernel device names.devicenameUsage:paradevicenamesiodevicename is used for serial
communication in FreeBSD. devicenamesiodevicename manifests
through a number of entries in filename/devfilename, including
filename/dev/ttyd0filename and filename/dev/cuaa0filename.paraparaBy contrast, network devices such as
devicenameed0devicename do not appear in filename/devfilename.paraparaIn MS-DOS, the first floppy drive is referred to as
devicenamea:devicename. In FreeBSD it is
filename/dev/fd0filename.paraAppearance:sio is used for serial
communication in FreeBSD. sio
manifests through a number of entries in
/dev, including
/dev/ttyd0 and
/dev/cuaa0.By contrast, network devices such as
ed0 do not appear in
/dev.In MS-DOS, the first floppy drive is referred to as
a:. In FreeBSD it is
/dev/fd0.Hosts, Domains, IP Addresses, and So Forth&os; ExtensionThese elements are part of the &os; extension to
DocBook, and do not exist in the original DocBook
DTD.Identification information for networked computers (hosts)
can be marked up in several ways, depending on the nature of
the information. All of them use hostid as
the element, with the role attribute
selecting the type of the marked up information.No role attribute, or
role="hostname"With no role attribute (i.e.,
hostid.../hostid)
the marked up information is the simple hostname, such
as freefall or
wcarchive. The hostname can be
explicitly specified with
role="hostname".role="domainname"The text is a domain name, such as
FreeBSD.org or
ngo.org.uk. There is no hostname
component.role="fqdn"The text is a Fully Qualified Domain Name, with
both hostname and domain name parts.role="ipaddr"The text is an IP address,
probably expressed as a dotted quad.role="ip6addr"The text is an IPv6
address.role="netmask"The text is a network mask, which might be
expressed as a dotted quad, a hexadecimal string, or as
a / followed by a number
(CIDR notation).role="mac"The text is an Ethernet MAC
address, expressed as a series of 2 digit hexadecimal
numbers separated by colons.hostid and RolesUsage:paraThe local machine can always be referred to by the
name hostidlocalhosthostid, which will have the IP
address hostid role="ipaddr"127.0.0.1hostid.paraparaThe hostid role="domainname"FreeBSD.orghostid
domain contains a number of different hosts, including
hostid role="fqdn"freefall.FreeBSD.orghostid and
hostid role="fqdn"bento.FreeBSD.orghostid.paraparaWhen adding an acronymIPacronym alias to an
interface (using commandifconfigcommand)
emphasisalwaysemphasis use a netmask of
hostid role="netmask"255.255.255.255hostid (which can
also be expressed as
hostid role="netmask"0xffffffffhostid).paraparaThe acronymMACacronym address uniquely identifies
every network card in existence. A typical
acronymMACacronym address looks like
hostid role="mac"08:00:20:87:ef:d0hostid.paraAppearance:The local machine can always be referred to by the
name localhost, which will have the IP
address 127.0.0.1.The FreeBSD.org
domain contains a number of different hosts, including
freefall.FreeBSD.org and
bento.FreeBSD.org.When adding an IP alias to an
interface (using ifconfig)
always use a netmask of
255.255.255.255 (which can
also be expressed as
0xffffffff).The MAC address uniquely identifies
every network card in existence. A typical
MAC address looks like
08:00:20:87:ef:d0.Usernames&os; ExtensionThese elements are part of the &os; extension to
DocBook, and do not exist in the original DocBook
DTD.To refer to a specific username, such as
root or bin, use
username.usernameUsage:paraTo carry out most system administration functions
requires logging in as usernamerootusername.paraAppearance:To carry out most system administration functions
requires logging in as root.Email AddressesEmail addresses are marked up as email
elements. In the HTML output format, the
wrapped text becomes a hyperlink to the email address. Other
output formats that support hyperlinks may also make the email
address into a link.email with a HyperlinkUsage:paraAn email address that does not actually exist, like
emailnotreal@example.comemail, can be used as an
example.paraAppearance:An email address that does not actually exist, like
notreal@example.com, can be used as an
example.A &os;-specific extension allows setting the
role attribute to nolink
to prevent the creation of the hyperlink to the email
address.email Without a HyperlinkUsage:paraSometimes a link to an email address like
email role="nolink"notreal@example.comemail is not
desired.paraAppearance:Sometimes a link to an email address like
notreal@example.com is not
desired.Describing Makefiles&os; ExtensionThese elements are part of the &os; extension to
DocBook, and do not exist in the original DocBook
DTD.Two elements exist to describe parts of
Makefiles, maketarget
and makevar.maketarget identifies a build target
exported by a Makefile that can be
given as a parameter to make.
makevar identifies a variable that can be
set (in the environment, on the command line with
make, or within the
Makefile) to influence the
process.maketarget and
makevarUsage:paraTwo common targets in a filenameMakefilefilename
are maketargetallmaketarget and
maketargetcleanmaketarget.paraparaTypically, invoking maketargetallmaketarget will
rebuild the application, and invoking
maketargetcleanmaketarget will remove the temporary
files (filename.ofilename for example) created by the
build process.paraparamaketargetcleanmaketarget may be controlled by a
number of variables, including makevarCLOBBERmakevar
and makevarRECURSEmakevar.paraAppearance:Two common targets in a Makefile
are all and
clean.Typically, invoking all will
rebuild the application, and invoking
clean will remove the temporary
files (.o for example) created by the
build process.clean may be controlled by a
number of variables, including CLOBBER
and RECURSE.Literal TextLiteral text, or text which should be entered verbatim, is
often needed in documentation. This is text that is excerpted
from another file, or which should be copied exactly as shown
from the documentation into another file.Some of the time, programlisting will
be sufficient to denote this text. But
programlisting is not always appropriate,
particularly when you want to include a portion of a file
in-line with the rest of the
paragraph.On these occasions, use
literal.literalUsage:paraThe literalmaxusers 10literal line in the kernel
configuration file determines the size of many system tables, and is
a rough guide to how many simultaneous logins the system will
support.paraAppearance:The maxusers 10 line in the kernel
configuration file determines the size of many system
tables, and is a rough guide to how many simultaneous
logins the system will support.Showing Items That the User Must
Fill InThere will often be times when the user is shown
what to do, or referred to a file or command line, but
cannot simply copy the example provided. Instead, they
must supply some information themselves.replaceable is designed for this
eventuality. Use it inside other
elements to indicate parts of that element's content that
the user must replace.replaceableUsage:screen&prompt.user; userinputman replaceablecommandreplaceableuserinputscreenAppearance:&prompt.user; man commandreplaceable can be used in many
different elements, including literal.
This example also shows that replaceable
should only be wrapped around the content that the user
is meant to provide. The other content
should be left alone.Usage:paraThe literalmaxusers replaceablenreplaceableliteral
line in the kernel configuration file determines the size of many system
tables, and is a rough guide to how many simultaneous logins the system will
support.paraparaFor a desktop workstation, literal32literal is a good value
for replaceablenreplaceable.paraAppearance:The
maxusers n
line in the kernel configuration file determines the size
of many system tables, and is a rough guide to how many
simultaneous logins the system will support.For a desktop workstation, 32 is a
good value for n.Showing GUI ButtonsButtons presented by a graphical user interface are marked
with guibutton. To make the text look more
like a graphical button, brackets and non-breaking spaces are
added surrounding the text.guibuttonUsage:paraEdit the file, then click
guibutton[ Save ]guibutton to save the
changes.paraAppearance:Edit the file, then click
[ Save ] to save the
changes.Quoting System ErrorsSystem errors generated by &os; are marked with
errorname. This indicates the exact error
that appears.errornameUsage:screenerrornamePanic: cannot mount rooterrornamescreenAppearance:Panic: cannot mount rootImagesImage support in the documentation is somewhat
experimental. The mechanisms described here are unlikely to
change, but that is not guaranteed.To provide conversion between different image formats, the
graphics/ImageMagick
port must be installed. This port is not included in the
textproc/docproj meta
port, and must be installed separately.A good example of the use of images is the
doc/en_US.ISO8859-1/articles/vm-design/
document. Examine the files in that directory to see how
these elements are used together. Build different output
formats to see how the format determines what images are shown
in the rendered document.Image FormatsTwo image formats are currently supported. The type of
image determines which format to use.Images that are primarily vector based, such as network
diagrams, time lines, and similar, should be in
EPS (Encapsulated Postscript) format.
These images have a .eps
extension.For bitmaps, such as screen captures, use the
PNG (Portable Network Graphic) format.
These images have the .png
extension.These are the only formats in which
images should be committed to the documentation
repository.Use the appropriate format for each image. Documentation
will often have a mix of EPS and
PNG images. The
Makefiles ensure that the correct format
image is chosen depending on the output format used.
Do not commit the same image to the repository in
two different formats.The Documentation Project may eventually switch to using
the SVG (Scalable Vector Graphic) format
for vector images. However, the current state of
SVG capable editing tools makes this
impractical.Image File LocationsImage files can be stored in one of several locations,
depending on the document and image:In the same directory as the document itself, usually
done for articles and small books that keep all their
files in a single directory.In a subdirectory of the main document. Typically
done when a large book uses separate subdirectories to
organize individual chapters.When images are stored in a subdirectory of the
main document directory, the subdirectory name must be
included in their paths in the
Makefile and the
imagedata element.In a subdirectory of
doc/share/images
named after the document. For example, images for the
Handbook are stored in doc/share/images/books/handbook.
Images that work for multiple translations are stored in
this upper level of the documentation file tree.
Generally, these are images that can be used unchanged in
non-English translations of the document.Image MarkupImages are included as part of a
mediaobject. The
mediaobject can contain other, more
specific objects. We are concerned with two, the
imageobject and the
textobject.Include one imageobject, and two
textobject elements. The
imageobject will point to the name of the
image file without the extension. The
textobject elements contain information
that will be presented to the user as well as, or instead of,
the image itself.Text elements are shown to the reader in several
situations. When the document is viewed in
HTML, text elements are shown while the
image is loading, or if the mouse pointer is hovered over the
image, or if a text-only browser is being used. In formats
like plain text where graphics are not possible, the text
elements are shown instead of the graphical ones.This example shows how to include an image called
fig1.png in a document. The image is a
rectangle with an A inside it:mediaobjectimageobjectimagedata fileref="fig1"imageobjecttextobjectliterallayout class="monospaced"+---------------+
| A |
+---------------+literallayouttextobjecttextobjectphraseA picturephrasetextobjectmediaobjectInclude an imagedata element
inside the imageobject element. The
fileref attribute should contain the
filename of the image to include, without the extension.
The stylesheets will work out which extension should be
added to the filename automatically.The first textobject contains a
literallayout element, where the
class attribute is set to
monospaced. This is an opportunity to
demonstrate ASCII art skills. This
content will be used if the document is converted to plain
text.Notice how the first and last lines of the content
of the literallayout element butt up
next to the element's tags. This ensures no extraneous
white space is included.The second textobject contains a
single phrase element. The contents of
this phrase will become the alt
attribute for the image when this document is converted to
HTML.Image Makefile EntriesImages must be listed in the Makefile
in the IMAGES variable. This variable must
contain the names of all the source
images. For example, if there are three figures,
fig1.eps, fig2.png,
fig3.png, then the
Makefile should have lines like this in
it.…
IMAGES= fig1.eps fig2.png fig3.png
…or…
IMAGES= fig1.eps
IMAGES+= fig2.png
IMAGES+= fig3.png
…Again, the Makefile will work out the
complete list of images it needs to build the source document,
you only need to list the image files you
provided.Images and Chapters in SubdirectoriesBe careful when separating documentation into smaller
files in different directories (see ).Suppose there is a book with three chapters, and the
chapters are stored in their own directories, called
chapter1/chapter.xml,
chapter2/chapter.xml, and
chapter3/chapter.xml. If each chapter
has images associated with it, place
those images in each chapter's subdirectory
(chapter1/,
chapter2/, and
chapter3/).However, doing this requires including the directory
names in the IMAGES variable in the
Makefile, and
including the directory name in the
imagedata element in the document
document.For example, if the book has
chapter1/fig1.png, then
chapter1/chapter.xml should
contain:mediaobjectimageobjectimagedata fileref="chapter1/fig1"imageobject
…
mediaobjectThe directory name must be included in the
fileref attribute.The Makefile must contain:…
IMAGES= chapter1/fig1.png
…LinksLinks are also in-line elements.id AttributesMost DocBook elements accept an id
attribute to give that part of the document a unique name.
The id can be used as a target for a
crossreference or link.Any portion of the document that will be a link target
must have an id attribute. Assigning an
id to all chapters and sections, even if
there are no current plans to link to them, is a good idea.
These ids can be used as unique anchor
reference points by anyone referring to the
HTML version of the document.id on Chapters and
Sectionschapter id="introduction"titleIntroductiontitleparaThis is the introduction. It contains a subsection,
which is identified as well.parasect1 id="introduction-moredetails"titleMore DetailstitleparaThis is a subsection.parasect1chapterUse descriptive values for id names.
The values must be unique within the entire document, not just
in a single file. In the example, the subsection
id is constructed by appending text to the
chapter id. This ensures that the
ids are unique. It also helps both reader
and anyone editing the document to see where the link is
located within the document, similar to a directory
path to a file.To allow the user to jump into a specific portion of the
document, even in the middle of a paragraph or an example, use
anchor. This element has no content, but
takes an id attribute.anchorparaThis paragraph has an embedded
anchor id="para1"link target in it. It will not
show up in the document.paraCrossreferences with xrefxref provides the reader with a link to
jump to another section of the document. The target
id is specified in the
linkend attribute, and
xref generates the link text
automatically.Using xrefAssume that this fragment appears somewhere in a
document that includes the id
example shown above:paraMore information can be found
in xref linkend="introduction".paraparaMore specific information can be found
in xref linkend="introduction-moredetails".paraThe link text will be generated automatically, looking
like (emphasized text indicates the
link text):
More information can be found in Chapter
1, Introduction.More specific information can be found in
Section 1.1,
More Details.
The link text is generated automatically from the chapter
and section number and title
elements.xref cannot link to an
id attribute on an
anchor element. The
anchor has no content, so the
xref cannot generate the link
text.Linking to the Same Document or Other Documents on the
WebThe link elements described here allow the writer to
define the link text. It is very important to use descriptive
link text to give the reader an idea of where the link will
take them. Remember that DocBook can be rendered to multiple
types of media. The reader may be looking at a printed book
or other form of media where there are no links. If the link
text is not descriptive enough, the reader may not be able to
locate the linked section.Links to the Same Documentlink is used to create a link
within the same document. The target id
is specified in the linkend attribute.
This element wraps content, which is used for the link
text.Using linkAssume that this fragment appears somewhere in a
document that includes the id
example.paraMore information can be found in the
link linkend="introduction"sample introductionlink.paraparaMore specific information can be found in the
link linkend="introduction-moredetails"sample introduction with more
detailslink section.paraThis output will be generated
(emphasized text is used to show the
link text):
More information can be found in the
sample introduction.More specific information can be found in the
sample introduction with more
details section.
link can be used to include links
to the id of an
anchor element, since the
link content defines the link
text.Linking to Other Documents on the WebThe ulink is used to link to
external documents on the web. The url
attribute is the URL of the page that the
link points to, and the content of the element is the text
that will be displayed for the user to activate.ulink to a &os; Documentation Web
PageLink to the book or article URL
entity. To link to a specific chapter in a book, add a
slash and the chapter file name, followed by an optional
anchor within the chapter. For articles, link to the
article URL entity, followed by an
optional anchor within the article.
URL entities can be found in
doc/share/xml/urls.ent.Usage for book links:paraRead the ulink
url="&url.books.handbook;/svn.html#svn-intro"SVN
introductionulink, then pick the nearest mirror from
the list of ulink
url="&url.books.handbook;/subversion-mirrors.html"Subversion
mirror sitesulink.paraAppearance:Read the SVN
introduction, then pick the nearest mirror from
the list of Subversion
mirror sites.Usage for article links:paraRead this
ulink url="&url.articles.bsdl-gpl;"article
about the BSD licenseulink, or just the
ulink url="&url.articles.bsdl-gpl;#intro"introductionulink.paraAppearance:Read this article
about the BSD license, or just the introduction.ulink to a &os; Web PageUsage:paraOf course, you could stop reading this document and go to the
ulink url="&url.base;/index.html"FreeBSD home pageulink instead.paraAppearance:Of course, you could stop reading this document and go
to the FreeBSD home
page instead.ulink to an External Web
PageUsage:paraWikipedia has an excellent reference on
ulink
url="http://en.wikipedia.org/wiki/GUID_Partition_Table"GUID
Partition Tablesulink.paraAppearance:Wikipedia has an excellent reference on
GUID
Partition Tables.The link text can be omitted to show the actual
URL:paraWikipedia has an excellent reference on
GUID Partition Tables: ulink
url="http://en.wikipedia.org/wiki/GUID_Partition_Table"ulink.paraAppearance:Wikipedia has an excellent reference on
GUID Partition Tables: .
diff --git a/en_US.ISO8859-1/books/fdp-primer/editor-config/chapter.xml b/en_US.ISO8859-1/books/fdp-primer/editor-config/chapter.xml
index 68e5c76ce5..485ec0a3b1 100644
--- a/en_US.ISO8859-1/books/fdp-primer/editor-config/chapter.xml
+++ b/en_US.ISO8859-1/books/fdp-primer/editor-config/chapter.xml
@@ -1,121 +1,135 @@
Editor ConfigurationAdjusting text editor configuration can make working on
document files quicker and easier, and help documents conform to
FDP guidelines.VimInstall from editors/vim
or editors/vim-lite.Edit ~/.vimrc, adding these
lines:augroup sgmledit
autocmd FileType sgml set formatoptions=cq2l " Special formatting options
autocmd FileType sgml set textwidth=70 " Wrap lines at 70 columns
autocmd FileType sgml set shiftwidth=2 " Automatically indent
autocmd FileType sgml set softtabstop=2 " Tab key indents 2 spaces
autocmd FileType sgml set tabstop=8 " Replace 8 spaces with a tab
autocmd FileType sgml set autoindent " Automatic indentation
augroup ENDEmacsInstall from
editors/emacs
or editors/xemacs.Edit ~/.emacs, adding these
lines: (defun local-sgml-mode-hook
(setq fill-column 70
indent-tabs-mode nil
next-line-add-newlines nil
standard-indent 4
sgml-indent-data t)
(auto-fill-mode t)
(setq sgml-catalog-files '("/usr/local/share/xml/catalog")))
(add-hook 'psgml-mode-hook
'(lambda () (local-psgml-mode-hook)))nanoInstall from
editors/nano or
editors/nano-devel.
- Configuration:
+
+ Configuration
- &prompt.user; cp /usr/local/share/nano/xml.nanorc ~/.nanorc
+ Copy the sample XML syntax highlight
+ file to the user's home directory:
- Use printf to add lines to the
- configuration file. Some have embedded Tab
- characters, making this easier than editing the file
- directly:
+ &prompt.user; cp /usr/local/share/nano/xml.nanorc ~/.nanorc
- &prompt.user; printf '# trailing whitespace\n' >> ~/.nanorc
-&prompt.user; printf 'color ,blue "[[:space:]]+$"\n' >> ~/.nanorc
-&prompt.user; printf '# multiples of eight spaces at the start a line\n' >> ~/.nanorc
-&prompt.user; printf '# (after zero or more tabs) should be a tab\n' >> ~/.nanorc
-&prompt.user; printf 'color ,blue "^([\t]*[ ]{8})+"\n' >> ~/.nanorc
-&prompt.user; printf '# tabs after spaces\n' >> ~/.nanorc
-&prompt.user; printf 'color ,yellow "( )+\t"\n' >> ~/.nanorc
-&prompt.user; printf '# lines longer than 70 characters\n' >> ~/.nanorc
-&prompt.user; printf 'color ,red "^(([ ]{2})+|(\t+))*[ ]{1}[^ ]{1}"\n' >> ~/.nanorc
+ Add these lines to the new
+ ~/.nanorc.
- Specify additional helpful options when running the
- editor.
+ # trailing whitespace
+color ,blue "[[:space:]]+$"
+# multiples of eight spaces at the start a line
+# (after zero or more tabs) should be a tab
+color ,blue "^([TAB]*[ ]{8})+"
+# tabs after spaces
+color ,yellow "( )+TAB"
+# highlight indents that have an odd number of spaces
+color ,red "^(([ ]{2})+|(TAB+))*[ ]{1}[^ ]{1}"
+# lines longer than 70 characters
+color ,yellow "^(.{71})|(TAB.{63})|(TAB{2}.{55})|(TAB{3}.{47}).+$"
- &prompt.user; nano -AKipwz -r 70 -T8 chapter.xml
+ Process the file to create embedded tabs:
- Users of &man.csh.1; can define an alias in
- ~/.cshrc to automate these options:
+ &prompt.user; perl -i'' -pe 's/TAB/\t/g' ~/.nanorc
+
- alias nano "nano -AKipwz -r 70 -T8"
+
+ Use
- After the alias is defined, the options will be added
- automatically:
+ Specify additional helpful options when running the
+ editor:
- &prompt.user; nano chapter.xml
+ &prompt.user; nano -AKipwz -r 70 -T8 chapter.xml
+
+ Users of &man.csh.1; can define an alias in
+ ~/.cshrc to automate these
+ options:
+
+ alias nano "nano -AKipwz -r 70 -T8"
+
+ After the alias is defined, the options will be added
+ automatically:
+
+ &prompt.user; nano chapter.xml
+
diff --git a/zh_CN.GB2312/books/handbook/bsdinstall/chapter.xml b/zh_CN.GB2312/books/handbook/bsdinstall/chapter.xml
index 5798715c08..487ad1a9bf 100644
--- a/zh_CN.GB2312/books/handbook/bsdinstall/chapter.xml
+++ b/zh_CN.GB2312/books/handbook/bsdinstall/chapter.xml
@@ -1,2454 +1,2454 @@
JimMock重构、 重整及部分重写:RandyPrattsysinstall 操作流程、 屏幕截图及一般性文字:GavinAtkinson对 bsdinstall 的更新:WarrenBlock安装 &os;(适用于 9.x 及以后版本)概述安装&os; 提供了一个以文字为主、 便于使用的安装程序:
从 &os; 9.0-RELEASE 开始是指 bsdinstall,
而在之前则是指 sysinstall。
本章介绍 bsdinstall 的使用,
有关 sysinstall
的使用参见 。学习完本章之后, 您将知道:如何创建 &os; 安装介质。&os; 如何划分目标硬盘。如何启动
bsdinstall。运行 bsdinstall 时需要回答的问题,
问题的具体含义, 以及应该如何回答。阅读本章之前, 您应该:查看将要安装的 &os; 版本所附的硬件支持列表,
以确定您的硬件能够被支持。一般来说, 此安装说明是针对 &i386;(“PC 兼容机”) 架构的计算机;
同时也会尽可能地对其他架构下的安装予以说明。 虽然本文档经常更新,
但仍可能与所安装版本上附带的说明文档有些许出入,
因此建议您仅将其作为常规的安装指导。硬件需求最低配置安装 &os; 所需的最低配置, 随版本及硬件架构而有所不同。以下几节对这些信息进行了总结。 根据所选的安装方式,
可能需要使用 &os; 支持的 CDROM 或网络适配器,
详见 。&os;/&arch.i386;&os;/&arch.i386; 需要 486 或更快的处理器, 最小 64 MB 的内存,
以及至少 1.1 GB 的硬盘空间。通常情况下对于老旧的计算机而言,
安装更大的内存和腾出更多的硬盘空间,
会比使用更快的处理器对性能的提升更加明显。&os;/&arch.amd64;&os;/&arch.amd64; 支持两种处理器。 第一种是 AMD64 处理器,
包括 &amd.athlon;64、 &amd.athlon;64-FX、 &amd.opteron;
以及更高级别的处理器。能够使用 &os;/&arch.amd64; 的另一种处理器是采用了
&intel; EM64 架构的处理器。 这类处理器包括
&intel; &core; 2 Duo、 Quad 和 Extreme 家族,
还包括 &intel; &xeon; 3000、 5000 和 7000 系列,
以及 &intel; &core; i3、 i5 和 i7。对于使用了 nVidia nForce3 Pro-150 的机器, 必须
在 BIOS 设置中禁用 IO APIC, 如果没有这样的选项就只能转而禁用 ACPI。
因为 Pro-150 芯片组存在 bug,而目前还没有能够规避此问题的方法。&os;/&arch.powerpc; &apple; &macintosh;支持所有内建 USB 的 New World &apple; &macintosh; 系统,
同时也为配置多 CPU 的机器提供 SMP 支持。注意 32 位的内核只能使用内存的前 2 GB,而 PowerMac G3
蓝白机上的 &firewire; 也不被支持。&os;/&arch.sparc64;有关 &os;/&arch.sparc64; 的系统支持,
详见
FreeBSD/sparc64 项目。&os;/&arch.sparc64; 需要独占一块磁盘。
目前还不支持与其他操作系统共享同一块磁盘。支持的硬件&os; 发行版所支持的硬件架构及设备会列在硬件兼容说明文件中,
此文件通常名为 HARDWARE.TXT,
位于发行版介质的根目录下。 这些内容也可以在 &os; 网站的 发行版信息
页面上找到。安装前的准备工作备份您的数据在将 &os; 安装至目标机器前,
应首先备份其上的重要数据并对备份进行测试。
&os; 安装程序对硬盘做任何改动前都会进行询问,
而一旦操作开始就无法撤销。决定将 &os; 安装在何处如果整个硬盘上仅安装 &os; 一个操作系统, 那么请直接跳过此节;
但如果需要让 &os; 与其他操作系统并存,
那么首先应当了解 &os; 的硬盘布局结构。&os;/&arch.i386; 与
&os;/&arch.amd64; 的硬盘布局硬盘可以分割成多个区域,
这些区域称作 partition(分区)。有两种硬盘分区方式。
传统的 Master Boot Record
(MBR, 主引导记录)
的分区表中可以定义四个 primary
partitions (主分区)。 (由于历史原因, &os;
中将主分区称作 slice。)
为了突破四个分区的限制, 可以将其中一个主分区创建为
extended partition (扩展分区),
并在其中建立
logical partitions (逻辑分区)。
正如您看到的那样, 这种方法十分笨拙。新式的 GUID Partition Table (GUID 分区表)
(GPT)
提供了更为简便的磁盘分区方法。
与传统的 MBR 分区相比, GPT 功能更为强大。 常见的
GPT 实现可以在一块磁盘上支持多达 128
个分区, 从而无需再采用类似逻辑分区这样迭床架屋的结构。一些旧式的操作系统, 如 &windows; XP
并不兼容 GPT
分区格式。 如果需要让 &os; 与这样的操作系统共用一块硬盘,
就必须使用 MBR 分区了。&os; 的标准引导加载器需要使用一个主分区或
GPT 分区。 (有关 &os; 引导过程的详情,
请参阅 。) 如果所有的主分区或
GPT 分区都已在使用中,
则必须为 &os; 腾出一个来使用。最小安装的 &os; 只需
1 GB 磁盘空间。 不过, 这是
非常 基本的安装,
而且也不会留下多少可用的空间。 比较实用的情况下,
如果不使用图形界面, 最小安装应分配至少 3 GB 的空间,
而使用图形界面, 则应分配至少 5 GB 的空间。
此外, 第三方应用程序可能还需要更多的空间。有很多
免费或商业的分区调整工具 可供使用。 例如,
以 Live CD 形式提供的 GParted
Live 中的 GParted
分区编辑器。 此外, GParted 也可以在许多其它
Linux Live CD 发行版中找到。磁盘分区程序有可能会破坏现有的数据。 在修改磁盘分区之前,
应先做一次完整的备份并校验其完整性。调整 µsoft; Vista 分区大小时可能会遇到一些问题。
如果要这样做, 请提前准备好 Vista 安装光盘。使用现有的分区假设一台安装了 &windows; 的计算机上有一块 40 GB 的硬盘,
分成了两个 20 GB 的分区。 &windows;
将它们分别叫做 C: 和
D:。
C: 分区包含了 10 GB
数据, 而 D: 分区包含了
5 GB 数据。将数据从 D: 移动到
C:, 就可将第二个分区腾出来供
&os; 使用了。缩小现有的分区假设一台安装了 &windows; 的计算机上有一块 40 GB 的硬盘,
一个大的分区使用了整块磁盘的全部空间。 &windows;
将这个 40 GB 分区叫做
C:。 目前占用了 15 GB 空间。
现希望将 &windows; 分区减少到
20 GB, 并将余下的 20 GB
分给 &os; 使用。可以在以下两种方法中任选一种:备份 &windows; 数据。 接着, 重新安装
&windows;, 在安装过程中建立一个 20 GB 的分区。使用类似 GParted 这样的分区调整工具来缩小
&windows; 分区, 并腾出空间给 &os; 使用。包含不同操作系统的磁盘分区令您能够在任何时候使用其中的一种。
如果希望同时运行多种不同的操作系统, 可以使用在
中介绍的方法。收集网络配置信息某些 &os; 安装方式需要通过网络连接下载相关文件。
若要连接至以太网 (或电视电缆/DSL 调制解调器上的以太网接口),
则需要向安装程序提供必要的网络配置信息。DHCP
可以用来提供自动配置网络的信息。 假如没有可用的
DHCP, 则必须从局域网管理员,
或网络服务提供商那里获得必要的配置信息:网络配置信息IP
地址子网掩码默认网关的 IP 地址本地网络域名DNS
服务器的 IP 地址检查 &os; 发行勘误尽管 &os; 项目会确保每个发行版尽可能地稳定,
但 bug 总是在所难免。 极少数情况下, 这些 bug 甚至会影响安装。
一旦这些问题被发现并修正后, 就会列在 &os; 网站的 &os; 发行勘误 中。
在安装之前, 应首先检查这些勘误, 以确保安装可以顺利进行。有关所有发行版的信息及勘误, 可以在
&os; 网站 的
发行版信息
一节中找到。准备安装介质&os; 的安装介质包括 CD、 DVD 及 USB 记忆棒。
若要开始安装, 只需使用安装介质引导计算机即可;
注意不能通过在其他操作系统中执行安装程序这种方式进行安装。标准的安装介质中包含了 &os; 安装所需的全部文件,
除此之外, 还有一种 bootonly 安装介质。
这种介质并不在其中直接包含安装所需的全部文件,
而是在需要时通过网络进行下载。 因此, 与标准的安装介质相比,
bootonly安装介质体积更小。&os; 安装介质的副本可以从
&os; 网站 获取。如果您已经有 &os; 的安装 CD、 DVD 或 USB 记忆棒,
则可以跳过此节。&os; 的安装 CD 或 DVD 映像均为可引导的 ISO 文件。 只需要
CD 或 DVD 其中的一种即可完成安装操作。
任选一种在当前操作系统中刻录成可引导光盘即可。若要创建可引导的记忆棒, 请执行以下操作:获取记忆棒映像&os; 9.0-RELEASE 和更高版本的记忆棒映像文件可以在
ftp://ftp.FreeBSD.org/pub/FreeBSD/releases/arch/arch/ISO-IMAGES/version/&os;-version-RELEASE-arch-memstick.img
中的
ISO-IMAGES/
目录中找到, 其中, arch
是指要安装的架构, 而
version
则是指要安装的版本号。 举例来说, &os;/&arch.i386; 9.0-RELEASE
的记忆棒映像位于
找到。在 &os; 8.X 以及更早的版本中,
映像文件的下载位置略有不同。 关于 &os; 8.X
和更早版本的安装操作请参阅 。记忆棒映像的扩展名为 .img。
在 ISO-IMAGES/
目录中提供了多个不同的映像, 可以根据需要的 &os; 版本,
有时也包括安装对象的硬件状况进行选择。执行以下步骤前, 应 备份 USB
记忆棒上的数据, 因为之后的操作将 擦除
这些数据。将映像文件写入记忆棒在 &os; 中操作在下面的例子中, 目标记忆棒对应的设备节点是 /dev/da0。
操作前请仔细确认目标设备是否正确,
以免损坏现有的数据。使用 &man.dd.1; 写入映像扩展名为 .img 的映像文件
不是 一种普通的文件。
它是对记忆棒上完整内容所做的 映像,
因此 不能 只是像普通文件一样简单的复制,
而应使用
&man.dd.1; 将其直接写入目标设备:&prompt.root; dd if=&os;-9.0-RELEASE-&arch.i386;-memstick.img of=/dev/da0 bs=64k在 &windows; 中操作操作前请确认是否为目标设备选择了正确的驱动器号,
否则可能会覆盖并损坏您的现有数据。获取 Image Writer for
&windows;Image Writer for
&windows; 是一种能将映像正确写入到记忆棒中的免费应用程序。
从
下载并将其提取至任意文件夹后即可开始使用。使用 Image Writer 写入映像双击图标 Win32DiskImager
运行程序后, 确定 Device
下面显示的驱动器号所对应的是记忆棒。
点击文件夹图标以选择需要写入的映像文件,
然后点击 [ Save ] 接受选择。
在确认所有操作无误且没有其他窗口访问记忆棒后,
点击 [ Write ] 将映像文件写入记忆棒。系统不再支持从软盘进行安装了。您现在可以开始安装 &os; 了。开始安装默认情况下, 在您看到下面这条信息之前,
安装程序不会对硬盘数据做任何修改:Your changes will now be written to disk. If you
have chosen to overwrite existing data, it will
be PERMANENTLY ERASED. Are you sure you want to
commit your changes?在此之前均可安全退出, 抑或您担心进行了某些错误的配置,
也可以直接关闭电源。开机启动引导 &i386; 及 &arch.amd64; 系统若要使用
所述的 USB 记忆棒引导, 则应在开机前将其插入计算机。若要使用 CDROM 引导, 则应在开机后立刻将其放入计算机。根据所使用的安装介质, 选择从 CDROM 或 USB启动。 在
BIOS 设置中,
可以选择特定的引导设备。 大多数系统还可以在启动时选择引导设备,
通常需要按 F10、 F11、
F12 或 Escape 键。如果您的计算机正常启动并加载了现有的操作系统,
那么请检查:USB 记忆棒插入过晚或 CDROM 放入过晚, 请将其拔下或取出,
然后重新启动计算机并再次尝试。BIOS 设置错误, 请重新设置。BIOS 不支持从当前介质启动; 可以使用
Plop
Boot Manager, 它能够让老式计算机支持
CD 或 USB 启动。&os; 将开始启动。 如果使用的是CDROM,
则会看到类似这样的显示(版本信息可以忽略):Booting from CD-ROM...
645MB medium detected
CD Loader 1.2
Building the boot loader arguments
Looking up /BOOT/LOADER... Found
Relocating the loader and the BTX
Starting the BTX loader
BTX loader 1.00 BTX version is 1.02
Consoles: internal video/keyboard
BIOS CD is cd0
BIOS drive C: is disk0
BIOS drive D: is disk1
BIOS 636kB/261056kB available memory
FreeBSD/i386 bootstrap loader, Revision 1.1
Loading /boot/defaults/loader.conf
/boot/kernel/kernel text=0x64daa0 data=0xa4e80+0xa9e40 syms=[0x4+0x6cac0+0x4+0x88e9d]
\&os; 引导加载器会显示:&os; 引导加载器菜单您可以等待十秒或按 Enter 键。引导 &macintosh; &powerpc;在大多数机器上, 开机时按住 C 键可以从 CD 启动。
除此之外, 按住
CommandOptionOF, 在非 &apple; 键盘上是
WindowsAltOF, 然后在出现的提示符 0 > 下输入boot cd:,\ppc\loader cd:0对于不带键盘的 Xserves 机器,请参考
&apple;
支持网站 以了解如何引导至 Open Firmware。引导 &sparc64;多数 &sparc64; 系统均设置成了硬盘自启动。 若要安装 &os;,
则应从网络或 CDROM 启动, 这就需要首先进入
PROM(OpenFirmware)。重启系统后等待引导信息出现, 虽然其具体内容取决于机器型号,
但应该会类似:Sun Blade 100 (UltraSPARC-IIe), Keyboard Present
Copyright 1998-2001 Sun Microsystems, Inc. All rights reserved.
OpenBoot 4.2, 128 MB memory installed, Serial #51090132.
Ethernet address 0:3:ba:b:92:d4, Host ID: 830b92d4.如果此时系统已经开始从硬盘启动, 那么请按下
L1A
或
StopA
或在串口控制台发送 BREAK(在 &man.tip.1; 或 &man.cu.1;
中是 ~#)以进入
PROM 提示符,
它应该如下所示:ok ok {0} 这是在单 CPU 系统上的提示符。这是在 SMP 系统上的提示符,
其中的数字表示可用的 CPU 个数。现在, 放入 CDROM 并在 PROM 提示符后输入
boot cdrom。查看设备探测结果为了便于查阅,
屏幕上所显示的最后几百行字符会始终保存在缓冲区里。若要浏览缓冲区, 可以按下 Scroll Lock
键来开启屏幕的滚动功能; 开启后即可使用方向键、
PageUp 键或 PageDown 键进行翻阅;
再次按下 Scroll Lock 键将关闭滚动功能。浏览时将看到内核进行了设备探测,
其结果类似 中的文本,
但具体内容会因计算机中所包含的设备而有所不同。典型的设备探测结果Copyright (c) 1992-2011 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 9.0-RELEASE #0 r225473M: Sun Sep 11 16:07:30 BST 2011
root@psi:/usr/obj/usr/src/sys/GENERIC amd64
CPU: Intel(R) Core(TM)2 Duo CPU T9400 @ 2.53GHz (2527.05-MHz K8-class CPU)
Origin = "GenuineIntel" Id = 0x10676 Family = 6 Model = 17 Stepping = 6
Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
Features2=0x8e3fd<SSE3,DTES64,MON,DS_CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1>
AMD Features=0x20100800<SYSCALL,NX,LM>
AMD Features2=0x1<LAHF>
TSC: P-state invariant, performance statistics
real memory = 3221225472 (3072 MB)
avail memory = 2926649344 (2791 MB)
Event timer "LAPIC" quality 400
ACPI APIC Table: <TOSHIB A0064 >
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
FreeBSD/SMP: 1 package(s) x 2 core(s)
cpu0 (BSP): APIC ID: 0
cpu1 (AP): APIC ID: 1
ioapic0: Changing APIC ID to 1
ioapic0 <Version 2.0> irqs 0-23 on motherboard
kbd1 at kbdmux0
acpi0: <TOSHIB A0064> on motherboard
acpi0: Power Button (fixed)
acpi0: reservation of 0, a0000 (3) failed
acpi0: reservation of 100000, b6690000 (3) failed
Timecounter "ACPI-safe" frequency 3579545 Hz quality 850
acpi_timer0: <24-bit timer at 3.579545MHz> port 0xd808-0xd80b on acpi0
cpu0: <ACPI CPU> on acpi0
ACPI Warning: Incorrect checksum in table [ASF!] - 0xFE, should be 0x9A (20110527/tbutils-282)
cpu1: <ACPI CPU> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
vgapci0: <VGA-compatible display> port 0xcff8-0xcfff mem 0xff400000-0xff7fffff,0xe0000000-0xefffffff irq 16 at device 2.0 on pci0
agp0: <Intel GM45 SVGA controller> on vgapci0
agp0: aperture size is 256M, detected 131068k stolen memory
vgapci1: <VGA-compatible display> mem 0xffc00000-0xffcfffff at device 2.1 on pci0
pci0: <simple comms> at device 3.0 (no driver attached)
em0: <Intel(R) PRO/1000 Network Connection 7.2.3> port 0xcf80-0xcf9f mem 0xff9c0000-0xff9dffff,0xff9fe000-0xff9fefff irq 20 at device 25.0 on pci0
em0: Using an MSI interrupt
em0: Ethernet address: 00:1c:7e:6a:ca:b0
uhci0: <Intel 82801I (ICH9) USB controller> port 0xcf60-0xcf7f irq 16 at device 26.0 on pci0
usbus0: <Intel 82801I (ICH9) USB controller> on uhci0
uhci1: <Intel 82801I (ICH9) USB controller> port 0xcf40-0xcf5f irq 21 at device 26.1 on pci0
usbus1: <Intel 82801I (ICH9) USB controller> on uhci1
uhci2: <Intel 82801I (ICH9) USB controller> port 0xcf20-0xcf3f irq 19 at device 26.2 on pci0
usbus2: <Intel 82801I (ICH9) USB controller> on uhci2
ehci0: <Intel 82801I (ICH9) USB 2.0 controller> mem 0xff9ff800-0xff9ffbff irq 19 at device 26.7 on pci0
usbus3: EHCI version 1.0
usbus3: <Intel 82801I (ICH9) USB 2.0 controller> on ehci0
hdac0: <Intel 82801I High Definition Audio Controller> mem 0xff9f8000-0xff9fbfff irq 22 at device 27.0 on pci0
pcib1: <ACPI PCI-PCI bridge> irq 17 at device 28.0 on pci0
pci1: <ACPI PCI bus> on pcib1
iwn0: <Intel(R) WiFi Link 5100> mem 0xff8fe000-0xff8fffff irq 16 at device 0.0 on pci1
pcib2: <ACPI PCI-PCI bridge> irq 16 at device 28.1 on pci0
pci2: <ACPI PCI bus> on pcib2
pcib3: <ACPI PCI-PCI bridge> irq 18 at device 28.2 on pci0
pci4: <ACPI PCI bus> on pcib3
pcib4: <ACPI PCI-PCI bridge> at device 30.0 on pci0
pci5: <ACPI PCI bus> on pcib4
cbb0: <RF5C476 PCI-CardBus Bridge> at device 11.0 on pci5
cardbus0: <CardBus bus> on cbb0
pccard0: <16-bit PCCard bus> on cbb0
isab0: <PCI-ISA bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
ahci0: <Intel ICH9M AHCI SATA controller> port 0x8f58-0x8f5f,0x8f54-0x8f57,0x8f48-0x8f4f,0x8f44-0x8f47,0x8f20-0x8f3f mem 0xff9fd800-0xff9fdfff irq 19 at device 31.2 on pci0
ahci0: AHCI v1.20 with 4 3Gbps ports, Port Multiplier not supported
ahcich0: <AHCI channel> at channel 0 on ahci0
ahcich1: <AHCI channel> at channel 1 on ahci0
ahcich2: <AHCI channel> at channel 4 on ahci0
acpi_lid0: <Control Method Lid Switch> on acpi0
battery0: <ACPI Control Method Battery> on acpi0
acpi_button0: <Power Button> on acpi0
acpi_acad0: <AC Adapter> on acpi0
acpi_toshiba0: <Toshiba HCI Extras> on acpi0
acpi_tz0: <Thermal Zone> on acpi0
attimer0: <AT timer> port 0x40-0x43 irq 0 on acpi0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
psm0: model GlidePoint, device ID 0
atrtc0: <AT realtime clock> port 0x70-0x71 irq 8 on acpi0
Event timer "RTC" frequency 32768 Hz quality 0
hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0
Timecounter "HPET" frequency 14318180 Hz quality 950
Event timer "HPET" frequency 14318180 Hz quality 450
Event timer "HPET1" frequency 14318180 Hz quality 440
Event timer "HPET2" frequency 14318180 Hz quality 440
Event timer "HPET3" frequency 14318180 Hz quality 440
uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
ppc0: cannot reserve I/O port range
est0: <Enhanced SpeedStep Frequency Control> on cpu0
p4tcc0: <CPU Frequency Thermal Control> on cpu0
est1: <Enhanced SpeedStep Frequency Control> on cpu1
p4tcc1: <CPU Frequency Thermal Control> on cpu1
Timecounters tick every 1.000 msec
hdac0: HDA Codec #0: Realtek ALC268
hdac0: HDA Codec #1: Lucent/Agere Systems (Unknown)
pcm0: <HDA Realtek ALC268 PCM #0 Analog> at cad 0 nid 1 on hdac0
pcm1: <HDA Realtek ALC268 PCM #1 Analog> at cad 0 nid 1 on hdac0
usbus0: 12Mbps Full Speed USB v1.0
usbus1: 12Mbps Full Speed USB v1.0
usbus2: 12Mbps Full Speed USB v1.0
usbus3: 480Mbps High Speed USB v2.0
ugen0.1: <Intel> at usbus0
uhub0: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0
ugen1.1: <Intel> at usbus1
uhub1: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus1
ugen2.1: <Intel> at usbus2
uhub2: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus2
ugen3.1: <Intel> at usbus3
uhub3: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus3
uhub0: 2 ports with 2 removable, self powered
uhub1: 2 ports with 2 removable, self powered
uhub2: 2 ports with 2 removable, self powered
uhub3: 6 ports with 6 removable, self powered
ugen2.2: <vendor 0x0b97> at usbus2
uhub8: <vendor 0x0b97 product 0x7761, class 9/0, rev 1.10/1.10, addr 2> on usbus2
ugen1.2: <Microsoft> at usbus1
ada0 at ahcich0 bus 0 scbus1 target 0 lun 0
ada0: <Hitachi HTS543225L9SA00 FBEOC43C> ATA-8 SATA 1.x device
ada0: 150.000MB/s transfers (SATA 1.x, UDMA6, PIO 8192bytes)
ada0: Command Queueing enabled
ada0: 238475MB (488397168 512 byte sectors: 16H 63S/T 16383C)
ada0: Previously was known as ad4
ums0: <Microsoft Microsoft 3-Button Mouse with IntelliEyeTM, class 0/0, rev 1.10/3.00, addr 2> on usbus1
SMP: AP CPU #1 Launched!
cd0 at ahcich1 bus 0 scbus2 target 0 lun 0
cd0: <TEAC DV-W28S-RT 7.0C> Removable CD-ROM SCSI-0 device
cd0: 150.000MB/s transfers (SATA 1.x, ums0: 3 buttons and [XYZ] coordinates ID=0
UDMA2, ATAPI 12bytes, PIO 8192bytes)
cd0: cd present [1 x 2048 byte records]
ugen0.2: <Microsoft> at usbus0
ukbd0: <Microsoft Natural Ergonomic Keyboard 4000, class 0/0, rev 2.00/1.73, addr 2> on usbus0
kbd2 at ukbd0
uhid0: <Microsoft Natural Ergonomic Keyboard 4000, class 0/0, rev 2.00/1.73, addr 2> on usbus0
Trying to mount root from cd9660:/dev/iso9660/FREEBSD_INSTALL [ro]...请仔细检查设备探测结果, 以确定 &os; 找到了所有您希望使用的设备。
没有找到的设备并不会在这里列出, 因为默认的
GENERIC 内核中不包含它们; 可以通过
内核模块
对这些设备提供支持。设备探测完成后, 您将看到 ,
表明安装介质共有三种用途: 安装 &os; 、
作为“Live CD”或引导至 &os; 的命令行界面。
请使用方向键选择一项后按 Enter 键确认。选择安装介质的使用方式在这里, 请选择 [ Install ]
以运行安装程序。介绍 bsdinstallbsdinstall 是一个基于文本的 &os; 安装程序,
作者是 &a.nwhitehorn;, 于 2011 年被 &os; 9.0 采用。&a.kmoore; 为 PC-BSD
编写的 pc-sysinstall 也可以用于
安装
&os;。 虽然有时会同
bsdinstall 混淆,
但实际两者并不相关。bsdinstall 菜单系统的主要控制键包括方向键、
Enter 键、
Tab 键、 Space
键等。选择键盘映射根据当前正在使用的系统控制台,
bsdinstall
可能会首先提示选择一种非默认的键盘布局。键盘映射选择选择了 [ YES ] 后, 将显示下面的键盘选择画面;
否则将不显示此画面而直接使用默认键盘映射。键盘选择菜单使用上/下方向键选择最适合当前系统的键盘映射后, 按
Enter 键确认。按 Esc 键以使用默认的键盘映射。
如果不清楚该选择哪一项, 推荐
United States of America
ISO-8859-1。设置主机名下面, bsdinstall
将提示为新安装的系统设置主机名。设置主机名应该输入完整的主机名,
例如
machine3.example.com。选择要安装的组件下面, bsdinstall
将提示选择要安装的组件。选择要安装的组件安装哪些组件很大程度取决于系统用途及可用磁盘空间。
注意, 任何情况下都会安装
&os; 内核及用户空间(统称基系统)。根据安装类型的不同, 某些组件可能不会显示。可选组件doc - 附加文档, 主要是与项目历史相关的内容。
稍后还可以安装 &os; 文档计划所提供的文档。games - 一些传统的 BSD 游戏,
包括 fortune 与
rot13 等。lib32 - 兼容库文件,
用于在 64 位版本的 &os; 上运行 32 位程序。ports - &os; 的 ports 集。ports 集提供了一种简单而方便的途径来安装软件。
在 ports 集中, 并不包含编译软件所需的源代码,
取而代之的是一组能够自动下载、 编译并安装第三方软件包的文件。
会讲述如何使用 ports 集。选择此项时, 必须保证有足够的硬盘空间,
注意安装程序并不会对此进行检查。
&os; 9.0 的 ports 集约需 &ports.size; 的磁盘空间;
您也可以为稍后的版本预留更大的空间。src - 系统源代码。&os; 提供了与内核及用户空间有关的完整源代码。
大部分程序并不需要这些源代码,
它们主要用于联编特定软件(例如设备驱动或内核模块)或者
&os; 本身的开发。完整的源代码树需要 1 GB 的磁盘空间,
而重新编译整个 &os; 系统则额外还需要 5 GB 的空间。通过网络安装bootonly 安装介质中并不会包含所有的安装文件。
如果使用这种介质进行安装, 那么需要的文件就必须通过网络下载。通过网络安装根据
配置了网络连接后,
即可开始选择像站点。 镜像站点上缓存有 &os; 的安装文件,
选择一个更近的镜像站点有助于更快的获取这些文件, 从而减少安装时间。选择一个镜像站点连接至所选镜像站点并查询到所需文件后, 安装将继续进行。分配磁盘空间&os; 提供了三种方式来分配磁盘空间:
Guided(向导式) 分区能够自动设置磁盘分区;
而 Manual(手动式) 分区则允许高级用户创建自定义分区;
还可以进入 shell 中直接使用类似 &man.gpart.8;、 &man.fdisk.8; 与
&man.bsdlabel.8; 这样的命令行程序。选择分配磁盘空间的方式向导式分区如果机器上配有多块磁盘, 则需要为 &os; 的安装指定目标磁盘。从多块磁盘中进行选择可以将整个磁盘都分配给 &os;, 也可以只分配其中的一部分。
若选择的是
[ Entire Disk ],
则创建分区布局时会直接使用整个磁盘; 若选择的是
[ Partition ],
则创建分区时仅会使用磁盘上的空闲空间。选择如何创建分区布局请仔细检查分区布局的创建结果。
如果发现有错误之处, 可以选择
[ Revert ] 来还原之前的分区;
此外, 也可以选择
[ Auto ] 重新让 &os; 自动创建分区。
也可以手动创建、 修改或删除分区。 正确创建了分区之后,
请选择 [ Finish ] 以继续安装。检查已创建分区手动式分区手动式分区将直接使用分区编辑器进行操作。手动创建分区高亮目标驱动器(本例中为 ada0)并选择
[ Create ] 以显示
partitioning scheme(分区方案) 菜单。手动创建分区对于 PC 兼容机来说, GPT 分区通常是最合适的选择,
而某些不兼容 GPT 的老式操作系统则可能需要使用
MBR 分区。
除此之外的分区方案仅用于一些不常见的或其他的老式操作系统。