版权 © 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The FreeBSD Documentation Project
版权 © 2005, 2006, 2007 FreeBSD 中文计划
这是 FreeBSD 6.X 和 7.X 版本的 FAQ。 如非特别说明, 所有的条目都假定与 FreeBSD 6.X 及以后的版本相对应。如果您有兴趣帮助这一项目,请发送邮件给 FreeBSD 文档计划邮件列表。 本文档的最新英文原始版本可从 FreeBSD Web 站点 获得, 由 FreeBSD 中文计划 维护的最新译本可以在 FreeBSD 中文计划 快照 Web 站点 和 FreeBSD 中文计划 文档快照 处获得, 这一译本会不断向主站同步。 此外, 您也可以从 FreeBSD FTP 服务器 或众多的 镜像站点 得到这份文档的各种其他格式以及压缩形式的版本。 您也可以 搜索 FAQ。
重要: 本文中许可证的非官方中文翻译仅供参考, 不作为判定任何责任的依据。如与英文原文有出入,则以英文原文为准。
在满足下列许可条件的前提下, 允许再分发或以源代码 (SGML DocBook) 或 “编译” (SGML, HTML, PDF, PostScript, RTF 等) 的经过修改或未修改的形式:
再分发源代码 (SGML DocBook) 必须不加修改的保留上述版权告示、 本条件清单和下述弃权书作为该文件的最先若干行。
再分发编译的形式 (转换为其它DTD、 PDF、 PostScript、 RTF 或其它形式), 必须将上述版权告示、本条件清单和下述弃权书复制到与分发品一同提供的文件, 以及其它材料中。
重要: 本文档由 FREEBSD DOCUMENTATION PROJECT “按现状条件” 提供, 并在此明示不提供任何明示或暗示的保障, 包括但不限于对商业适销性、 对特定目的的适用性的暗示保障。 任何情况下, FREEBSD DOCUMENTATION PROJECT 均不对任何直接、 间接、 偶然、 特殊、 惩罚性的, 或必然的损失 (包括但不限于替代商品或服务的采购、 使用、 数据或利益的损失或营业中断) 负责, 无论是如何导致的并以任何有责任逻辑的, 无论是否是在本文档使用以外以任何方式产生的契约、 严格责任或是民事侵权行为(包括疏忽或其它)中的, 即使已被告知发生该损失的可能性。
Redistribution and use in source (SGML DocBook) and 'compiled' forms (SGML, HTML, PDF, PostScript, RTF and so forth) with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code (SGML DocBook) must retain the above copyright notice, this list of conditions and the following disclaimer as the first lines of this file unmodified.
Redistributions in compiled form (transformed to other DTDs, converted to PDF, PostScript, RTF and other formats) must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
重要: THIS DOCUMENTATION IS PROVIDED BY THE FREEBSD DOCUMENTATION PROJECT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FREEBSD DOCUMENTATION PROJECT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
FreeBSD 是 FreeBSD基金会的注册商标
3Com 和 HomeConnect 是 3Com Corporation 的注册商标。
Adobe, Acrobat, Acrobat Reader, 以及 PostScript 是 Adobe Systems Incorporated 在美国和/或其他国家的商标或注册商标。
Sound Blaster 是 Creative Technology Ltd. 在美国和/或其他国家的注册商标。
CVSup 是 John D. Polstra 的注册商标。
IBM、 AIX、 EtherJet、 Netfinity、 OS/2、 PowerPC、 PS/2、 S/390 以及 ThinkPad 是国际商用机器公司在美国和其他国家的注册商标或商标。
IEEE, POSIX, 和 802 是 Institute of Electrical and Electronics Engineers, Inc. 在美国的注册商标。
Intel, Celeron, EtherExpress, i386, i486, Itanium, Pentium, 和 Xeon 是 Intel Corporation 及其分支机构在美国和其他国家的商标或注册商标。
Iomega, Zip, 和 Jaz 是 Iomega Corporation 在美国和/或其他国家的商标或注册商标。
Linux 是 Linus Torvalds 的注册商标。
Microsoft, IntelliMouse, MS-DOS, Outlook, Windows, Windows Media, 和 Windows NT 是 Microsoft Corporation 在美国和/或其他国家的商标或注册商标。
MIPS 和 R4000 是 MIPS Technologies, Inc. 在美国以及其他国家的注册商标。
Netscape 以及 Netscape Navigator 是 Netscape Communications Corporation 在美国和其他国家的注册商标。
Motif, OSF/1, 和 UNIX 是 The Open Group 在美国和其他国家的注册商标; IT DialTone 和 The Open Group 是其商标。
Oracle 是 Oracle Corporation 的注册商标。
Silicon Graphics, SGI, 和 OpenGL 是 Silicon Graphics, Inc. 在美国和/或其他国家的注册商标。
Sparc, Sparc64, SPARCEngine, 以及 UltraSPARC 是 SPARC International, Inc 在美国和其他国家的商标。 包含 SPARC 商标的产品基于 Sun Microsystems, Inc. 开发的架构。
Sun、 Sun Microsystems、 Java、 Java Virtual Machine、 JavaServer Pages、 JDK、 JRE、 JSP、 JVM、 Netra、 Solaris、 StarOffice、 Sun Blade、 Sun Enterprise、 Sun Fire、 SunOS 以及 Ultra 是 Sun Microsystems, Inc. 在美国和其他国家的商标或注册商标。
U.S. Robotics 和 Sportster 是 U.S. Robotics Corporation 的注册商标。
XFree86 是 The XFree86 Project, Inc 的商标。.
许多制造商和经销商使用一些称为商标的图案或文字设计来彰显自己的产品。 本文档中出现的, 为 FreeBSD Project 所知晓的商标,后面将以 '™' 或 '®' 符号来标注。
欢迎阅读 FreeBSD 6.X-7.X FAQ!
就像 Usenet 的 FAQ 一样,这份文档涵盖了与 FreeBSD 操作系统有关的最常见问题(当然还包括了回答!)。 虽说 FAQ 本意是为了避免相同的旧问题一次又一次的被提及以减少带宽的占用, 但是现在这已经被公认为非常有价值的信息资源了。
我们已经尽可能的使这份 FAQ 的内容丰富。 如果你有任何改进的建议,请随时把它们发送到 FreeBSD 文档计划邮件列表
Briefly, FreeBSD is a UNIX® like operating system for AMD64 and Intel® EM64T, i386™ PC-98, IA-64, ARM®, PowerPC® and UltraSPARC® platforms based on U.C. Berkeley's “4.4BSD-Lite” release, with some “4.4BSD-Lite2” enhancements. It is also based indirectly on William Jolitz's port of U.C. Berkeley's “Net/2” to the i386, known as “386BSD”, though very little of the 386BSD code remains. A fuller description of what FreeBSD is and how it can work for you may be found on the FreeBSD home page.
FreeBSD is used by companies, Internet Service Providers, researchers, computer professionals, students and home users all over the world in their work, education and recreation.
For more detailed information on FreeBSD, please see the FreeBSD Handbook.
The goal of the FreeBSD Project is to provide software that may be used for any purpose and without strings attached. Many of us have a significant investment in the code (and project) and would certainly not mind a little financial compensation now and then, but we definitely do not insist on it. We believe that our first and foremost “mission” is to provide code to any and all comers, and for whatever purpose, so that the code gets the widest possible use and provides the widest possible benefit. This is, we believe, one of the most fundamental goals of Free Software and one that we enthusiastically support.
That code in our source tree which falls under the GNU General Public License (GPL) or GNU Library General Public License (LGPL) comes with slightly more strings attached, though at least on the side of enforced access rather than the usual opposite. Due to the additional complexities that can evolve in the commercial use of GPL software, we do, however, endeavor to replace such software with submissions under the more relaxed FreeBSD license whenever possible.
Yes. Those restrictions do not control how you use the code, merely how you treat the FreeBSD Project itself. If you have serious license concerns, read the actual license. For the simply curious, the license can be summarized like this.
Do not claim that you wrote this.
Do not sue us if it breaks.
For most people, yes. But this question is not quite that cut-and-dried.
Most people do not actually use an operating system. They use applications. The applications are what really use the operating system. FreeBSD is designed to provide a robust and full-featured environment for applications. It supports a wide variety of web browsers, office suites, email readers, graphics programs, programming environments, network servers, and just about everything else you might want. Most of these applications can be managed through the Ports Collection.
If you need to use an application that is only available on one operating system, you simply cannot replace that operating system. Chances are there is a very similar application on FreeBSD, however. If you want a solid office or Internet server, a reliable workstation, or just the ability to do your job without interruptions, FreeBSD will almost certainly do everything you need. Many computer users across the world, including both novices and experienced UNIX administrators, use FreeBSD as their only desktop operating system.
If you are migrating to FreeBSD from some other UNIX environment, you already know most of what you need to. If your background is in graphic-driven operating systems such as Windows® and older versions of Mac OS®, expect to invest additional time learning the UNIX way of doing things. This FAQ and the FreeBSD Handbook are excellent places to start.
It may be used free of charge, even by commercial users.
Full source for the operating system is freely available, and the minimum possible restrictions have been placed upon its use, distribution and incorporation into other work (commercial or non-commercial).
Anyone who has an improvement or bug fix is free to submit their code and have it added to the source tree (subject to one or two obvious provisions).
It is worth pointing out that the word “free” is being used in two ways here, one meaning “at no cost”, the other meaning “you can do whatever you like”. Apart from one or two things you cannot do with the FreeBSD code, for example pretending you wrote it, you can really do whatever you like with it.
1.6. What are the differences between FreeBSD and NetBSD, OpenBSD, and other open source BSD operating systems?
James Howard wrote a good explanation of the history and differences between the various projects for DaemonNews, called The BSD Family Tree which goes a fair way to answering this question.
At this point in FreeBSD's development, there are two parallel development branches; releases are being made from both branches. The 6.X series of releases is being made from the 6-STABLE branch and the 7.X series of releases from 7-STABLE.
Up until the release of 7.0, the 6.X series was the one known as -STABLE. However, as of 7.0, the 6.X branch will be designated for an “extended support” status and receive only fixes for major problems, such as security-related fixes. There will be more releases made from the 6-STABLE branch, but it is considered a “legacy” branch and most current work will only become a part of 7-STABLE.
Version 7.0 is the latest release from the 7-STABLE branch; it was released in Feb 2008. Version 6.3 is the latest release from the 6-STABLE branch; it was released in Jan 2008.
Briefly, -STABLE is aimed at the ISP, corporate user, or any user who wants stability and a minimal number of changes compared to the new (and possibly unstable) features of the latest -CURRENT snapshot. Releases can come from either branch, but -CURRENT should only be used if you are prepared for its increased volatility (relative to -STABLE, that is).
Releases are made every few months. While many people stay more up-to-date with the FreeBSD sources (see the questions on FreeBSD-CURRENT and FreeBSD-STABLE) than that, doing so is more of a commitment, as the sources are a moving target.
More information on FreeBSD releases can be found on the Release Engineering page on the FreeBSD Web site.
FreeBSD-CURRENT is the development version of the operating system, which will in due course become the new FreeBSD-STABLE branch. As such, it is really only of interest to developers working on the system and die-hard hobbyists. See the relevant section in the Handbook for details on running -CURRENT.
If you are not familiar with the operating system or are not capable of identifying the difference between a real problem and a temporary problem, you should not use FreeBSD-CURRENT. This branch sometimes evolves quite quickly and can be un-buildable for a number of days at a time. People that use FreeBSD-CURRENT are expected to be able to analyze any problems and only report them if they are deemed to be mistakes rather than “glitches”. Questions such as “make world produces some error about groups” on the FreeBSD-CURRENT 邮件列表 may be treated with contempt.
Every month, snapshot releases are made based on the current state of the -CURRENT and -STABLE branches. The goals behind each snapshot release are:
To test the latest version of the installation software.
To give people who would like to run -CURRENT or -STABLE but who do not have the time or bandwidth to follow it on a day-to-day basis an easy way of bootstrapping it onto their systems.
To preserve a fixed reference point for the code in question, just in case we break something really badly later. (Although CVS normally prevents anything horrible like this happening.)
To ensure that all new features and fixes in need of testing have the greatest possible number of potential testers.
No claims are made that any -CURRENT snapshot can be considered “production quality” for any purpose. If you want to run a stable and fully tested system, you will have to stick to full releases, or use the -STABLE snapshots.
Snapshot releases are directly available from snapshot.
Official snapshots are generated each month on a regular basis for all actively developed branches. There are also daily snapshot builds of the popular i386 and amd64 branches, hosted on http://snapshots.us.freebsd.org/.
Back when FreeBSD 2.0.5 was released, FreeBSD development branched in two. One branch was named -STABLE, one -CURRENT. FreeBSD-STABLE is intended for Internet Service Providers and other commercial enterprises for whom sudden shifts or experimental features are quite undesirable. It receives only well-tested bug fixes and other small incremental enhancements. FreeBSD-CURRENT, on the other hand, has been one unbroken line since 2.0 was released, leading towards 7.0-RELEASE and beyond. For more detailed information on branches see “FreeBSD Release Engineering: Creating the Release Branch”, the status of the branches and the upcoming release schedule can be found on the Release Engineering Information page.
The 2.2-STABLE branch was retired with the release of 2.2.8. The 3-STABLE branch has ended with the release of 3.5.1, the final 3.X release. The 4-STABLE branch has ended with the release of 4.11, the final 4.X release. The only changes made to either of these branches will be, for the most part, security-related bug fixes. Support for the 5-STABLE branches has ended with the release of 5.5, the final 5.X release. Support for the 6-STABLE branches will continue for some time but focus primarily on security-related bug fixes and other serious issues.
7.0-STABLE is the actively developed -STABLE branch. The latest release on the 7.0-STABLE branch is 7.0-RELEASE, which was released in Feb 2008.
The 8-CURRENT branch is the actively developed -CURRENT branch toward the next generation of FreeBSD. See What is FreeBSD-CURRENT? for more information on this branch.
The Release Engineering 团队 <re@FreeBSD.org> releases a new major version
of FreeBSD about every 18 months and a new minor version about every 8 months, on
average. Release dates are announced well in advance, so that the people working on the
system know when their projects need to be finished and tested. A testing period precedes
each release, in order to ensure that the addition of new features does not compromise
the stability of the release. Many users regard this caution as one of the best things
about FreeBSD, even though waiting for all the latest goodies to reach -STABLE can be a little frustrating.
More information on the release engineering process (including a schedule of upcoming releases) can be found on the release engineering pages on the FreeBSD Web site.
For people who need or want a little more excitement, binary snapshots are made daily as discussed above.
The key decisions concerning the FreeBSD project, such as the overall direction of the project and who is allowed to add code to the source tree, are made by a core team of 9 people. There is a much larger team of more than 350 committers who are authorized to make changes directly to the FreeBSD source tree.
However, most non-trivial changes are discussed in advance in the mailing lists, and there are no restrictions on who may take part in the discussion.
Every significant release of FreeBSD is available via anonymous FTP from the FreeBSD FTP site:
The latest 7-STABLE release, 7.0-RELEASE can be found in the 7.0-RELEASE directory.
Snapshot releases are made monthly for the -CURRENT and -STABLE branch, these being of service purely to bleeding-edge testers and developers.
The latest 6-STABLE release, 6.3-RELEASE can be found in the 6.3-RELEASE directory.
Information about obtaining FreeBSD on CD, DVD, and other media can be found in the Handbook.
The Problem Report database of all user change requests may be queried by using our web-based PR query interface.
The send-pr(1) command can be used to submit problem reports and change requests via electronic mail. Alternatively, the web-based problem report submission interface can be used to submit problem reports through a web browser.
Before submitting a problem report, please read Writing FreeBSD Problem Reports, an article on how to write good problem reports.
Please check the Documentation list on the main FreeBSD web site.
FreeBSD 工程产生了内容涉及范围很广的文档, 可以从这个链接上得到:http://www.FreeBSD.org/docs.html。 这些文档也可以以安装包的形式得到, 可以方便的安装到你的 FreeBSD 系统上。 关于文档安装包的更多细节可在随后几段中找到。
此外, 在这本 《问答集》 的结尾部分的 参考资料清单 以及 《使用手册》 中的对应部分 也列出了其他推荐书籍。
有。文档可以以不同的格式和压缩形式得到, 位于 FreeBSD 的 FTP 站点上,在 /pub/FreeBSD/doc/ 目录之中。
文档被以许多不同的方式分类。 这些方式包括:
文档名称,例如 faq (问答集),或 handbook (手册)。
文档的语言和编码。 这是按照你可以在 FreeBSD 系统中的 /usr/share/locale 找到的本地化名称。 当前我们已经有的文档的语言和编码如下:
| 名称 | 意义 |
|---|---|
| en_US.ISO8859-1 | 美国英文 |
| bn_BD.ISO10646-1 | Bengali (or Bangla) |
| da_DK.ISO8859-1 | Danish (Denmark) |
| de_DE.ISO8859-1 | 德文 |
| el_GR.ISO8859-7 | Greek (Greece) |
| es_ES.ISO8859-1 | 西班牙文 |
| fr_FR.ISO8859-1 | 法文 |
| hu_HU.ISO8859-2 | Hungarian |
| it_IT.ISO8859-15 | 意大利文 |
| ja_JP.eucJP | 日文 (EUC 编码) |
| mn_MN.UTF-8 | Mongolian (UTF-8 encoding) |
| nl_NL.ISO8859-1 | Dutch (Netherlands) |
| no_NO.ISO8859-1 | Norwegian (Norway) |
| pl_PL.ISO8859-2 | Polish (Poland) |
| pt_BR.ISO8859-1 | Portuguese (Brazil) |
| ru_RU.KOI8-R | 俄文 (KOI8-R 编码) |
| sr_YU.ISO8859-2 | Serbian (Serbia) |
| tr_TR.ISO8859-9 | Turkish (Turkey) |
| zh_CN.GB2312 | 简体中文 (GB2312 编码) |
| zh_TW.Big5 | 繁体中文 (Big5 编码) |
注意: 有的文档不是可以通过任何语言得到的。
文档的格式。我们产生许多不同输出格式的文档。 每种格式都有各自的好处和缺点。 一些格式更适合在线阅读, 其它格式在纸张打印时因为美观而令人满意。 让文档可以以这些格式中的任意一种格式得到 是为了确保我们的读者能阅读他们感兴趣的部分, 既可以在显示器上,也可以打印在纸张上。 现在可得到的格式是:
压缩和包装方式。现在正在使用的有三种。
格式是 html-split时, 文件用 tar(1) 捆扎。 .tar 文件然后用下述的压缩方式压缩。
所有的其他格式均只生成一个名为 类型.格式 的文件 (例如 article.pdf、 book.html, 等等)。
这些文件然后使用两种压缩方式压缩。
| 方式 | 描述 |
|---|---|
| zip | Zip 格式。 如果你要在 FreeBSD 解压缩这种格式则需要首先安装 port archivers/unzip。 |
| bz2 | BZip2 格式。不如 Zip 使用普遍,但是可以产生更小的文件。 安装 port archivers/bzip2 以解压缩这些文件。 |
所以手册的 PostScript 版本, 使用 BZip2 压缩,将会存储为一个文件称为 book.ps.bz2,位于 handbook/ 目录。
在确定您希望下载的格式和压缩形式之后, 您需要自行下载这些压缩文件, 对其进行解压缩, 然后将文档复制到适当的位置。
例如,分页 HTML 版本的《问答集》, 使用 bzip2(1) 压缩,可以在文件 doc/en_US.ISO8859-1/books/faq/book.html-split.tar.bz2 中找到。为了下载和解压缩这个文件你应当这样做:
# fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/en_US.ISO8859-1/books/faq/book.html-split.tar.bz2 # bzip2 -d book.html-split.tar.bz2 # tar xvf book.html-split.tar
你会留下一系列 .html 文件。其中主要的一个是 index.html,包含目录、 介绍性的材料,和指向文档其它部分的链接。 然后你可以复制和移动这些到需要的地方。
你可以在 使用手册 的信件列表部分 里找到全部信息。
你可以在 使用手册 的新闻组部分 里找到全部信息。
有,多数重要的 IRC 网络都承载 FreeBSD 聊天频道:
频道 #FreeBSD 位于 EFNet 是个 FreeBSD 论坛,但是不要到那里寻求技术支持 或尝试在那里找到朋友帮助你免去阅读联机手册的艰辛, 或是开展你自己的研究。 那是一个聊天频道,最先和首要的问题是, 那里的话题就好像包括性、运动和核武器 就是 FreeBSD 。你已经被警示了! 可在服务器 irc.chat.org 访问。
频道 #FreeBSDhelp 位于 EFNet 致力于帮助 FreeBSD 用户。 对于解决问题他们要比 #FreeBSD 有心的多。
Channel ##FreeBSD on Freenode is a general help channel with about 300 users at any time. The conversations have been known to run off-topic for a while, but priority is given to users with FreeBSD questions. We are good about helping you understand the basics, referring to the Handbook whenever possible, and directing you where to learn more about the topic you need help with. We are a primarily English speaking channel, though we have users from all over the world. If you would like to speak in your native language, try to ask the question in English and then relocate to another channel ##freebsd-lang as appropriate.
频道 #FreeBSD 位于 DALNET 可访问于美国的 irc.dal.net 和欧洲的 irc.eu.dal.net。
频道 #FreeBSDHelp 位于 DALNET 可访问于美国的 irc.dal.net 和欧洲的 irc.eu.dal.net。
频道 #FreeBSD 位于 UNDERNET 可访问于美国的 us.undernet.org 和欧洲的 eu.undernet.org。 由于那是一个帮助频道,应当准备去阅读向你提及的文档。
频道 #FreeBSD 位于 RUSNET 是一个面向俄语的频道, 致力于帮助 FreeBSD 用户。那也是个进行非技术性讨论的好地址。
Channel #bsdchat on Freenode is a Traditional-Chinese (UTF-8 encoding) language oriented channel dedicated to helping FreeBSD users. This is also good place for non-technical discussions.
这些频道中每个都有特色, 彼此没有联系。它们的聊天风格也不相同, 所以你需要尝试其中的每一个以找到一个风格适应你的。 在所有类型的 IRC 通信中, 如果你很容易就被冒犯,无力应付许多油腔滑调的年轻人 (并且人数比一些较年长的人多), 千万不要因此而感到烦恼。
一张 3.5 英寸 (1.44 MB) 的软盘可以容纳 1474560 字节的数据, 而引导镜像文件的尺寸正是 1474560 字节。
准备创建引导软盘时常见的错误有:
使用 FTP 时没有用 binary 模式下载软盘镜像文件。
有些 FTP 客户端程序的默认传输模式为 ascii,并且试图 转换接收到的所有行尾字符,以匹配客户端系统的转换模式。这不可避免的破坏了引导镜像文件。检查一下 下载的引导镜像文件:如果它的大小不 完全 等于服务器上文件大小的话,这个 下载过程就是可疑的。
规避措施:在使用 FTP 连上服务器准备下载镜像文件时,在 FTP 命令提示符号处输入 binary。
使用 DOS copy 命令(或者等同的 GUI 工具)往软盘上传送引导镜像文件。
直接使用类似 copy 这样的命令创建引导镜像文件是不可行的。镜像文件含有一个软 盘的全部内容,磁道对磁道,而不是像普通文件一样放在软盘上。您必须使用 “原始” 方式把文件传输 到软盘上,这需要比较低级的工具,(比如 fdimage 或者 rawrite)这 些工具在 使用手册的安装章节 有说明。
安装说明可以在使用手册的安装章节找到。
使用 FreeBSD 需要 486 或更高配置的 PC、 至少 24 MB 的 RAM 以及 150 MB 的磁盘空间。
FreeBSD 的所有版本都可以运行在低端的单色显示适配器 (MDA) 上, 但是要运行 Xorg,就需要 VGA 或者更好的显卡。
您还可以参考 第 4 章.
目前还没有办法仅仅创建一张安装软盘。你需要制作一个全新的发行版,这里包 含您的安装软盘。
要创建一个自定义的发行版,您可以参考 Release Engineering 中的说明。
请参考 multi-OS 文章.
先安装 Windows ,然后再安装 FreeBSD。FreeBSD 的引导管理器能够引导 Windows 和 FreeBSD。如 果您在 FreeBSD 之后安装 Windows ,Windows 会在自做主张的覆盖您的引导管理器。如果您 遇到这种情况,请参考下一部分的说明。
您可以使用下面三种方法中的一种来重新安装您的 FreeBSD 引导管理器:
运行 DOS,切换到 FreeBSD 发行版的 tools 目录下,寻找 bootinst.exe 文件。您可以这样运行这个程序:
...\TOOLS> bootinst.exe boot.bin
这样,引导管理器就可以被重新安装上。
再次使用 FreeBSD 引导软盘来引导系统, 然后选择 Custom 菜单项进行定制安装。 选择 Partition。 选中您先前安装了启动管理器的驱动器 (通常会是第一个) 然后进入分区表编辑器, 并直接 (也就是不要做任何修改) 按 W。 系统会要求您确认操作, 选择 [ Yes ], 然后在选择引导管理器 (Boot Manager) 时, 选择 FreeBSD Boot Manager。 这个操作会在磁盘上重写引导管理器。 接着退出安装菜单, 就可以从硬盘引导系统了。
引导 FreeBSD 引导软盘(或者 CDROM)并且选择 Fixit 菜单项。选择 Fixit 软盘或 者 CDROM #2 (“live”文件系统选项)进入 fixit shell。然后运行下面的命令:
Fixit# fdisk -B -b /boot/boot0 引导设备
把 bootdevice 替换成您实际的引导设备,比如 ad0(第一个IDE磁盘),ad4(辅助控制器上的第一个 IDE 磁盘),da0(第一个SCSI磁盘),等等。
在 IBM 较早版本的 BIOS 中有个 bug,导致机器把 FreeBSD 分区错误地看成一个潜在的 FAT suspend-to-disk 分区。当 BIOS 试图解析 FreeBSD 分区时,BIOS 便挂起了。
根据 IBM[1],下面 型号/BIOS 的版本数字 (release numbers) 含有对这个 bug 的修正。
| Model | BIOS revision |
|---|---|
| T20 | IYET49WW or later |
| T21 | KZET22WW or later |
| A20p | IVET62WW or later |
| A20m | IWET54WW or later |
| A21p | KYET27WW or later |
| A21m | KXET24WW or later |
| A21e | KUET30WW |
根据报道,较晚的 IBM BIOS 版本可能又重新引入了这个 bug。 由 Jacques Vidrine 发到 FreeBSD 笔记本电脑邮件列表的 邮件 描述了一个或许可行的方法,如果您的新 IBM 笔记本电 脑不能正常的启动 FreeBSD,您可以升级或者降级您的 BIOS。
如果您使用较早版本的 BIOS,并且升级不可行时,一个规避措施是首先安装 FreeBSD,然后改变 FreeBSD 所使用的分区 ID,再安装新的能处理不同分区 ID 的引导块(boot blocks)。
首先,您需要把机器恢复到能够通过自检屏幕的状态。这一步需要在引导机器时,不让机器在主磁盘搜寻 到 FreeBSD 分区。一种方法是把硬盘摘下然后暂时移至较老版本的 ThinkPad(比如 ThinkPad 600)上或者一台 有合适转换线缆的桌面 PC 上。当您完成这一步时,您可以删除 FreeBSD 分区并且把硬盘移回。此时 ThinkPad 便可以再次引导了。
由于机器能够再次工作了,您可以使用下面描写的规避措施来安装一个可以运行的 FreeBSD。
从 http://people.FreeBSD.org/~bmah/ThinkPad/ 上下载 boot1 和 boot2。把这些文件放在您能够再次找到它们的地 方。
正常地在 ThinkPad 上安装 FreeBSD。不要使用 Dangerously Dedicated 模式。安装程序完成之后不要重启机器。
切换至 “Emergency Holographic Shell” (ALT+F4) 或者启动一个 “fixit” shell。
使用 fdisk(8) 把 FreeBSD 的分区 ID 从165改变为 166(这是 OpenBSD 使用的分区类型)。
把 boot1 和 boot2 两个文件复制到本地的文件系统上(local filesystem)。
使用 disklabel(8) 把 boot1 和 boot2 两个文 件复制到您的 FreeBSD slice 上。
# disklabel -B -b boot1 -s boot2 ad0sn
n 是您安装 FreeBSD slice 的编号。
重启。在引导提示符下,系统将提供引导 OpenBSD 的选项,但是这实际上将启 动 FreeBSD。
在同一台笔记本电脑上安装双引导 OpenBSD 和 FreeBSD 这一工作留给读者作为练习。
您可以,但是这不是一个好主意。
如果您在某个现代 IDE 驱动器上发现了坏块,那么这个驱动器将很快报销。(这个驱动器内部重映射 (remapping) 功能已经不再足以修复坏块,这意味着这个磁盘已经被严重破坏了);我们建议您购买一块新的硬盘。
如果您使用的 SCSI 驱动器有坏块,请参考这个答案。
如果您遇到这样的情况:机器慢慢停机或者当你从安装软盘引导机器时,机器不停地自动重启, 您可以问自己这样的三个问题:
您使用的是一张新的,刚刚格式化的,没有错误的软盘吗?(最好是用一张刚从盒中取出的崭新软盘, 而不是一张在床下压了三年的杂志附赠磁盘)?
您下载软盘镜像的时候使用的是二进制(或者镜像)模式吗?(不要觉得不好意思,即便是我们中间的 高手,也犯过使用 ASCII 模式下载二进制文件的错误!)
如果您在使用 Windows 95 或者 Windows 98, 您是在纯 DOS 模式下使用 fdimage 或 rawrite 这两个工具吗? 这些操作系统会干扰直接向硬件上写数据的程序, 比如磁盘创建程序; 甚至在 GUI 模式下的 DOS shell 运行这样的程序也会出现这样的问题。
还有报导说,Netscape® 在下载引导软盘时可能会出现错误,因此,如果可能的话,您最好使用一个不同的 FTP 客户端。
这个问题的一般原因是 CDROM 驱动器的配置有错误。很多 PC 现在把 CDROM 设置为第二 IDE 控制器上 的从盘,在这个控制器上没有主盘。根据 ATAPI 的规格,这是不标准的,但是 Windows 不严格的按照 ATAPI 规格进行处理,并且 BIOS 在引导系统的时候也忽略这一点。这就是为什么 BIOS 可以在引导系统时可以检测到 CDROM,但是 FreeBSD 却不能检测到 CDROM 以完成安装程序。
重新配置您的系统以把 CDROM 设置为 IDE 控制器上的主盘,或者,如果您只有一块 IDE 控制器的话, 那就把CDROM设置为从盘,但是此时 IDE 控制器上需要有主盘。
可以。使用标准的 Laplink 线缆。如果有必要,您可以参考 使用手册中的PLIP部分以获取并行端口网络的详细资 料。
注意: 一块磁盘的 “geometry”,是指这块磁盘的柱面(cylinder)数,磁头(head)数和 扇区/磁道(sectors/track)数,为了行文的方便,我们用 C/H/S 来指称一块硬盘的几何布局(geometry)。
这一点对系统管理员新手常常会导致混淆。首先,SCSI 驱动器的物理几何布局 (geometry) 跟 FreeBSD 上的磁盘区块(disk blocks)是完全不相关的。事实上,就磁盘上磁道密度的变化而言, 并没有“所谓 ”physical geometry 这种东西。硬盘制造商所说的 “physical geometry” 通常是指硬盘上使用最小空间来存放数据的几何布局(geometry)。以 IDE 磁盘而言, FreeBSD 用以存取硬盘设定的方式是 C/H/S ,然而,现代硬盘驱动器在内部运作时,早就自动转换为 block 方式 了。
关键在于 logicalgeometry。这是 BIOS 检测硬盘的几何布局 (geometry)时所得到的设定,并且用来决定硬盘存取方式。由于 FreeBSD 在引导时采用 BIOS 检测设定值, 所以如何来让 BIOS 检测到正确的设定值,是十分重要的。尤其是在同一块硬盘上有多个操作系统的情况下, 它们都必须采用一致的硬盘几何布局(geometry)。否则,您就会面严重的系统检测问题!
对 SCSI 硬盘而言, 磁盘的几何布局 (geometry) 取决于您的控制器是否启用了扩展翻译支持 (extended translation support, 通常这个选项会标示为 “支持 >1GB 的 DOS 磁盘” 或类似的概念)。 如果这个选项是关闭的, 则应使用 N 柱面 (cylinders)、 64 磁头 (heads) 和每磁道 32 扇区 (sectors/track), 此处 N 是以 MB 为单位的磁盘容量。 举例来说, 2GB 的磁盘应该是 2048 柱面、 64 磁头和每磁道 32 扇区。
如果该 SCSI 有支持使用 extended translation 的话, (通常这个方式在MS-DOS®使用上有某些限制),并且硬盘容量大于 1GB,那么硬盘的几何布局(geometry)就会 使用类似:M cylinders、每磁道 63 sectors(不是 64)、255 heads,这里讲的 M 是指硬盘的容量(单位:MB)再除以 7.844238所得出的数值!所以,在这个例子中,2GB 的硬盘应该是261 cylinders、每磁道63 sectors、255 heads。
如果您对上面所讲的不确定,或者 FreeBSD 在安装时不能正确检测到硬盘几何布局(geometry)的话,最简 单的解决方法通常是在硬盘上建立一块小的 DOS 分区。这样一来,BIOS 就能检测到正确的硬盘几何布局 (geometry)了,如果不想继续保留那一小块 DOS 分区的话,可以随时用 partition editor 来删掉它。或者把 它留着当作网卡驱动程序编程使用,也可以留做您喜欢的用途。
此外, 随 FreeBSD 发行版有一个免费提供的 pfdisk.exe 工具。 您可以在 FreeBSD CDROM 和众多 FreeBSD FTP 站点的 tools 目录中找到它。 这个程序可以从使用磁盘的其他操作系统中读取硬盘的几何布局信息。 您可以在分区表编辑器中输入这些参数。
有,您必须确认您的 root 分区是在 1024 cylinders 之内,以便让 BIOS 可以从中引导内核。(注意: 这是 PC 的 BIOS 功能限制,而不是 FreeBSD 的限制)。
对 SCSI 硬盘而言, 通常这表示将根分区放到硬盘最前面的 1024 MB (如果启用了扩展地址翻译功能, 则是最前面的 4096 MB - 参见前一个问题)。 对于 IDE 硬盘, 则是 504 MB。
FreeBSD 可以识别 Ontrack Disk Manager 并能够为其留出需要的空间。 不过, 它并不支持其他的磁盘管理器。
如果您的整块硬盘上只打算安装 FreeBSD, 就不再需要磁盘管理器了。 只要把磁盘配置为 BIOS 所能处理的最大空间 (通常是 504 兆字节), FreeBSD 会算出实际可用的空间大小。 如果您使用的是采用 MFM 控制器的旧式磁盘, 则需要告诉 FreeBSD 实际的柱面数 (cylinders)。
如果您希望在磁盘上同时安装 FreeBSD 和其他操作系统, 可能也不需要磁盘管理器: 只需确保 FreeBSD 的引导分区以及其他操作系统的分区都在前 1024 个柱面上就可以了。 如果您足够细心的话, 20 兆字节的引导分区应该够用了。
通常原因出在 FreeBSD 及 DOS 或其它操作系统在硬盘的 geometry 上有冲突。您需要重新安装 FreeBSD,只要遵守上面给出的说明,您基本就可以解决这个问题。
这是上文提到的问题的另外一个症状。这是因为您的 BIOS 几何布局(geometry)和 FreeBSD 的几何布局 (geometry)不一致。如果您的磁盘控制器和 BIOS 支持 cylinder translation (通常被标记为 “支持 >1GB 的驱动器”),尝试更改相关设定,并重装 FreeBSD。
一般而言 ,不需要。然而,我们强烈建议您的源代码最少要安装 base, 其中包含了本文中提到的一些文件,以及 sys(kernel),这是 内核的源代码。系统的操作不需要源代码,然而,kernel-configuration 程序 config(8)则需要源代码。 在没有内核源代码情况下,我们仍然可以自己构建源代码结构。你可以通过 NFS 从别的地方用只读方式装 载源代码,然后您依然能够构建新的二进制文件。(由于内核源代码的限制,我们建议您不要直接把源代码装 载到 /usr/src 下,而是装载到其他的地方,然后使用合适的符号链接 把源代码复制到源代码树的顶层架构上。)
拥有在线的源代码并且知道怎么用源代码构建整个系统,会让您更容易地把系统升级到更高级的发行版。
如果需要选择源代码的子集, 在系统安装工具选择 Distributions (软件包) 时, 选择其中的 Custom (定制安装) 菜单项。
在过去, 联编新内核原本是安装 FreeBSD 时非常必要的一步, 不过得益于近来的一些版本采用的更为人性化的内核配置方式, 内核的配置工作可以通过更灵活的 “hints” 来完成, 这些可以在引导加载器的提示符处进行。
联编只包含您用到的驱动程序有时还是有价值的, 因为这可以节省一些 RAM, 但对多数系统而言这已经不再是必需的了。
为了节约一点内存而构建一个仅仅含有您需要的驱动的新内核还是值得的,但是对大部分操作系统而言, 这一点已经不再是必需的。
FreeBSD 上的默认采用的是基于 MD5 的密码格式。 这种格式通常被认为比采用 DES 算法的传统 UNIX 密码格式更安全。 如果您需要与仍在使用不太安全的密码格式的那些旧式操作系统共享口令文件的话, 仍然可以选择使用 DES 密码。 此外, FreeBSD 还允许使用更加安全的 Blowfish 密码格式。 新口令使用何种密码格式是由 /etc/login.conf 中所配置的 passwd_format 登录能力 (login capability) 决定的, 它可以设置为 des、 blf (如果可用) 或 md5 之一。 请参见联机手册 login.conf(5) 以了解关于登录能力的更多信息。
如果您安装了一块 IDE Zip® 或者 Jaz® 驱动器,把它卸载掉,然后重试一遍。引导软盘会被这 些驱动器搞糊涂。在系统安装之后,您可以把这些驱动器重新安装到机器上。希望这一问题可以在之后的发行版 中得到修正。
这一错误信息来自引导块和内核对磁盘设备理解之间的混淆。这一错误信息通常出现在双 IDE 系统 上,这样的系统中硬盘被设置为 IDE 控制器上的主盘或者唯一的设备,而此时 FreeBSD 安装在附属的 IDE 控制器上。引导块认为系统是安装在 ad0 (BIOS 识别出来的第二块硬盘) 上, 而内核则把第一块磁盘指派到附属控制器 ad2 上。 在设备检测之后, 内核试图装载引导块所认为的引导磁盘, ad0, 但是实际上那是 ad2,因此启动过程出现错误。
为了修正这一错误,您可以采用下面方法中一种:
重启系统,然后在 Booting kernel in 10 seconds; hit [Enter] to interrupt 提示符处按 Enter 键。这将进入 boot loader。
然后输入 set root_disk_unit="disk_number" 。 如果 FreeBSD 安装在第一块 IDE 控制器上的主盘上,disk_number 就是 0 ,如果 FreeBSD 安装在第一块 IDE 控制器的从盘上, disk_number 就是 1 ,如果FreeBSD安装在 第二块IDE控制器的主盘上,disk_number 就是 2, 如果 FreeBSD 安装在第二块 IDE 控制器的从盘上,disk_number 就是 3 。
然后输入 boot,这样您的系统应该能正确引导了。
如果想让这些改动成为永久有效的,(这样您就不需要在每次重启或者引导 FreeBSD 系统的时候做 这一工作了),把 root_disk_unit="disk_number" 这句话写入 /boot/loader.conf.local 文件中。
把 FreeBSD 磁盘移至主 IDE 控制器上,这样几块硬盘的编号就是连续的了。
内存的最高限制与所使用的平台有关。 对于标准的 i386 而言, 这个限制是 4 GB, 不过, 通过 pae(4) 可以支持更多的内存, 请参见 在 i386 上使用 4 GB 或更多内存。
FreeBSD/pc98 的内存上限是 4 GB, 并且不支持 PAE。 其它 FreeBSD 支持的硬件架构理论上支持非常多的内存 (数个 terabytes)。
对 FFS 文件系统而言, 其理论容量限制是 8 TB (2 G 个块), 或如果使用 8 KB 的块尺寸时, 其容量限制为 16 TB。 实际使用中, 软限制是 1 TB, 但经过修改可以使用 4 TB (并且是实际存在的)。
在 FFS 上的单个文件的最大尺寸是大约 1 G 个块, 换言之对 4 KB 块尺寸的文件系统来说, 这个尺寸限制是 4 TB。
表 3-1. 最大文件大小
| FS Block Size | Works | Should Work |
|---|---|---|
| 4 KB | > 4 GB | 4 TB - 1 |
| 8 KB | > 32 GB | 32 TB - 1 |
| 16 KB | > 128 GB | 32 TB - 1 |
| 32 KB | > 512 GB | 64 TB - 1 |
| 64 KB | > 2048 GB | 128 TB - 1 |
当 FS 的块尺寸是 4 KB 时, 系统能够使用三级间接块, 所有对象受限于三级间接块所能表达的最大 FS 块的数量 (大约是 10243 + 10242 + 1024), 然而在文件系统块数方面有一个 (错误的) 1 G - 1 限制。 FS 本身的块数限制是 2 G - 1。 当 FS 块数接近 2 G - 1 时会有一些错误, 但这样多的块在 FS 块尺寸为 4 KB 时是不可能达到的。
当文件系统块尺寸为 8 KB 或更大时, 文件系统中的对象尺寸限制应该是 2 G - 1 个块, 但实际上受制于 FS 块数限制 1 G - 1。 使用正确的 2 G - 1 块限制反而会导致错误发生。
因为您的 world 和内核(kernel)不同步, 这是不被支持的做法。 请确保您使用 make buildworld 和 make buildkernel 来升级内核。
您可以在系统引导到第二个阶段, 在引导加载器开始前的 | 符号出现时按下任意键, 另行指定用于引导系统的内核。
在 FreeBSD 的邮件列表中经常出现这样的讨论。 因为硬件的变化很快, 但无论如何这就是现实。 我们 仍然 强烈建议您完整地阅读 FreeBSD 的 《硬件兼容说明》 7.0 或 6.3 并搜索信件列表的 文章。 假如你正在寻找的硬件类型刚在前一周被讨论了, 那就算是碰上好机会了。
如果你正在寻找一款笔记本计算机, 就查看 FreeBSD 笔记本电脑邮件列表 信件列表的文章。 还有, 你可能需要 FreeBSD 一般问题邮件列表 的文章, 或者可能是一种特定硬件类型的信件列表的文章。
Yes. FreeBSD as an operating system generally supports as much physical memory (RAM) as the platform it is running on does. Keep in mind that different platforms have different limits for memory; for example i386 without PAE supports at most 4 GB of memory (and usually less than that because of PCI address space) and i386 with PAE supports at most 64 GB memory. AMD64 platforms currently deployed support up to 1 TB of physical memory.
The total address space on i386 machines is 32-bit, meaning that at most 4 GB of memory is addressable (can be accessed). Furthermore, some addresses in this range are reserved by hardware for different purposes, for example for using and controlling PCI devices, for accessing video memory, and so on. Therefore, the total amount of memory usable by the operating system for its kernel and applications is limited to significantly less than 4 GB. Usually, 3.2 GB to 3.7 GB is the maximum usable physical memory in this configuration.
To access more than 3.2 GB to 3.7 GB of installed memory (meaning up to 4 GB but also more than 4 GB), a special tweak called PAE must be used. PAE stands for Physical Address Extension and is a way for 32-bit x86 CPUs to address more than 4 GB of memory. It remaps the memory that would otherwise be overlayed by address reservations for hardware devices above the 4 GB range and uses it as additional physical memory (see pae(4)). Using PAE has some drawbacks; this mode of memory access is a little bit slower than the normal (without PAE) mode and loadable modules (see kld(4)) are not supported. This means all drivers must be compiled into the kernel.
The most common way to enable PAE is to build a new kernel with the special ready-provided kernel configuration file called PAE, which is already configured to build a safe kernel. Note that some entries in this kernel configuration file are too conservative and some drivers marked as unready to be used with PAE are actually usable. A rule of thumb is that if the driver is usable on 64-bit architectures (like AMD64), it is also usable with PAE. If you wish to create your own kernel configuration file, you can enable PAE by adding the following line to your configuration:
options PAE
PAE is not much used nowadays because most new x86 hardware also supports running in 64-bit mode, known as AMD64 or Intel 64. It has a much larger address space and does not need such tweaks. FreeBSD supports AMD64 and it is recommended that this version of FreeBSD be used instead of the i386 version if 4 GB or more memory is required.
支持。 目前 FreeBSD 可以在 Intel x86 和 AMD64 架构上运行。 除此之外, 它还支持 Intel EM64T、 IA-64、 ARM、 PowerPC、 sun4v 和 Sparc64® 架构。 对于 MIPS® 和 S/390® 的支持目前正在开发中; 如欲了解关于 MIPS 平台的进一步信息, 请订阅 FreeBSD MIPS 移植邮件列表。 对于新系统结构的一般讨论, 可加入 FreeBSD 非 Intel 平台移植邮件列表。
如果你的机器有一种与上述不同的系统结构, 并且现在你需要良好的工作状态,我们建议你看看 NetBSD 或 OpenBSD。
FreeBSD 支持常见的对称多处理器 (SMP) 系统, 不过有时 BIOS 或主板的设计问题会导致问题。 阅读 FreeBSD 对称多处理 (SMP) 邮件列表 可以找到一些线索。
FreeBSD 能够利用 Intel CPU 提供的超线程 (HTT) 技术支持。 启用了 options SMP 功能的内核能够自动检测额外的逻辑处理器。 默认的 FreeBSD
调度器会将这些逻辑处理器视同为额外的物理处理器; 换言之,
它不会尝试基于逻辑处理器在同一颗物理 CPU 上这个事实来对调度决策进行优化。
由于这种调度方式会导致性能下降, 有时通过禁用逻辑处理器能够获得更好的性能, 方法是调整
machdep.hlt_logical_cpus sysctl 变量。 此外, 您也可以通过
machdep.hlt_cpus sysctl 变量来将任意 CPU
置入空闲循环状态来停止运行。 联机手册 smp(4)
中对这些配置进行了详细介绍。
FreeBSD 支持 EIDE、 SATA、 SCSI 和 SAS 驱动器 (配合兼容的控制器; 参见下一节),以及所有使用原始的 “Western Digital (美国西部数据公司)”接口 (MFM, RLL, ESDI, 当然还有 IDE)。几种使用特有接口的 ESDI 控制器可能无法工作: WD1002/3/6/7 接口及雷同品。
FreeBSD 支持 SCSI 和 QIC-36 (带有一个 QIC-02 接口) 的。 这其中包括 8-mm (aka Exabyte) 和 DAT 驱动器。
一些早期的 8-mm 驱动器与 SCSI-2 不太兼容,可能不能与 FreeBSD 很好的工作。
连接到已被支持的控制器的任何 SCSI 驱动器都是被支持的。
下列特有的 CDROM 接口也被支持:
Mitsumi LU002 (8 位), LU005 (16 位) 和 FX001D (16 位 2 倍速)。
Sony CDU 31/33A
Sound Blaster 非 SCSI CDROM
Matsushita/Panasonic CDROM
与 ATAPI 兼容的 IDE CDROM
已知所有 非 SCSI 卡比起 SCSI 驱动器要慢的多, 并且一些 ATAPI CDROM 可能无法工作。
正式发布的 FreeBSD CDROM ISO 映象,来自 Daemon News 和 FreeBSD Mall 的 CDROM,支持直接从 CD 引导。
FreeBSD 支持任何与 ATAPI 兼容的 IDE CD-R 或 CD-RW 驱动器。详见 burncd(8)。
FreeBSD 也支持任何 SCSI CD-R 或 CD-RW 驱动器。 从 port 或 package 系统中安装并使用命令 cdrecord, 并且确认你已将设备 pass 编译进你的内核中。
FreeBSD 支持外置 SCSI 和 ATAPI (IDE) Zip 驱动器。 SCSI ZIP 驱动器被设置运行在 SCSI 目的标识 (target ID) 5 或 6,但是如果你的 SCSI 主机适配器的 BIOS 支持,你甚至可以从这些驱动器引导。 还不清楚哪些主机适配器支持从 0 或 1 以外的目的 (target) 引导, 所以如果你要使用这个特性,你应当查看你的适配器的文档。
FreeBSD 也支持并行端口 Zip 驱动器。 检查你的内核是否包含 scbus0, da0, ppbus0 和 vp0 驱动程序 (通用 (GENERIC) 内核包含除 vp0之外的所有组件)。 如果这些驱动程序都有,并行端口驱动器应当可以以 /dev/da0s4访问。磁盘可使用 mount /dev/da0s4 /mnt 或 (对于 dos 磁盘) mount_msdos /dev/da0s4 /mnt 挂接。
也请查看本章后面的 移动式驱动器常见问题,以及在《管理》一章的关于 “格式化”的提示。
支持。这些中的大多数是 SCSI 驱动器, 所以对于 FreeBSD 他们表征为 SCSI 驱动器。IDE EZ 表征为一个 IDE 驱动器。
确保在引导系统时这些外部部件都已接通电源。
若要在机器运行时更换存储介质, 查看 mount(8), umount(8) 和 camcontrol(8) (对于 SCSI 驱动器) 或 atacontrol(8) (对于 IDE 驱动器),以及本书后面的 关于使用移动式驱动器的讨论 。
FreeBSD 直接支持 USB 键盘。 如果您启用了 USB 键盘支持, 并且系统中同时接入了 AT 和 USB 键盘, 则 AT 键盘会成为 /dev/kbd0, 而 USB 键盘则会成为 /dev/kbd1。 如果只有 USB 键盘, 则它会成为 /dev/ukbd0。
如果您希望在控制台使用 USB 键盘, 您需要明确地告诉控制台驱动使用现有的 USB 键盘。 这可以通过在系统启动时执行下面的命令来完成。
# kbdcontrol -k /dev/kbd1 < /dev/console > /dev/null
注意,如果 USB 键盘是唯一的键盘, 可以以 /dev/ukbd0 访问,所以, 命令应该是:
# kbdcontrol -k /dev/ukbd0 < /dev/console > /dev/null
注意: 如果希望系统记住这一变动, 可以在 /etc/rc.conf 中加入 keyboard="/dev/ukbd0"。
一旦这已做完,USB 键盘不需要专门设置就应可以工作于 X 环境中。
如果希望换回使用默认的键盘, 使用下面的命令:
# kbdcontrol -k /dev/kbd0 > /dev/null
配合 kbdmux(4) 驱动和下列命令, 可以同时使用 USB 键盘和 AT 键盘:
# kbdcontrol -K < /dev/console > /dev/null kbdcontrol -a atkbd0 < /dev/kbdmux0 > /dev/null kbdcontrol -a ukbd1 < /dev/kbdmux0 > /dev/null kbdcontrol -k /dev/kbdmux0 < /dev/console > /dev/null
请参见联机手册 ukbd(4)、 kbdcontrol(1) 以及 kbdmux(4) 以了解进一步的信息。
注意: USB 键盘的热插拔有时工作会不正常。 我们建议您在系统启动时就将其插上, 并在系统关机之后再拔下, 以避免触发问题。
FreeBSD 支持一些生产商的,如 Microsoft®、Logitech、ATI 的, 总线鼠标和 InPort 总线鼠标。 GENERIC 内核不包含这些设备驱动程序。 如需建造一个带有这些驱动程序的自定制的内核, 须将如下一个加入到内核配置文件中:
device mse0 at isa? port 0x23c irq5
总线鼠标通常配有专门的接口卡。 这些接口卡使你可以设置不同于上面的端口地址和中断请求线号。 参考你的鼠标的手册和联机手册 mse(4) 以获得更多信息。
PS/2 鼠标是以外置设备的形式被支持的。 必要的驱动程序 psm 已被包含在内核中。
如果你的自定制的内核没有这个驱动程序, 添加下面一行到你的内核配置文件中并编译一个新内核。
device psm0 at atkbdc? irq 12
一旦内核在引导时正确地检测到了 psm0, 就会自动创建 psm0 的设备节点。
如果你正在使用默认的控制台驱动程序 syscons(4),你可以在文本控制台上使用鼠标光标 剪切和粘贴文本。请运行鼠标守护程序 moused(8),并在虚拟控制台上启用鼠标光标:
# moused -p /dev/xxxx -t yyyy # vidcontrol -m on
这里 xxxx 是鼠标设备名, yyyy 是鼠标协议类型。 鼠标守护程序可以自动侦测大多数鼠标的协议类型, 除了一些旧的串行鼠标。 指定 auto(自动) 协议则实行自动侦测。 如果自动侦测不奏效,则参看联机手册 moused(8) 里的已支持协议类型的清单。
如果你有一个 PS/2 鼠,只需添加 moused_enable="YES" 到 /etc/rc.conf, 即可在引导时启动鼠标守护程序。还有, 如果你要在所有虚拟终端上而不只是控制台上使用鼠标守护程序, 添加 allscreens_flags="-m on" 到 /etc/rc.conf。
在鼠标守护程序运行的时候, 对鼠标的访问必须在鼠标守护程序和其它程序如 X Windows 之间进行。参考本问答集的 为什么我的鼠标不能与 X 协同工作? 以获得此问题的更多详细信息。
很不幸,答案是“看情况”。 多数情形中这些有附加功能的鼠标需要特别设计的驱动程序。 如果鼠标设备驱动程序或用户程序对于该鼠标无专门支持, 这只鼠标就只能像标准的 2 键和 3 键鼠标那样使用。
对于滚轮在 X Window 环境中可能的用途, 请参考 这一节。
请参考 前一个问题的答案。
For the Bourne Shell, add the following lines to your .shrc. See sh(1) and editrc(5).
bind ^? ed-delete-next-char # for console bind ^[[3~ ed-delete-next-char # for xterm
For the C Shell, add the following lines to your .cshrc. See csh(1).
bindkey ^? delete-char # for console bindkey ^[[3~ delete-char # for xterm
For more information, see this page.
通过附加软件, FreeBSD 能够支持多种软件调制解调器。 例如, comms/ltmdm port 提供了对流行的基于 Lucent LT 芯片组的软件调制解调器的支持。
你不能通过一个软件调制解调器安装 FreeBSD; 这些软件必须在操作系统安装后安装。
没有,而且好像也不会有了。
Broadcom 拒绝公开他们的无线芯片组的编程信息, 很可能因为他们使用软件控制无线电。 为了得到对他们部件的像美国联邦通信委员会 (FCC) 那样的许可,他们必须确保用户不能任何的设置工作参数, 诸如操作频率、 调制参数和输出功率。 可是不知道如何对该芯片组编程,几乎不可能写一个驱动程序。
请参见 《使用手册》 中的这一节。
FreeBSD 支持各种声卡 (详见 FreeBSD 发行信息 和联机手册 snd(4))。 对于 MPU-401 和兼容的 MIDI 卡也有有限的支持。 符合 Microsoft 声音系统规范的卡也被支持。
注意: 这仅仅对于声卡!这个驱动程序不支持 CDROM,SCSI 或在这些卡上的游戏操纵杆,除了 SoundBlaster®。SoundBlaster SCSI 接口和一些 非 SCSI CDROM 也被支持,但是你不能从这些设备引导。
FreeBSD supports APM on certain machines. Further information can be found in apm(4).
FreeBSD also supports the ACPI features found in most modern hardware. Further information can be found in acpi(4). If a system supports both APM and ACPI, either can be used. We suggest you try both and choose the one that best fits your needs.
Add following line
hint.acpi.0.disabled="1"into your /boot/device.hints file.
Certain Micron motherboards have a non-conforming PCI BIOS implementation that causes grief when FreeBSD boots because PCI devices do not get configured at their reported addresses.
Disable the “Plug and Play Operating System” flag in the BIOS to work around this problem.
Go into the BIOS setup and disable the “boot virus protection”.
See the previous answer.
最有可能的原因是, 内存的物理地址与虚拟地址存在差异。
对于多数 PC 硬件而言, 它们会将位于 3.5 GB 与 4 GB 之间的内存地址空间用于一些特殊的目的 (通常会用于 PCI)。 由于这部分地址空间被 PCI 硬件设备占用, 因而也就无法用于访问实际的物理内存。
这一区域的内存究竟会作何处理取决于您使用的硬件。 不幸的是, 一些硬件什么都不做, 因而最后这 500 MB 的 RAM 也就完全丢失了。
幸运的是, 多数硬件会将这些内存重新映射到更高的位置, 因而它们仍能正常使用。 不过, 如果您观察引导时的提示信息的话, 仍然可能会产生一些误解。
在 32 位版本本的 FreeBSD, 这些内存看起来会丢失, 因为它们会被重新映射到高于 4 GB 的位置, 而这些位置 32 位 的内核是无法访问的。 这种情况下, 您可以考虑联编启用了 PAE 的内核。 请参阅 关于内存限制的问题 以及 不同平台上不同的内存数量限制 以了解进一步的信息。
在 64-位 版本的 FreeBSD, 或启用了 PAE 的内核上, FreeBSD 就能够正确检测并重新映射内存。 不过由于这个重新映射的过程, 在系统引导时, FreeBSD 会显示多于系统实际内存容量的内存, 实际的内存数量会在引导过程结束时修正为正确的值。
With SCSI drives, the drive should be capable of re-mapping these automatically. However, many drives ship with this feature disabled.
To enable bad block remapping edit the first device page mode, which can be done by giving the command (as root)
# camcontrol modepage sd0 -m 1 -e -P 3
and changing the values of AWRE and ARRE from 0 to 1:
AWRE (Auto Write Reallocation Enbld): 1 ARRE (Auto Read Reallocation Enbld): 1
Modern IDE drives also have bad block remapping features in the controller, and they ship with this feature turned on.
If you see warnings about bad blocks (on either type of drive), it is time to consider replacing the drive. You might be able to use the drive manufacturer's diagnostic program to lock out those bad blocks, but at best this will buy you some time.
This is basically a known problem. The EISA on-board SCSI controller in the HP Netserver machines occupies EISA slot number 11, so all the “true” EISA slots are in front of it. Alas, the address space for EISA slots >= 10 collides with the address space assigned to PCI, and FreeBSD's auto-configuration currently cannot handle this situation very well.
So now, the best you can do is to pretend there is no address range clash :), by bumping the kernel option EISA_SLOTS to a value of 12. Configure and compile a kernel, as described in the Handbook entry on configuring the kernel.
Of course, this does present you with a chicken-and-egg problem when installing on such a machine. In order to work around this problem, a special hack is available inside UserConfig. Do not use the “visual” interface, but the plain command-line interface there. Simply type
eisa 12 quit
at the prompt, and install your system as usual. While it is recommended you compile and install a custom kernel anyway.
Hopefully, future versions will have a proper fix for this problem.
注意: You cannot use a dangerously dedicated disk with an HP Netserver. See this note for more info.
This is usually caused by an interrupt conflict (e.g., two boards using the
same IRQ). Boot with the -c option and change the ed0/de0/... entry to match your
board.
If you are using the BNC connector on your network card, you may also see device timeouts because of bad termination. To check this, attach a terminator directly to the NIC (with no cable) and see if the error messages go away.
Some NE2000 compatible cards will give this error if there is no link on the UTP port or if the cable is disconnected.
This card has a bad habit of losing its configuration information. Refresh your card's settings with the DOS utility 3c5x9.exe.
If the only problem is that the printer is terribly slow, try changing your printer port mode as discussed in the Printer Setup section of the Handbook.
Signal 11 errors are caused when your process has attempted to access memory which the operating system has not granted it access to. If something like this is happening at seemingly random intervals then you need to start investigating things very carefully.
These problems can usually be attributed to either:
If the problem is occurring only in a specific application that you are developing yourself it is probably a bug in your code.
If it is a problem with part of the base FreeBSD system, it may also be buggy code, but more often than not these problems are found and fixed long before us general FAQ readers get to use these bits of code (that is what -current is for).
In particular, a dead giveaway that this is not a FreeBSD bug is if you see the problem when you are compiling a program, but the activity that the compiler is carrying out changes each time.
For example, suppose you are running make buildworld, and the compile fails while trying to compile ls.c into ls.o. If you then run make buildworld again, and the compile fails in the same place then this is a broken build ── try updating your sources and try again. If the compile fails elsewhere then this is almost certainly hardware.
What you should do:
In the first case you can use a debugger e.g. gdb(1) to find the point in the program which is attempting to access a bogus address and then fix it.
In the second case you need to verify that it is not your hardware at fault.
Common causes of this include:
Your hard disks might be overheating: Check the fans in your case are still working, as your disk (and perhaps other hardware might be overheating).
The processor running is overheating: This might be because the processor has been overclocked, or the fan on the processor might have died. In either case you need to ensure that you have hardware running at what it is specified to run at, at least while trying to solve this problem. i.e. Clock it back to the default settings.
If you are overclocking then note that it is far cheaper to have a slow system than a fried system that needs replacing! Also the wider community is not often sympathetic to problems on overclocked systems, whether you believe it is safe or not.
Dodgy memory: If you have multiple memory SIMMS/DIMMS installed then pull them all out and try running the machine with each SIMM or DIMM individually and narrow the problem down to either the problematic DIMM/SIMM or perhaps even a combination.
Over-optimistic Motherboard settings: In your BIOS settings, and some motherboard jumpers you have options to set various timings, mostly the defaults will be sufficient, but sometimes, setting the wait states on RAM too low, or setting the “RAM Speed: Turbo” option, or similar in the BIOS will cause strange behavior. A possible idea is to set to BIOS defaults, but it might be worth noting down your settings first!
Unclean or insufficient power to the motherboard. If you have any unused I/O boards, hard disks, or CDROMs in your system, try temporarily removing them or disconnecting the power cable from them, to see if your power supply can manage a smaller load. Or try another power supply, preferably one with a little more power (for instance, if your current power supply is rated at 250 Watts try one rated at 300 Watts).
You should also read the SIG11 FAQ (listed below) which has excellent explanations of all these problems, albeit from a Linux® viewpoint. It also discusses how memory testing software or hardware can still pass faulty memory.
Finally, if none of this has helped it is possible that you have just found a bug in FreeBSD, and you should follow the instructions to send a problem report.
There is an extensive FAQ on this at the SIG11 problem FAQ
5.8. My system crashes with either “Fatal trap 12: page fault in kernel mode”, or “panic:”, and spits out a bunch of information. What should I do?
The FreeBSD developers are very interested in these errors, but need some more information than just the error you see. Copy your full crash message. Then consult the FAQ section on kernel panics, build a debugging kernel, and get a backtrace. This might sound difficult, but you do not need any programming skills; you just have to follow the instructions.
This is a known problem with the ATI Mach64 video card. The problem is that this card uses address 2e8, and the fourth serial port does too. Due to a bug (feature?) in the sio(4) driver it will touch this port even if you do not have the fourth serial port, and even if you disable sio3 (the fourth port) which normally uses this address.
Until the bug has been fixed, you can use this workaround:
Enter -c at the boot prompt. (This will put the kernel
into configuration mode).
Disable sio0, sio1, sio2 and sio3 (all of them). This way the sio(4) driver does not get activated ── no problems.
Type exit to continue booting.
If you want to be able to use your serial ports, you will have to build a new kernel with the following modification: in /usr/src/sys/dev/sio/sio.c (or in /usr/src/sys/pc98/cbus/sio.c for pc98) find the one occurrence of the string 0x2e8 and remove that string and the preceding comma (keep the trailing comma). Now follow the normal procedure of building a new kernel.
Due to the manner in which FreeBSD gets the memory size from the BIOS, it can only detect 16 bits worth of Kbytes in size (65535 Kbytes = 64 MB) (or less... some BIOSes peg the memory size to 16 MB). If you have more than 64 MB, FreeBSD will attempt to detect it; however, the attempt may fail.
To work around this problem, you need to use the kernel option specified below. There is a way to get complete memory