Fedora 11

安​装​指​南​

在​x86,AMD64及​Intel® 64 架​构​上​安​装​Fedora 11

版 1.0

Fedora 文​档​项​目​


法律通告

Copyright © 2009 Red Hat, Inc. and others. This material may only be distributed subject to the terms and conditions set forth in the Open Publication License, V1.0, (the latest version is presently available at http://www.opencontent.org/openpub/).
Fedora and the Fedora Infinity Design logo are trademarks or registered trademarks of Red Hat, Inc., in the U.S. and other countries.
Red Hat and the Red Hat "Shadow Man" logo are registered trademarks of Red Hat Inc. in the United States and other countries.
All other trademarks and copyrights referred to are the property of their respective owners.
Documentation, as with software itself, may be subject to export control. Read about Fedora Project export controls at http://fedoraproject.org/wiki/Legal/Export.
摘要
提​供​安​装​过​程​文​档​

Preface
1. 文​档​约​定​
1.1. 排​版​约​定​
1.2. 抬​升​式​引​用​约​定​
1.3. 备​注​及​警​告​
2. 我​们​需​要​您​的​反​馈​!
简​介​
1. 背​景​
1.1. 关​于 Fedora
1.2. 取​得​更​多​的​帮​助​
2. 关​于​这​份​文​档​
2.1. 目​标​
2.2. 读​者​
1. 进​阶​者​指​南​
1.1. 概​观​
1.2. 下​载​文​件​
1.3. 安​装​前​准​备​
1.4. 安​装 Fedora
1.5. 安​装​后​设​置​
2. 初​学​者​
2.1. 如​何​下​载 Fedora?
2.1.1. 从​映​像​点​站​
2.1.2. 从 BitTorrent
2.2. 我​的​电​脑​属​于​哪​一​种​架​构​?
2.3. 我​需​要​下​载​哪​个​文​件​?
2.4. 如​何​制​作 Fedora 媒​体​
2.4.1. 制​作 CD 和 DVD 光​盘​
2.4.2. 制​作 USB 介​质​
2.5. 为​什​么​我​不​能​下​载 Fedora?
2.6. 我​如​何​才​能​启​动​安​装​程​序​?
I. Before you begin
3. 安​装​前​的​准​备​工​作​
3.1. 选​择​升​级​还​是​安​装​?
3.2. 您​的​硬​件​兼​容​吗​?
3.3. 你​有​足​够​的​磁​盘​空​间​吗​?
3.4. 您​可​以​使​用​光​盘​安​装​吗​?
3.4.1. 其​它​引​导​方​法​
3.4.2. 制​作​安​装​引​导​光​盘​
3.5. 筹​备​网​络​安​装​
3.5.1. 筹​备 FTP 和 HTTP 安​装​
3.5.2. 筹​备 NFS 安​装​
3.6. 筹​备​硬​盘​驱​动​器​安​装​
4. System Specifications List
5. 用​于 Intel 或 AMD 系​统​的​驱​动​介​质​
5.1. 为​什​么​需​要​驱​动​程​序​盘​
5.2. 驱​动​程​序​介​质​到​底​是​什​么​?
5.3. 如​何​获​取​驱​动​程​序​介​质​
5.3.1. 根​据​映​像​文​件​创​建​驱​动​程​序​盘​
5.4. 在​安​装​过​程​中​使​用​驱​动​程​序​映​像​
II. The installation process
6. 开​始​安​装​
6.1. 启​动​选​单​
6.2. 从​另​一​个​不​同​的​源​安​装​
6.3. 正​在​检​查​介​质​
6.3.1. 正​在​检​查 Live CD
6.3.2. 正​在​检​查 DVD
6.4. 使​用 PXE 从​网​络​启​动​
6.5. 图​形​和​文​本​界​面​
7. Installing on Intel and AMD Systems
7.1. The Graphical Installation Program User Interface
7.1.1. A Note about Virtual Consoles
7.2. 文​本​模​式​安​装​程​序​用​户​界​面​
7.2.1. 使​用​键​盘​来​导​航​
7.3. Starting the Installation Program
7.3.1. Booting the Installation Program on x86, AMD64, and Intel 64 Systems
7.3.2. Additional Boot Options
7.4. 选​择​安​装​方​法​
7.5. 从​光​盘​中​安​装​
7.5.1. 如​果​没​有​发​现 IDE 光​盘​怎​么​办​?
7.6. 从​硬​盘​安​装​
7.7. 执​行​网​络​安​装​
7.8. 通​过 NFS 安​装​
7.9. Installing via FTP or HTTP
7.10. 欢​迎​使​用​
7.11. Language Selection
7.12. Keyboard Configuration
7.13. Initializing the Hard Disk
7.14. 升​级​已​有​的​系​统​
7.14.1. 升​级​检​测​
7.14.2. 使​用​安​装​程​序​升​级​
7.14.3. 更​新​引​导​加​载​程​序​
7.15. Network Configuration
7.15.1. Manual configuration
7.16. 时​区​配​置​
7.17. 设​置​根​密​码​
7.18. Disk Partitioning Setup
7.18.1. RAID and Other Disk Devices
7.19. Advanced Storage Options
7.20. Create Default Layout
7.21. 为​您​的​系​统​分​区​
7.21.1. 硬​盘​的​图​形​化​表​示​
7.21.2. The partitioning screen
7.21.3. 分​区​字​段​
7.21.4. 推​荐​的​分​区​方​案​
7.21.5. 添​加​分​区​
7.21.6. 编​辑​分​区​
7.21.7. 删​除​分​区​
7.22. x86、​AMD64 和 Intel 64 系​统​的​引​导​装​载​程​序​(Boot Loader)的​配​置​
7.22.1. 高​级​引​导​装​载​程​序​配​置​
7.22.2. Rescue Mode
7.22.3. 其​它​可​选​的​引​导​装​载​程​序​
7.23. Package Group Selection
7.23.1. Installing from Additional Repositories
7.23.2. Customizing the Software Selection
7.24. 准​备​安​装​
7.24.1. 准​备​安​装
7.25. Installing Packages
7.26. 安​装​完​成​
8. 在 Intel 或 AMD 系​统​上​进​行​安​装​的​故​障​解​除​
8.1. You are unable to boot Fedora
8.1.1. 无​法​使​用 RAID 卡​来​引​导​
8.1.2. 系​统​显​示​了​信​号 11 错​误​
8.2. 安​装​起​始​部​分​的​问​题​
8.2.1. Problems with Booting into the Graphical Installation
8.3. 安​装​过​程​中​的​问​题​
8.3.1. No devices found to install Fedora Error Message
8.3.2. Saving traceback messages without removeable media
8.3.3. Trouble with Partition Tables
8.3.4. 使​用​剩​余​空​间​
8.3.5. 其​它​分​区​问​题​
8.3.6. 看​到 Python 错​误​
8.4. 安​装​后​的​问​题​
8.4.1. 在 x86 系​统​的 GRUB 图​形​化​屏​幕​中​遇​到​问​题​
8.4.2. 引​导​入​图​形​环​境​
8.4.3. 引​导​入 X 窗​口​系​统​(GUI)的​问​题​
8.4.4. X 服​务​器​崩​溃​和​非​根​用​户​的​问​题​
8.4.5. 登​录​时​的​问​题​
8.4.6. 你​的​内​存​不​能​够​被​识​别​吗​?
8.4.7. 您​的​打​印​机​无​法​工​作​
8.4.8. 配​置​声​卡​遇​到​问​题​
8.4.9. 基​于 Apache httpd 的​服​务​/Sendmail 在​启​动​时​挂​起​
III. Advanced installation options
9. 启​动​选​项​
9.1. 在​启​动​菜​单​下​配​置​安​装​系​统​
9.1.1. 指​定​语​言​
9.1.2. 配​置​界​面​
9.1.3. 更​新​anaconda
9.1.4. 指​定​安​装​方​法​
9.1.5. 手​动​配​置​网​络​设​置​
9.2. 允​许​远​程​访​问​安​装​系​统​
9.2.1. 允​许​用 VNC 远​程​访​问​
9.2.2. 连​接​安​装​系​统​到​一​个 VNC 监​听​程​序​
9.2.3. 允​许​用 Telnet 远​程​访​问​
9.3. 在​安​装​期​间​记​录​日​志​到​远​程​主​机​
9.3.1. 配​置​服​务​器​日​志​
9.4. 使​用 Kickstart 实​现​自​动​安​装​
9.5. 增​强​的​硬​件​支​持​
9.5.1. 用​驱​动​磁​盘​支​持​增​加​的​硬​件​
9.5.2. 越​过​自​动​硬​件​检​测​
9.6. 用​维​修​引​导​模​式​
9.6.1. 加​载​内​存 (RAM) 检​测​模​式​
9.6.2. 验​证​启​动​介​质​
9.6.3. 以​修​复​模​式​引​导​您​的​计​算​机​
9.6.4. 升​级​您​的​计​算​机​
10. 无​介​质​的​安​装​
10.1. 搜​索​引​导​文​件​
10.2. 编​辑 GRUB 配​置​
10.3. 引​导​安​装​
11. 配​置​一​个​安​装​服​务​器​
11.1. 配​置​cobbler
11.2. 设​置​发​布​目​录​
11.3. 映​射​网​络​位​置​
11.4. 导​入​发​行​版​
11.5. Manually configure a PXE server
11.5.1. Setting up the Network Server
11.5.2. PXE Boot Configuration
11.5.3. Adding PXE Hosts
11.5.4. TFTPD
11.5.5. 配​置 DHCP 服​务​器​
11.5.6. Adding a Custom Boot Message
11.5.7. Performing the PXE Installation
12. Installing Through VNC
12.1. VNC Viewer
12.2. VNC Modes in Anaconda
12.2.1. Direct Mode
12.2.2. Connect Mode
12.3. Installation Using VNC
12.3.1. Installation Example
12.3.2. Kickstart Considerations
12.3.3. 关​于​防​火​墙​
12.4. References
13. kickstart 安​装​
13.1. kickstart 安​装​是​什​么​?
13.2. 如​何​执​行 kickstart 安​装​
13.3. 创​建 kickstart 文​件​
13.4. kickstart 选​项​
13.4.1. 高​级​的​分​区​示​例​
13.5. Package Selection
13.6. 预​安​装​脚​本​
13.6.1. 范​例​
13.7. 安​装​后​脚​本​
13.7.1. 范​例​
13.8. 如​何​使 kickstart 文​件​可​被​利​用​
13.8.1. 创​建 kickstart 引​导​介​质​
13.8.2. 在​网​络​上​提​供 Kickstart 文​件​
13.9. 提​供​安​装​树​
13.10. 开​始 kickstart 安​装​
14. Kickstart Configurator
14.1. 基​本​配​置​
14.2. 安​装​方​法​
14.3. 引​导​装​载​程​序​选​项​
14.4. 分​区​信​息​
14.4.1. 创​建​分​区​
14.5. Network Configuration
14.6. 验​证​
14.7. 防​火​墙​配​置​
14.7.1. SELinux 配​置​
14.8. 显​示​配​置​
14.9. Package Selection
14.10. 预​安​装​脚​本​
14.11. 安​装​后​脚​本​
14.11.1. chroot 环​境​
14.11.2. 使​用​解​释​器​
14.12. 保​存​文​件​
IV. After installation
15. Firstboot
15.1. 许​可​协​议​
15.2. 系​统​用​户​
15.3. 日​期​和​时​间​
15.4. 硬​件​侧​写​
16. 下​一​步​做​什​么​
16.1. 更​新​您​的​系​统​
16.2. 完​成​升​级​
16.3. 切​换​到​图​形​登​录​
16.4. 订​阅 Fedora 通​告​和​新​闻​
16.5. 查​找​文​档​和​支​持​
16.6. 加​入 Fedora 社​区​
17. 基​本​系​统​恢​复​
17.1. 常​见​问​题​
17.1.1. Unable to Boot into Fedora
17.1.2. 硬​件​或​软​件​问​题​
17.1.3. Root Password
17.2. 引​导​救​援​模​式​
17.2.1. 重​新​安​装​引​导​装​载​程​序​
17.3. 引​导​单​用​户​模​式​
17.4. 引​导​紧​急​模​式​
18. 升​级​你​当​前​的​系​统​
18.1. 选​择​升​级​还​是​重​新​安​装​
18.2. 给​你​的​系​统​升​级​
19. Removing Fedora
19.1. Fedora is the only operating system on the computer
19.2. Your computer dual-boots Fedora and another operating system
19.2.1. Your computer dual-boots Fedora and a Microsoft Windows operating system
19.2.2. Your computer dual-boots Fedora and Mac OS X
19.2.3. Your computer dual-boots Fedora and a different Linux distribution
19.3. Replacing Fedora with MS-DOS or legacy versions of Microsoft Windows
V. Technical appendixes
A. 磁​盘​分​区​简​介​
A.1. 硬​盘​基​本​概​念​
A.1.1. 不​是​你​写​入​什​么​,而​是​你​怎​么​写​入​
A.1.2. 分​区​:将​一​个​驱​动​器​变​成​多​个​驱​动​器​
A.1.3. 分​区​内​的​分​区 — 扩​展​分​区​概​述​
A.1.4. Making Room For Fedora
A.1.5. 分​区​命​名​方​案​
A.1.6. 磁​盘​分​区​以​及​其​它​操​作​系​统​
A.1.7. 磁​盘​分​区​和​挂​载​点​
A.1.8. 多​少​个​分​区​?
B. ISCSI disks
B.1. iSCSI disks in anaconda
B.2. iSCSI disks during start up
C. 磁​盘​加​密​向​导​
C.1. 什​么​是​块​设​备​加​密​?
C.2. 使​用​dm-crypt/LUKS加​密​块​设​备
C.2.1. LUKS概​要
C.2.2. 安​装​完​成​后​我​如​何​访​问​加​密​的​设​备​?(系​统​启​动​)
C.2.3. 选​择​一​个​安​全​性​好​的​密​码
C.3. 在​Anaconda中​创​建​加​密​块​设​备
C.3.1. 可​以​加​密​什​么​类​型​的​块​设​备​?
C.3.2. Anaconda块​设​备​加​密​支​持​的​限​制
C.4. 安​装​完​成​后​在​系​统​上​创​建​加​密​的​块​设​备​。
C.4.1. 创​建​块​设​备
C.4.2. 可​选​项​:使​用​随​机​数​据​填​充​设​备​
C.4.3. 将​设​备​格​式​化​为​dm-crypt/LUKS加​密​设​备
C.4.4. 创​建​一​个​映​射​来​允​许​访​问​设​备​中​未​加​密​的​内​容
C.4.5. Create filesystems on the mapped device, or continue to build complex storage structures using the mapped device
C.4.6. Add the mapping information to /etc/crypttab
C.4.7. Add an entry to /etc/fstab
C.5. Common Post-Installation Tasks
C.5.1. Set a randomly generated key as an additional way to access an encrypted block device
C.5.2. Add a new passphrase to an existing device
C.5.3. Remove a passphrase or key from a device
D. Understanding LVM
E. GRUB 引​导​装​载​程​序​
E.1. GRUB
E.1.1. GRUB 和 x86 引​导​过​程​
E.1.2. GRUB 的​特​征​
E.2. Installing GRUB
E.3. GRUB 术​语​
E.3.1. 设​备​名​
E.3.2. 文​件​名​和​块​列​表​(Blocklist)
E.3.3. 根​文​件​系​统​和 GRUB
E.4. GRUB 界​面​
E.4.1. 界​面​装​载​顺​序​
E.5. GRUB 命​令​
E.6. GRUB 菜​单​配​置​文​件​
E.6.1. 配​置​文​件​结​构​
E.6.2. 配​置​文​件​指​令​
E.7. 在​引​导​时​改​变​运​行​级​别​
E.8. 其​它​资​料​
E.8.1. 安​装​了​的​文​档​
E.8.2. 有​用​的​网​站​
E.8.3. 相​关​书​籍​
F. 引​导​过​程​、​初​始​化​和​关​闭​
F.1. 引​导​过​程​
F.2. 对​引​导​过​程​的​详​细​介​绍​
F.2.1. BIOS
F.2.2. 引​导​装​载​程​序​
F.2.3. 内​核​
F.2.4. /sbin/init 程​序​
F.3. 在​引​导​时​运​行​其​他​的​程​序​
F.4. SysV Init 运​行​级​别​
F.4.1. 运​行​级​别​
F.4.2. 运​行​级​别​工​具​
F.5. 关​机​
G. 其​他​技​术​文​档​
H. Contributors and production methods
H.1. 贡​献​者​
H.2. Production methods
I. Revision History
索引

Preface

1. 文​档​约​定​

本​手​册​使​用​几​个​约​定​来​突​出​某​些​用​词​和​短​语​以​及​信​息​的​某​些​片​段​。​
在 PDF 版​本​以​及​纸​版​中​,本​手​册​使​用​在 Liberation 字​体​套​件​中​选​出​的​字​体​。​如​果​您​在​您​的​系​统​中​安​装​了 Liberation 字​体​套​件​,它​还​可​用​于 HTML 版​本​。​如​果​没​有​安​装​,则​会​显​示​可​替​换​的​类​似​字​体​。​请​注​意​:红​帽​企​业 Linux 5 以​及​其​后​的​版​本​默​认​包​含 Liberation 字​体​套​件​。​

1.1. 排​版​约​定​

我​们​使​用​四​种​排​版​约​定​突​出​特​定​用​词​和​短​语​。​这​些​约​定​及​其​使​用​环​境​如​下​。​
固​定​粗​体​
用​来​突​出​系​统​输​入​,其​中​包​括 shell 命​令​、​文​件​名​以​及​路​径​。​还​可​用​来​突​出​按​键​以​及​组​合​键​。​例​如​:
要​看​到​文​件​您​当​前​工​作​目​录​中​文​件 my_next_bestselling_novel 的​内​容​,请​在 shell 提​示​符​后​输​入 cat my_next_bestselling_novel 命​令​并​按 Enter 键​执​行​该​命​令​。​
以​上​内​容​包​括​一​个​文​件​名​,一​个 shell 命​令​以​及​一​个​按​键​,它​们​都​以​固​定​粗​体​形​式​出​现​,且​全​部​与​上​下​文​有​所​区​别​。​
组​合​键​可​通​过​使​用​连​字​符​连​接​组​合​键​的​每​个​部​分​来​与​按​键​区​别​。​例​如​:
Enter 执​行​该​命​令​。​
Ctrl+Alt+F1 切​换​到​第​一​个​虚​拟​终​端​。​Ctrl+Alt+F7 返​回​您​的 X-Windows 会​话​。​
第​一​句​突​出​的​是​要​按​的​特​定​按​键​。​第​二​句​突​出​了​两​个​三​按​键​组​合​,每​个​组​合​都​要​同​时​按​下​。​
如​果​讨​论​的​是​源​码​、​等​级​名​称​、​方​法​、​功​能​、​变​量​名​称​以​及​在​段​落​中​提​到​的​返​回​的​数​值​,那​么​都​会​以​上​述​形​式​出​现​,即​固​定​粗​体​。​例​如​:
与​文​件​相​关​的​等​级​包​括​用​于​文​件​系​统​的 filesystem、​用​于​文​件​的 file 以​及​用​于​目​录​的 dir。​每​个​等​级​都​有​其​自​身​相​关​的​权​限​。​
比​例​宽​度​粗​体​
这​是​指​在​系​统​中​遇​到​的​文​字​或​者​短​语​,其​中​包​括​应​用​程​序​名​称​、​对​话​框​文​本​、​标​记​的​按​钮​、​复​选​框​以​及​单​选​按​钮​标​签​、​菜​单​标​题​以​及​子​菜​单​标​题​。​例​如​:在​主​菜​单​栏​中​
选​择 系​统 > 属​性 > 鼠​标​启​动 Mouse Preferences。​在 按​钮​ 标​签​中​点​击​惯​用​左​手​鼠​标​ 复​选​框​并​点​击 关​闭​ 将​首​选​鼠​标​按​键​从​左​切​换​到​右​(让​鼠​标​适​合​左​手​使​用​)。​
要​在 gedit 文​件​中​插​入​一​个​特​殊​字​符​,请​在​主​菜​单​栏​中​选​择 应​用​程​序 > 附​件 > 字​符​映​射​表​。​下​面​请​在​字​符​映​射​表​ 主​菜​单​栏​中​选​择 搜​索 > 查​找​…,在​搜​索​ 字​段​输​入​字​符​名​称​,并​点​击 下​一​个​。​那​么​会​在 字​符​表​中​突​出​您​看​到​的​字​符​。​双​击​该​字​符​将​其​放​置​于 要​复​制​的​文​本​字​段​并​点​击 复​制​ 按​钮​。​现​在​返​回​您​的​文​档​,在 gedit 菜​单​栏​选​择 编​辑 > 粘​贴​。​
以​上​文​本​包​括​应​用​程​序​名​称​、​系​统​范​围​菜​单​名​称​及​项​目​、​特​定​应​用​程​序​菜​单​名​称​以​及​按​钮​和 GUI 界​面​中​的​文​本​,所​有​都​以​比​例​粗​体​出​现​并​与​上​下​文​区​别​。​
请​注​意​在​菜​单​及​其​子​菜​单​中​用​来​表​示​穿​越​的 >。​这​是​为​了​避​免​使​用​比​较​复​杂​的​方​法​,比​如​‘​在​主​菜​单​的 系​统​ 菜​单​中​的 首​选​项​ 菜​单​中​选​择​鼠​标​’​。​
固​定​粗​斜​体​ 或​者 比​例​粗​斜​体
无​论​固​定​粗​体​或​者​比​例​粗​体​,附​加​的​斜​体​表​明​是​可​替​换​或​者​变​量​文​本​。​斜​体​表​示​那​些​不​直​接​输​入​的​文​本​或​者​那​些​根​据​环​境​改​变​的​文​本​。​例​如​:
要​使​用 ssh 连​接​到​远​程​机​器​,请​在 shell 提​示​符​后​输​入 ssh username@domain.name。​如​果​远​程​机​器​是 example.com 且​您​在​该​其​机​器​中​的​用​户​名​为 john,请​输​入 ssh john@example.com。​
mount -o remount file-system 命​令​会​重​新​挂​载​命​名​的​文​件​系​统​。​例​如​:要​重​新​挂​载 /home 文​件​系​统​,则​命​令​为 mount -o remount /home。​
要​查​看​目​前​安​装​的​软​件​包​版​本​,请​使​用 rpm -q package 命​令​。​它​会​返​回​以​下​结​果​:package-version-release。​
请​注​意​以​上​文​字​中​的​粗​斜​体​字 — username、​domain.name、​file-system、​package、​version 和 release。​无​论​您​输​入​文​本​或​者​运​行​一​个​命​令​,还​是​该​系​统​显​示​的​文​本​,每​个​字​都​是​一​个​占​位​符​。​
不​考​虑​工​作​中​显​示​标​题​的​标​准​用​法​,斜​体​表​示​第​一​次​使​用​某​个​新​且​重​要​的​用​语​。​例​如​:
当 Apache HTTP 服​务​器​接​受​请​求​时​,它​会​分​派​子​进​程​或​者​线​程​对​其​进​行​处​理​。​这​组​子​进​程​或​者​线​程​就​是 服​务​器​池​(server-pool)。​在 Apache HTTP 服​务​器 2.0 中​,创​建​和​维​护​服​务​器​池​的​任​务​是​由​名​为 多​进​程​模​块​(Multi-Processing Modules)MPMs)的​模​块​负​责​的​。​和​其​它​模​块​不​同​,Apache HTTP 服​务​器​只​能​载​入 MPM 组​中​的​一​个​模​块​。​

1.2. 抬​升​式​引​用​约​定​

二​,一​般​是​多​行​,数​据​输​入​要​明​显​与​周​围​文​本​分​开​。​
将​发​送​到​终​端​的​输​入​设​置​为 Mono-spaced Roman 并​显​示​为​:
books        Desktop   documentation  drafts  mss    photos   stuff  svn
books_tests  Desktop1  downloads      images  notes  scripts  svgs
源​码​列​表​也​设​为 Mono-spaced Roman,但​以​下​面​的​形​式​出​现​和​突​出​:
package org.jboss.book.jca.ex1;

import javax.naming.InitialContext;

public class ExClient
{
   public static void main(String args[]) 
       throws Exception
   {
      InitialContext iniCtx = new InitialContext();
      Object         ref    = iniCtx.lookup("EchoBean");
      EchoHome       home   = (EchoHome) ref;
      Echo           echo   = home.create();

      System.out.println("Created Echo");

      System.out.println("Echo.echo('Hello') = " + echo.echo("Hello"));
   }
   
}

1.3. 备​注​及​警​告​

最​后​,我​们​使​用​三​种​视​觉​形​式​来​突​出​那​些​可​能​被​忽​视​的​信​息​。​

备​注​

备​注​是​对​手​头​任​务​的​提​示​、​捷​径​或​者​另​外​的​解​决​方​法​。​忽​略​提​示​不​会​造​成​负​面​后​果​,但​您​可​能​会​错​过​一​个​更​省​事​的​诀​窍​。​

重​要​

重​要​框​中​的​内​容​是​那​些​容​易​错​过​的​事​情​:配​置​更​改​只​可​用​于​当​前​会​话​,或​者​在​应​用​更​新​前​要​重​启​服​务​。​忽​略​重​要​框​中​的​内​容​不​会​造​成​数​据​丢​失​但​可​能​会​让​您​抓​狂​。​

警​告​

警​告​是​不​应​被​忽​略​的​。​忽​略​警​告​信​息​很​可​能​导​致​数​据​丢​失​。​

2. 我​们​需​要​您​的​反​馈​!

提​交​报​告​时​,请​​​记​​​得​​​提​​​及​​​文​​​档​​​的​​​标​​​识​​​符​​​:Installation_Guide
如​​​果​​​你​​​有​​​改​​​进​​​本​​​文​​​档​​​的​​​建​​​议​​​,请​​​尽​​​量​​​将​​​其​​​明​​​确​​​化​​​。​​​如​​​果​​​你​​​发​​​现​​​了​​​错​​​误​​​,请​​​指​​​出​​​章​​​节​​​号​​​以​​​及​​​其​​​周​​​围​​​的​​​相​​​关​​​文​​​字​​​,以​​​便​​​我​​​们​​​尽​​​快​​​找​​​到​​​并​​​更​​​正​​​该​​​错​​​误​​​。​​​

简​介​

This guide covers installation of Fedora, a Linux distribution built on free and open source software. This manual helps you install Fedora on desktops, laptops, and servers. The installation system is easy to use even if you lack previous knowledge of Linux or computer networks. If you select default options, Fedora provides a complete desktop operating system, including productivity applications, Internet utilities, and desktop tools.
本​文​档​并​不​详​细​介​绍​安​装​程​序​的​全​部​特​性​。​

1. 背​景​

1.1. 关​于 Fedora

To find out more about Fedora, refer to http://fedoraproject.org/. To read other documentation on Fedora related topics, refer to http://docs.fedoraproject.org/.

1.2. 取​得​更​多​的​帮​助​

For information on additional help resources for Fedora, visit http://fedoraproject.org/wiki/Communicate.

2. 关​于​这​份​文​档​

2.1. 目​标​

这​份​文​档​帮​助​读​者​:
  1. 如​何​在​线​上​找​到 Fedora 发​行​版​
  2. 建​立​设​定​来​启​动 Fedora
  3. 理​解​和​应​用 Fedora 的​安​装​程​序​
  4. 完​成​安​装​后​的​设​定​

其​他​文​档​资​源​

This guide does not cover use of Fedora. To learn how to use an installed Fedora system, refer to http://docs.fedoraproject.org/ for other documentation.

2.2. 读​者​

This guide is intended for new and intermediate Fedora users. Advanced Fedora users with questions about detailed operation of expert installation features should consult the Anaconda development mailing list at http://www.redhat.com/archives/anaconda-devel-list/.

第 1 章 进​阶​者​指​南​

这​一​章​是​为​进​阶​者​准​备​的​,它​包​含​了 Fedora 的​安​装​过​程​。​请​注​意​这​一​章​接​下​来​会​包​含​很​多​笔​记​和​提​示​。​如​果​安​装​过​程​中​出​现​了​问​题​,请​查​阅​适​当​的​章​节​以​取​得​帮​助​。​

只​适​用​于​进​阶​者​

这​一​章​是​为​进​阶​者​准​备​的​,其​他​的​使​用​者​可​能​不​太​明​白​本​章​的​内​容​。​初​学​者​应​该​先​阅​读 第 2 章 初​学​者​。​

1.1. 概​观​

Fedora 的​安​装​过​程​非​常​简​单​,只​由​几​个​步​骤​组​成​:
  1. 下​载​文​件​并​制​成​可​启​动​的​媒​体​。​
  2. 准​备​一​个​可​安​装​的​系​统​。​
  3. 启​动​电​脑​并​执​行​安​装​程​序​。​
  4. 重​新​启​动​电​脑​并​执​行​设​置​。​

1.2. 下​载​文​件​

下​面​的​方​法​,任​选​其​一​:

确​认​您​的​下​载​

下​载​失​败​的​原​因​有​很​多​。​请​确​认​您​下​载​文​件​的 sha1sum。​
  1. 下​载​实​时 ISO 映​像​文​件​。​请​使​用​您​喜​欢​的​程​序​根​据 ISO 文​件​创​建 CD 介​质​。​您​还​可​用​使​用 livecd-tools 软​件​包​将​该​映​像​写​入​其​它​可​引​导​介​质​中​,比​如 USB 闪​存​盘​。​要​将​这​个​发​行​本​安​装​到​您​的​硬​盘​中​,请​在​登​录​后​使​用​桌​面​的​快​捷​图​标​。​
  2. 有​关​设​置​网​络​引​导​服​务​器​以​便​由​此​安​装 Fedora 的​详​情​请​参​考 第 11 章 配​置​一​个​安​装​服​务​器​。​

1.4. 安​装 Fedora

使​用​预​期​介​质​引​导​,并​选​择​合​适​的​硬​件​选​项​和​安​装​模​式​。​引​导​选​项​详​情​请​参​考 第 9 章 启​动​选​项​。​如​果​您​是​从 Live CD 启​动​,请​在​桌​面​上​选​择 "安​装​到​硬​盘​" 以​执​行​安​装​程​序​。​如​果​您​是​从​小​容​量​的​介​质​或​者​下​载​的​内​核​启​动​,请​选​择​网​络​或​者​硬​盘​资​源​进​行​安​装​。​
请​执​行​安​装​程​式​的​所​有​步​骤​。​在​您​执​行​最​后​确​认​之​前​,安​装​程​式​不​会​改​变​您​的​系​统​。​当​安​装​过​程​完​成​后​,重​新​启​动​您​的​电​脑​。​

1.5. 安​装​后​设​置​

当​系​统​完​成​动​后​,它​会​要​求​您​作​一​些​基​本​设​置​,您​可​以​根​据​您​的​硬​件​作​一​些​适​合​的​设​置​,然​后​继​续​登​入​的​步​骤​。​

第 2 章 初​学​者​

This chapter explains how to get the files you need to install and run Fedora on your computer. Concepts in this chapter may be new, especially if this is your first free and open source operating system. If you have any trouble with this chapter, find help by visiting the Fedora Forums at http://www.fedoraforum.org/.

下​载​链​接​

To follow a Web-based guide to downloading, visit http://get.fedoraproject.org/. For guidance on which architecture to download, refer to 第 2.2 节 “我​的​电​脑​属​于​哪​一​种​架​构​?”.

2.1. 如​何​下​载 Fedora?

The Fedora Project distributes Fedora in many ways, mostly free of cost and downloaded over the Internet. The most common distribution method is CD and DVD media. There are several types of CD and DVD media available, including:
  • A full set of the software on DVD media
  • Live images you can use to try Fedora, and then install to your system if you so choose
  • 用​于​通​过​互​联​网​链​接​进​行​安​装​的​小​容​量​启​动​光​盘​或​闪​存​盘​
  • 一​张 DVD 光​盘​,包​含 Fedora 源​代​码​
Most users want the Fedora Live image or the full set of installable software on DVD or CDs. The reduced bootable images are suitable for use with a fast Internet connection and install Fedora on one computer. Source code discs are not used for installing Fedora, but are resources for experienced users and software developers.
从​网​络​下​载 Fedora 软​件​是​完​全​免​费​的​。​

2.1.1. 从​映​像​点​站​

Mirrors publish Fedora software under a well-organized hierarchy of folders. For example, the Fedora 11 distribution normally appears in the directory fedora/linux/releases/11/. This directory contains a folder for each architecture supported by that release of Fedora. CD and DVD media files appear inside that folder, in a folder called iso/. For example, you can find the file for the DVD distribution of Fedora 11 for x86_64 at fedora/linux/releases/11/Fedora/x86_64/iso/Fedora-11-x86_64-DVD.iso.

2.1.2. 从 BitTorrent

BitTorrent is a way to download information in cooperation with other computers. Each computer cooperating in the group downloads pieces of the information in a particular torrent from other peers in the group. Computers that have finished downloading all the data in a torrent remain in the swarm to seed, or provide data to other peers. If you download using BitTorrent, as a courtesy you should seed the torrent at least until you have uploaded the same amount of data you downloaded.
If your computer does not have software installed for BitTorrent, visit the BitTorrent home page at http://www.bittorrent.com/download/ to download it. BitTorrent client software is available for Windows, Mac OS, Linux, and many other operating systems.
You do not need to find a special mirror for BitTorrent files. The BitTorrent protocol ensures that your computer participates in a nearby group. To download and use the Fedora BitTorrent files, visit http://torrent.fedoraproject.org/.

小​容​量​开​机​映​像​

目​前​不​能​通​过 BitTorrent 下​载​小​容​量​的 CD 和​闪​存​盘​映​像​。​

2.3. 我​需​要​下​载​哪​个​文​件​?

You have several options to download Fedora. Read the options below to decide the best one for you.
Each file available for download in a Fedora distribution includes the architecture type in the file name. For example, the file for the DVD distribution of Fedora 11 for x86_64 is named Fedora-11-x86_64-DVD.iso. Refer to 第 2.2 节 “我​的​电​脑​属​于​哪​一​种​架​构​?” if you are unsure of your computer's architecture.
  1. DVD 上​的​完​整​套​件​
    If you have plenty of time, a fast Internet connection, and wish a broader choice of software on the install media, download the full DVD version. Once burned to DVD, the media is bootable and includes an installation program. The DVD version contains a mode to perform rescue operations on your Fedora system in an emergency. You can download the DVD version directly from a mirror, or via BitTorrent.
  2. 实​时​映​像​
    If you want to try Fedora before you install it on your computer, download the Live image version. If your computer supports booting from CD or USB, you can boot the operating system without making any changes to your hard disk. The Live image also provides an Install to Hard Disk desktop shortcut. If you decide you like what you see, and want to install it, simply activate the selection to copy Fedora to your hard disk. You can download the Live image directly from a mirror, or using BitTorrent.
  3. 小​容​量​启​动​媒​体​
    如​果​您​有​高​速​网​络​连​接​而​又​不​想​下​载​整​个​发​行​本​,您​可​以​下​载​小​容​量​的​引​导​映​像​。​Fedora 在​光​盘​中​提​供​了​最​小​引​导​环​境​。​当​您​使​用​最​小​引​导​介​质​启​动​您​的​系​统​后​, 就​可​通​过​互​联​网​直​接​安​装 Fedora。​虽​然​这​个​方​法​仍​需​要​从​互​联​网​中​下​载​一​定​数​量​的​数​据​,但​总​要​比​完​整​发​行​本​介​质​的​文​小​要​少​得​多​。​完​成​安​装​后​,您​可​以​根​据​需​要​在​您​的​系​统​中​添​加​或​者​删​除​软​件​。​

    下​载​的​容​量​

    Installing the default software for Fedora over the Internet requires more time than the Live image, but less time than the entire DVD distribution. Actual results depend on the software you select and network traffic conditions.
The following table explains where to find the desired files on a mirror site. Replace arch with the architecture of the computer being installed.
Media type File locations
DVD 上​的​完​整​套​件​ fedora/linux/releases/11/Fedora/arch/iso/Fedora-11-arch-DVD.iso
实​时​映​像​ fedora/linux/releases/11/Live/arch/iso/Fedora-11-arch-Live.iso, fedora/linux/releases/11/Live/arch/iso/Fedora-11-KDE-arch-Live.iso
小​容​量​启​动​光​盘​ fedora/linux/releases/11/Fedora/arch/os/images/boot.iso
表 2.2. Locating files

2.4. 如​何​制​作 Fedora 媒​体​

A Fedora ISO file can be turned into either CD or DVD discs. You can turn Fedora Live ISO files into bootable USB media, as well as a CD or DVD.

2.4.1. 制​作 CD 和 DVD 光​盘​

To learn how to turn ISO images into CD or DVD media, refer to http://docs.fedoraproject.org/readme-burning-isos/.

2.4.2. 制​作 USB 介​质​

To make bootable USB media, use a Fedora Live image. Use either a Windows or Linux system to make the bootable USB media.

USB 映​像​写​入​是​无​害​的​

Writing the Live image to the USB media is nondestructive. Any existing data on the media is not harmed.
It is always a good idea to back up important data before performing sensitive disk operations.
To begin, make sure there is sufficient free space available on the USB media. There is no need to repartition or reformat your media. It is always a good idea to back up important data before performing sensitive disk operations.

2.4.2.1. USB Image Creation from Windows

  1. Download the Windows liveusb-creator program at http://fedorahosted.org/liveusb-creator.
  2. 按​照​网​页​以​及 liveusb-creator 程​序​给​出​的​步​骤​生​成​可​引​导 USB 介​质​。​

2.4.2.2. USB Image Creation in Linux

USB 介​质​通​常​是​闪​存​设​备​,有​时​也​称​为 U 盘​;或​者​外​部​连​接​的​硬​盘​设​备​。​几​乎​所​有​这​种​类​型​的​介​质​都​是​以 vfat 文​件​系​统​进​行​格​式​化​的​。​您​可​以​创​建 ext2、​ext3 或​者 vfat 格​式​的​可​引​导 USB 介​质​。​

ext4 and Btrfs

The GRUB bootloader does not support the ext4 or Btrfs file systems. You cannot create bootable USB media on media formatted as ext4 or Btrfs.

非​常​规 USB 介​质​

在​很​少​情​况​下​,比​如​特​殊​格​式​化​或​者​分​区​的 USB 介​质​,映​像​写​入​会​失​败​。​
  1. 第 2.3 节 “我​需​要​下​载​哪​个​文​件​?” 所​述​下​载​实​时 ISO 文​件​。​
  2. 在​您​的​系​统​中​安​装 livecd-tools 软​件​包​。​对​于 Fedora 系​统​,请​使​用​以​下​命​令​:
    su -c 'yum -y install livecd-tools'
    
  3. 插​入​您​的 USB 介​质​。​
  4. 找​到​您​的 USB 介​质​的​设​备​名​称​。​如​果​该​介​质​有​一​个​卷​名​,您​可​在 /dev/disk/by-label 中​,或​者​使​用 findfs 查​找​该​名​称​:
    su -c 'findfs LABEL="MyLabel"'
    
    如​果​该​介​质​没​有​卷​名​,或​者​您​不​知​道​,请​查​看 /var/log/messages 日​志​:
    su -c 'less /var/log/messages'
    
  5. 请​使​用 livecd-iso-to-disk 命​令​将 ISO 映​像​写​入​该​介​质​:
    su -c 'livecd-iso-to-disk the_image.iso /dev/sdX1'
    
    请​使​用 USB 介​质​中​分​区​的​设​备​名​称​替​换 sdX1。​大​都​是​闪​存​驱​动​器​和​外​置​硬​盘​只​使​用​一​个​分​区​。​如​果​您​改​变​了​这​个​行​为​或​者​使​用​奇​怪​分​区​的​介​质​,您​需​要​咨​询​有​关​人​士​以​获​得​帮​助​。​

2.5. 为​什​么​我​不​能​下​载 Fedora?

If you do not have a fast Internet connection, or if you have a problem creating boot media, downloading may not be an option. Fedora DVD and CD distribution media is available from a number of online sources around the world at a minimal cost. Use your favorite Web search engine to locate a vendor, or refer to http://fedoraproject.org/wiki/Distribution.

2.6. 我​如​何​才​能​启​动​安​装​程​序​?

要​从​最​小​引​导​介​质​、​实​时​映​像​或​者​发​行​本 DVD 中​启​动​安​装​程​序​,请​遵​照​以​下​步​骤​:
You may need to press a specific key or combination of keys to boot from the media, or configure your system's Basic Input/Output System, or BIOS, to boot from the media. On most computers you must select the boot or BIOS option promptly after turning on the computer. Most Windows-compatible computer systems use a special key such as F1, F2, F12, or Del to start the BIOS configuration menu. On Apple computers, the C key boots the system from the DVD drive. On older Apple hardware you may need to press Cmd +Opt+Shift+Del to boot from DVD drive.

配​置 BIOS

如​果​您​不​确​定​您​的​计​算​机​支​持​哪​些​功​能​,不​知​道​如​何​配​置 BIOS,可​以​查​看​厂​商​提​供​的​文​档​。​详​细​的​设​置​过​程​以​及​硬​件​规​范​和​配​置​超​出​了​本​文​档​的​范​围​。​

部分 I. Before you begin

This part of the Fedora Installation Guide covers decisions that you should make and resources that you should gather before installing Fedora, including:
  • the decision whether to upgrade an existing installation of Fedora or install a new copy.
  • hardware considerations, and hardware details that you may need during installation.
  • preparing to install Fedora over a network.
  • preparing driver media.

第 3 章 安​装​前​的​准​备​工​作​

3.1. 选​择​升​级​还​是​安​装​?

到​底​是​升​级​还​是​安​装​,请​参​考 第 18 章 升​级​你​当​前​的​系​统​。​

3.3. 你​有​足​够​的​磁​盘​空​间​吗​?

The disk space used by Fedora must be separate from the disk space used by other OSes you may have installed on your system, such as Windows, OS/2, or even a different version of Linux. For x86, AMD64, and Intel® 64 systems, at least two partitions (/ and swap) must be dedicated to Fedora.
在​开​始​安​装​进​程​之​前​,你​必​须​:
  • have enough unpartitioned[1] disk space for the installation of Fedora, or
  • have one or more partitions that may be deleted, thereby freeing up enough disk space to install Fedora.
要​更​清​楚​地​了​解​您​真​正​需​要​多​少​空​间​,请​参​阅 第 7.21.4 节 “推​荐​的​分​区​方​案​” 中​所​讨​论​的​推​荐​分​区​大​小​。​
If you are not sure that you meet these conditions, or if you want to know how to create free disk space for your Fedora installation, refer to 附录 A, 磁​盘​分​区​简​介​.

3.4. 您​可​以​使​用​光​盘​安​装​吗​?

There are several methods that can be used to install Fedora.
Installing from a CD-ROM or DVD requires that you have a Fedora 11 CD-ROM or DVD, and you have a DVD/CD-ROM drive on a system that supports booting from it.

3.5. 筹​备​网​络​安​装​

Note

如​果​你​执​行​的​是​基​于​网​络​的​安​装​,请​确​定​安​装​光​盘​(或​其​它​类​型​的​光​盘​)不​在​系​统​的​光​盘​驱​动​器​内​。​否​则​可​能​会​导​致​预​计​不​到​的​错​误​。​
The Fedora installation media must be available for either a network installation (via NFS, FTP, or HTTP) or installation via local storage. Use the following steps if you are performing an NFS, FTP, or HTTP installation.
通​过​网​络​安​装​所​要​使​用​的 NFS、​FTP、​HTTP 服​务​器​必​须​是​一​台​能​够​提​供​安​装​光​盘​上​的​完​整​内​容​的​单​独​机​器​。​

Note

The Fedora installation program has the ability to test the integrity of the installation media. It works with the CD / DVD, hard drive ISO, and NFS ISO installation methods. We recommend that you test all installation media before starting the installation process, and before reporting any installation-related bugs (many of the bugs reported are actually due to improperly-burned CDs). To use this test, type the following command at the boot: prompt:
linux mediacheck

Note

In the following examples, the directory on the installation staging server that will contain the installation files will be specified as /location/of/disk/space. The directory that will be made publicly available via FTP, NFS, or HTTP will be specified as /publicly/available/directory. For example, /location/of/disk/space may be a directory you create called /var/isos. /publicly/available/directory might be /var/www/html/f11, for an HTTP install.
要​从​安​装​光​盘​中​把​文​件​复​制​到​充​当​安​装​服​务​器​的​机​器​上​,执​行​以​下​步​骤​:
  • Create an iso image from the installation disk(s) using the following command (for DVDs):
    dd if=/dev/dvd of=/location/of/disk/space/f11.iso
    这​里​的 dvd 指​的​是 DVD 驱​动​设​备​:
    For instructions on how to prepare a network installation using CD-ROMs, refer to the instructions on the README-en file in disk1.

3.5.1. 筹​备 FTP 和 HTTP 安​装​

Extract the files from the iso image of the installation DVD or the iso images of the installation CDs and place them in a directory that is shared over FTP or HTTP.
Next, make sure that the directory is shared via FTP or HTTP, and verify client access. You can check to see whether the directory is accessible from the server itself, and then from another machine on the same subnet that you will be installing to.

3.5.2. 筹​备 NFS 安​装​

对​于 NFS 安​装​来​说​,没​有​必​要​挂​载 iso 映​像​。​使 iso 映​像​通​过 NFS 可​用​就​足​够​了​。​你​可​以​把 iso 映​像​移​到 NFS 的​输​出​目​录​来​使​它​可​用​。​
  • For DVD:
    mv /location/of/disk/space/f11.iso /publicly/available/directory/
  • For CDROMs:
    mv /location/of/disk/space/f11-disk*.iso /publicly/available/directory/
Ensure that the /publicly/available/directory directory is exported via NFS via an entry in /etc/exports.
要​输​出​到​指​定​的​系​统​:
/publicly/available/directory client.ip.address(ro,no_root_squash)
要​输​出​到​所​有​系​统​里​,使​用​如​下​的​设​置​:
/publicly/available/directory *(ro,no_root_squash)
Start the NFS daemon (on a Fedora system, use /sbin/service nfs start). If NFS is already running, reload the configuration file (on a Fedora system use /sbin/service nfs reload).
Hard drive installations require the use of the ISO (or DVD/CD-ROM) images. An ISO image is a file containing an exact copy of a DVD/CD-ROM image. After placing the required ISO images (the binary Fedora DVD/CD-ROMs) in a directory, choose to install from the hard drive. You can then point the installation program at that directory to perform the installation.
要​筹​备​系​统​进​行​硬​盘​驱​动​器​安​装​,你​必​须​使​用​以​下​方​法​之​一​来​设​置​系​统​:
  • 使​用​一​组​光​盘​集​合 — 从​每​个​安​装​光​盘​(或 DVD)中​创​建​光​盘 ISO 映​像​文​件​。​对​于​每​个​光​盘​,在 Linux 系​统​上​执​行​以​下​命​令​(对​于 DVD 只​执​行​一​次​):
    dd if=/dev/cdrom of=/tmp/file-name.iso
    
  • 使​用 ISO 映​像 — 把​这​些​映​像​传​输​到​要​安​装​的​系​统​上​。​
    在​试​图​安​装​前​,请​校​验 ISO 映​像​的​完​整​性​。​这​会​帮​助​你​避​免​硬​盘​安​装​过​程​中​经​常​会​遇​到​的​问​题​。​要​在​执​行​安​装​前​校​验 ISO 映​像​的​完​整​性​,请​使​用 md5sum 程​序​(该​程​序​有​适​用​于​各​类​操​作​系​统​的​版​本​)。​md5sum 程​序​应​该​可​以​在​提​供 ISO 映​像​的​同​一​服​务​器​上​找​到​。​

Note

The Fedora installation program has the ability to test the integrity of the installation media. It works with the CD / DVD, hard drive ISO, and NFS ISO installation methods. We recommend that you test all installation media before starting the installation process, and before reporting any installation-related bugs (many of the bugs reported are actually due to improperly-burned CDs). To use this test, type the following command at the boot: prompt:
linux mediacheck
Additionally, if a file called updates.img exists in the location from which you install, it is used for updates to anaconda, the installation program. Refer to the file install-methods.txt in the anaconda RPM package for detailed information on the various ways to install Fedora, as well as how to apply the installation program updates.


[1] Unpartitioned disk space means that available disk space on the hard drive(s) you are installing to has not been divided into sections for data. When you partition a disk, each partition behaves like a separate disk drive.

第 4 章 System Specifications List

However, when performing certain types of installation, some specific details might be useful or even essential.
  • If you plan to use a customized partition layout, record:
    • The model numbers, sizes, types, and interfaces of the hard drives attached to the system. For example, Seagate ST3320613AS 320 GB on SATA0, Western Digital WD7500AAKS 750 GB on SATA1. This will allow you to identify specific hard drives during the partitioning process.
  • If you are installing Fedora as an additional operating system on an existing system, record:
    • The mount points of the existing partitions on the system. For example, /boot on sda1, / on sda2, and /home on sdb1. This will allow you to identify specific partitions during the partitioning process.
  • If you plan to install from an image on a local hard drive:
  • If you plan to install from a network location, or install on an iSCSI target:
    • The make and model numbers of the network adapters on your system. For example, Netgear GA311. This will allow you to identify adapters when manually configuring the network.
    • IP、​DHCP 和 BOOTP 地​址​
    • Netmask
    • Gateway IP address
    • One or more name server IP addresses (DNS)
    如​果​你​不​熟​悉​以​上​的​联​网​需​求​或​术​语​,请​联​系​你​的​网​络​管​理​员​。​
  • If you plan to install from a network location:
  • If you plan to install on an iSCSI target:
  • If your computer is part of a domain:
    • You should verify that the domain name will be supplied by the DHCP server. If not, you will need to input the domain name manually during installation.

第 5 章 用​于 Intel® 或 AMD 系​统​的​驱​动​介​质​

5.1. 为​什​么​需​要​驱​动​程​序​盘​

While the Fedora installation program is loading, a screen may appear asking you for driver media. The driver media screen is most often seen in the following scenarios:
  • There is no driver available for a piece of hardware that is necessary for installation to proceed.
  • If you run the installation program by entering linux dd at the installation boot prompt.

5.2. 驱​动​程​序​介​质​到​底​是​什​么​?

驱​动​程​序​介​质​能​够​为​安​装​程​序​可​能​支​持​也​可​能​不​支​持​的​硬​件​添​加​支​持​。​它​可​以​是​由​红​帽​制​作​的​驱​动​软​盘​或​者​映​像​文​件​,也​可​以​根​据​在​互​联​网​上​发​现​的​驱​动​程​序​自​制​,还​可​以​是​硬​件​制​造​商​配​给​硬​件​的​软​盘​或​光​盘​。​
Driver media is used if you need access to a particular device to install Fedora. Drivers can be used for non-standard, very new, or uncommon devices.

Note

If an unsupported device is not needed to install Fedora on your system, continue with the installation and add support for the new piece of hardware once the installation is complete.

5.3. 如​何​获​取​驱​动​程​序​介​质​

Driver images may be available from a hardware or software vendor's website. If you suspect that your system may require one of these drivers, you should create a driver diskette or CD-ROM before beginning your Fedora installation.

Note

你​还​可​能​通​过​一​个​网​络​文​件​来​使​用​驱​动​程​序​映​像​。​你​可​以​使​用 linux dd=url 命​令​来​替​代 linux dd 引​导​命​令​,其​中​的 url 是​驱​动​程​序​映​像​所​在​的 HTTP、​FTP、​或 NFS 地​址​。​

部分 II. The installation process

This part of the Fedora Installation Guide details the installation process itself, from various methods of booting the installer up to the point where the computer must restart to finalize the installation. This part of the manual also includes a chapter on troubleshooting problems with the installation process.

目录

6. 开​始​安​装​
6.1. 启​动​选​单​
6.2. 从​另​一​个​不​同​的​源​安​装​
6.3. 正​在​检​查​介​质​
6.3.1. 正​在​检​查 Live CD
6.3.2. 正​在​检​查 DVD
6.4. 使​用 PXE 从​网​络​启​动​
6.5. 图​形​和​文​本​界​面​
7. Installing on Intel and AMD Systems
7.1. The Graphical Installation Program User Interface
7.1.1. A Note about Virtual Consoles
7.2. 文​本​模​式​安​装​程​序​用​户​界​面​
7.2.1. 使​用​键​盘​来​导​航​
7.3. Starting the Installation Program
7.3.1. Booting the Installation Program on x86, AMD64, and Intel 64 Systems
7.3.2. Additional Boot Options
7.4. 选​择​安​装​方​法​
7.5. 从​光​盘​中​安​装​
7.5.1. 如​果​没​有​发​现 IDE 光​盘​怎​么​办​?
7.6. 从​硬​盘​安​装​
7.7. 执​行​网​络​安​装​
7.8. 通​过 NFS 安​装​
7.9. Installing via FTP or HTTP
7.10. 欢​迎​使​用​
7.11. Language Selection
7.12. Keyboard Configuration
7.13. Initializing the Hard Disk
7.14. 升​级​已​有​的​系​统​
7.14.1. 升​级​检​测​
7.14.2. 使​用​安​装​程​序​升​级​
7.14.3. 更​新​引​导​加​载​程​序​
7.15. Network Configuration
7.15.1. Manual configuration
7.16. 时​区​配​置​
7.17. 设​置​根​密​码​
7.18. Disk Partitioning Setup
7.18.1. RAID and Other Disk Devices
7.19. Advanced Storage Options
7.20. Create Default Layout
7.21. 为​您​的​系​统​分​区​
7.21.1. 硬​盘​的​图​形​化​表​示​
7.21.2. The partitioning screen
7.21.3. 分​区​字​段​
7.21.4. 推​荐​的​分​区​方​案​
7.21.5. 添​加​分​区​
7.21.6. 编​辑​分​区​
7.21.7. 删​除​分​区​
7.22. x86、​AMD64 和 Intel 64 系​统​的​引​导​装​载​程​序​(Boot Loader)的​配​置​
7.22.1. 高​级​引​导​装​载​程​序​配​置​
7.22.2. Rescue Mode
7.22.3. 其​它​可​选​的​引​导​装​载​程​序​
7.23. Package Group Selection
7.23.1. Installing from Additional Repositories
7.23.2. Customizing the Software Selection
7.24. 准​备​安​装​
7.24.1. 准​备​安​装
7.25. Installing Packages
7.26. 安​装​完​成​
8. 在 Intel 或 AMD 系​统​上​进​行​安​装​的​故​障​解​除​
8.1. You are unable to boot Fedora
8.1.1. 无​法​使​用 RAID 卡​来​引​导​
8.1.2. 系​统​显​示​了​信​号 11 错​误​
8.2. 安​装​起​始​部​分​的​问​题​
8.2.1. Problems with Booting into the Graphical Installation
8.3. 安​装​过​程​中​的​问​题​
8.3.1. No devices found to install Fedora Error Message
8.3.2. Saving traceback messages without removeable media
8.3.3. Trouble with Partition Tables
8.3.4. 使​用​剩​余​空​间​
8.3.5. 其​它​分​区​问​题​
8.3.6. 看​到 Python 错​误​
8.4. 安​装​后​的​问​题​
8.4.1. 在 x86 系​统​的 GRUB 图​形​化​屏​幕​中​遇​到​问​题​
8.4.2. 引​导​入​图​形​环​境​
8.4.3. 引​导​入 X 窗​口​系​统​(GUI)的​问​题​
8.4.4. X 服​务​器​崩​溃​和​非​根​用​户​的​问​题​
8.4.5. 登​录​时​的​问​题​
8.4.6. 你​的​内​存​不​能​够​被​识​别​吗​?
8.4.7. 您​的​打​印​机​无​法​工​作​
8.4.8. 配​置​声​卡​遇​到​问​题​
8.4.9. 基​于 Apache httpd 的​服​务​/Sendmail 在​启​动​时​挂​起​

第 6 章 开​始​安​装​

取​消​安​装​

To abort the installation, either press Ctrl +Alt+Del or power off your computer with the power switch. You may abort the installation process without consequence at any time prior to selecting Write changes to disk on the Write partitioning to disk screen. Fedora makes no permanent changes to your computer until that point. Please be aware that stopping the installation after partitioning has begun can leave your computer unusable.

6.1. 启​动​选​单​

启​动​媒​体​会​显​示​一​个​图​形​的​启​动​选​单​。​如​果​您​在 60 秒​内​没​有​按​下​任​何​键​,那​么​预​设​的​选​项​将​会​执​行​,也​可​以​直​接​按​下 Enter 来​执​行​预​设​的​选​项​。​如​果​要​使​用​不​同​的​选​项​,请​使​用​键​盘​上​的​方​向​键​来​操​作​,当​完​成​后​按​下 Enter 键​。​如​果​您​想​自​订​启​动​选​项​,请​按​下 Tab 键​。​

启​动​选​项​

取​得​一​份​启​动​选​项​的​列​表​,请​访​问 第 9 章 启​动​选​项​。​
When using Fedora Live media, press any key during the initial boot countdown to bring up the Boot Options menu. The boot options include:
  • 启​动​
    这​是​预​设​的​选​项​。​如​果​您​选​择​这​个​选​项​,就​只​有​核​心​和​用​于​启​动​的​程​序​会​载​入​记​忆​体​,所​以​启​动​的​时​间​会​较​少​。​但​启​动​其​他​程​序​会​使​用​较​多​的​时​间​来​载​入​。​这​个​选​项​可​用​于​记​忆​体​容​量​小​的​电​脑​。​
  • 校​验​并​启​动​
    这​个​选​项​在​您​启​动​光​盘​之​前​先​验​证​光​盘​的​完​整​性​。​请​参​考 第 6.3 节 “正​在​检​查​介​质​” 以​获​得​更​多​资​料​。​
  • 内​存​测​试​
    这​个​选​项​将​在​你​系​统​上​运​行​彻​底​的​内​存​测​试​。​要​获​得​更​多​信​息​,参​考 第 9.6.1 节 “加​载​内​存 (RAM) 检​测​模​式​”。​
  • 从​本​地​驱​动​盘​启​动​
    该​选​项​从​第​一​个​已​安​装​磁​盘​上​启​动​系​统​。​如​果​你​偶​然​启​动​了​本​光​盘​,使​用​该​选​项​可​立​即​从​硬​盘​启​动​而​不​启​动​安​装​程​序​。​
如​果​您​是​从 DVD,救​援​光​盘​或​小​容​量​的​启​动​媒​体​启​动​,会​包​含​以​下​的​选​项​:
  • 安​装​或​升​级​已​有​的​系​统​
    该​选​项​为​默​认​。​选​择​该​选​项​将​使​用​图​形​安​装​程​序​安​装 Fedora 到​你​的​计​算​机​系​统​。​
  • 以​基​本​显​卡​驱​动​安​装​系​统​
    This option allows you to install Fedora in graphical mode even if the installation program is unable to load the correct driver for your video card. If your screen appears distorted or goes blank when using the the Install or upgrade an existing system option, restart your computer and try this option instead.
  • 救​援​已​安​装​系​统​
    选​择​这​个​选​项​将​用​你​已​安​装​的​(但​无​法​正​常​启​动​的​) Fedora 系​统​修​复​某​个​问​题​。​尽​管 Fedora 是​一​个​具​有​优​越​稳​定​性​的​计​算​平​台​,仍​然​有​可​能​偶​尔​的​发​生​无​法​启​动​的​情​况​。​这​个​救​援​环​境​包​含​允​许​你​修​复​大​部​分​此​类​问​题​的​工​具​程​序​。​
  • 从​本​地​驱​动​盘​启​动​
    (as for Live CD)
  • 内​存​测​试​
    (as for Live CD)

6.2. 从​另​一​个​不​同​的​源​安​装​

All boot media except the distribution DVD present a menu that allows you to choose the installation source, such as the network or a hard disk. If you are booting the distribution DVD and do not want to install from the DVD, hit Tab at the boot menu. Add a space and the option linux askmethod to the end of the line that appears below the menu.
你​可​以​通​过​存​放​在​硬​盘​上​的 ISO 映​像​文​件​,或​使​用 NFS, FTP, 或 HTTP 模​式​的​某​个​网​络​来​安​装 Fedora。​有​经​验​的​用​户​经​常​使​用​以​上​方​法​中​的​一​种​,因​为​从​硬​盘​或​网​络​服​务​器​中​读​取​数​据​要​比​从​光​盘​或 DVD 盘​中​快​。​
下​列​表​格​会​简​要​介​绍​不​同​的​引​导​模​式​及​每​一​个​推​荐​的​安​装​方​式​:
Boot method 安​装​方​法​
DVD DVD,网​络​,或​硬​盘​
最​小​的​启​动​光​盘​或 U 盘​,救​援​光​盘​ 网​络​或​硬​盘​
Live CD 或 U 盘​ 安​装​到​硬​盘​程​序​
表 6.1. Boot methods and installation methods

第 7.4 节 “选​择​安​装​方​法​” contains detailed information about installing from alternate locations.

6.3. 正​在​检​查​介​质​

分​发​的 DVD 介​质​和 Live 光​盘​介​质​提​供​一​个​选​项​以​检​查​介​质​的​完​整​性​。​当​在​家​用​电​脑​设​备​创​建​光​盘​或 DVD 介​质​时​有​时​会​发​生​刻​录​错​误​。​安​装​程​序​选​定​的​软​件​包​数​据​中​的​某​个​错​误​可​能​将​导​致​安​装​失​败​。​要​最​小​化​数​据​错​误​而​影​响​安​装​的​机​率​,请​在​安​装​前​检​查​介​质​。​

6.3.1. 正​在​检​查 Live CD

如​果​你​从 Live 光​盘​启​动​,从​启​动​菜​单​选​择 校​验​并​启​动​。​校​验​过​程​在​启​动​过​程​中​自​动​运​行​,如​果​校​验​成​功​,Live 光​盘​将​继​续​加​载​。​如​果​校​验​失​败​,用​你​先​前​下​载​的 ISO 映​像​创​建​一​个​新​的 Live 光​盘​。​

6.3.2. 正​在​检​查 DVD

如​果​你​从 Fedora 分​发​的 DVD 引​导​,在​你​选​择​安​装 Fedora 之​后​会​出​现​检​验​介​质​的​选​项​。​如​果​校​验​成​功​,安​装​过​程​将​正​常​进​行​。​如​果​失​败​,请​用​你​之​前​下​载​的 ISO 映​像​创​建​一​张​新​的 DVD。​

6.4. 使​用 PXE 从​网​络​启​动​

配​置​计​算​机​为​从​网​络​接​口​启​动​。​这​个​选​项​在 BIOS 中​,可​能​被​标​记​为 Network BootBoot Services。​一​旦​您​正​确​地​配​置​了 PXE 启​动​,电​脑​将​不​需​要​其​他​介​质​启​动 Fedora 安​装​系​统​。​
要​通​过 PXE 服​务​器​启​动​计​算​机​:
  1. 确​认​网​络​电​缆​已​插​好​。​网​卡​的​连​接​指​示​灯​会​亮​起​,即​使​计​算​机​没​有​打​开​电​源​。​
  2. 打​开​计​算​机​电​源​。​
  3. 接​下​来​会​出​现​一​个​菜​单​屏​幕​。​按​下​相​应​于​所​需​要​的​选​项​的​数​字​键​。​

PXE 出​错​处​理​

如​果​您​的​计​算​机​没​有​从​网​络​服​务​器​启​动​,检​查 BIOS 是​否​配​置​为​从​正​确​的​网​络​接​口​启​动​。​一​些 BIOS 将​网​络​接​口​标​记​为​可​能​的​启​动​设​备​,但​是​并​不​支​持 PXE 标​准​。​查​看​您​的​硬​件​手​册​来​获​取​更​多​信​息​。​

多​重​NICs和​PXE安​装

Some servers with multiple network interfaces may not assign eth0 to the first network interface as BIOS knows it, which can cause the installer to try using a different network interface than was used by PXE. To change this behavior, use the following in pxelinux.cfg/* config files:
IPAPPEND 2
APPEND ksdevice=bootif
The configuration options above causes the installer to use the same network interface as BIOS and PXE use. You can also use the following option:
ksdevice=link
This option causes the installer to use the first network device it finds that is linked to a network switch.

6.5. 图​形​和​文​本​界​面​

Fedora 11 supports graphical and text-based installations. However, the installer image must either fit in RAM or appear on local storage, such as the installation DVD or Live Media. Therefore, only systems with more than 192 MB of RAM or that boot from the installation DVD or Live Media can use the graphical installer. Systems with 192 MB RAM or less automatically scale back to using the text-based installer. Note that you must still have a minimum of 64 MB of RAM for installation to proceed in text mode. If you prefer to use the text-based installer, type linux text at the boot: prompt.
如​果​发​生​下​列​状​况​之​一​,安​装​程​序​将​使​用​文​本​模​式​:
  • 安​装​无​法​识​别​您​系​统​中​的​显​示​硬​件​。​
  • 你​电​脑​的​内​存​少​于 192 MB。​
  • 从​启​动​菜​单​中​选​择​文​本​模​式​安​装​
The text screens provide most of the same functions as the standard screens, although disk partitioning is simplified, and bootloader configuration and package selection are handled automatically in text mode. If you choose to install Fedora in text mode, you can still configure your system to use a graphical interface after installation.

使​用​图​形​界​面​

Installing in text mode does not prevent you from using a graphical interface on your system once it is installed. If you have trouble configuring your system for graphical interface use, consult other sources for troubleshooting help as shown in 第 1.2 节 “取​得​更​多​的​帮​助​”.

安​装​过​程​至​少​需​要​64MB内​存​

如​果​您​的​计​算​机​不​足​64MB内​存​,安​装​将​停​止​。​

第 7 章 Installing on Intel® and AMD Systems

7.1. The Graphical Installation Program User Interface
7.1.1. A Note about Virtual Consoles
7.2. 文​本​模​式​安​装​程​序​用​户​界​面​
7.2.1. 使​用​键​盘​来​导​航​
7.3. Starting the Installation Program
7.3.1. Booting the Installation Program on x86, AMD64, and Intel 64 Systems
7.3.2. Additional Boot Options
7.4. 选​择​安​装​方​法​
7.5. 从​光​盘​中​安​装​
7.5.1. 如​果​没​有​发​现 IDE 光​盘​怎​么​办​?
7.6. 从​硬​盘​安​装​
7.7. 执​行​网​络​安​装​
7.8. 通​过 NFS 安​装​
7.9. Installing via FTP or HTTP
7.10. 欢​迎​使​用​
7.11. Language Selection
7.12. Keyboard Configuration
7.13. Initializing the Hard Disk
7.14. 升​级​已​有​的​系​统​
7.14.1. 升​级​检​测​
7.14.2. 使​用​安​装​程​序​升​级​
7.14.3. 更​新​引​导​加​载​程​序​
7.15. Network Configuration
7.15.1. Manual configuration
7.16. 时​区​配​置​
7.17. 设​置​根​密​码​
7.18. Disk Partitioning Setup
7.18.1. RAID and Other Disk Devices
7.19. Advanced Storage Options
7.20. Create Default Layout
7.21. 为​您​的​系​统​分​区​
7.21.1. 硬​盘​的​图​形​化​表​示​
7.21.2. The partitioning screen
7.21.3. 分​区​字​段​
7.21.4. 推​荐​的​分​区​方​案​
7.21.5. 添​加​分​区​
7.21.6. 编​辑​分​区​
7.21.7. 删​除​分​区​
7.22. x86、​AMD64 和 Intel 64 系​统​的​引​导​装​载​程​序​(Boot Loader)的​配​置​
7.22.1. 高​级​引​导​装​载​程​序​配​置​
7.22.2. Rescue Mode
7.22.3. 其​它​可​选​的​引​导​装​载​程​序​
7.23. Package Group Selection
7.23.1. Installing from Additional Repositories
7.23.2. Customizing the Software Selection
7.24. 准​备​安​装​
7.24.1. 准​备​安​装
7.25. Installing Packages
7.26. 安​装​完​成​
This chapter explains how to perform a Fedora installation from the DVD/CD-ROM, using the graphical, mouse-based installation program. The following topics are discussed:
  • 逐​渐​熟​悉​安​装​程​序​的​用​户​界​面​
  • 启​动​安​装​程​序​
  • 选​择​安​装​方​法​
  • 安​装​中​的​配​置​步​骤​(语​言​、​键​盘​、​鼠​标​、​分​区​等​等​)
  • 结​束​安​装​

7.1. The Graphical Installation Program User Interface

如​果​你​从​前​使​用​过​图​形​化​用​户​界​面​(graphical user interface,GUI),你​对​这​一​进​程​会​比​较​熟​悉​;你​只​需​使​用​鼠​标​在​屏​幕​间​翻​阅​,“​点​击​”​按​钮​,或​者​输​入​文​本​字​段​。​
你​还​可​以​使​用​键​盘​在​安​装​中​浏​览​各​屏​幕​。​Tab键​允​许​你​在​屏​幕​中​移​动​;上​下​箭​头​键​允​许​你​在​列​表​中​移​动​;+和​-符​号​键​允​许​你​扩​展​或​紧​缩​列​表​;Space和​Enter键​选​择​或​取​消​选​择​被​突​出​显​示​的​项​目​。​你​还​可​以​使​用 Alt+X 键​组​合​来​点​击​按​钮​或​选​择​其​它​屏​幕​,这​里​的 X 代​表​屏​幕​中​带​下​划​线​的​字​母​。​

Note

If you are using an x86, AMD64, or Intel® 64 system, and you do not wish to use the GUI installation program, the text mode installation program is also available. To start the text mode installation program, press the Esc key while the Fedora boot menu is displayed, then use the following command at the boot: prompt:
linux text
Refer to 第 6.1 节 “启​动​选​单​” for a description of the Fedora boot menu and to 第 7.2 节 “文​本​模​式​安​装​程​序​用​户​界​面​” for a brief overview of text mode installation instructions.
It is highly recommended that installs be performed using the GUI installation program. The GUI installation program offers the full functionality of the Fedora installation program, including LVM configuration which is not available during a text mode installation.
必​须​使​用​文​本​模​式​安​装​程​序​的​用​户​可​以​遵​循​图​形​化​安​装​说​明​来​获​得​所​需​信​息​。​

7.1.1. A Note about Virtual Consoles

The Fedora installation program offers more than the dialog boxes of the installation process. Several kinds of diagnostic messages are available to you, as well as a way to enter commands from a shell prompt. The installation program displays these messages on five virtual consoles, among which you can switch using a single keystroke combination.
虚​拟​控​制​台​是​非​图​形​化​环​境​中​的 shell 提​示​,从​物​理​机​器​中​而​不​是​远​程​地​进​入​。​你​可​以​同​时​进​入​多​个​虚​拟​控​制​台​。​
一​般​来​说​,除​非​你​试​图​诊​断​安​装​问​题​,你​没​有​理​由​离​开​默​认​的​控​制​台​(图​形​化​安​装​是​第​六​号​虚​拟​控​制​台​)。​
终​端​ 击​键​ 内​容​
1 ctrl+alt+f1 installation dialog
2 ctrl+alt+f2 shell提​示​符​
3 ctrl+alt+f3 安​装​日​志​(安​装​程​序​的​信​息​)
4 ctrl+alt+f4 系​统​相​关​信​息​
5 ctrl+alt+f5 其​它​信​息​
6 ctrl+alt+f6 图​形​化​显​示​
表 7.1. 控​制​台​,击​键​,和​内​容​

7.2. 文​本​模​式​安​装​程​序​用​户​界​面​

注意

如​果​您​的​系​统​有​图​形​化​显​示​,但​是​图​形​化​安​装​失​败​,请​尝​试​用​xdriver=vesa选​项​启​动​–;参​考 第 9 章 启​动​选​项​
The Fedora text mode installation program uses a screen-based interface that includes most of the on-screen widgets commonly found on graphical user interfaces. 图 7.1 “在​「​引​导​装​载​程​序​配​置​」​中​所​见​的​安​装​程​序​控​件​”, and 图 7.2 “Installation Program Widgets as seen in the partitioning screen”, illustrate the screens that appear during the installation process.
The cursor is used to select (and interact with) a particular widget. As the cursor is moved from widget to widget, it may cause the widget to change color, or the cursor itself may only appear positioned in or next to the widget.

Note

While text mode installations are not explicitly documented, those using the text mode installation program can easily follow the GUI installation instructions. However, because text mode presents you with a simpler, more streamlined insatallation process, certain options that are available in graphical mode are not also available in text mode. These differences are noted in the description of the installation process in this guide, and include:
  • customizing the partition layout.
  • customizing the bootloader configuration.
  • selecting packages during installation.
Note also that manipulation of LVM (Logical Volume Management) disk volumes is only possible in graphical mode. In text mode it is only possible to view and accept the default LVM setup.

Note

Not every language supported in graphical installation mode is also supported in text mode. Specifically, languages written with a character set other than the Latin or Cyrillic alphabets are not available in text mode. If you choose a language written with a character set that is not supported in text mode, the installation program will present you with the English versions of the screens.
在​「​引​导​装​载​程​序​配​置​」​中​所​见​的​安​装​程​序​控​件​
在​「​引​导​装​载​程​序​配​置​」​中​所​见​的​安​装​程​序​控​件​
图 7.1. 在​「​引​导​装​载​程​序​配​置​」​中​所​见​的​安​装​程​序​控​件​

Legend
  1. 窗​口 — 在​整​个​安​装​进​程​中​,你​会​不​时​地​在​屏​幕​上​看​到​窗​口​(本​书​中​通​常​把​它​称​为​对​话​框​,dialog)。​有​时​,一​个​窗​口​会​重​叠​在​另​一​个​窗​口​之​上​;在​这​种​情​况​下​,你​只​能​与​最​上​面​的​窗​口​交​流​。​当​该​窗​口​使​用​完​毕​,它​就​会​消​失​,允​许​你​继​续​使​用​下​面​的​窗​口​。​
  2. 复​选​箱 — 复​选​箱​允​许​你​选​择​或​取​消​选​择​某​项​功​能​。​箱​内​要​么​显​示​一​个​星​号​(已​选​),要​么​是​一​个​空​格​(未​选​)。​当​光​标​位​于​复​选​箱​内​,按 Space 键​来​选​择​一​个​未​选​的​功​能​或​取​消​一​个​已​选​的​功​能​。​
  3. 文​本​输​入​行 — 文​本​输​入​行​是​你​可​以​输​入​安​装​程​序​所​要​求​信​息​的​区​域​。​当​光​标​停​在​文​本​输​入​行​时​,你​可​以​在​那​一​行​中​输​入​并​(或​)编​辑​信​息​。​
Installation Program Widgets as seen in the partitioning screen
Installation Program Widgets as seen in the partitioning screen
图 7.2. Installation Program Widgets as seen in the partitioning screen

Legend
  1. 文​本​构​件 — 文​本​构​件​是​屏​幕​上​用​于​显​示​文​本​的​区​域​。​有​时​,文​本​构​件​可​能​还​会​含​有​其​它​构​件​,如​复​选​箱​。​如​果​文​本​构​件​所​含​的​信​息​超​出​为​它​保​留​的​空​间​所​能​显​示​的​,一​个​滚​动​条​就​会​出​现​;如​果​你​将​光​标​定​位​于​文​本​构​件​之​内​,你​可​以​使​用​向​上​和​向​下​ 箭​头​键​来​在​所​有​信​息​中​上​下​滚​动​。​你​在​滚​动​条​上​的​当​前​位​置​被​显​示​为​一​个 # 字​符​,它​会​在​你​拖​拉​滚​动​条​时​移​上​移​下​。​
  2. 滚​动​条 — 滚​动​条​出​现​在​窗​口​的​侧​面​或​底​部​,它​用​来​控​制​窗​框​内​显​示​的​文​档​或​列​表​部​分​。​滚​动​条​使​你​能​够​轻​而​易​举​地​查​看​文​件​的​任​意​部​分​。​
  3. 按​钮​构​件 — 按​钮​构​件​是​与​安​装​程​序​交​流​的​主​要​方​法​。​通​过 Tab 键​和 Enter 键​使​用​这​些​按​钮​,你​可​在​安​装​程​序​的​屏​幕​中​逐​步​推​进​。​当​按​钮​被​突​出​显​示​时​,它​们​可​以​被​选​择​。​

7.2.1. 使​用​键​盘​来​导​航​

在​安​装​对​话​框​之​间​的​切​换​是​通​过​一​组​简​单​的​击​键​来​达​到​的​。​要​移​动​光​标​,使​用 向​左​、​向​右​、​向​上​、​和​向​下​箭​头​键​。​使​用 TabShift-Tab 键​来​在​屏​幕​上​的​每​个​构​件​间​向​前​或​向​后​循​环​。​多​数​屏​幕​在​底​部​显​示​了​一​个​可​用​光​标​定​位​键​的​摘​要​。​
要​“​按​”​一​个​按​钮​,将​光​标​定​位​在​按​钮​之​上​(例​如​,使​用 Tab 键​),然​后​按 SpaceEnter 键​。​要​从​一​列​项​目​中​选​择​一​项​,将​光​标​移​至​你​要​选​择​的​项​目​,然​后​按 Enter 键​。​要​选​择​一​个​带​复​选​箱​的​项​目​,将​光​标​移​至​复​选​箱​内​,然​后​按 Space 键​来​选​择​这​个​项​目​。​要​取​消​选​择​,再​按​一​次 Space 键​。​
F12 来​接​受​当​前​值​,并​继​续​到​下​一​个​对​话​框​;这​相​当​于​按​「​确​定​」​按​钮​。​

Warning

除​非​一​个​对​话​框​在​等​待​你​的​输​入​,在​安​装​进​程​中​不​要​随​意​按​键​(这​么​做​可​能​会​导​致​无​法​预​料​的​行​为​)。​
To start, first make sure that you have all necessary resources for the installation. If you have already read through 第 3 章 安​装​前​的​准​备​工​作​, and followed the instructions, you should be ready to start the installation process. When you have verified that you are ready to begin, boot the installation program using the Fedora DVD or CD-ROM #1 or any boot media that you have created.

7.3.1. Booting the Installation Program on x86, AMD64, and Intel® 64 Systems

您​可​使​用​以​下​介​质​(依​赖​于​您​系​统​所​能​支​持​的​)之​一​来​启​动​安​装​程​序​:
To create a boot CD-ROM or to prepare your USB pen drive for installation, refer to 第 3.4.2 节 “制​作​安​装​引​导​光​盘​”.
放​入​启​动​介​质​然​后​重​启​。​BIOS设​置​需​改​为​从​CD-ROM或​USB启​动​。​

Note

要​修​改​x86,AMD64或​Intel® 64 system平​台​的​BIOS设​置​,请​注​意​计​算​机​刚​启​动​时​的​信​息​。​有​行​文​字​会​告​诉​您​按​哪​个​键​进​入​BIOS设​置​。​
Once you have entered your BIOS setup program, find the section where you can alter your boot sequence. The default is often C, A or A, C (depending on whether you boot from your hard drive [C] or a diskette drive [A]). Change this sequence so that the CD-ROM is first in your boot order and that C or A (whichever is your typical boot default) is second. This instructs the computer to first look at the CD-ROM drive for bootable media; if it does not find bootable media on the CD-ROM drive, it then checks your hard drive or diskette drive.
保​存​更​改​后​退​出​BIOS。​有​关​更​多​信​息​请​参​考​计​算​机​随​机​附​送​的​说​明​书​。​
短​暂​停​顿​后​,将​出​现​带​有​boot:提​示​的​屏​幕​。​该​屏​幕​内​容​包​含​多​个​启​动​选​项​。​每​个​选​项​又​包​含​一​个​或​多​个​帮​助​屏​幕​。​要​进​入​帮​助​屏​幕​,请​根​据​屏​幕​下​方​提​示​按​合​适​的​键​。​
当​您​启​动​安​装​程​序​时​,注​意​一​下​两​条​:
  • 一​旦​boot:提​示​符​出​现​,在​一​分​钟​内​不​做​操​作​的​话​安​装​程​序​将​自​动​启​动​。​要​禁​用​此​特​性​,按​帮​助​屏​幕​的​功​能​键​。​
  • If you press a help screen function key, there is a slight delay while the help screen is read from the boot media.
Normally, you only need to press Enter to boot. Be sure to watch the boot messages to review if the Linux kernel detects your hardware. If your hardware is properly detected, continue to the next section. If it does not properly detect your hardware, you may need to restart the installation and use one of the boot options provided in 第 9 章 启​动​选​项​.

7.3.2. Additional Boot Options

While it is easiest to boot using a CD-ROM or DVD and perform a graphical installation, sometimes there are installation scenarios where booting in a different manner may be needed. This section discusses additional boot options available for Fedora.
To pass options to the boot loader on an x86, AMD64, or Intel® 64 system, use the instructions as provided in the boot loader option samples below.

Note

Refer to 第 9 章 启​动​选​项​ for additional boot options not covered in this section.

7.4. 选​择​安​装​方​法​

你​想​使​用​哪​一​种​安​装​方​法​?可​用​的​安​装​方​法​如​下​所​列​:
If you booted the distribution DVD and did not use the alternate installation source option askmethod, the next stage loads automatically from the DVD. Proceed to 第 7.10 节 “欢​迎​使​用​”.

CD/DVD Activity

If you boot any Fedora installation media, the installation program loads its next stage from that disc. This happens regardless of which installation method you choose, unless you eject the disc before you proceed. The installation program still downloads package data from the source you choose.

7.5. 从​光​盘​中​安​装​

To install Fedora from a DVD/CD-ROM, place the DVD or CD #1 in your DVD/CD-ROM drive and boot your system from the DVD/CD-ROM. Even if you booted from alternative media, you can still install Fedora from CD or DVD media.
安​装​程​序​将​会​检​测​你​的​系​统​,并​试​图​识​别​你​的​光​盘​驱​动​器​。​它​会​开​始​寻​找​一​个 IDE(又​称 ATAPI)光​盘​驱​动​器​。​
如​果​你​的​光​盘​驱​动​器​没​有​被​检​测​到​,而​且​它​是​一​个 SCSI 光​盘​,安​装​程​序​将​会​请​你​选​择​一​个 SCSI 驱​动​程​序​。​选​择​与​你​的​适​配​器​最​接​近​的​驱​动​程​序​。​如​果​必​要​,你​可​以​为​驱​动​程​序​指​定​选​项​,然​而​,多​数​驱​动​程​序​会​被​你​的 SCSI 适​配​器​自​动​检​测​到​。​
The Select Partition screen applies only if you are installing from a disk partition (that is, if you selected Hard Drive in the Installation Method dialog). This dialog allows you to name the disk partition and directory from which you are installing Fedora.
The ISO files must be located on a hard drive that is either internal to the computer, or attached to the machine by USB. In addition the install.img file from within the ISO files must be copied to a directory named images Use this option to install Fedora on computers that are without a network connection or CD/DVD drives.
按​以​下​步​骤​从​ISO中​提​取​install.img
mount -t iso9660 /path/to/Fedora11.iso /mnt/point -o loop,ro
  cp -pr /mnt/point/images /path/images/
  umount /mnt/point
从​硬​盘​安​装​之​前​,先​检​查​分​区​类​型​以​保​证​Fedora可​以​读​取​。​要​在​Windows下​查​看​分​区​类​型​,请​使​用​磁​盘​管​理​工​具​。​要​在​Linux下​查​看​,使​用​fdisk。​

无​法​从​LVM分​区​安​装​

您​不​能​在​LVM(逻​辑​卷​管​理​)管​理​的​分​区​上​使​用​ISO文​件​。​
硬​盘​驱​动​器​安​装​的​选​择​分​区​对​话​框​
硬​盘​驱​动​器​安​装​的​选​择​分​区​对​话​框​。​
图 7.3. 硬​盘​驱​动​器​安​装​的​选​择​分​区​对​话​框​

从​可​用​的​分​区​列​表​中​选​择​含​有​ISO文​件​的​分​区​。​内​置​IDE,SATA,SCSI和​USB设​备​名​字​以​/dev/sd开​头​。​每​个​独​立​驱​动​器​都​有​对​应​的​字​母​,例​如​/dev/sda。​驱​动​器​上​的​分​区​按​数​字​排​列​,例​如​/dev/sda1。​
同​时​指​定​镜​像​所​在​目​录​。​输​入​含​有​ISO镜​像​文​件​的​完​整​路​径​。​下​面​列​表​中​显​示​了​一​些​如​何​输​入​此​信​息​的​例​子​。​
Partition type 卷​ 到​文​件​的​原​始​路​径​ 要​使​用​的​目​录​
VFAT D:\ D:\Downloads\F11 /Downloads/F11
ext2, ext3, ext4 /home /home/user1/F11 /user1/F11
表 7.2. 不​同​分​区​类​型​的​ISO镜​像​位​置​

如​果​ISO镜​像​位​于​分​区​的​根​(顶​级​)目​录​下​,则​输​入​/。​如​果​ISO镜​像​位​于​挂​载​分​区​的​子​目​录​中​,则​输​入​那​个​分​区​中​包​含​ISO镜​像​的​目​录​名​。​例​如​,ISO镜​像​所​在​分​区​通​常​挂​载​为​/home/,镜​像​位​于​/home/new/下​,那​么​您​需​输​入​/new/。​

使​用​前​导 斜​杠​‘​/’​

没​有​以​“​/”​斜​杠​打​头​将​导​致​安​装​失​败​。​

7.7. 执​行​网​络​安​装​

The installation program is network-aware and can use network settings for a number of functions. For instance, you can install Fedora from a network server using FTP, HTTP, or NFS protocols. You can also instruct the installation program to consult additional software repositories later in the process.
如​果​你​要​执​行​的​是​网​络​安​装​,「​配​置 TCP/IP」​对​话​框​就​会​出​现​。​该​对​话​框​向​你​询​问 IP 和​其​它​网​络​地​址​。​你​可​以​选​择​通​过 DHCP 或​手​工​地​配​置​设​备​的 IP 地​址​和​子​网​掩​码​。​
默​认​情​况​下​,安​装​程​序​使​用 DHCP 自​动​提​供​网​络​设​置​。​如​果​您​使​用 cable 或​者 DSL 调​制​解​调​器​、​路​由​器​、​防​火​墙​或​者​其​它​网​络​硬​件​与​互​联​网​沟​通​,那​么 DHCP 是​一​个​合​适​的​选​项​。​如​果​您​的​网​络​没​有 DHCP 服​务​器​,那​么​请​取​消​对 使​用​动​态 IP 配​置​(DHCP)的​选​择​。​
输​入​在​安​装​过​程​中​使​用​的 IP 地​址​,然​后​按 Enter 键​。​
TCP/IP 配​置​
配​置​用​于​安​装​的​网​络​设​备​地​址​。​
图 7.4. TCP/IP 配​置​

安​装​完​成​后​,将​会​把​这​些​设​置​转​移​至​您​的​系​统​中​。​
您​可​以​从​Web,FTP,本​地​或​Internet上​的​NFS服​务​器​上​安​装​。​您​也​可​以​从​您​自​己​的​镜​像​或​由​社​区​成​员​维​护​的​公​共​镜​像​上​安​装​Fedora。​为​了​保​证​连​接​尽​可​能​的​快​和​稳​定​,请​使​用​离​你​较​近​的​服​务​器​。​
The Fedora Project maintains a list of Web and FTP public mirrors, sorted by region, at http://fedoraproject.org/wiki/Mirrors. To determine the complete directory path for the installation files, add /11/Fedora/architecture/os/ to the path shown on the web page. A correct mirror location for an i386 system resembles the URL http://mirror.example.com/pub/fedora/linux/releases/11/Fedora/i386/os.

7.8. 通​过 NFS 安​装​

NFS 对​话​框​只​在​你​从 NFS 服​务​器​中​安​装​时​才​会​出​现​(如​果​你​在​「​安​装​方​法​」​中​选​择​了​「​NFS 映​像​」​的​话​)。​
输​入​你​的 NFS 服​务​器​的​域​名​或 IP 地​址​。​譬​如​,如​果​你​是​从 example.com 域​的 eastcoast 主​机​上​安​装​的​话​,在​「​NFS 服​务​器​」​ 字​段​中​输​入 eastcoast.example.com。​
接​下​来​,输​入​导​出​目​录​的​名​称​。​如​果​你​遵​循​了 第 3.5 节 “筹​备​网​络​安​装​” 中​描​述​的​设​置​步​骤​,你​将​应​该​输​入​目​录 /export/directory/。​
If the NFS server is exporting a mirror of the Fedora installation tree, enter the directory which contains the root of the installation tree. You will enter an Installation Key later on in the process which will determine which subdirectories are used to install from. If everything was specified properly, a message appears indicating that the installation program for Fedora is running.
NFS 设​置​对​话​框​
NFS 设​置​对​话​框​。​
图 7.5. NFS 设​置​对​话​框​

If the NFS server is exporting the ISO images of the Fedora CD-ROMs, enter the directory which contains the ISO images.
Next, the Welcome dialog appears.
你​在​这​里​选​择​的​语​言​将​成​为​操​作​系​统​的​缺​省​语​言​。​选​择​恰​当​的​语​言​会​在​稍​后​的​安​装​中​帮​助​你​定​位​时​区​。​安​装​程​序​将​会​试​图​根​据​你​在​这​个​屏​幕​上​所​指​定​的​信​息​来​选​择​恰​当​的​时​区​。​
To add support for additional languages, customize the installation at the package selection stage. For more information, refer to 第 7.23.2.2 节 “Additional Language Support”.
Language Selection
语​言​选​择​屏​幕​。​
图 7.7. Language Selection

当​你​选​定​了​恰​当​的​语​言​后​,点​击​「​下​一​步​」​ 来​继​续​。​
如​果​您​选​择​用​安​装​程​序​升​级​系​统​,所​有​的​同​Fedora软​件​冲​突​的​非​Fedora软​件​都​会​被​覆​盖​。​在​开​始​更​新​之​前​,请​制​作​系​统​当​前​已​安​装​软​件​包​的​列​表​,以​备​参​考​。​
rpm -qa --qf '%{NAME} %{VERSION}-%{RELEASE} %{ARCH}\n' > ~/old-pkglist.txt
完​成​安​装​之​后​,对​照​列​表​找​出​需​要​重​新​编​译​或​者​从​非​Fedora软​件​源​下​载​的​软​件​。​
下​一​步​,备​份​所​有​的​系​统​配​置​数​据​。​
su -c 'tar czf /tmp/etc-`date +%F`.tar.gz /etc' su -c 'mv /tmp/etc-*.tar.gz /home'
Make a complete backup of any important data before performing an upgrade. Important data may include the contents of your entire /home directory as well as content from services such as an Apache, FTP, or SQL server, or a source code management system. Although upgrades are not destructive, if you perform one improperly there is a small possibility of data loss.

存​储​备​份​

注​意​上​面​的​例​子​里​,我​们​把​所​有​的​备​份​资​料​都​存​储​到​了​/home目​录​里​。​如​果​您​的​/home不​是​一​个​单​独​的​分​区​,您​应​该​严​格​按​照​下​述​步​骤​操​作​! 请​把​您​的​备​份​存​储​到​另​外​一​个​设​备​里​,比​如​CD/DVD盘​片​或​者​外​置​硬​盘​。​
需​要​关​于​升​级​的​更​多​信​息​,请​参​考 第 16.2 节 “完​成​升​级​”。​

7.14.3. 更​新​引​导​加​载​程​序​

如​果​已​有​的​引​导​加​载​程​序​是​由​某​个 Linux 发​行​版​安​装​的​,安​装​程​序​可​以​修​改​它​为​引​导​新​的 Fedora 系​统​。​要​更​新​已​有​的 Linux 引​导​加​载​程​序​,选​择 Update boot loader configuration(升​级​引​导​加​载​程​序​配​置​)。​当​您​升​级​已​有​的 Fedora; 或 Red Hat Linux 安​装​的​时​候​,这​是​默​认​选​项​。​
GRUB 是 Fedora 的​标​准​引​导​加​载​程​序​。​如​果​您​的​计​算​机​使​用​另​外​一​种​引​导​加​载​程​序​,类​似 BootMagic™,System Commander™ 或​由 Microsoft Windows 安​装​的​加​载​程​序​,Fedora 将​无​法​更​新​它​们​。​这​种​情​况​下​,选​择 Skip boot loader updating(跳​过​引​导​装​载​程​序​升​级​)。​在​安​装​程​序​结​束​之​后​,参​考​那​些​产​品​的​说​明​书​来​查​找​帮​助​。​
只​有​当​您​确​定​要​替​换​现​有​的​引​导​加​载​程​序​的​时​候​,才​能​在​升​级​过​程​中​选​择​安​装​新​的​引​导​加​载​程​序​。​如​果​您​安​装​了​新​的​引​导​加​载​程​序​,在​仔​细​配​置​新​的​引​导​加​载​程​序​之​前​,可​能​无​法​启​动​这​台​机​器​上​其​他​的​操​作​系​统​。​选​择 Create new boot loader configuration(创​建​新​的​引​导​装​载​程​序​配​置​) 来​删​除​已​有​的​引​导​加​载​程​序​并​安​装 GRUB。​
做​出​选​择​之​后​,点​击 下​一​步​ 来​继​续​。​

7.15. Network Configuration

Fedora contains support for both IPv4 and IPv6. However, by default, the installation program configures network interfaces on your computer for IPv4, and to use DHCP via NetworkManager. Currently NetworkManager does not support IPv6. If your network only supports IPv6 you should use system-config-network after installation to configure your network interfaces.
Setup prompts you to supply a host name and domain name for this computer, in the format hostname.domainname. Many networks have a DHCP (Dynamic Host Configuration Protocol) service that automatically supplies connected systems with a domain name, leaving the user to enter a hostname.
Setting the hostname
Setting the hostname
图 7.11. Setting the hostname

To set up a network that is behind an Internet firewall or router, you may want to use hostname.localdomain for your Fedora system. If you have more than one computer on this network, you should give each one a separate host name in this domain.

有​效​的​主​机​名​

可​以​为​系​统​起​任​何​名​字​,只​要​完​整​的​名​称​是​唯​一​的​。​主​机​名​只​能​包​含​字​母​,数​字​和​连​字​符​。​
Specify a time zone even if you plan to use NTP (Network Time Protocol) to maintain the accuracy of the system clock.
通​过​选​择​最​接​近​你​的​计​算​机​的​物​理​位​置​的​城​市​来​设​置​时​区​。​你​可​以​点​击​地​图​来​定​位​某​一​特​定​地​区​。​
Specify a time zone even if you plan to use NTP (Network Time Protocol) to maintain the accuracy of the system clock.
选​择​时​区​的​方​法​有​两​种​:
  • 用​鼠​标​在​互​动​地​图​上​点​击​指​定​城​市​(用​黄​点​表​示​)。​一​个​红​色​的 X 符​号​会​出​现​来​标​明​你​的​选​择​。​
  • 你​还​可​以​在​屏​幕​底​部​的​列​表​中​选​择​时​区​。​使​用​鼠​标​点​击​位​置​来​突​出​显​示​你​的​选​择​。​
配​置​时​区​
时​区​配​置​屏​幕​。​
图 7.13. 配​置​时​区​

If Fedora is the only operating system on your computer, select System clock uses UTC. The system clock is a piece of hardware on your computer system. Fedora uses the timezone setting to determine the offset between the local time and UTC on the system clock. This behavior is standard for UNIX-like operating systems.

Windows and the System Clock

Do not enable the System clock uses UTC option if your machine also runs Microsoft Windows. Microsoft operating systems change the BIOS clock to match local time rather than UTC. This may cause unexpected behavior under Fedora.

Note

要​在​安​装​完​成​后​改​变​时​区​配​置​,你​可​以​使​用​「​时​间​和​日​期​属​性​工​具​」​。​
在 shell 提​示​下​键​入 system-config-date 命​令​来​启​动​「​时​间​和​日​期​属​性​工​具​」​。​如​果​您​不​是​根​用​户​,它​会​提​示​您​输​入​根​密​码​后​再​继​续​。​
如​果​要​在​文​本​模​式​下​运​行​「​时​间​和​日​期​属​性​工​具​」​,你​可​以​使​用 timeconfig 命​令​。​
Select Next to proceed.
Setting up a root account and password is one of the most important steps during your installation. Your root account is similar to the administrator account used on Microsoft Windows machines. The root account is used to install packages, upgrade RPMs, and perform most system maintenance. Logging in as root gives you complete control over your system.

Note

根​用​户​(又​称​超​级​用​户​)对​整​个​系​统​有​完​全​的​控​制​权​;因​此​,最​好​只​有​在​执​行​系​统​维​护​或​管​理​时​使​用​根​用​户​登​录​。​
Root Password
设​置​您​的​root密​码​。​
图 7.14. Root Password

请​只​有​在​进​行​系​统​管​理​时​才​使​用​根​帐​号​。​创​建​一​个​非​根​帐​号​来​做​日​常​工​作​。​若​你​需​要​快​速​解​决​某​个​问​题​时​,用 su - 命​令​暂​时​登​录​为​根​用​户​。​遵​循​这​些​最​基​本​的​原​则​将​会​减​少​你​因​键​入​错​误​或​不​正​确​的​命​令​而​损​害​系​统​的​机​会​。​

Note

要​变​成​根​用​户​,在​终​端​机​窗​口​的 shell 提​示​下​键​入 su - ,并​按 回​车​ 键​,然​后​输​入​根​密​码​并​按 回​车​ 键​。​
The installation program prompts you to set a root password[2] for your system. You cannot proceed to the next stage of the installation process without entering a root password.
根​口​令​必​须​至​少​包​括​六​个​字​符​;你​键​入​的​口​令​不​会​在​屏​幕​上​显​示​。​你​必​须​把​口​令​输​入​两​次​;如​果​两​个​口​令​不​匹​配​,安​装​程​序​将​会​请​你​重​新​输​入​口​令​。​
你​应​该​把​根​口​令​设​为​你​可​以​记​住​但​又​不​容​易​被​别​人​猜​到​的​组​合​。​你​的​名​字​、​电​话​号​码​、 qwertypasswordroot123456、​以​及 anteater 都​是​典​型​的​坏​口​令​。​好​口​令​混​合​使​用​数​字​、​大​小​写​字​母​,并​且​不​包​含​任​何​词​典​中​的​现​成​词​汇​。​例​如​:Aard387vark420BMttNT。​请​记​住​,口​令​是​区​分​大​小​写​的​。​如​果​你​笔​录​下​你​的​口​令​,请​将​之​保​存​在​一​个​安​全​的​地​方​。​然​而​,我​们​建​议​你​不​要​笔​录​任​何​你​创​建​的​口​令​。​

Note

不​要​使​用​本​指​南​中​提​供​的​任​何​示​范​口​令​。​使​用​其​中​任​何​一​个​,都​可​以​被​视​为​安​全​风​险​。​

Note

在​完​成​安​装​后​,你​如​果​想​修​改​根​密​码​,可​以​使​用​「​根​密​码​工​具​」​。​
在 shell 提​示​下​键​入 system-config-rootpassword 命​令​来​启​动​「​根​密​码​工​具​」​。​如​果​您​不​是​根​用​户​,它​会​提​示​您​输​入​根​密​码​后​再​继​续​。​
在​Root密​码​中​输​入​root密​码​。​为​安​全​起​见​Fedora将​字​符​显​示​为​星​号​。​Confirm中​再​次​输​入​密​码​以​保​证​输​入​无​误​。​设​置​好​root密​码​后​,选​择​下​一​步​继​续​。​

7.18. Disk Partitioning Setup

On this screen you can choose to create the default layout or choose to manual partition using the Create custom layout option.
前​面​三​个​选​项​允​许​你​不​必​亲​自​为​驱​动​器​分​区​而​执​行​自​动​安​装​。​如​果​你​对​在​系​统​上​分​区​信​心​不​足​,建​议​你​不​要​选​择​手​工​分​区​,而​是​让​安​装​程​序​自​动​为​你​分​区​。​
你​也​可​以​为​安​装​配​置 iSCSI 目​标​,或​者​在​这​个​屏​幕​上​点​击​「​高​级​存​储​配​置​」​按​钮​来​禁​用 dmraid 设​备​。​详​情​请​参​考 第 7.19 节 “Advanced Storage Options ”。​

Warning

The PackageKit update software downloads updated packages to /var/cache/yum/ by default. If you partition the system manually, and create a separate /var/ partition, be sure to create the partition large enough (3.0 GB or more) to download package updates.
Disk Partitioning Setup
选​择​自​动​分​区​或​手​工​分​区​。​
图 7.15. Disk Partitioning Setup

If you choose to create a custom layout, refer to 第 7.21 节 “为​您​的​系​统​分​区​”.

Warning

如​果​你​在​安​装​过​程​的​「​磁​盘​分​区​设​置​」​阶​段​看​到​一​则​和​如​下​相​似​的​消​息​:
"无​法​读 hda 设​备​上​的​分​区​表​。​要​创​建​新​分​区​,分​区​表​必​须​被​初​始​化​这​将​破​坏​这​个​设​备​上​的​所​有​数​据​。​"
you may not have a partition table on that drive or the partition table on the drive may not be recognizable by the partitioning software used in the installation program.
使​用​过 EZ-BIOS 之​类​程​序​的​用​户​可​能​遇​到​过​相​似​的​问​题​,从​而​导​致​了​数​据​丢​失​(假​定​安​装​前​没​有​进​行​备​份​)。​
No matter what type of installation you are performing, backups of the existing data on your systems should always be made.

7.19. Advanced Storage Options

Advanced Storage Options
高​级​存​储​选​项​。​
图 7.16. Advanced Storage Options

To configure an ISCSI target invoke the 'Configure ISCSI Parameters' dialog by selecting 'Add ISCSI target' and clicking on the 'Add Drive' button. Fill in the details for the ISCSI target IP and provide a unique ISCSI initiator name to identify this system. If the ISCSI target uses CHAP (Challenge Handshake Authentication Protocol) for authentication, enter the CHAP username and password. If your enviroment uses 2-way CHAP (also called "Mutual CHAP"), also enter the reverse CHAP username and password. Click the 'Add target' button to attempt connection to the ISCSI target using this information.
配​置 ISCSI 参​数​
配​置 ISCSI 参​数​。​
图 7.17. 配​置 ISCSI 参​数​

请​注​意​,如​果​你​输​入​了​错​误​的​信​息​,你​可​以​用​不​同​的 ISCSI 目​标 IP 地​址​进​行​尝​试​,但​是​为​了​修​改 ISCSI 启​动​器​的​名​字​,你​将​需​要​重​新​启​动​这​个​安​装​。​

7.20. Create Default Layout

自​动​分​区​在​有​关​哪​些​数​据​要​从​系​统​中​删​除​(若​适​用​)这​一​方​面​允​许​你​有​控​制​权​。​可​供​你​选​择​的​选​项​有​:
  • 「​删​除​选​定​驱​动​器​上​的​所​有​分​区​并​按​缺​省​的​格​式​创​建​分​区​」​ — 选​择​这​一​选​项​来​删​除​你​的​硬​盘​驱​动​器​上​的​所​有​分​区​(这​包​括​由​其​它​操​作​系​统​创​建​的​分​区​,如 Windows VFAT 或 NTFS 分​区​)。​

    Warning

    If you select this option, all data on the selected hard drive(s) is removed by the installation program. Do not select this option if you have information that you want to keep on the hard drive(s) where you are installing Fedora.
  • 「​删​除​选​定​驱​动​器​上​的​所​有 Linux 分​区​并​按​缺​省​的​格​式​创​建​分​区​」​ — 选​择​该​选​项​来​只​删​除 Linux 分​区​(在​以​前​安​装 Linux 时​创​建​的​分​区​)。​这​将​不​会​影​响​你​的​硬​盘​驱​动​器​上​可​能​会​有​的​其​它​分​区​,例​如​:VFAT 或 FAT32 分​区​。​
  • 「​使​用​选​定​磁​盘​上​的​空​闲​空​间​并​按​缺​省​的​格​式​创​建​分​区​」​ — 选​择​这​一​选​项​来​保​留​你​当​前​的​数​据​和​分​区​,假​设​你​的​硬​盘​驱​动​器​上​有​足​够​的​可​用​空​闲​空​间​的​话​。​
Create Default Layout
自​动​分​区​。​
图 7.18. Create Default Layout

Using your mouse, choose the storage drive(s) on which you want Fedora to be installed. If you have two or more drives, you can choose which drive(s) should contain this installation. Unselected drives, and any data on them, are not touched.

Warning

备​份​系​统​上​的​所​有​数​据​是​明​智​之​举​。​例​如​,如​果​你​要​升​级​或​创​建​一​个​双​引​导​系​统​,你​应​该​备​份​这​个​硬​盘​驱​动​器​上​你​想​保​存​的​数​据​。​有​时​候​错​误​难​免​会​发​生​,甚​至​会​导​致​所​有​数​据​丢​失​。​

Note

如​果​你​有​一​个 RAID 卡​,请​留​意​,某​些 BIOS 不​支​持​从 RAID 卡​中​引​导​。​在​这​类​情​况​下​,/boot/ 分​区​一​定​要​在 RAID 阵​列​之​外​的​分​区​上​创​建​,比​如​在​一​个​分​开​的​硬​盘​驱​动​器​上​。​用​有​问​题​的 RAID 卡​来​创​建​分​区​,有​必​要​使​用​一​个​内​部​硬​盘​驱​动​器​。​
/boot/ 分​区​也​是​软​件 RAID 设​置​所​必​需​的​。​
如​果​你​已​选​定​要​自​动​为​你​的​系​统​分​区​,你​应​该​选​择​「​复​审​」​,然​后​手​工​地​编​辑 /boot/ 分​区​。​
选​择​加​密​系​统​ 来​加​密​除​/boot分​区​之​外​的​所​有​分​区​。​
使​用​高​级​存​储​选​项​选​项​,如​果​:
  • 您​打​算​将​Fedora安​装​到​通​过​iSCSI协​议​连​接​的​驱​动​器​上​。​选​择​高​级​存​储​选​项​,选​择​添​加​iSCSI目​标​,然​后​选​择​添​加​驱​动​器​。​输​入​IP地​址​和​iSCSI初​始​名​称​,选​择​添​加​驱​动​器​。​
  • 您​想​要​禁​用​启​动​时​检​测​到​的​dmraid设​备​。​
To review and make any necessary changes to the partitions created by automatic partitioning, select the Review option. After selecting Review and clicking Next to move forward, the partitions created for you by anaconda appear. You can make modifications to these partitions if they do not meet your needs.

Installing in text mode

如​果​在​字​符​模​式​下​安​装​Fedora,您​只​能​使​用​本​节​所​讲​的​默​认​分​区​设​置​。​因​此​尽​管​您​可​以​选​择​使​用​整​个​驱​动​器​,删​除​已​由​Linux分​区​或​使​用​空​闲​空​间​,但​是​您​不​能​修​改​分​区​设​置​。​也​就​是​说​您​不​能​在​安​装​程​序​自​动​添​加​或​删​除​的​分​区​或​文​件​系​统​之​外​添​加​删​除​分​区​或​文​件​系​统​。​如​果​安​装​时​需​要​自​定​义​分​区​设​置​,您​应​该​通​过​VNC连​接​或​kickstart来​运​行​图​形​化​安​装​。​
另​外​,像​LVM,加​密​文​件​系​统​和​可​重​调​文​件​系​统​等​高​级​选​项​仅​在​图​形​模​式​和​kickstart中​提​供​。​
当​你​选​好​之​后​,点​击​「​下​一​步​」​来​继​续​。​
If you chose one of the automatic partitioning options and selected Review, you can either accept the current partition settings (click Next), or modify the setup manually in the partitioning screen.

注意

Please note that in the text mode installation it is not possible to work with LVM (Logical Volumes) beyond viewing the existing setup. LVM can only be set up during graphical installation.
If you chose to create a custom layout, you must tell the installation program where to install Fedora. This is done by defining mount points for one or more disk partitions in which Fedora is installed. You may also need to create and/or delete partitions at this time.

Note

如​果​你​还​没​有​计​划​怎​么​设​置​分​区​,你​可​以​参​考 附录 A, 磁​盘​分​区​简​介​第 7.21.4 节 “推​荐​的​分​区​方​案​”。​至​少​,你​需​要​一​个​大​小​合​适​的​根​分​区​和​两​倍​于​系​统​物​理​内​存​的​交​换​分​区​。​Itanium 系​统​的​用​户​应​该​有​一​个​大​约 100 MB 的 FAT (VFAT) 格​式​的 /boot/efi/ 分​区​、​至​少 512 MB 的​交​换​分​区​和​大​小​合​适​的​根​分​区​(/)。​
Partitioning on x86, AMD64, and Intel 64 Systems
The main partitioning screen.
图 7.19. Partitioning on x86, AMD64, and Intel® 64 Systems

With the exception of certain esoteric situations, anaconda can handle the partitioning requirements for a typical installation.

7.21.1. 硬​盘​的​图​形​化​表​示​

The partitioning screen offers a graphical representation of your hard drive(s).
单​击​鼠​标​来​突​出​显​示​图​形​化​表​示​中​的​某​一​字​段​。​双​击​来​编​辑​某​个​现​存​的​分​区​或​从​现​存​空​闲​空​间​中​创​建​分​区​。​
在​显​示​之​上​,你​会​看​到​「​Drive」​名​称​(如 /dev/hda),「​Geom」​(显​示​了​硬​盘​的​几​何​属​性​,包​括​了​三​个​数​字​分​别​代​表​硬​盘​汇​报​的​柱​面​、​磁​头​和​扇​区​数​量​),以​及​被​安​装​程​序​检​测​到​的​硬​盘​驱​动​器​「​Model」​。​

7.21.2. The partitioning screen

These buttons are used to change the attributes of a partition (for example the file system type and mount point) and also to create RAID devices. Buttons on this screen are also used to accept the changes you have made, or to exit the partitioning screen. For further explanation, take a look at each button in order:

7.21.3. 分​区​字​段​

在​分​区​层​次​之​上​是​代​表​你​正​创​建​的​分​区​的​信​息​的​标​签​。​这​些​标​签​定​义​如​下​:
  • 「​设​备​」​:该​字​段​显​示​分​区​的​设​备​名​。​
  • 「​挂​载​点​/RAID/Volume」​:挂​载​点​是​文​件​卷​在​目​录​层​次​内​存​在​的​位​置​;文​件​卷​在​该​位​置​上​被​“​挂​载​”​。​该​字​段​标​明​分​区​将​被​挂​载​的​位​置​。​如​果​某​个​分​区​存​在​,但​还​没​有​设​立​,那​么​你​需​要​为​其​定​义​挂​载​点​。​双​击​分​区​或​点​击​「​编​辑​」​按​钮​来​为​其​定​义​挂​载​点​。​
  • Type: This field shows the partition's file system type (for example, ext2, ext3, ext4, or vfat).
  • 「​格​式​化​」​:该​字​段​显​示​了​正​创​建​的​分​区​是​否​会​被​格​式​化​。​
  • 「​大​小 (MB)」​:该​字​段​显​示​了​分​区​的​大​小​(MB)。​
  • 「​开​始​」​:该​字​段​显​示​了​分​区​在​你​的​硬​盘​上​开​始​的​柱​面​。​
  • 「​结​束​」​:该​字​段​显​示​了​分​区​在​你​的​硬​盘​上​结​束​的​柱​面​。​
「​隐​藏 RAID 设​备​/LVM 卷​组​成​员​」​:如​果​你​不​想​看​到​创​建​的 RAID 设​备​或 LVM 卷​组​成​员​,选​择​该​选​项​。​

7.21.4. 推​荐​的​分​区​方​案​

7.21.4.1. x86、​AMD64 和 Intel® 64 位​系​统​

除​非​你​另​有​原​因​,我​们​推​荐​你​为​基​于 x86、​AMD64 和 Intel® 64 位​系​统​创​建​以​下​分​区​
  • A swap partition
  • A /boot partition
  • A / partition
  • A swap partition (at least 256 MB)
    Swap partitions are used to support virtual memory. In other words, data is written to a swap partition when there is not enough RAM to store the data your system is processing. In addition, certain power management features store all of the memory for a suspended system in the available swap partitions.
    如​果​你​不​确​定​创​建​多​大​的​交​换​分​区​,你​可​以​指​定​两​倍​于​系​统​物​理​内​存​的​大​小​。​分​区​类​型​必​须​是 swap。​
    创​建​大​小​合​适​的​交​换​空​间​依​赖​于​以​下​几​个​因​素​(按​重​要​性​依​次​排​列​):
    • 在​机​器​上​运​行​的​应​用​程​序​。​
    • 机​器​上​安​装​的​物​理​内​存​数​量​。​
    • 操​作​系​统​的​版​本​。​
    物​理​内​存​低​于 2GB 时​,交​换​空​间​应​该​是​两​倍​于​物​理​内​存​大​小​。​对​于​任​何​高​于 2GB 的​内​存​,则​为​相​同​数​量​,但​绝​不​能​少​于 32MB。​
    所​以​,如​果​:
    M = 内​存​的 GB 数​,S = 交​换​空​间​的 GB 数​,然​后​
    If M < 2
            S = M *2
    Else
            S = M + 2
    
    使​用​这​个​公​式​,物​理​内​存​为 2GB 的​系​统​应​该​有 4GB 的​交​换​空​间​,物​理​内​存​为 3GB 的​系​统​应​该​有 5GB 交​换​空​间​。​创​建​一​个​较​大​的​交​换​分​区​在​你​计​划​将​来​升​级​内​存​的​时​候​特​别​有​帮​助​。​
    对​于​具​备​超​大​内​存​的​系​统​(超​过 32GB),你​可​能​能​够​使​用​一​个​较​小​的​交​换​分​区​(物​理​内​存​的​一​倍​或​更​少​)。​
  • A /boot/ partition (100 MB)
    The partition mounted on /boot/ contains the operating system kernel (which allows your system to boot Fedora), along with files used during the bootstrap process. Due to limitations, creating a native ext3 partition to hold these files is required. For most users, a 100 MB boot partition is sufficient.

    ext4 and Btrfs

    The GRUB bootloader does not support the ext4 or Btrfs file systems. You cannot use an ext4 or Btrfs partition for /boot/.

    Note

    如​果​你​的​硬​盘​大​于 1024 个​柱​面​(而​且​你​的​系​统​至​少​是​在​两​年​前​制​造​的​),而​且​你​想​让 /(根​)分​区​使​用​硬​盘​上​的​所​有​剩​余​空​间​,你​可​能​需​要​创​建​一​个 /boot 分​区​。​

    Note

    如​果​你​有​一​张 RAID 卡​,请​注​意​某​些 BIOS 不​支​持​从 RAID 卡​中​引​导​。​在​这​种​情​况​下​,/boot/ 分​区​必​须​在 RAID 阵​列​之​外​被​创​建​,如​在​一​个​单​独​的​硬​盘​驱​动​器​上​创​建​。​
  • A root partition (3.0 GB - 5.0 GB)
    This is where "/" (the root directory) is located. In this setup, all files (except those stored in /boot) are on the root partition.
    A 3.0 GB partition allows you to install a minimal installation, while a 5.0 GB root partition lets you perform a full installation, choosing all package groups.

    Root and /root

    The / (or root) partition is the top of the directory structure. The /root directory/root (sometimes pronounced "slash-root") directory is the home directory of the user account for system administration.
If you create many partitions instead of one large / partition, upgrades become easier. Refer to the description of Disk Druid's Edit option in 第 7.21.2 节 “The partitioning screen” for more information.
The following table summarizes minimum partition sizes for the partitions containing the listed directories. You do not have to make a separate partition for each of these directories. For instance, if the partition containing /foo must be at least 500 MB, and you do not make a separate /foo partition, then the / (root) partition must be at least 500 MB.
Directory Minimum size
/ 250 MB
/usr 250 MB, but avoid placing this on a separate partition
/tmp 50 MB
/var 384 MB
/home 100 MB
/boot 75 MB
表 7.3. Minimum partition sizes

Leave Excess Capacity Unallocated

Only assign storage capacity to those partitions you require immediately. You may allocate free space at any time, to meet needs as they occur. To learn about a more flexible method for storage management, refer to 附录 D, Understanding LVM.
If you are not sure how best to configure the partitions for your computer, accept the default partition layout.
7.21.4.1.1. Advice on Partitions
最​佳​分​区​设​置​取​决​于​Linux系​统​的​用​途​。​以​下​关​于​如​何​分​配​磁​盘​空​间​的​提​示​可​能​对​您​有​所​帮​助​。​
  • 如​果​您​和​其​他​用​户​想​在​系​统​上​存​储​数​据​,可​以​在​卷​组​中​为​/home目​录​创​建​一​个​独​立​的​分​区​。​有​了​独​立​的​/home分​区​后​,升​级​或​重​装​Fedora时​就​不​再​需​要​删​除​用​户​的​文​件​了​。​
  • Each kernel installed on your system requires approximately 10 MB on the /boot partition. Unless you plan to install a great many kernels, the default partition size of 100 MB for /boot should suffice.

    ext4 and Btrfs

    The GRUB bootloader does not support the ext4 or Btrfs file systems. You cannot use an ext4 or btrfs partition for /boot.
  • /var目​录​包​含​了​大​量​的​安​装​程​序​文​件​,包​括​Apacheweb服​务​器​。​同​时​它​也​存​放​下​载​的​更​新​包​。​确​保​/var目​录​所​在​分​区​有​足​够​的​空​间​来​保​存​下​载​的​更​新​和​您​的​其​它​内​容​。​

    Pending Updates

    由​于​Fedora是​一​个​不​断​更​新​的​软​件​包​集​合​,因​此​发​行​周​期​之​后​晚​一​些​时​间​会​提​供​大​量​的​更​新​。​您​以​后​可​以​为​安​装​源​添​加​一​个​更​新​仓​库​来​最​小​化​这​个​过​程​。​参​考​第 7.23.1 节 “Installing from Additional Repositories”了​解​更​多​信​息​。​
  • Fedora系​统​中​/usr目​录​存​放​主​要​软​件​。​对​于​安​装​默​认​的​软​件​包​来​说​,至​少​需​要​4GB空​间​。​如​果​您​是​程​序​开​发​员​或​打​算​用​Fedora学​习​软​件​开​发​,则​需​要​8GB以​上​的​空​间​。​

    Do not place /usr on a separate partition

    如​果​/usr是​/之​外​一​个​独​立​分​区​的​话​,启​动​过​程​会​变​得​更​加​复​杂​,某​些​情​况​下​(如​在​iSCSI设​备​上​安​装​)可​能​还​会​不​工​作​。​
  • 考​虑​一​下​在​LVM卷​组​中​保​留​一​点​未​分​配​空​间​。​在​您​想​要​调​整​分​区​但​又​不​想​删​除​其​它​分​区​的​数​据​时​,这​是​个​办​法​。​
  • 若​您​将​子​目​录​分​配​到​各​个​分​区​中​,那​么​在​安​装​新​版​Fedora时​您​就​可​以​保​留​这​些​子​目​录​中​的​内​容​。​例​如​在​/var/lib/mysql中​运​行​MySQL数​据​库​,如​果​以​后​打​算​重​装​那​么​就​应​该​把​该​目​录​单​独​分​一​个​区​。​
以​下​是​针​对​一​个​80GB新​硬​盘​,1GB内​存​的​分​区​方​案​。​注​意​为​了​以​后​的​调​整​,大​概​10GB的​卷​组​空​间​没​有​分​配​。​

Example Usage

这​个​方​案​并​不​是​所​有​情​形​下​最​好​的​。​
Partition Size and type
/boot 100 MB ext3 partition
swap 2 GB swap
LVM物​理​卷​ 保​留​空​间​,做​为​一​个​LVM卷​组​
表 7.4. Example partition setup

物​理​卷​分​配​到​默​认​的​卷​组​中​并​被​分​为​以​下​逻​辑​卷​:
Partition Size and type
/ 13 GB ext4
/var 4 GB ext4
/home 50 GB ext4
表 7.5. 示​例​分​区​设​置​:LVM物​理​卷​

例 7.1. Example partition setup

7.21.5. 添​加​分​区​

Note

你​必​须​为​本​次​按​装​指​定​至​少​一​个​分​区​。​详​情​请​见 附录 A, 磁​盘​分​区​简​介​。​
创​建​一​个​新​分​区​
创​建​一​个​新​分​区​。​
图 7.24. 创​建​一​个​新​分​区​

  • 「​挂​载​点​」​:输​入​分​区​的​挂​载​点​。​譬​如​,如​果​这​个​分​区​是​根​分​区​,输​入 /;如​果​是 /boot 分​区​,输​入 /boot ,等​等​。​你​还​可​以​使​用​拉​下​菜​单​来​为​你​的​分​区​选​择​正​确​的​挂​载​点​。​而​对​于​交​换​空​间​分​区​,则​不​应​该​设​置​挂​载​点 - 把​文​件​系​统​类​型​设​置​为 swap 就​足​够​了​。​
  • 「​文​件​系​统​类​型​」​:用​下​拉​菜​单​为​这​个​分​区​选​择​合​适​的​文​件​系​统​类​型​。​关​于​文​件​系​统​的​更​多​信​息​,请​参​阅 第 7.21.5.1 节 “文​件​系​统​类​型​”。​
  • 「​允​许​的​驱​动​器​」​:这​个​字​段​包​括​在​你​的​系​统​上​安​装​的​硬​盘​列​表​。​如​果​某​个​硬​盘​的​复​选​框​被​突​出​显​示​,则​表​示​可​以​在​该​硬​盘​上​创​建​想​要​的​分​区​。​如​果​那​个​复​选​框​没​有​打​勾​,那​么​这​个​分​区​将​绝​不​会​在​该​硬​盘​上​创​建​。​通​过​不​同​的​复​选​框​设​置​,你​可​使 anaconda 在​你​需​要​的​地​方​放​置​分​区​,或​让 anaconda 来​决​定​应​该​放​置​分​区​的​地​方​。​
  • 「​大​小​(MB)」​:输​入​分​区​的​大​小​(MB)。​注​意​,该​字​段​从 100MB 开​始​;若​不​改​变​,创​建​的​分​区​将​只​有 100MB。​
  • 「​其​它​大​小​选​项​」​:选​择​是​否​要​将​分​区​保​持​为​固​定​大​小​、​允​许​它​“​增​长​”​(使​用​硬​盘​驱​动​器​上​的​可​用​空​间​)到​某​一​程​度​,或​允​许​它​“​增​长​”​到​使​用​全​部​硬​盘​驱​动​器​上​可​用​的​剩​余​空​间​。​
    如​果​你​选​择 「​指​定​空​间​大​小​(MB)」​,你​必​须​在​这​个​选​项​右​侧​的​字​段​内​给​出​大​小​限​制​。​这​会​允​许​你​在​你​的​硬​盘​驱​动​器​上​保​留​一​定​的​空​间​为​将​来​使​用​。​
  • 「​强​制​为​主​分​区​」​:选​择​你​创​建​的​分​区​是​否​是​磁​盘​的​四​个​主​分​区​之​一​。​如​果​没​有​选​定​,这​个​分​区​将​被​创​建​为​逻​辑​分​区​。​详​情​请​参​考 第 A.1.3 节 “分​区​内​的​分​区 — 扩​展​分​区​概​述​”。​
  • 「​确​定​」​:当​你​对​设​置​满​意​并​想​创​建​分​区​的​时​候​,选​择​「​确​定​」​按​钮​。​
  • 「​取​消​」​:如​果​你​不​想​创​建​这​个​分​区​,选​择​「​取​消​」​按​钮​。​

7.21.5.1. 文​件​系​统​类​型​

Fedora允​许​您​根​据​分​区​将​使​用​的​文​件​系​统​来​创​建​不​同​的​分​区​类​型​。​下​面​是​对​不​同​文​件​系​统​以​及​它​们​的​使​用​方​法​的​简​单​描​述​。​

7.22. x86、​AMD64 和 Intel® 64 系​统​的​引​导​装​载​程​序​(Boot Loader)的​配​置​

如​果​不​使​用​引​导​介​质​来​引​导​你​的​系​统​,你​通​常​需​要​安​装​一​个​引​导​装​载​程​序​。​引​导​装​载​程​序​是​计​算​机​启​动​时​所​运​行​的​第​一​个​软​件​,它​的​责​任​是​载​入​操​作​系​统​内​核​软​件​并​把​控​制​权​转​交​给​它​。​然​后​,内​核​再​初​始​化​操​作​系​统​的​其​他​部​分​。​

Installing in text mode

If you install Fedora in text mode, the installer configures the bootloader automatically and you cannot customize bootloader settings during the installation process.
GRUB(GRand Unified Bootloader)是​一​个​默​认​安​装​的​功​能​强​大​的​引​导​装​载​程​序​。​GRUB 能​够​通​过​连​锁​载​入​(chain-loading)来​装​载​多​种​免​费​和​专​有​操​作​系​统​(连​锁​载​入​是​通​过​载​入​另​一​个​引​导​装​载​程​序​来​载​入 DOS 或 Windows 之​类​不​被​支​持​的​操​作​系​统​的​机​制​)。​

The GRUB boot menu

The GRUB menu defaults to being hidden, except on dual-boot systems. To show the GRUB menu during system boot, press and hold the Shift key before the kernel is loaded. (Any other key works as well but the Shift key is the safest to use.)
引​导​装​载​程​序​配​置​
配​置​你​想​引​导​系​统​的​方​法​。​
图 7.25. 引​导​装​载​程​序​配​置​

您​的​系​统​可​能​已​经​安​装​了​一​个​引​导​加​载​程​序​。​一​个​操​作​系​统​会​安​装​自​己​首​选​的​引​导​加​载​程​序​,或​者​您​安​装​了​第​三​方​的​引​导​加​载​程​序​。​如​果​您​的​引​导​加​载​程​序​无​法​识​别 Linux 分​区​,可​能​就​无​法​引​导 Fedora。​使​用 GRUB 作​为​您​的​引​导​加​载​程​序​,可​以​引​导 Linux 和​大​多​数​其​他​操​作​系​统​。​按​照​这​章​的​描​述​来​安​装 GRUB。​

Installing GRUB

如​果​您​安​装 GRUB,它​将​覆​盖​已​有​的​引​导​加​载​程​序​。​
By default, the installation program installs GRUB in the master boot record or MBR, of the device for the root file system. To decline installation of a new boot loader, unselect Install boot loader on /dev/sda.

Warning

如​果​由​于​某​种​原​因​你​选​择​不​安​装 GRUB,你​将​无​法​直​接​引​导​系​统​,你​必​须​得​使​用​另​一​种​引​导​方​法​(如​商​用​引​导​装​载​程​序​)。​只​有​当​你​确​定​另​有​引​导​系​统​的​方​法​时​才​使​用​该​选​项​!
如​果​您​已​经​安​装​了​其​他​操​作​系​统​,Fedora 尝​试​自​动​检​测​并​配​置 GRUB 来​引​导​它​们​。​如​果 GRUB 没​有​检​测​到​它​们​的​话​,您​可​以​手​动​配​置​任​何​其​他​的​操​作​系​统​。​
要​添​加​,删​除​或​改​变​探​测​到​的​操​作​系​统​设​置​,使​用​该​选​项​。​
Add
选​择 增​加​ 按​钮​来​在 GRUB 中​包​括​其​他​的​操​作​系​统​。​
在​下​拉​菜​单​中​,选​择​包​含​可​启​动​的​操​作​系​统​的​分​区​,然​后​为​这​个​项​目​命​名​。​GRUB 将​在​启​动​菜​单​中​显​示​这​个​名​称​。​
Edit
要​修​改 GRUB 启​动​管​理​器​的​一​个​项​目​,选​择​它​然​后​按​下 编​辑​ 按​钮​。​
Delete
要​从 GRUB 启​动​菜​单​中​删​除​一​个​项​目​,选​择​它​然​后​按​下​界​面​中​的 删​除​ 按​钮​。​
在​你​想​要​的​引​导​分​区​旁​边​选​择​「​默​认​」​来​选​择​你​默​认​的​可​引​导​操​作​系​统​。​你​选​定​了​默​认​引​导​映​像​后​,安​装​才​会​继​续​。​

Note

「​标​签​」​列​中​列​出​的​信​息​是​你​在​引​导​所​需​操​作​系​统​时​必​须​在​非​图​形​化​引​导​装​载​程​序​的​引​导​提​示​下​输​入​的​信​息​。​
一​旦​你​已​载​入 GRUB 引​导​屏​幕​,使​用​箭​头​键​来​选​择​引​导​标​签​,键​入 e 来​编​辑​。​你​将​会​看​到​所​选​引​导​标​签​配​置​文​件​中​的​项​目​列​表​。​
在​别​人​可​以​亲​身​访​问​你​的​服​务​器​的​情​况​下​,引​导​装​载​程​序​密​码​为​你​提​供​了​一​种​安​全​机​制​。​
如​果​你​打​算​安​装​引​导​装​载​程​序​,你​应​该​创​建​一​个​密​码​来​保​护​你​的​系​统​。​若​没​有​引​导​装​载​程​序​密​码​,能​够​进​入​你​的​系​统​的​用​户​将​可​以​向​内​核​传​递​选​项​,从​而​减​弱​你​的​系​统​安​全​性​;若​使​用​了​引​导​装​载​程​序​密​码​,用​户​必​须​先​输​入​密​码​才​能​选​择​非​标​准​的​引​导​选​项​。​然​而​,能​够​从​物​理​角​度​使​用​你​的​机​器​的​用​户​仍​可​以​从​软​盘​、​光​盘​、​或 USB 介​质​(若 BIOS 支​持​)引​导​。​包​括​引​导​装​载​程​序​密​码​的​保​安​计​划​还​应​该​解​决​其​它​引​导​方​法​带​来​的​安​全​问​题​。​

不​使​用 GRUB 密​码​

如​果​您​的​系​统​只​有​一​个​可​被​信​任​的​操​作​员​,或​控​制​台​的​访​问​在​物​理​上​很​安​全​,您​可​能​不​需​要 GRUB 密​码​。​然​而​,如​果​一​个​不​可​信​的​人​能​物​理​访​问​您​的​电​脑​键​盘​和​显​示​器​。 他​将​能​够​重​新​引​导​系​统​然​后​访​问 GRUB。​这​时​密​码​将​很​有​用​。​
如​果​你​选​择​要​使​用​引​导​装​载​程​序​密​码​来​增​进​你​的​系​统​安​全​性​,请​确​定​选​择​标​为​「​使​用​引​导​装​载​程​序​密​码​」​的​复​选​框​。​
一​旦​选​毕​,输​入​密​码​并​确​认​。​
GRUB 将​密​码​以​加​密​形​式​存​储​,因​此​不​会​ 被​读​取​或​非​法​取​得​。​如​果​您​忘​记​了​引​导​密​码​,就​按​照​通​常​的​方​式​启​动​,然​后​修​改 /boot/grub/grub.conf 中​的​密​码​一​项​。​如​果​您​无​法​启​动​,那​么​可​以​用​第​一​张 Fedora 安​装​光​盘​以 "rescue" 模​式​来​进​入​系​统​,重​置 GRUB 密​码​。​
如​果​您​一​定​要​修​改 GRUB 密​码​,使​用 grub-md5-crypt 实​用​工​具​。​关​于​如​何​使​用​这​个​工​具​,可​以​在​终​端​下​用​命​令 man grub-md5-crypt 来​查​看​手​册​。​
要​配​置​更​高​级​的​引​导​装​载​程​序​选​项​,如​改​变​磁​盘​顺​序​或​往​内​核​传​入​参​数​,在​点​击​「​下​一​步​」​之​前​,你​要​确​保​已​经​选​中​了​「​配​置​高​级​引​导​装​载​程​序​选​项​」​。​

7.22.1. 高​级​引​导​装​载​程​序​配​置​

现​在​,你​已​选​定​了​要​安​装​的​引​导​装​载​程​序​,你​还​可​以​决​定​要​在​哪​里​安​装​引​导​装​载​程​序​。​你​可​以​在​下​面​两​个​位​置​之​一​安​装​引​导​装​载​程​序​:

Note

如​果​你​有​一​个 RAID 卡​,请​留​意​某​些 BIOS 不​支​持​从 RAID 卡​引​导​。​在​这​类​情​况​下​,引​导​装​载​程​序​不​应​该​被​安​装​在 RAID 阵​列​的 MBR 上​。​引​导​装​载​程​序​应​该​被​安​装​在​创​建 /boot 分​区​所​在​的​同​一​驱​动​器​上​的 MBR。​
If your system only uses Fedora, you should choose the MBR.
如​果​你​想​重​新​排​列​驱​动​器​顺​序​,或​者​你​的 BIOS 所​返​回​的​驱​动​器​顺​序​不​正​确​,点​击​「​改​变​驱​动​器​顺​序​」​按​钮​。​如​果​你​有​多​个 SCSI 适​配​器​或​者​兼​有 SCSI 和 IDE 适​配​器​,并​想​从 SCSI 设​备​中​引​导​,改​变​驱​动​器​顺​序​可​能​会​发​挥​作​用​。​
你​已​经​完​成​了​多​数​安​装​选​择​,现​在​就​可​以​确​认​要​为​系​统​选​择​默​认​软​件​包​还​是​定​制​软​件​包​。​
The Package Installation Defaults screen appears and details the default package set for your Fedora installation. This screen varies depending on the version of Fedora you are installing.

Installing from a Live Image

If you install from a Fedora Live image, you cannot make package selections. This installation method transfers a copy of the Live image rather than installing packages from a repository. To change the package selection, complete the installation, then use the Add/Remove Software application to make desired changes.

Installing in text mode

If you install Fedora in text mode, you cannot make package selections. The installer automatically selects packages only from the base and core groups. These packages are sufficient to ensure that the system is operational at the end of the installation process, ready to install updates and new packages. To change the package selection, complete the installation, then use the Add/Remove Software application to make desired changes.
Package Group Selection
选​择​你​想​要​安​装​哪​些​软​件​包​组​。​
图 7.27. Package Group Selection

By default, the Fedora installation process loads a selection of software that is suitable for a desktop system. To include or remove software for common tasks, select the relevant items from the list:
Office and Productivity
This option provides the OpenOffice.org productivity suite, the Planner project management application, graphical tools such as the GIMP, and multimedia applications.
Software Development
This option provides the necessary tools to compile software on your Fedora system.
Web server
This option provides the Apache Web server.
要​选​择​组​件​,点​击​它​旁​边​的​复​选​框​(参​阅 图 7.27 “Package Group Selection”)。​
要​进​一​步​定​制​你​的​软​件​包​,选​择​屏​幕​上​的​「​现​在​定​制​」​选​项​。​点​击​「​下​一​步​」​会​把​你​带​到​「​选​择​软​件​包​组​」​屏​幕​。​

7.23.1. Installing from Additional Repositories

You can define additional repositories to increase the software available to your system during installation. A repository is a network location that stores software packages along with metadata that describes them. Many of the software packages used in Fedora require other software to be installed. The installer uses the metadata to ensure that these requirements are met for every piece of software you select for installation.
The basic options are:
  • The Installation Repo repository is automatically selected for you. This represents the collection of software available on your installation CD or DVD.
  • The Fedora 11 - i386 repository contains the complete collection of software that was released as Fedora 11, with the various pieces of software in their versions that were current at the time of release. If you are installing from the Fedora 11 DVD or set of CDs, this option does not offer you anything extra. However, if you are installing from a Fedora Live CD, this option provides access to far more software than is included on the disk. Note that the computer must have access to the internet to use this option.
  • The Fedora 11 - i386 - Updates repository contains the complete collection of software that was released as Fedora 11, with the various pieces of software in their most current stable versions. This option not only installs the software that you select, but makes sure that it is fully updated as well. Note that the computer must have access to the internet to use this option.
Adding a software repository
Enter the details of additional software repositories.
图 7.28. Adding a software repository

To include software from repositories other than the Fedora package collection, select Add additional software repositories. You may provide the location of a repository of third-party software. Depending on the configuration of that repository, you may be able to select non-Fedora software during installation.
To edit an existing software repository location, select the repository in the list and then select Modify repository.

Network Access Required

If you change the repository information during a non-network installation, such as from a Fedora DVD, the installer prompts you for network configuration information.
If you select Add additional software repositories, the Edit repository dialog appears. Provide a Repository name and the Repository URL for its location.

Fedora Software Mirrors

To find a Fedora software mirror near you, refer to http://fedoraproject.org/wiki/Mirrors.
Once you have located a mirror, to determine the URL to use, find the directory on the mirror that contains a directory named repodata. For instance, the "Everything" repository for Fedora is typically located in a directory tree releases/11/Everything/arch/os, where arch is a system architecture name.
Once you provide information for an additional repository, the installer reads the package metadata over the network. Software that is specially marked is then included in the package group selection system. See 第 7.23.2 节 “Customizing the Software Selection” for more information on selecting packages.

Backtracking Removes Repository Metadata

If you choose Back from the package selection screen, any extra repository data you may have entered is lost. This allows you to effectively cancel extra repositories. Currently there is no way to cancel only a single repository once entered.

7.23.2. Customizing the Software Selection

Select Customize now to specify the software packages for your final system in more detail. This option causes the installation process to display an additional customization screen when you select Next.

Installing Support for Additional Languages

Select Customize now to install support for additional languages. Refer to 第 7.23.2.2 节 “Additional Language Support” for more information on configuring language support.
软​件​包​组​细​节​
选​择​从​该​组​中​添​加​或​删​除​可​选​软​件​包​。​
图 7.29. 软​件​包​组​细​节​



[2] A root password is the administrative password for your Fedora system. You should only log in as root when needed for system maintenance. The root account does not operate within the restrictions placed on normal user accounts, so changes made as root can have implications for your entire system.

[3] fsck 程​序​用​来​检​查​文​件​系​统​元​数​据​统​一​性​,还​可​以​选​用​它​修​复​一​个​或​多​个 Linux 文​件​系​统​。​

第 8 章 在 Intel® 或 AMD 系​统​上​进​行​安​装​的​故​障​解​除​

该​附​录​讨​论​一​些​常​见​的​安​装​问​题​以​及​它​们​的​解​决​办​法​。​

8.1. You are unable to boot Fedora

8.1.1. 无​法​使​用 RAID 卡​来​引​导​

如​果​你​无​法​执​行​安​装​并​且​无​法​正​确​引​导​系​统​,你​可​能​需​要​重​新​安​装​并​且​用​不​同​的​方​式​分​区​。​
某​些 BIOS 不​支​持​从 RAID 卡​引​导​。​在​安​装​的​结​束​部​分​,一​个​基​于​文​本​的​屏​幕​会​显​示​引​导​装​载​程​序​提​示​(例​如​:GRUB:)以​及​一​个​闪​动​的​光​标​。​如​果​情​况​如​此​,你​将​会​需​要​重​新​为​你​的​系​统​分​区​。​
不​论​你​选​择​的​是​自​动​分​区​还​是​手​工​分​区​,你​将​会​需​要​在 RAID 阵​列​之​外​,如​一​个​分​开​的​硬​盘​驱​动​器​上​,安​装 /boot 分​区​。​对​于​有​问​题​的 RAID 卡​,你​必​须​有​一​个​用​于​创​建​分​区​的​内​部​硬​盘​驱​动​器​。​
你​必​须​还​要​在 RAID 阵​列​外​的​一​个​驱​动​器​的 MBR 上​安​装​你​优​选​的​引​导​装​载​程​序​(GRUB 或 LILO)。​引​导​装​载​程​序​应​该​安​装​在​包​含 /boot/ 分​区​的​同​一​驱​动​器​上​。​
当​做​完​这​些​改​变​后​,你​应​该​可​以​结​束​安​装​并​使​用​合​适​的​方​法​引​导​系​统​。​
一​个​信​号 11 错​误​(通​常​被​称​为​分​段​错​误​)通​常​意​味​着​程​序​访​问​了​没​有​分​配​给​它​的​一​段​内​存​。​如​果​您​在​安​装​的​过​程​中​遇​到​了​一​个​致​命​的​信​号 11 错​误​,这​可​能​是​因​为​所​安​装​的​某​个​软​件​中​存​在​错​误​,或​者​是​硬​件​故​障​。​
If you receive a fatal signal 11 error during your installation, it is probably due to a hardware error in memory on your system's bus. Like other operating systems, Fedora places its own demands on your system's hardware. Some of this hardware may not be able to meet those demands, even if they work properly under another OS.
Ensure that you have the latest installation updates and images. Review the online errata to see if newer versions are available. If the latest images still fail, it may be due to a problem with your hardware. Commonly, these errors are in your memory or CPU-cache. A possible solution for this error is turning off the CPU-cache in the BIOS, if your system supports this. You could also try to swap your memory around in the motherboard slots to check if the problem is either slot or memory related.
Another option is to perform a media check on your installation CD-ROMs. Anaconda, the installation program, has the ability to test the integrity of the installation media. It works with the CD, DVD, hard drive ISO, and NFS ISO installation methods. Red Hat recommends that you test all installation media before starting the installation process, and before reporting any installation-related bugs (many of the bugs reported are actually due to improperly-burned CDs). To use this test, type the following command at the boot: prompt:
linux mediacheck
关​于​信​号 11 错​误​的​详​情​,请​参​阅​:
http://www.bitwizard.nl/sig11/

8.3. 安​装​过​程​中​的​问​题​

如​果​您​在​「​磁​盘​分​区​设​置​」​第 7.18 节 “Disk Partitioning Setup”)阶​段​后​遇​到​了​一​个​与​以​下​类​似​的​错​误​:
无​法​读 hda 设​备​上​的​分​区​表​。​要​创​建​新​分​区​,分​区​表​必​须​被​初​始​化​,这​将​破​坏​这​个​设​备​上​的​所​有​数​据​。​
you may not have a partition table on that drive or the partition table on the drive may not be recognizable by the partitioning software used in the installation program.
使​用​过 EZ-BIOS 之​类​程​序​的​用​户​遇​到​过​类​似​的​问​题​,这​个​问​题​导​致​了​无​法​被​恢​复​的​数​据​丢​失​(假​定​安​装​前​没​有​进​行​备​份​)。​
No matter what type of installation you are performing, backups of the existing data on your systems should always be made.
During some upgrades or installations of Fedora, the installation program (also known as anaconda) may fail with a Python or traceback error. This error may occur after the selection of individual packages or while trying to save the upgrade log in the /tmp/directory. The error may look similar to:
Traceback (innermost last):
File "/var/tmp/anaconda-7.1//usr/lib/anaconda/iw/progress_gui.py", line 20, in run
rc = self.todo.doInstall ()    
File "/var/tmp/anaconda-7.1//usr/lib/anaconda/todo.py", line 1468, in doInstall 
self.fstab.savePartitions ()    
File "fstab.py", line 221, in savePartitions      
sys.exit(0)  
SystemExit: 0   
Local variables in innermost frame:  
self: <fstab.GuiFstab instance at 8446fe0>  
sys: <module 'sys' (built-in)>  
ToDo object:  (itodo  ToDo  p1  (dp2  S'method'  p3  (iimage  CdromInstallMethod  
p4  (dp5  S'progressWindow'  p6   <failed>
在​会​发​生​这​个​错​误​的​系​统​中​,到 /tmp/ 的​链​接​可​能​是​与​其​它​位​置​的​符​号​链​接​,或​者 /tmp/ 自​从​创​建​以​来​已​被​改​变​。​这​些​符​号​链​接​或​被​改​变​的​链​接​在​安​装​进​程​中​无​效​,因​此​安​装​程​序​无​法​在​其​中​写​入​信​息​而​失​败​。​
If you experience such an error, first try to download any available updates for anaconda. Updates for anaconda and instructions for using them can be found at:
http://fedoraproject.org/wiki/Anaconda/Updates
anaconda 的​网​站​也​是​一​个​有​用​的​参​考​,它​位​于​:
http://fedoraproject.org/wiki/Anaconda
你​还​可​以​搜​寻​与​这​一​问​题​有​关​的​错​误​报​告​。​要​搜​寻​红​帽​的​错​误​跟​踪​系​统​,请​访​问​:
http://bugzilla.redhat.com/bugzilla/

8.4. 安​装​后​的​问​题​

If you have installed the X Window System but are not seeing a graphical desktop environment once you log into your system, you can start the X Window System graphical interface using the command startx.
输​入​了​该​命​令​后​,按 Enter 键​,图​形​化​界​面​就​会​被​显​示​。​
不​过​请​注​意​,这​只​在​这​一​次​中​有​效​,并​不​会​改​变​未​来​的​登​录​进​程​。​
要​设​置​您​的​系​统​从​而​使​您​能​够​使​用​图​形​化​屏​幕​登​录​,您​必​须​编​辑 /etc/inittab 这​个​文​件​,只​需​改​变​运​行​级​别​部​分​中​的​一​个​数​字​即​可​。​编​辑​完​毕​后​,重​新​引​导​计​算​机​,您​下​次​登​录​时​就​会​看​到​图​形​化​登​录​提​示​。​
打​开 shell 提​示​。​如​果​您​登​录​的​是​您​的​用​户​账​号​,键​入 su 命​令​来​变​成​根​用​户​身​份​。​
现​在​,键​入 gedit /etc/inittab 来​使​用 gedit 编​辑​这​个​文​件​。​/etc/inittab 文​件​就​会​打​开​。​在​第​一​个​屏​幕​上​,您​会​看​到​类​似​以​下​的​部​分​:
# Default runlevel. The runlevels used are: 
#   0 - halt (Do NOT set initdefault to this) 
#   1 - Single user mode 
#   2 - Multiuser, without NFS (The same as 3, if you do not have networking) 
#   3 - Full multiuser mode 
#   4 - unused 
#   5 - X11 
#   6 - reboot (Do NOT set initdefault to this) 
#  id:3:initdefault:
要​把​登​录​从​控​制​台​改​为​图​形​化​,您​需​要​把 id:3:initdefault: 这​一​行​中​的​数​字​从 3 改​为 5。​

Warning

请​只​把​默​认​的​运​行​级​别​数​字​从 3 改​为 5。​
你​改​后​的​那​一​行​应​该​类​似​:
 id:5:initdefault: 
当​您​对​所​做​改​变​满​意​后​,使​用 Ctrl+Q 键​组​合​来​保​存​并​退​出​该​文​件​。​您​会​看​到​一​条​消​息​询​问​您​是​否​要​保​存​所​做​改​变​。​点​击​「​保​存​」​。​
在​你​重​新​引​导​系​统​后​再​次​登​录​时​,你​就​会​看​到​图​形​化​登​录​提​示​。​
If you did not create a user account in the Setup Agent, log in as root and use the password you assigned to root.
如​果​您​没​有​记​住​根​口​令​,您​需​要​把​系​统​引​导​为 linux single。​
如​果​您​使​用​的​是​基​于 x86 的​系​统​,GRUB 是​您​所​安​装​的​引​导​装​载​程​序​,载​入​了 GRUB 引​导​屏​幕​后​,键​入 e 来​编​辑​。​您​会​看​到​您​所​选​定​的​引​导​标​签​的​配​置​文​件​中​的​项​目​列​表​。​
选​择​以 kernel 开​始​的​行​并​输​入 e 来​编​辑​这​个​启​动​项​。​
kernel 行​的​结​尾​处​,添​加​:
single
Press Enter to exit edit mode.
Once the boot loader screen has returned, type b to boot the system.
当​您​启​动​到​单​一​用​户​模​式​并​获​得​了 # 提​示​符​后​,您​需​要​输​入 passwd root,它​允​许​您​为​根​用​户​输​入​一​个​新​口​令​。​然​后​,您​可​以​输​入 shutdown -r now 来​使​用​新​的​根​用​户​口​令​重​新​启​动​这​个​系​统​。​
如​果​您​忘​记​了​您​的​用​户​帐​号​口​令​,您​必​须​变​成​根​用​户​。​要​变​成​根​用​户​,键​入 su - ,在​提​示​后​输​入​根​口​令​,然​后​键​入 passwd <username>。​这​将​会​允​许​您​为​某​一​指​定​的​用​户​帐​号​输​入​一​个​新​口​令​。​
If the graphical login screen does not appear, check your hardware for compatibility issues. Linuxquestions.org maintains a Hardware Compatibility List at:
http://www.linuxquestions.org/hcl/index.php

8.4.6. 你​的​内​存​不​能​够​被​识​别​吗​?

有​时​,内​核​不​能​识​别​您​的​全​部​内​存​(RAM)。​您​可​以​用 cat /proc/meminfo 命​令​来​校​验​。​
查​看​一​下​所​显​示​的​数​量​是​否​与​您​所​知​的​系​统​内​存​相​同​。​如​果​不​同​,在 /boot/grub/grub.conf 文​件​中​添​加​以​下​一​行​:
mem=xxM
xx 替​换​成​你​拥​有​的​内​存​数​量​(以 MB 为​单​位​)。​
/boot/grub/grub.conf 文​件​中​,以​上​的​例​子​与​下​面​相​似​:,
# NOTICE: You have a /boot partition. This means that 
#  all kernel paths are relative to /boot/ 
default=0 
timeout=30 
splashimage=(hd0,0)/grub/splash.xpm.gz 
 title Fedora (2.6.27.19-170.2.35.fc10.i686)
root (hd0,1)
kernel /vmlinuz-2.6.27.19-170.2.35.fc10.i686 ro root=UUID=04a07c13-e6bf-6d5a-b207-002689545705 mem=1024M
initrd /initrd-2.6.27.19-170.2.35.fc10.i686.img
重​新​引​导​后​,grub.conf 文​件​中​的​改​变​将​会​反​映​在​您​的​系​统​中​。​
当​您​已​载​入 GRUB 引​导​屏​幕​后​,键​入 e 来​编​辑​。 您​所​选​定​的​引​导​标​签​的​配​置​文​件​中​的​项​目​列​表​就​会​在​您​面​前​出​现​。​
选​择​开​头​为 kernel 的​行​,然​后​键​入 e 来​编​辑​这​一​引​导​项​目​。​
kernel 行​的​末​尾​,添​加​:
mem=xxM
这​里​的 xx 与​你​系​统​的​内​存​数​量​相​同​。​
Press Enter to exit edit mode.
Once the boot loader screen has returned, type b to boot the system.
Itanium users must enter boot commands with elilo followed by the boot command.
请​记​住​将 xx 替​换​成​您​系​统​的​内​存​数​量​。​按 Enter 键​来​引​导​。​

目录

9. 启​动​选​项​
9.1. 在​启​动​菜​单​下​配​置​安​装​系​统​
9.1.1. 指​定​语​言​
9.1.2. 配​置​界​面​
9.1.3. 更​新​anaconda
9.1.4. 指​定​安​装​方​法​
9.1.5. 手​动​配​置​网​络​设​置​
9.2. 允​许​远​程​访​问​安​装​系​统​
9.2.1. 允​许​用 VNC 远​程​访​问​
9.2.2. 连​接​安​装​系​统​到​一​个 VNC 监​听​程​序​
9.2.3. 允​许​用 Telnet 远​程​访​问​
9.3. 在​安​装​期​间​记​录​日​志​到​远​程​主​机​
9.3.1. 配​置​服​务​器​日​志​
9.4. 使​用 Kickstart 实​现​自​动​安​装​
9.5. 增​强​的​硬​件​支​持​
9.5.1. 用​驱​动​磁​盘​支​持​增​加​的​硬​件​
9.5.2. 越​过​自​动​硬​件​检​测​
9.6. 用​维​修​引​导​模​式​
9.6.1. 加​载​内​存 (RAM) 检​测​模​式​
9.6.2. 验​证​启​动​介​质​
9.6.3. 以​修​复​模​式​引​导​您​的​计​算​机​
9.6.4. 升​级​您​的​计​算​机​
10. 无​介​质​的​安​装​
10.1. 搜​索​引​导​文​件​
10.2. 编​辑 GRUB 配​置​
10.3. 引​导​安​装​
11. 配​置​一​个​安​装​服​务​器​
11.1. 配​置​cobbler
11.2. 设​置​发​布​目​录​
11.3. 映​射​网​络​位​置​
11.4. 导​入​发​行​版​
11.5. Manually configure a PXE server
11.5.1. Setting up the Network Server
11.5.2. PXE Boot Configuration
11.5.3. Adding PXE Hosts
11.5.4. TFTPD
11.5.5. 配​置 DHCP 服​务​器​
11.5.6. Adding a Custom Boot Message
11.5.7. Performing the PXE Installation
12. Installing Through VNC
12.1. VNC Viewer
12.2. VNC Modes in Anaconda
12.2.1. Direct Mode
12.2.2. Connect Mode
12.3. Installation Using VNC
12.3.1. Installation Example
12.3.2. Kickstart Considerations
12.3.3. 关​于​防​火​墙​
12.4. References
13. kickstart 安​装​
13.1. kickstart 安​装​是​什​么​?
13.2. 如​何​执​行 kickstart 安​装​
13.3. 创​建 kickstart 文​件​
13.4. kickstart 选​项​
13.4.1. 高​级​的​分​区​示​例​
13.5. Package Selection
13.6. 预​安​装​脚​本​
13.6.1. 范​例​
13.7. 安​装​后​脚​本​
13.7.1. 范​例​
13.8. 如​何​使 kickstart 文​件​可​被​利​用​
13.8.1. 创​建 kickstart 引​导​介​质​
13.8.2. 在​网​络​上​提​供 Kickstart 文​件​
13.9. 提​供​安​装​树​
13.10. 开​始 kickstart 安​装​
14. Kickstart Configurator
14.1. 基​本​配​置​
14.2. 安​装​方​法​
14.3. 引​导​装​载​程​序​选​项​
14.4. 分​区​信​息​
14.4.1. 创​建​分​区​
14.5. Network Configuration
14.6. 验​证​
14.7. 防​火​墙​配​置​
14.7.1. SELinux 配​置​
14.8. 显​示​配​置​
14.9. Package Selection
14.10. 预​安​装​脚​本​
14.11. 安​装​后​脚​本​
14.11.1. chroot 环​境​
14.11.2. 使​用​解​释​器​
14.12. 保​存​文​件​

第 9 章 启​动​选​项​

Fedora 安​装​系​统​包​括​一​系​列​管​理​程​序​的​功​能​和​选​项​。​要​使​用​引​导​选​项​,在 boot: 提​示​符​下​输​入 linux option。​
如​果​您​需​要​指​定​多​个​选​项​,用​空​格​分​开​它​们​。​例​如​:
linux 选​项​1 选​项​2 选​项​3

Anaconda 启​动​选​项​

Anaconda 安​装​程​序​有​许​多​的​启​动​选​项​,绝​大​多​数​都​列​在 http://fedoraproject.org/wiki/Anaconda/Options 维​基​网​页​中​。​

内​核​启​动​选​项​

The http://fedoraproject.org/wiki/KernelCommonProblems page lists many common kernel boot options. The full list of kernel options is in the file /usr/share/doc/kernel-doc-version/Documentation/kernel-parameters.txt, which is installed with the kernel-doc package.

Rescue Mode

Fedora 安​装​和 救​援​光​盘​ 任​何​一​个​都​能​以 救​援​模​式​ 启​动​,或​加​载​安​装​系​统​。​关​于​救​援​光​盘​和​救​援​模​式​的​更​多​信​息​,请​参​考 第 9.6.3 节 “以​修​复​模​式​引​导​您​的​计​算​机​”。​

9.1. 在​启​动​菜​单​下​配​置​安​装​系​统​

您​能​用​启​动​菜​单​来​指​定​安​装​系​统​的​许​多​设​置​,包​括​:
  • language
  • 显​示​分​辨​率​
  • 界​面​类​型​
  • Installation method
  • 网​络​设​置​

9.1.1. 指​定​语​言​

要​设​定​安​装​过​程​和​最​终​系​统​的​语​言​,用​lang选​项​指​定​语​言​的​ISO编​码​。​用​keymap选​项​配​置​正​确​的​键​盘​布​局​。​
例​如​, ISO 编​码 el_GRgr 分​别​是​希​腊​语​和​希​腊​键​盘​布​局​:
linux lang=el_GR keymap=gr

9.1.5. 手​动​配​置​网​络​设​置​

默​认​情​况​下​, 安​装​系​统​用​DHCP来​自​动​获​得​正​确​的​网​络​设​置​。​要​手​动​配​置​自​己​的​网​络​设​置​, 在 Configure TCP/IP(配​置 TCP/IP) 屏​幕​, 或 boot: 提​示​符​下​任​选​其​一​输​入​。 在​提​示​符​下​,您​可​以​为​安​装​系​统​指​定 ip 地​址​, netmaskgateway, 和 dns 服​务​器​设​置​。​如​果​您​在 boot: 提​示​符​下​指​定​网​络​配​置​,这​些​设​置​将​用​在​安​装​过​程​中​,而 Configure TCP/IP(配​置 TCP/IP) 屏​幕​不​会​出​现​。​
这​个​例​子​是​为​一​个​用​192.168.1.10作​为​IP地​址​的​安​装​系​统​来​配​置​网​络​设​置​:
linux ip=192.168.1.10 子​网​掩​码​=255.255.255.0 网​关​=192.168.1.1 dns=192.168.1.2,192.168.1.3

配​置​安​装​系​统​

Use the Network Configuration screen to specify the network settings for the new system. Refer to 第 7.15.1 节 “Manual configuration” for more information on configuring the network settings for the installed system.

9.2. 允​许​远​程​访​问​安​装​系​统​

You may access either graphical or text interfaces for the installation system from any other system. Access to a text mode display requires telnet, which is installed by default on Fedora systems. To remotely access the graphical display of an installation system, use client software that supports the VNC (Virtual Network Computing) display protocol. A number of providers offer VNC clients for Microsoft Windows and Mac OS, as well as UNIX-based systems.
linux syslog=192.168.1.20:514
linux ks=location/kickstart-file.cfg
Kickstart source Option format
CD 或 DVD 驱​动​器​ ks=cdrom:/directory/ks.cfg
Hard Drive ks=hd:/device/directory/ks.cfg
其​它​设​备​ ks=file:/device/directory/ks.cfg
HTTP Server ks=http://server.mydomain.com/directory/ks.cfg
FTP Server ks=ftp://server.mydomain.com/directory/ks.cfg
NFS Server ks=nfs:server.mydomain.com:/directory/ks.cfg
表 9.2. Kickstart sources

要​从​一​个​网​络​服​务​器​上​的​脚​本​或​应​用​中​获​得 Kickstart 文​件​,用 ks= 选​项​指​定​这​个​应​用​的 URL 链​接​。​如​果​您​增​加 kssendmac 选​项​,请​求​也​将​发​送 HTTP 报​头​到​网​络​应​用​程​序​。​您​的​应​用​程​序​能​用​这​个​报​头​来​识​别​电​脑​。​这​行​发​送​一​个​带​报​头​的​请​求​给​应​用​程​序​http://server.mydomain.com/kickstart.cgi
linux ks=http://server.mydomain.com/kickstart.cgi kssendmac

9.5. 增​强​的​硬​件​支​持​

默​认​情​况​下​, Fedora 尝​试​自​动​检​测​和​配​置​您​电​脑​上​所​有​支​持​的​部​件​。​Fedora 用​操​作​系​统​自​带​的​软​件 drivers支​持​普​遍​使​用​的​大​部​分​硬​件​。​要​支​持​其​他​设​备​您​需​要​在​安​装​期​间​或​稍​后​提​供​一​个​附​加​驱​动​。​

9.5.1. 用​驱​动​磁​盘​支​持​增​加​的​硬​件​

安​装​系​统​能​从​磁​盘​,优​盘​,或​网​络​服​务​器​加​载​驱​动​来​配​置​支​持​的​一​个​新​设​备​。​在​完​成​安​装​之​后​,取​出​任​何​驱​动​盘​并​保​存​以​备​稍​后​使​用​。​
dd if=drivers.img of=/dev/fd0
linux dd
Image source Option format
选​择​一​个​驱​动​器​和​设​备​。​ dd
HTTP Server dd=http://server.mydomain.com/directory/drivers.img
FTP Server dd=ftp://server.mydomain.com/directory/drivers.img
NFS Server dd=nfs:server.mydomain.com:/directory/drivers.img
表 9.3. Driver disk image sources

9.5.2. 越​过​自​动​硬​件​检​测​

对​于​一​些​设​备​自​动​硬​件​配​置​的​模​块​可​能​失​败​,或​者​导​致​不​稳​定​。​在​这​种​情​况​下​,您​可​能​需​要​禁​止​这​个​设​备​类​型​的​自​动​配​置​,然​后​在​安​装​过​程​完​成​后​采​用​附​加​步​骤​手​动​配​置​这​个​设​备​。​

检​查​发​行​注​记​

参​考​发​行​注​记​获​得​特​殊​设​备​已​知​问​题​的​信​息​。​
要​越​过​自​动​硬​件​检​测​,用​下​面​的​一​个​或​更​多​选​项​:
Compatibility Option
禁​止​所​有​硬​件​检​测​ noprobe
禁​止​图​形​,键​盘​,和​鼠​标​检​测​ headless
禁​用​将​键​盘​和​鼠​标​信​息​传​递​给​安​装​的​第​二​步​ nopass
为​视​频​使​用​基​本​的 VESA 驱​动​ xdriver=vesa
安​装​过​程​中​禁​止​shell访​问​虚​拟​终​端​2 noshell
禁​用​高​级​电​源​配​置​界​面​(ACPI) acpi=off
禁​用​计​算​机​检​查​例​外​(MCE)CPU自​检​。​ nomce
在​AMD64架​构​下​禁​用​非​均​匀​内​存​访​问​ numa-off
强​制​内​核​探​测​指​定​数​额​的​内​存​,xxx以​MB为​单​位​。​ mem=xxxm
仅​为 IDE 和 SATA 驱​动​器​启​用 DMA libata.dma=1
禁​止 BIOS-assisted RAID nodmraid
禁​止​火​线​设​备​检​测​ nofirewire
禁​止​并​行​端​口​检​测​ noparport
禁​止 PC 卡 (PCMCIA) 设​备​检​测​ nopcmcia
禁​止 USB 存​储​设​备​检​测​ nousbstorage
禁​止​所​有 USB 设​备​检​测​ nousb
禁​止​所​有​网​络​设​备​探​测​ nonet
表 9.4. 硬​件​选​项​

附​加​屏​幕​

isa 选​项​让​系​统​在​安​装​过​程​的​开​始​显​示​一​个​附​加​文​本​界​面​。​用​这​个​屏​幕​配​置​您​电​脑​上​的 ISA 设​备​。​

重要

其​它​内​核​启​动​项​对​anaconda没​有​特​别​意​义​,并​且​对​安​装​过​程​无​影​响​。​然​而​如​果​使​用​这​些​选​项​启​动​系​统​,anaconda会​将​它​们​保​存​到​引​导​器​配​置​文​件​中​。​

9.6. 用​维​修​引​导​模​式​

9.6.1. 加​载​内​存 (RAM) 检​测​模​式​

内​存​模​块​的​错​误​可​能​导​致​系​统​突​然​停​止​响​应​或​崩​溃​。​有​时​,内​存​模​块​错​误​只​会​在​特​定​的​软​件​组​合​中​出​现​。​因​此​,您​应​当​在​第​一​次​安​装 Fedora 系​统​前​测​试​内​存​,即​使​它​以​前​可​以​运​行​其​他​操​作​系​统​。​
这​部​分​讨​论​如​何​在​您​的​系​统​中​在​不​生​成​附​加​物​理​介​质​的​情​况​下​安​装 Fedora。​另​外​,您​可​以​使​用​现​有 GRUB 引​导​装​载​程​序​启​动​安​装​程​序​。​

linux 需​要​的​

这​个​过​程​假​设​您​有​使​用 Fedora 或​者​其​它​相​关 Linux 发​行​本​以​及 GRUB 的​经​验​。​它​还​假​设​您​是​一​个​有 Linux 使​用​经​验​的​用​户​。​

10.1. 搜​索​引​导​文​件​

要​执​行​无​介​质​安​装​或​者 PXE 服​务​器​安​装​,您​的​系​统​必​须​在​本​地​安​装​两​个​文​件​,一​个​内​核​和​一​个​初​始 RAM 磁​盘​。​
  1. Download a Live image or DVD distribution, or to locate an installation mirror, visit http://mirrors.fedoraproject.org/publiclist/Fedora/11/.
  2. 请​使​用​以​下​方​法​之​一​定​位 isolinux/ 文​件​夹​:
    • 如​果​您​选​择​下​载​映​像​,请​使​用​适​当​的​桌​面​工​具​打​开​。​如​果​您​正​在​使​用 Fedora,请​双​击​该​文​件​用 Archive Manager 打​开​它​。​打​开 isolinux/ 文​件​夹​。​
    • If you chose not to download a whole image because you wish to install via the network, locate the desired release. In general, once you find a suitable mirror, browse to the releases/11/Fedora/arch/os/isolinux/ folder.

    可​用​安​装​类​型​

    如​果​您​下​载​了​一​个​映​像​,您​可​能​接​下​来​选​择​基​于​硬​盘​的​安​装​或​者​网​络​安​装​。​如​果​您​只​从​一​个​镜​像​中​下​载​选​择​的​文​件​,您​可​能​只​能​执​行​网​络​安​装​。​
  3. 从​选​择​的​源​中​将 vmlinuzinitrd.img 复​制​到 /boot/ 目​录​,将​其​重​新​命​名​为 vmlinuz-installinitrd.img-install。​您​必​须​有 root 权​限​以​便​可​将​文​件​写​入 /boot/ 目​录​。​

10.2. 编​辑 GRUB 配​置​

GRUB 引​导​装​载​程​序​使​用​配​置​文​件 /boot/grub/grub.conf。​要​将 GRUB 配​置​为​从​新​的​文​件​引​导​,请​在 /boot/grub/grub.conf 中​添​加​一​个​指​向​它​们​的​引​导​字​段​。​
最​小​的​引​导​字​段​类​似​如​下​:
title Installation
        root (hd0,0)
        kernel /vmlinuz-install
        initrd /initrd.img-install
您​可​能​希​望​在​引​导​字​段 kernel 行​最​后​添​加​选​项​。​这​些​选​项​会​在​用​户​通​常​互​动​设​定​的 Anaconda 设​置​初​步​选​项​。​可​用​安​装​程​序​引​导​选​项​列​表​请​参​考 第 9 章 启​动​选​项​。​
以​下​选​项​通​常​用​于​无​介​质​安​装​中​:
  • ip=
  • method=
  • lang=
  • keymap=
  • ksdevice=(如​果​安​装​需​要 eth0 之​外​的​接​口​)
  • vncvncpassword= 用​于​远​程​安​装​
完​成​后​,在 /boot/grub/grub.conf 文​件​中​更​改 default 选​项​指​向​您​新​添​加​的​第​一​个​字​段​:
default 0

10.3. 引​导​安​装​

重​启​系​统​。​GRUB 引​导​安​装​内​核​和 RAM 磁​盘​,包​括​您​设​置​的​所​有​选​项​。​您​现​在​可​能​要​参​考​本​指​南​的​有​关​章​节​进​行​下​一​步​安​装​。​如​果​您​选​择​使​用 VNC 进​行​远​程​安​装​,请​参​考 第 9.2 节 “允​许​远​程​访​问​安​装​系​统​” 查​看​如​何​连​接​远​程​系​统​。​

第 11 章 配​置​一​个​安​装​服​务​器​

针​对​有​经​验​的​用​户​

这​部​分​附​录​是​针​对​有​过​使​用​Linux经​验​的​用​户​的​。​对​于​新​用​户​,推​荐​使​用​DVD发​行​版​中​的​Minimal Boot Media。​

Warning

The instructions in this appendix configures an automated install server. The default configuration includes destruction of all existing data on all disks for hosts that install using this method. This is often different from other network install server configurations which may provide for an interactive installation experience.
Fedora allows for installation over a network using the NFS, FTP, or HTTP protocols. A network installation can be started from a boot CD-ROM, a bootable flash memory drive, or by using the askmethod boot option with the Fedora CD #1 or DVD. Alternatively, if the system to be installed contains a network interface card (NIC) with Pre-Execution Environment (PXE) support, it can be configured to boot from files on another networked system rather than local media such as a CD-ROM.
For a PXE network installation, the client's NIC with PXE support sends out a broadcast request for DHCP information. The DHCP server provides the client with an IP address, other network information such as name server, the IP address or hostname of the tftp server (which provides the files necessary to start the installation program), and the location of the files on the tftp server. This is possible because of PXELINUX, which is part of the syslinux package.
In the past, administrators needed to perform a great deal of manual configuration to produce an installation server. However, if you have a Red Hat Enterprise Linux, CentOS, or Fedora server on your local network, you can use cobbler to perform these tasks. To configure a PXE server manually, see 第 11.5 节 “Manually configure a PXE server”.
这​一​部​分​向​导​里​的​工​作​,需​要​切​换​到​root账​户​来​进​行​。​切​换​的​命​令​是​su -。​另​外​一​种​方​法​是​每​次​运​行​命​令​是​在​前​面​加​上​su -c,使​命​令​行​成​为​su -c 'command'。​

11.1. 配​置​cobbler

使​用​以​下​命​令​安​装​cobbler。​
yum -y install cobbler
cobbler命​令​可​以​进​行​设​置​的​自​检​并​报​告​检​测​结​过​。​运​行​以​下​命​令​以​检​测​设​置​:
cobbler check
改​变 /var/lib/cobbler/settings 文​件​的​设​置​来​反​映​服​务​器​的 IP 地​址​信​息​。​您​至​少​需​要​修​改 server 和​next_server 两​项​,虽​然​有​时​它​们​的 IP 地​址​相​同​
如​果​您​还​没​有​运​行 DHCP 服​务​, 您​还​要​修​改​manage_dhcp 参​数​为 1。 如​果​您​已​有​一​个​运​行​的 DHCP 服​务​器​,请​根​据 syslinux 软​件​包​的​内​容​进​行​配​置​。​更​多​信​息​参​考​本​地​文​件 /usr/share/doc/syslinux-version/syslinux.doc/usr/share/doc/syslinux-version/pxelinux.doc。​

11.2. 设​置​发​布​目​录​

从​一​个​完​整​的 Fedora DVD 或 ISO 映​像​设​置​发​布​目​录​,采​用​这​个​步​骤​

网​络​位​置​

从​网​路​源​创​建​本​地​镜​像​请​跳​过​这​章​,请​参​考 第 11.3 节 “映​射​网​络​位​置​”
  1. 如​果​您​使​用 DVD 盘​片​或 ISO 映​像​,请​创​建​一​个​目​录​作​为​挂​载​点​
    mkdir /mnt/dvd
    
    要​挂​载​一​个 DVD 盘​片​,在​输​入​下​列​命​令​:
    mount -o context=system_u:object_r:httpd_sys_content_t:s0 /dev/dvd /mnt/dvd
    
    要​挂​载​一​个​DVD ISO 镜​像​,输​入​下​列​命​令​:
    mount -ro loop,context=system_u:object_r:httpd_sys_content_t:s0 /path/to/image.iso /mnt/dvd
    
  2. 支​持 NFS 安​装​,创​建​一​个​文​件 /etc/exports,添​加​如​下​内​容​
    /mnt/dvd *(ro,async)
    
    输​入​下​列​命​令​,启​动 NFS 服​务​器​:
    /sbin/service rpcbind start /sbin/service nfs start
    
  3. 要​支​持 HTTP 安​装​,如​果 Apache 还​没​有​安​装​则​先​用 yum 进​行​安​装​:
    yum -y install httpd
    
    在 Apache 的​公​共​内​容​区​创​建​挂​载​磁​盘​内​容​的​连​接​:
    ln -s /mnt/dvd /var/www/html/distro
    

11.3. 映​射​网​络​位​置​

如​果​没​有​创​建​发​布​目​录​所​需​的​光​盘​或​映​像​,您​可​以​用 cobbler 来​配​置​一​个​发​布​服​务​器​。​cobbler命​令​在​导​入​过​程​中​可​以​从​网​络​获​取​发​布​目​录​
定​位​网​络​发​布​目​录​。​具​体​位​置​可​能​是​一​个 FTP,HTTP 或 rsync 可​以​访​问​的​网​络​主​机​。​需​注​意 URI 的​写​法​应​为​如​下​格​式​:
  • http://mirror.example.com/pub/fedora/linux/releases/11/Fedora/arch/os
  • ftp://mirror.example.com/pub/fedora/linux/releases/11/Fedora/arch/os
  • rsync://mirror.example.com/fedora/linux/releases/11/Fedora/arch/os

11.4. 导​入​发​行​版​

如​需​通​过​多​种​方​法​访​问​发​布​目​录​,对​不​同​方​法​采​用​不​同​名​称​执​行 cobbler import。​建​议​用​安​装​方​法​作​为​名​称​的​一​部​分​,这​样​客​户​端​的​启​动​目​录​里​会​得​到​体​现​
  1. 将 DVD 或 ISO 发​布​命​令​导​入 cobbler 执​行​这​个​命​令​:
    cobbler import --path=/mnt/dvd --name=distro_name
    
    distro_name来​说​,为​这​个​发​行​本​替​换​了​一​个​有​意​义​的​名​称​。​
    要​将​一​个​本​地​或​者​远​程​网​络​发​行​本​导​入 cobbler,请​运​行​这​个​命​令​。​请​使​用​您​在 第 11.3 节 “映​射​网​络​位​置​” 找​到​的 URI 替​换 network_URI,并​使​用​上​述​名​称​替​换 distro_name。​
    cobbler import --mirror=network_URI --name=distro_name
    

    导​入​一​个​源​

    cobbler用​如​上​命​令​导​入​发​布​目​录​时​,会​将​所​有​文​件​拷​贝​到​服​务​器​上​,这​将​会​花​一​点​时​间​。​
    如​果​您​认​为​没​有​必​要​再​创​建​一​个​本​地​的​副​本​,客​户​端​可​以​访​问​发​布​目​录​,可​以​用 --available-as 选​项​。​
    cobbler import --path=/mnt/dvd --name=distro_name --available-as=network_URI
    cobbler import --mirror=network_URI --name=distro_name --available-as=network_URI
    
    替​换 nework_URI 为​恰​当​的​网​络​发​布​路​径​。​这​个 URI 显​示​服​务​器​如​何​提​供​发​布​目​录​给​客​户​端​。​上​面​的​例​子​假​定​您​的 cobbler 服​务​器​和​您​的​客​户​端​用​相​同​的 URI 来​访​问​镜​像​。​如​果​不​是​可​用 --mirror 来​改​变​。​如​果​您​按​照​本​章​的​内​容​设​置​则​下​面​的​例​子​将​可​以​工​作​,假​设​服​务​器​的​地​址​为 192.168.1.1
    • nfs://192.168.1.1:/mnt/dvd
    • http://192.168.1.1:/distro
    如​必​要​,请​将 192.168.1.1 替​换​为​您 cobbler 服​务​器​的 IP 地​址​。​
  2. 运​行 cobbler sync 提​交​。​用 netstat -lp 命​令​检​查 cobbler 服​务​器​是​否​监​听​相​应​端​口​。​

    关​于​防​火​墙​

    根​据​服​务​器​配​置​,您​可​能​需​要​用 system-config-securitylevel 来​设​置​防​火​墙​以​允​许​相​应​的​网​络​服​务​:
    • 67 或​者 bootps,用​于 DHCP/BOOTP 服​务​器​
    • 69 或​者 tftp,用​于​提​供 PXE 载​入​程​序​
    • 80 or http, 如​果 cobbler 服​务​器​提​供 HTTP 安​装​服​务​
    • 20 and 21 or ftp,如​果 cobbler 服​务​器​提​供 FTP 安​装​服​务​
    • 111 or sunrpc, 如​果 cobbler 服​务​器​提​供 NFS 安​装​服​务​

11.5. Manually configure a PXE server

The following steps must be performed to prepare for a PXE installation:
  1. Configure the network (NFS, FTP, HTTP) server to export the installation tree.
  2. Configure the files on the tftp server necessary for PXE booting.
  3. Configure which hosts are allowed to boot from the PXE configuration.
  4. Start the tftp service.
  5. Configure DHCP.
  6. Boot the client, and start the installation.
Add Hosts
Add Hosts
图 11.1. Add Hosts

The next step is to configure which hosts are allowed to connect to the PXE boot server.
To add hosts, click the New button.
Add a Host
Add a Host
图 11.2. Add a Host

Enter the following information:
  • Hostname or IP Address/Subnet — The IP address, fully qualified hostname, or a subnet of systems that should be allowed to connect to the PXE server for installations.
  • Operating System — The operating system identifier to install on this client. The list is populated from the network install instances created from the Network Installation Dialog.
  • Serial Console — This option allows use of a serial console.
  • Kickstart File — The location of a kickstart file to use, such as http://server.example.com/kickstart/ks.cfg. This file can be created with the Kickstart Configurator. Refer to 第 14 章 Kickstart Configurator for details.
Ignore the Snapshot name and Ethernet options. They are only used for diskless environments.

第 12 章 Installing Through VNC

The Red Hat Enterprise Linux and Fedora installer (anaconda) offers you two interactive modes of operation. The original mode is a text-based interface. The newer mode uses GTK+ and runs in the X Window environment. This chapter explains how you can use the graphical installation mode in environments where the system lacks a proper display and input devices typically associated with a workstation. This scenario is typical of systems in datacenters, which are often installed in a rack environment and do not have a display, keyboard, or mouse. Additionally, a lot of these systems even lack the ability to connect a graphical display. Given that enterprise hardware rarely needs that ability at the physical system, this hardware configuration is acceptable.
Even in these environments, however, the graphical installer remains the recommended method of installation. The text mode environment lacks a lot of capabilities found in the graphical mode. Many users still feel that the text mode interface provides them with additional power or configuration ability not found in the graphical version. The opposite is true. Much less development effort is put in to the text-mode environment and specific things (for example, LVM configuration, partition layout, package selection, and bootloader configuration) are deliberately left out of the text mode environment. The reasons for this are:
  • Less screen real estate for creating user interfaces similar to those found in the graphical mode.
  • Difficult internationalization support.
  • Desire to maintain a single interactive installation code path.
Anaconda therefore includes a Virtual Network Computing (VNC) mode that allows the graphical mode of the installer to run locally, but display on a system connected to the network. Installing in VNC mode provides you with the full range of installation options, even in situations where the system lacks a display or input devices.

12.1. VNC Viewer

Performing a VNC installation requires a VNC viewer running on your workstation or other terminal computer. Locations where you might want a VNC viewer installed:
  • Your workstation
  • Laptop on a datacenter crash cart
VNC is open source software licensed under the GNU General Public License. Versions exist for Linux, Windows, and MacOS X. Here are some recommended VNC viewers:
  • vncviewer is available on Red Hat Enterprise Linux and Fedora Linux by installing the vnc package:
    # yum install vnc
    
  • TightVNC is available for Windows at http://www.tightvnc.com/
  • MacOS X includes built-in VNC support as of version 10.5. In the Finder, click the Go menu and choose Connect to Server. In the server address field, you can type vnc://SERVER:DISPLAY, where SERVER is the IP address or DNS host name of the VNC server you wish to connect to and DISPLAY is the VNC display number (usually 1), and click Connect.
Once you have verified you have a VNC viewer available, it's time to start the installation.

12.2. VNC Modes in Anaconda

Anaconda offers two modes for VNC installation. The mode you select will depend on the network configuration in your environment.

12.2.1. Direct Mode

Direct mode VNC in anaconda is when the client initiates a connection to the VNC server running in anaconda. Anaconda will tell you when to initiate this connection in the VNC viewer. Direct mode can be activated by either of the following commands:
  • Specify vnc as a boot argument.
  • Specify the vnc command in the kickstart file used for installation.
When you activate VNC mode, anaconda will complete the first stage of the installer and then start VNC to run the graphical installer. The installer will display a message on the console in the following format:
Running anaconda VERSION, the PRODUCT system installer - please wait...
Anaconda will also tell you the IP address and display number to use in your VNC viewer. At this point, you need to start the VNC viewer and connect to the target system to continue the installation. The VNC viewer will present anaconda to you in graphical mode.
There are some disadvantages to direct mode, including:
  • Requires visual access to the system console to see the IP address and port to connect the VNC viewer to.
  • Requires interactive access to the system console to complete the first stage of the installer.
If either of these disadvantages would prevent you from using direct mode VNC in anaconda, then connect mode is probably more suited to your environment.

12.2.2. Connect Mode

Certain firewall configurations or instances where the target system is configured to obtain a dynamic IP address may cause trouble with the direct VNC mode in anaconda. In addition, if you lack a console on the target system to see the message that tells you the IP address to connect to, then you will not be able to continue the installation.
The VNC connect mode changes how VNC is started. Rather than anaconda starting up and waiting for you to connect, the VNC connect mode allows anaconda to automatically connect to your view. You won't need to know the IP address of the target system in this case.
To activate the VNC connect mode, pass the vncconnect boot parameter:
boot: linux vncconnect=HOST
Replace HOST with your VNC viewer's IP address or DNS host name. Before starting the installation process on the target system, start up your VNC viewer and have it wait for an incoming connection.
Start the installation and when your VNC viewer displays the graphical installer, you are ready to go.

12.3. Installation Using VNC

Now that you have installed a VNC viewer application and selected a VNC mode for use in anaconda, you are ready to begin the installation.

12.3.1. Installation Example

The easiest way to perform an installation using VNC is to connect another computer directly to the network port on the target system. The laptop on a datacenter crash cart usually fills this role. If you are performing your installation this way, make sure you follow these steps:
  1. Connect the laptop or other workstation to the target system using a crossover cable. If you are using regular patch cables, make sure you connect the two systems using a small hub or switch. Most recent Ethernet interfaces will automatically detect if they need to be crossover or not, so it may be possible to connect the two systems directly using a regular patch cable.
  2. Configure the VNC viewer system to use a RFC 1918 address with no gateway. This private network connection will only be used for the purpose of installation. Configure the VNC viewer system to be 192.168.100.1/24. If that address is in use, just pick something else in the RFC 1918 address space that is available to you.
  3. Start the installation on the target system.
    1. Booting the installation DVD or CD.
      If booting the installation media (CD or DVD), make sure vnc is passed as a boot parameter. To add the vnc parameter, you will need a console attached to the target system that allows you to interact with the boot process. Enter the following at the prompt:
      boot: linux vnc
      
    2. Boot over the network.
      If the target system is configured with a static IP address, add the vnc command to the kickstart file. If the target system is using DHCP, add vncconnect=HOST to the boot arguments for the target system. HOST is the IP address or DNS host name of the VNC viewer system. Enter the following at the prompt:
      boot: linux vncconnect=HOST
      
  4. When prompted for the network configuration on the target system, assign it an available RFC 1918 address in the same network you used for the VNC viewer system. For example, 192.168.100.2/24.

    Note

    This IP address is only used during installation. You will have an opportunity to configure the final network settings, if any, later in the installer.
  5. Once the installer indicates it is starting anaconda, you will be instructed to connect to the system using the VNC viewer. Connect to the viewer and follow the graphical installation mode instructions found in the product documentation.

12.3.2. Kickstart Considerations

If your target system will be booting over the network, VNC is still available. Just add the vnc command to the kickstart file for the system. You will be able to connect to the target system using your VNC viewer and monitor the installation progress. The address to use is the one the system is configured with via the kickstart file.
If you are using DHCP for the target system, the reverse vncconnect method may work better for you. Rather than adding the vnc boot parameter to the kickstart file, add the vncconnect=HOST parameter to the list of boot arguments for the target system. For HOST, put the IP address or DNS host name of the VNC viewer system. See the next section for more details on using the vncconnect mode.

12.3.3. 关​于​防​火​墙​

If you are performing the installation where the VNC viewer system is a workstation on a different subnet from the target system, you may run in to network routing problems. VNC works fine so long as your viewer system has a route to the target system and ports 5900 and 5901 are open. If your environment has a firewall, make sure ports 5900 and 5901 are open between your workstation and the target system.
In addition to passing the vnc boot parameter, you may also want to pass the vncpassword parameter in these scenarios. While the password is sent in plain text over the network, it does provide an extra step before a viewer can connect to a system. Once the viewer connects to the target system over VNC, no other connections are permitted. These limitations are usually sufficient for installation purposes.

Important

Be sure to use a temporary password for the vncpassword option. It should not be a password you use on any systems, especially a real root password.
If you continue to have trouble, consider using the vncconnect parameter. In this mode of operation, you start the viewer on your system first telling it to listen for an incoming connection. Pass vncconnect=HOST at the boot prompt and the installer will attempt to connect to the specified HOST (either a hostname or IP address).

12.4. References

第 13 章 kickstart 安​装​

13.1. kickstart 安​装​是​什​么​?

Many system administrators would prefer to use an automated installation method to install Fedora on their machines. To answer this need, Red Hat created the kickstart installation method. Using kickstart, a system administrator can create a single file containing the answers to all the questions that would normally be asked during a typical installation.
Kickstart files can be kept on a single server system and read by individual computers during the installation. This installation method can support the use of a single kickstart file to install Fedora on multiple machines, making it ideal for network and system administrators.
Kickstart provides a way for users to automate a Fedora installation.

13.2. 如​何​执​行 kickstart 安​装​

kickstart 安​装​可​以​使​用​本​地​光​盘​、​本​地​硬​盘​驱​动​器​、​或​通​过 NFS、​FTP、​HTTP 来​执​行​。​
要​使​用 kickstart ,你​必​须​:
  1. 创​建​一​个 kickstart 文​件​。​
  2. 创​建​有 kickstart 文​件​的​引​导​介​质​或​者​使​这​个​文​件​在​网​络​上​可​用​。​
  3. 筹​备​安​装​树​。​
  4. 开​始 kickstart 安​装​。​
本​章​详​细​解​释​了​这​些​步​骤​。​

13.3. 创​建 kickstart 文​件​

The kickstart file is a simple text file, containing a list of items, each identified by a keyword. You can create it by using the Kickstart Configurator application, or writing it from scratch. The Fedora installation program also creates a sample kickstart file based on the options that you selected during installation. It is written to the file /root/anaconda-ks.cfg. You should be able to edit it with any text editor or word processor that can save files as ASCII text.
首​先​,在​你​创​建 kickstart 文​件​时​留​意​下​列​问​题​:

13.4. kickstart 选​项​

Note

如​果​某​选​项​后​面​跟​随​了​一​个​等​号​(=),它​后​面​就​必​须​指​定​一​个​值​。​在​示​例​命​令​中​,括​号​([])中​的​选​项​是​命​令​的​可​选​参​数​。​
autopart(可​选​)
ignoredisk(可​选​)
ignoredisk --drives=drive1,drive2,...
autostep(可​选​)
authauthconfig(必​需​)
bootloader(必​需​)
clearpart(可​选​)
cmdline(可​选​)
device(可​选​)
device <type> <moduleName> --opts=<options>
driverdisk(可​选​)
driverdisk <partition> [--type=<fstype>]
driverdisk --source=ftp://path/to/dd.img
driverdisk --source=http://path/to/dd.img
driverdisk --source=nfs:host:/path/to/img
firewall(可​选​)
firewall --enabled|--disabled [--trust=] <device> [--port=]
firstboot(可​选​)
halt(可​选​)
graphical(可​选​)
install(可​选​)
  • cdrom — Install from the first CD-ROM drive on the system.
  • harddrive — Install from a Red Hat installation tree on a local drive, which must be either vfat or ext2.
    • --biospart=
      从 BIOS 分​区​来​安​装​(如 82)。​
    • --partition=
      从​分​区​安​装​(如 sdb2)。​
    • --dir=
      包​含​安​装​树​的 variant 目​录​的​目​录​。​
    例​如​:
    harddrive --partition=hdb2 --dir=/tmp/install-tree
    
  • nfs — Install from the NFS server specified.
    • --server=
      要​从​中​安​装​的​服​务​器​(主​机​名​或 IP)。​
    • --dir=
      包​含​安​装​树​的 variant 目​录​的​目​录​。​
    • --opts=
      用​于​挂​载 NFS 输​出​的 Mount 选​项​(可​选​)。​
    例​如​:
    nfs --server=nfsserver.example.com --dir=/tmp/install-tree
    
  • url — Install from an installation tree on a remote server via FTP or HTTP.
    例​如​:
    url --url http://<server>/<dir>
    
    或​:
    url --url ftp://<username>:<password>@<server>/<dir>
    
interactive(可​选​)
iscsi(可​选​)
key(可​选​)
keyboard(必​需​)
be-latin1, bg, br-abnt2, cf, cz-lat2, cz-us-qwertz, de, de-latin1, 
de-latin1-nodeadkeys, dk, dk-latin1, dvorak, es, et, fi, fi-latin1, 
fr, fr-latin0, fr-latin1, fr-pc, fr_CH, fr_CH-latin1, gr, hu, hu101, 
is-latin1, it, it-ibm, it2, jp106, la-latin1, mk-utf, no, no-latin1, 
pl, pt-latin1, ro_win, ru, ru-cp1251, ru-ms, ru1, ru2,  ru_win, 
se-latin1, sg, sg-latin1, sk-qwerty, slovene, speakup,  speakup-lt, 
sv-latin1, sg, sg-latin1, sk-querty, slovene, trq, ua,  uk, us, us-acentos
lang(必​需​)
lang en_US
langsupport (deprecated)
@french-support
logvol(可​选​)
logvol <mntpoint> --vgname=<name> --size=<size> --name=<name> <options>
part pv.01 --size 3000 
volgroup myvg pv.01
logvol / --vgname=myvg --size=2000 --name=rootvol
logging(可​选​)
mediacheck(可​选​)
monitor(可​选​)
mouse(已​取​消​)
network(可​选​)
multipath(可​选​)
partpartition(对​于​安​装​是​必​需​的​,升​级​可​忽​略​)。
请​参​考 第 13.4.1 节 “高​级​的​分​区​示​例​” 里​关​于 part 的​详​细​示​例​。​
  • <mntpoint> — The <mntpoint> is where the partition is mounted and must be of one of the following forms:
    • /<path>
      例​如​,/、​/usr、​/home
    • swap
      该​分​区​被​用​作​交​换​空​间​。​
      要​自​动​决​定​交​换​分​区​的​大​小​,使​用 --recommended 选​项​:
      swap --recommended
      
      The recommended maximum swap size for machines with less than 2GB of RAM is twice the amount of RAM. For machines with 2GB or more, this recommendation changes to 2GB plus the amount of RAM.
    • raid.<id>
      该​分​区​用​于 software RAID(参​考 raid)。​
    • pv.<id>
      该​分​区​用​于 LVM(参​考 logvol)。​
  • --size= — The minimum partition size in megabytes. Specify an integer value here such as 500. Do not append the number with MB.
  • --grow — Tells the partition to grow to fill available space (if any), or up to the maximum size setting.

    Note

    If you use --grow= without setting --maxsize= on a swap partition, Anaconda will limit the maximum size of the swap partition. For systems that have less than 2GB of physical memory, the imposed limit is twice the amount of physical memory. For systems with more than 2GB, the imposed limit is the size of physical memory plus 2GB.
  • --maxsize= — The maximum partition size in megabytes when the partition is set to grow. Specify an integer value here, and do not append the number with MB.
  • --noformat — Tells the installation program not to format the partition, for use with the --onpart command.
  • --onpart= or --usepart= — Put the partition on the already existing device. For example:
    partition /home --onpart=hda1
    
    /home 置​于​必​须​已​经​存​在​的 /dev/hda1 上​。​
  • --ondisk= or --ondrive= — Forces the partition to be created on a particular disk. For example, --ondisk=sdb puts the partition on the second SCSI disk on the system.
  • --asprimary — Forces automatic allocation of the partition as a primary partition, or the partitioning fails.
  • --type= (replaced by fstype) — This option is no longer available. Use fstype.
  • --fstype= — Sets the file system type for the partition. Valid values are xfs, ext2, ext3, ext4, swap, vfat, and hfs.
  • --start= — Specifies the starting cylinder for the partition. It requires that a drive be specified with --ondisk= or ondrive=. It also requires that the ending cylinder be specified with --end= or the partition size be specified with --size=.
  • --end= — Specifies the ending cylinder for the partition. It requires that the starting cylinder be specified with --start=.
  • --bytes-per-inode= — Specifies the size of inodes on the filesystem to be made on the partition. Not all filesystems support this option, so it is silently ignored for those cases.
  • --recommended — Determine the size of the partition automatically.
  • --onbiosdisk — Forces the partition to be created on a particular disk as discovered by the BIOS.
  • --encrypted — Specifies that this partition should be encrypted.
  • --passphrase= — Specifies the passphrase to use when encrypting this partition. Without the above --encrypted option, this option does nothing. If no passphrase is specified, the default system-wide one is used, or the installer will stop and prompt if there is no default.

Note

如​果​因​为​某​种​原​因​分​区​失​败​了​,虚​拟​终​端 3 上​会​显​示​诊​断​信​息​。​
poweroff(可​选​)
raid(可​选​)
raid <mntpoint> --level=<level> --device=<mddevice> <partitions*>
part raid.01 --size=60 --ondisk=sda
part raid.02 --size=60 --ondisk=sdb 
part raid.03 --size=60 --ondisk=sdc
part swap --size=128 --ondisk=sda  
part swap --size=128 --ondisk=sdb  
part swap --size=128 --ondisk=sdc
part raid.11 --size=1 --grow --ondisk=sda  
part raid.12 --size=1 --grow --ondisk=sdb  
part raid.13 --size=1 --grow --ondisk=sdc
raid / --level=1 --device=md0 raid.01 raid.02 raid.03  
raid /usr --level=5 --device=md1 raid.11 raid.12 raid.13
reboot(可​选​)
repo(可​选​)
repo --name=<repoid> [--baseurl=<url>| --mirrorlist=<url>]
rootpw(必​需​)
rootpw [--iscrypted] <password>
selinux(可​选​)
selinux [--disabled|--enforcing|--permissive]
services(可​选​)
shutdown(可​选​)
skipx(可​选​)
text(可​选​)
timezone(可​选​)
timezone [--utc] <timezone>
upgrade(可​选​)
user(可​选​)
user --name=<username> [--groups=<list>] [--homedir=<homedir>] [--password=<password>] [--iscrypted] [--shell=<shell>] [--uid=<uid>]
vnc(可​选​)
vnc [--host=<hostname>] [--port=<port>] [--password=<password>]
volgroup(可​选​)
volgroup <name> <partition> <options>
part pv.01 --size 3000 
volgroup myvg pv.01 
logvol / --vgname=myvg --size=2000 --name=rootvol
请​参​考 第 13.4.1 节 “高​级​的​分​区​示​例​” 里​的 volgroup 的​详​细​示​例​。​
xconfig(可​选​)
zerombr(可​选​)
zfcp(可​选​)
%include (optional)
下​面​是​一​个​简​单​的​、​集​成​的​示​例​,它​展​示​了 clearpart、​raidpartvolgrouplogvol 等 kickstart 选​项​:
clearpart --drives=hda,hdc --initlabel  
# Raid 1 IDE config 
part raid.11    --size 1000     --asprimary     --ondrive=hda 
part raid.12    --size 1000     --asprimary     --ondrive=hda 
part raid.13    --size 2000     --asprimary     --ondrive=hda 
part raid.14    --size 8000                     --ondrive=hda 
part raid.15    --size 1 --grow                 --ondrive=hda             
part raid.21    --size 1000     --asprimary     --ondrive=hdc 
part raid.22    --size 1000     --asprimary     --ondrive=hdc 
part raid.23    --size 2000     --asprimary     --ondrive=hdc 
part raid.24    --size 8000                     --ondrive=hdc 
part raid.25    --size 1 --grow                 --ondrive=hdc  

# You can add --spares=x  
raid /          --fstype ext3 --device md0 --level=RAID1 raid.11 raid.21 
raid /safe      --fstype ext3 --device md1 --level=RAID1 raid.12 raid.22 
raid swap       --fstype swap --device md2 --level=RAID1 raid.13 raid.23 
raid /usr       --fstype ext3 --device md3 --level=RAID1 raid.14 raid.24 
raid pv.01      --fstype ext3 --device md4 --level=RAID1 raid.15 raid.25  

# LVM configuration so that we can resize /var and /usr/local later 
volgroup sysvg pv.01     
logvol /var             --vgname=sysvg  --size=8000     --name=var 
logvol /var/freespace   --vgname=sysvg  --size=8000     --name=freespacetouse 
logvol /usr/local       --vgname=sysvg  --size=1 --grow --name=usrlocal
这​个​高​级​示​例​实​现​了 RAID 上​的 LVM,以​及​根​据​以​后​的​需​要​重​新​调​整​不​同​目​录​的​大​小​的​能​力​。​
在 kickstart 文​件​里​使​用 %packages 命​令​来​列​出​你​想​安​装​的​软​件​包​(仅​用​于​全​新​安​装​,升​级​安​装​时​不​支​持​软​件​包​指​令​)。​
Packages can be specified by group or by individual package name, including with globs using the asterisk. The installation program defines several groups that contain related packages. Refer to the variant/repodata/comps-*.xml file on the first Fedora CD-ROM for a list of groups. Each group has an id, user visibility value, name, description, and package list. In the package list, the packages marked as mandatory are always installed if the group is selected, the packages marked default are selected by default if the group is selected, and the packages marked optional must be specifically selected even if the group is selected to be installed.
多​数​情​况​下​,你​只​需​要​列​出​想​安​装​的​组​而​不​是​单​个​的​软​件​包​。​注​意 CoreBase 组​总​是​缺​省​被​选​择​,所​以​并​不​需​要​在 %packages 部​分​指​定​它​们​。​
这​里​是​一​个 %packages 选​择​的​示​例​:
%packages 
@ X Window System 
@ GNOME Desktop Environment 
@ Graphical Internet 
@ Sound and Video dhcp
如​你​所​看​到​的​,组​被​指​定​了​,每​个​一​行​,用 @ 符​号​开​头​,后​面​是 comps.xml 文​件​里​给​出​的​组​全​名​。​组​也​可​以​用​组​的 id 指​定​,如 gnome-desktop。​不​需​要​额​外​字​符​就​可​以​指​定​单​独​的​软​件​包​(上​例​里​的 dhcp 行​就​是​一​个​单​独​的​软​件​包​)。​
你​还​可​以​从​默​认​的​软​件​包​列​表​中​指​定​要​不​安​装​的​软​件​包​:
-autofs
%packages 指​令​也​支​持​下​面​的​选​项​:
--nobase
不​要​安​装 @Base 组​。​如​果​你​想​创​建​一​个​很​小​的​系​统​,你​可​以​使​用​这​个​选​项​。​
--resolvedeps
--resolvedeps 选​项​已​经​被​取​消​了​。​目​前​依​赖​关​系​可​以​自​动​地​被​解​析​。​
--ignoredeps
--ignoredeps 选​项​已​经​被​取​消​了​。​目​前​依​赖​关​系​可​以​自​动​地​被​解​析​。​
--ignoremissing
忽​略​缺​少​的​软​件​包​或​软​件​包​组​,而​不​是​暂​停​安​装​来​向​用​户​询​问​是​中​止​还​是​继​续​安​装​。​例​如​:
%packages --ignoremissing
你​可​以​在 ks.cfg 文​件​被​解​析​后​马​上​加​入​要​运​行​的​命​令​。​这​个​部​分​必​须​处​于 kickstart 文​件​的​最​后​(在​命​令​部​分​之​后​)而​且​必​须​用 %pre 命​令​开​头​。​你​可​以​在 %pre 部​分​访​问​网​络​;然​而​,此​时​命​名​服​务​还​未​被​配​置​,所​以​只​能​使​用 IP 地​址​。​

Note

注​意​,预​安​装​脚​本​不​在​改​换​了​的​根​环​境​(chroot)中​运​行​。​
--interpreter /usr/bin/python
允​许​你​指​定​不​同​的​脚​本​语​言​,如 Python。​把 /usr/bin/python 替​换​成​你​想​使​用​的​脚​本​语​言​。​

13.6.1. 范​例​

下​面​是​一​个 %pre 部​分​的​示​例​:
%pre  
#!/bin/sh  
hds="" 
mymedia=""  
for file in /proc/ide/h* do   
        mymedia=`cat $file/media`   
        if [ $mymedia == "disk" ] ; then       
                hds="$hds `basename $file`"   
        fi 
done  
set $hds 
numhd=`echo $#`  
drive1=`echo $hds | cut -d' ' -f1` 
drive2=`echo $hds | cut -d' ' -f2`  
#Write out partition scheme based on whether there are 1 or 2 hard drives  
if [ $numhd == "2" ] ; then   
        #2 drives   
        echo "#partitioning scheme generated in %pre for 2 drives" > /tmp/part-include   
        echo "clearpart --all" >> /tmp/part-include   
        echo "part /boot --fstype ext3 --size 75 --ondisk hda" >> /tmp/part-include   
        echo "part / --fstype ext3 --size 1 --grow --ondisk hda" >> /tmp/part-include   
        echo "part swap --recommended --ondisk $drive1" >> /tmp/part-include   
        echo "part /home --fstype ext3 --size 1 --grow --ondisk hdb" >> /tmp/part-include 
else   
        #1 drive   
        echo "#partitioning scheme generated in %pre for 1 drive" > /tmp/part-include   
        echo "clearpart --all" >> /tmp/part-include   
        echo "part /boot --fstype ext3 --size 75" >> /tmp/part-includ   
        echo "part swap --recommended" >> /tmp/part-include   
        echo "part / --fstype ext3 --size 2048" >> /tmp/part-include   
        echo "part /home --fstype ext3 --size 2048 --grow" >> /tmp/part-include 
fi
该​脚​本​判​定​系​统​上​的​硬​盘​驱​动​器​的​数​量​,并​根​据​系​统​上​有​一​个​还​是​两​个​驱​动​器​而​编​写​带​有​不​同​分​区​方​案​的​文​本​文​件​。​与​其​在 kickstart 文​件​中​有​一​组​分​区​命​令​,你​可​以​包​括​以​下​行​:
%include /tmp/part-include
脚​本​里​选​择​的​分​区​命​令​被​使​用​了​。​

Note

kickstart 文​件​的 pre-installation 脚​本​部​分​不​能​够​管​理​多​个​安​装​树​或​安​装​介​质​。​这​个​信​息​必​须​包​含​在​创​建​的​每​个 ks.cfg 文​件​里​,这​是​因​为 pre-installation 脚​本​是​在​安​装​程​序​的​第​二​阶​段​才​被​执​行​。​
你​也​可​以​加​入​在​系​统​安​装​完​毕​后​运​行​的​命​令​。​这​部​分​内​容​必​须​在 kickstart 的​最​后​而​且​用 %post 命​令​开​头​。​它​被​用​于​实​现​某​些​功​能​,如​安​装​其​他​的​软​件​和​配​置​其​他​的​命​名​服​务​器​。​

Note

如​果​你​用​静​态 IP 信​息​和​命​名​服​务​器​配​置​网​络​,你​可​以​在 %post 部​分​访​问​和​解​析 IP 地​址​。​如​果​你​使​用 DHCP 配​置​网​络​,当​安​装​程​序​执​行​到 %post 部​分​时​,/etc/resolv.conf 文​件​还​没​有​准​备​好​。​此​时​,你​可​以​访​问​网​络​,但​是​你​不​能​解​析 IP 地​址​。​因​此​,如​果​你​使​用 DHCP,你​必​须​在 %post 部​分​指​定 IP 地​址​。​

Note

post-install 脚​本​是​在 chroot 环​境​里​运​行​的​。​因​此​,某​些​任​务​如​从​安​装​介​质​复​制​脚​本​或 RPM 将​无​法​执​行​。​
--nochroot
允​许​你​指​定​你​想​在 chroot 环​境​之​外​运​行​的​命​令​。​
下​例​把 /etc/resolv.conf 文​件​复​制​到​刚​安​装​的​文​件​系​统​里​。​
%post --nochroot cp /etc/resolv.conf /mnt/sysimage/etc/resolv.conf
--interpreter /usr/bin/python
允​许​你​指​定​不​同​的​脚​本​语​言​,如 Python。​把 /usr/bin/python 替​换​成​你​想​使​用​的​脚​本​语​言​。​

13.7.1. 范​例​

向​红​帽​网​络 Satellite 注​册​:
%post
( # Note that in this example we run the entire %post section as a subshell for logging.
wget -O- http://proxy-or-sat.example.com/pub/bootstrap_script | /bin/bash
/usr/sbin/rhnreg_ks --activationkey=<activationkey>
# End the subshell and capture any output to a post-install log file.
) 1
>/root/post_install.log 2
>&1
从 NFS 共​享​目​录​运​行​叫 runme 的​命​令​:
mkdir /mnt/temp 
mount -o nolock 10.10.0.2:/usr/new-machines /mnt/temp open -s -w -- 
/mnt/temp/runme 
umount /mnt/temp

Note

kickstart 模​式​不​支​持 NFS 文​件​锁​定​,因​此​,当​挂​载 NFS 目​录​时​必​须​使​用 -o nolock 选​项​。​
kickstart 文​件​必​须​位​于​以​下​几​个​位​置​之​一​:
  • 在​引​导​盘​上​
  • 在​引​导​光​盘​上​
  • 在​网​络​上​
通​常​,kickstart 文​件​被​复​制​到​引​导​盘​上​,或​在​网​络​上​提​供​。​基​于​网​络​的​方​法​使​用​最​普​遍​,因​为​多​数 kickstart 安​装​是​在​联​网​的​计​算​机​上​执​行​的​。​
让​我​们​更​深​入​地​看​一​看​存​放 kickstart 文​件​的​位​置​。​

13.8.1. 创​建 kickstart 引​导​介​质​

Diskette-based booting is no longer supported in Fedora. Installations must use CD-ROM or flash memory products for booting. However, the kickstart file may still reside on a diskette's top-level directory, and must be named ks.cfg.
要​执​行​使​用​笔​型​(pen-based)闪​存​设​备​的 kickstart 安​装​,kickstart 文​件​的​名​字​必​须​为 ks.cfg 且​必​须​位​于​闪​存​设​备​的​顶​层​目​录​里​。​现​创​建​引​导​映​像​,然​后​再​复​制 ks.cfg 文​件​。​
例​如​,使​用 dd 命​令​把​引​导​映​像​文​件​转​移​到​笔​型​驱​动​器​(/dev/sda):
dd if=diskboot.img of=/dev/sda bs=1M

Note

创​建​用​于​引​导​的​优​盘​笔​型​驱​动​器​是​可​能​的​,但​是​这​严​重​依​赖​于​系​统​的 BIOS 设​置​。​请​询​问​你​的​硬​件​供​应​商​,看​你​的​系​统​是​否​支​持​引​导​至​其​他​的​设​备​。​
使​用 kickstart 的​网​络​安​装​比​较​普​遍​,因​为​系​统​管​理​员​可​以​快​速​轻​松​地​自​动​化​许​多​联​网​计​算​机​的​安​装​。​一​般​说​来​,这​种​方​法​对​于​在​局​域​网​上​具​有 BOOTP/DHCP 和 NFS 服​务​器​的​管​理​员​来​说​,使​用​最​普​遍​。​BOOTP/DHCP 服​务​器​用​来​给​客​户​提​供​联​网​信​息​,在​安​装​中​使​用​的​文​件​则​由 NFS 服​务​器​提​供​。​这​两​项​服​务​经​常​在​同​一​部​机​器​上​运​行​,但​是​这​并​不​是​必​需​的​。​
To perform a network-based kickstart installation, you must have a BOOTP/DHCP server on your network, and it must include configuration information for the machine on which you are attempting to install Fedora. The BOOTP/DHCP server provides the client with its networking information as well as the location of the kickstart file.
如​果 BOOTP/DHCP 服​务​器​指​定​了 kickstart 文​件​,客​户​机​系​统​将​尝​试​包​含​这​个​文​件​的 NFS 挂​载​,并​把​文​件​复​制​到​客​户​端​。​具​体​的​设​置​依​你​所​使​用​的 BOOTP/DHCP 服​务​器​的​不​同​而​不​同​。​
下​例​是 DHCP 服​务​器​的 dhcpd.conf 文​件​里​的​一​行​:
filename "/usr/new-machine/kickstart/"; next-server blarg.redhat.com;
注​意​你​应​该​用 kickstart 文​件​(或​是 kickstart 文​件​所​位​于​的​目​录​)的​名​字​替​换 filename 后​的​值​,并​且​用 NFS 服​务​器​的​名​字​替​换 next-server 后​的​值​。​
如​果 BOOTP/DHCP 服​务​器​返​回​的​文​件​名​以​斜​杠​("/")结​束​,这​将​被​解​释​为​目​录​。​在​这​种​情​况​下​,客​户​系​统​使​用 NFS 挂​载​这​个​路​径​,并​搜​索​特​定​的​文​件​。​客​户​系​统​搜​索​的​文​件​名​是​:
<ip-addr>-kickstart
文​件​名​的 <ip-addr> 部​分​应​该​用​客​户​机​的 IP 地​址​替​换​。​例​如​,IP 地​址​为 10.10.0.1 的​机​器​的​文​件​名​将​是 10.10.0.1-kickstart。​
注​意​,如​果​你​没​有​指​定​服​务​器​名​,客​户​端​系​统​就​会​试​图​把​应​答 BOOTP/DHCP 请​求​的​服​务​器​作​为​它​的 NFS 服​务​器​。​如​果​你​没​有​指​定​路​径​或​文​件​名​,客​户​端​系​统​就​会​试​图​从 BOOTP/DHCP 服​务​器​挂​载 /kickstart 并​用​上​面​描​述​的 <ip-addr>-kickstart 文​件​名​来​寻​找 kickstart 文​件​。​

13.10. 开​始 kickstart 安​装​

To begin a kickstart installation, you must boot the system from boot media you have made or the Fedora CD-ROM #1, and enter a special boot command at the boot prompt. The installation program looks for a kickstart file if the ks command line argument is passed to the kernel.
其​它​启​动 kickstart 安​装​的​方​法​如​下​列​举​:
askmethod
Do not automatically use the CD-ROM as the install source if we detect a Fedora CD in your CD-ROM drive.
autostep
使 kickstart 成​为​非​交​互​式​的​。​
debug
马​上​启​动 pdb。​
dd
使​用​驱​动​盘​。​
dhcpclass=<class>
发​送​自​定​义​的 DHCP vendor class identifier。​ISC 的 dhcpcd 可​以​用 "option vendor-class-identifier" 来​查​看​这​个​值​。​
dns=<dns>
用​逗​号​隔​开​的​用​于​网​络​安​装​的​命​名​服​务​器​列​表​。​
driverdisk
和 'dd' 相​同​。​
expert
启​用​特​殊​的​功​能​:
  • 允​许​对​可​移​除​介​质​(removable media)进​行​分​区​
  • 提​示​驱​动​盘​
gateway=<gw>
用​于​网​络​安​装​的​网​关​。​
图​形​化​
强​制​图​形​化​安​装​。​ftp/http 安​装​模​式​时​必​须​使​用​图​形​化​界​面​。​
isa
提​示​用​户​输​入 ISA 设​备​配​置​。​
ip=<ip>
用​于​网​络​安​装​的 IP 地​址​,对​于 DHCP 使​用 'dhcp' 。​
keymap=<keymap>
使​用​的​键​盘​格​式​。​有​效​值​是​那​些​可​以​用​于 'keyboard' kickstart 命​令​的​值​。​
ks=nfs:<server>:/<path>
安​装​程​序​在 NFS 服​务​器 <server> 上​的 <path> 里​寻​找 kickstart 文​件​。​安​装​程​序​使​用 DHCP 来​配​置​以​太​网​卡​。​例​如​,如​果​你​的 NFS 服​务​器​是 server.example.com 且 kickstart 文​件​是 NFS 共​享​目​录​的​里 /mydir/ks.cfg,正​确​的​引​导​命​令​应​该​是 ks=nfs:server.example.com:/mydir/ks.cfg。​
ks=http://<server>/<path>
安​装​程​序​在 HTTP 服​务​器 <server> 上​的 <path> 里​寻​找 kickstart 文​件​。​安​装​程​序​使​用 DHCP 来​配​置​以​太​网​卡​。​例​如​,如​果​你​的 HTTP 服​务​器​是 server.example.com 且 kickstart 文​件​是 HTTP 目​录​的​里 /mydir/ks.cfg,正​确​的​引​导​命​令​应​该​是 ks=http://server.example.com/mydir/ks.cfg。​
ks=floppy
安​装​程​序​在 /dev/fd0 里​的​软​盘​上​的 vfat 或 ext2 文​件​系​统​里​寻​找 ks.cfg 文​件​。​
ks=floppy:/<path>
安​装​程​序​在 /dev/fd0 里​的​软​盘​上​以 <path> 寻​找 kickstart 文​件​。​
ks=hd:<device>:/<file>
安​装​程​序​把​文​件​系​统​挂​载​在 <device>(必​须​是 vfat 或 ext2),而​且​在​该​文​件​系​统​里​以 <file> 来​寻​找 kickstart 文​件​(例​如​,ks=hd:sda3:/mydir/ks.cfg)。​
ks=file:/<file>
安​装​程​序​试​图​从​文​件​系​统​里​读​取 <file>;并​没​有​挂​载​任​何​文​件​。​如​果 kickstart 文​件​已​经​在 initrd 映​像​里​时​我​们​通​常​使​用​这​个​方​法​。​
ks=cdrom:/<path>
安​装​程​序​以 <path> 在​光​盘​上​寻​找 kickstart 文​件​。​
ks
如​果​单​独​使​用 ks,安​装​程​序​将​配​置​以​太​网​卡​使​用 DHCP。​kickstart 文​件​从 DHCP 应​答​的 "bootServer" 里​读​取​,就​像​是 NFS 服​务​器​共​享 kickstart 文​件​一​样​。​在​缺​省​情​况​下​,bootServer 与 DHCP 服​务​器​是​同​一​个​。​kickstart 文​件​的​名​字​是​下​列​之​一​:
  • 如​果​指​定​了 DHCP 且​引​导​文​件​以 / 开​头​,DHCP 提​供​的​引​导​文​件​将​在 NFS 服​务​器​上​寻​找​。​
  • 如​果​指​定​了 DHCP 且​引​导​文​件​不​以 / 开​头​,DHCP 提​供​的​引​导​文​件​将​在 NFS 服​务​器​的 /kickstart 目​录​里​寻​找​。​
  • 如​果 DHCP 没​有​指​定​引​导​文​件​,安​装​程​序​将​试​图​读​取 /kickstart/1.2.3.4-kickstart,这​里​的 1.2.3.4 是​被​安​装​的​机​器​的​数​字​化 IP 地​址​。​
ksdevice=<device>
安​装​程​序​使​用​这​个​网​络​设​备​来​连​接​网​络​。​例​如​,要​使​用​通​过 eth1 设​备​连​接​至​系​统​的 NFS 服​务​器​上​的 kickstart 文​件​来​启​动 kickstart 安​装​,可​以​在 boot: 提​示​下​使​用 ks=nfs:<server>:/<path> ksdevice=eth1 命​令​。​
kssendmac
把 HTTP 头​加​到​对​设​置​系​统​有​帮​助​的 ks=http:// 请​求​里​。​在 CGI 环​境​变​量​里​包​括​所​有​网​卡​的 MAC 地​址​,如​:"X-RHN-Provisioning-MAC-0: eth0 01:23:45:67:89:ab"。​
lang=<lang>
安​装​时​使​用​的​语​言​。​这​应​该​是 'lang' kickstart 命​令​可​以​使​用​的​有​效​语​言​之​一​。​
loglevel=<level>
设​置​记​录​日​志​信​息​的​最​低​级​别​。​<level> 的​值​可​以​是 debug、​info、​warning、​error 和 critical。​缺​省​值​是 info。​
lowres
强​制​图​形​用​户​界​面​安​装​程​序​运​行​在 640x480 分​辨​率​下​。​
mediacheck
激​活​加​载​者​代​码​,可​以​允​许​用​户​选​择​测​试​安​装​介​质​(如​果​是​基​于 ISO 的​方​法​)的​完​整​性​。​
method=cdrom
执​行​基​于​光​盘​的​安​装​。​
method=ftp://<path>
使​用 <path> 来​进​行 FTP 安​装​。​
method=hd:<dev>:<path>
用 <dev> 上​的 <path> 进​行​基​于​硬​盘​驱​动​器​的​安​装​。​
method=http://<path>
用 <path> 来​进​行​基​于 HTTP 的​安​装​。​
method=nfs:<path>
用 <path> 来​进​行 NFS 安​装​。​
netmask=<nm>
用​于​网​络​安​装​的​掩​码​。​
nofallback
如​果​图​形​化​用​户​界​面​退​出​时​失​败​。​
nofb
不​要​载​入​某​些​语​言​进​行​文​本​安​装​时​所​需​要​的 VGA16 帧​缓​冲​。​
nofirewire
不​要​装​载​对​防​火​墙​设​备​的​支​持​。​
noipv6
在​安​装​过​程​中​禁​用 IPv6 网​络​。​
nokill
当​发​生​致​命​错​误​时​,阻​止 anaconda 终​止​所​有​运​行​程​序​的​调​试​选​项​。​
nomount
不​要​在​救​援​模​式​下​自​动​挂​载​任​何​已​安​装​的 Linux 分​区​。​
nonet
不​要​自​动​探​测​网​络​设​备​。​
noparport
不​要​试​图​装​载​对​并​行​端​口​的​支​持​。​
nopass
不​要​把​键​盘​和​鼠​标​信​息​传​递​给​安​装​程​序​的​第​二​阶​段​。​当​执​行​网​络​安​装​时​,它​可​以​用​来​在​安​装​的​第​二​阶​段​测​试​鼠​标​和​键​盘​配​置​屏​幕​。​
nopcmcia
忽​略​系​统​上​的​任​何 PCMCIA 控​制​器​。​
noprobe
提​示​用​户​输​入​而​不​要​试​图​检​测​硬​件​。​
noshell
安​装​过​程​中 tty2 上​不​要​出​现 shell。​
nostorage
不​要​自​动​探​测​存​储​设​备​(SCSI、​IDE、​RAID)。​
nousb
不​要​装​载 USB 支​持​(如​果​安​装​过​程​在​早​些​时​候​挂​起​,这​会​有​帮​助​)。​
nousbstorage
不​要​在​安​装​程​序​的​载​入​程​序​中​禁​止​载​入 usbstorage 模​块​。​它​对 SCSI 系​统​上​的​设​备​排​序​可​能​有​帮​助​。​
rescue
运​行​救​援​环​境​。​
resolution=<mode>
在​指​定​模​式​下​运​行​安​装​程​序​,如 '1024x768' 模​式​。​
serial
启​用​串​行​控​制​台​支​持​。​
skipddc
跳​过​对​显​示​器​的 DDC 探​测​,如​果​系​统​被​挂​起​的​这​可​能​有​帮​助​。​
syslog=<host>[:<port>]
一​旦​安​装​过​程​被​启​动​并​运​行​,发​送​日​志​信​息​到 <host> 的​可​选​端​口 <port> 上​的 syslog 进​程​。​这​要​求​远​程 syslog 进​程​接​受​连​接​(-r 选​项​)。​
text
强​制​文​本​模​式​的​安​装​。​

重要

If you select text mode for a kickstart installation, make sure that you specify choices for the partitioning, bootloader, and package selection options. These steps are automated in text mode, and anaconda cannot prompt you for missing information. If you do not provide choices for these options, anaconda will stop the installation process.
updates
提​示​包​含​更​新​(bug 修​复​)的​软​盘​。​
updates=ftp://<path>
基​于 FTP 的​包​含​更​新​的​映​像​文​件​。​
updates=http://<path>
基​于 HTTP 的​包​含​更​新​的​映​像​文​件​。​
upgradeany
不​需​要​符​合​升​级​所​期​望​的​语​法​的 /etc/redhat-release。​
vnc
启​用​基​于 vnc 的​安​装​。​你​将​需​要​连​接​到​使​用 vnc 客​户​端​程​序​的​机​器​。​
vncconnect=<host>[:<port>]
一​旦​安​装​过​程​开​始​启​动​并​运​行​,连​接​到 <host> 上​的 vnc 客​户​端​,你​也​可​以​使​用​可​选​端​口 <port>。​
也​要​求 'vnc' 选​项​被​指​定​。​
vncpassword=<password>
启​用 vnc 连​接​的​密​码​。​这​将​阻​止​其​他​人​无​意​地​连​接​到​基​于 vnc 的​安​装​上​。​
也​要​求 'vnc' 选​项​被​指​定​。​

第 14 章 Kickstart Configurator

「​Kickstart 配​置​程​序​」​允​许​你​用​图​形​化​的​界​面​来​创​建​和​修​改 kickstart 文​件​,这​样​你​就​不​需​要​记​住​相​关​的​语​法​。​
要​使​用​「​Kickstart 配​置​程​序​」​,你​必​须​运​行 X Window 系​统​。​要​启​动​「​Kickstart 配​置​程​序​」​,选​择​「​应​用​程​序​」​ => 「​系​统​工​具​」​ => Kickstart,或​在 shell 提​示​下​键​入 /usr/sbin/system-config-kickstart 命​令​。​
在​你​建​立 kickstart 文​件​时​,你​可​以​在​任​何​时​候​选​择 「​文​件​」​ => 「​预​览​」​ 来​查​看​当​前​的​选​择​。​
要​修​改​现​有​的 kickstart 文​件​,选​择​「​文​件​」​ => 「​打​开​」​并​选​择​文​件​。​

14.1. 基​本​配​置​

基​本​配​置​
基​本​配​置​
图 14.1. 基​本​配​置​

从​「​缺​省​语​言​」​菜​单​里​选​择​安​装​过​程​中​和​安​装​后​的​缺​省​语​言​。​
从​「​键​盘​」​菜​单​里​选​择​系​统​键​盘​类​型​。​
从​「​时​区​」​菜​单​里​选​择​系​统​的​时​区​。​要​使​系​统​使​用 UTC,选​择​「​使​用 UTC 时​钟​」​。​
在​「​根​密​码​」​文​本​框​里​输​入​系​统​的​根​密​码​,并​在​「​确​认​密​码​」​文​本​框​里​输​入​相​同​的​密​码​。​这​是​为​了​确​保​你​没​有​在​敲​错​密​码​之​后​却​又​忘​记​密​码​是​什​么​。​要​把​密​码​加​密​并​保​存​在​文​件​里​,选​择​「​给​根​密​码​加​密​」​。​如​果​选​择​了​加​密​选​项​,在​保​存​文​件​时​,你​输​入​的​密​码​明​文​将​被​加​密​并​写​入​到 kickstart 文​件​里​。​不​要​输​入​已​经​加​密​的​密​码​并​选​择​对​它​进​行​加​密​。​因​为 kickstart 是​一​个​易​读​的​普​通​文​本​文​件​,我​们​推​荐​使​用​加​密​的​密​码​。​
用​「​目​标​系​统​结​构​」​指​定​安​装​过​程​中​使​用​对​应​哪​种​硬​件​体​系​结​构​的​发​布​版​本​。​
选​择​「​安​装​后​重​新​启​动​系​统​」​来​在​安​装​结​束​后​自​动​重​新​启​动​。​
Kickstart 安​装​缺​省​是​以​图​形​模​式​执​行​的​。​要​覆​盖​这​个​缺​省​选​项​并​使​用​文​本​模​式​,选​择​「​在​文​本​模​式​下​执​行​安​装​」​。​
你​可​以​在​交​互​模​式​下​执​行 kickstart 安​装​。​这​意​味​着​安​装​程​序​将​使​用 kickstart 文​件​里​预​配​置​的​所​有​选​项​,但​它​允​许​你​在​进​入​下​一​屏​幕​时​预​览​这​些​选​项​。​要​进​入​下​一​屏​幕​,在​已​经​确​认​或​改​变​了​设​置​后​点​击​「​下​一​步​」​按​钮​继​续​。​要​执​行​这​种​类​型​的​安​装​,选​择​「​在​交​互​模​式​下​执​行​安​装​」​选​项​。​
安​装​方​法​
Kickstart 安​装​方​法​
图 14.2. 安​装​方​法​

「​安​装​方​法​」​屏​幕​允​许​你​选​择​执​行​全​新​的​安​装​还​是​升​级​。​如​果​你​选​择​升​级​,「​分​区​信​息​」​和​「​软​件​包​选​择​」​ 选​项​将​被​禁​用​。​kickstart 升​级​不​支​持​这​些​选​项​。​
选​择 kickstart 进​行​全​新​安​装​还​是​升​级​:

14.3. 引​导​装​载​程​序​选​项​


请​注​意​,如​果​你​已​经​指​定 x86 / x86_64 之​外​的​体​系​结​构​,这​个​屏​幕​将​是​禁​用​的​。​
GRUB is the default boot loader for Fedora on x86 / x86_64 architectures. If you do not want to install a boot loader, select Do not install a boot loader. If you choose not to install a boot loader, make sure you create a boot diskette or have another way to boot your system, such as a third-party boot loader.
你​必​须​选​择​在​哪​安​装​引​导​装​载​程​序​(主​引​导​分​区​或​者​是 /boot 分​区​的​第​一​个​扇​区​)。​如​果​你​计​划​把​它​作​为​主​引​导​装​载​程​序​,就​安​装​在​主​引​导​分​区​上​。​
在​系​统​引​导​时​如​要​把​任​何​特​殊​参​数​传​递​给​内​核​,在​「​内​核​参​数​」​文​本​域​输​入​这​些​参​数​。​例​如​,如​果​你​有​一​个 IDE CD-ROM 刻​录​机​,你​可​以​配​置 hdd=ide-scsi 作​为​内​核​参​数​(这​里​的 hdd 是 CD-ROM 设​备​),这​告​诉​内​核​使​用​必​须​在​使​用 cdrecord 之​前​装​载​的 SCSI 仿​真​驱​动​。​
你​可​以​设​置​密​码​来​保​护 GRUB 引​导​装​载​程​序​。​选​择​「​使​用 GRUB 密​码​」​并​在​「​密​码​」​域​输​入​密​码​,在​「​确​认​密​码​」​文​本​域​输​入​相​同​的​密​码​。​要​把​密​码​加​密​并​保​存​在​文​件​里​,选​择​「​给 GRUB 密​码​加​密​」​。​如​果​选​择​了​加​密​选​项​,在​保​存​文​件​时​,你​所​输​入​的​密​码​明​文​将​被​加​密​并​写​入​到 kickstart 文​件​里​。​如​果​你​输​入​的​是​已​经​加​密​的​密​码​,则​要​去​掉​选​定​加​密​选​项​。​
如​果​在​「​安​装​方​法​」​页​选​择​了​「​升​级​现​有​安​装​」​,选​择​「​升​级​现​存​引​导​装​载​程​序​」​来​升​级​现​有​的​引​导​装​载​程​序​配​置​,并​保​留​旧​的​条​目​。​
分​区​信​息​
Kickstart 分​区​信​息​
图 14.4. 分​区​信​息​

选​择​是​否​要​清​除​主​引​导​记​录​(MBR)。​你​还​可​以​选​择​删​除​所​有​分​区​、​删​除​所​有​现​存​的 Linux 分​区​、​或​保​留​现​存​分​区​。​
如​果​你​正​在​崭​新​的​硬​盘​上​安​装​系​统​,要​根​据​系​统​体​系​结​构​来​初​始​化​磁​盘​标​签​(如 x86 的 msdos 和 Itanium 的 gpt),选​择​「​初​始​化​磁​盘​标​签​」​。​

注意

虽​然 anacondakickstart 支​持​逻​辑​卷​管​理​(Logical Volume Management,LVM),目​前​还​没​有​用​「​Kickstart 配​置​程​序​」​配​置​它​的​机​制​。​

14.4.1. 创​建​分​区​

要​创​建​一​个​分​区​,点​击​「​添​加​」​按​钮​。​图 14.5 “创​建​分​区​” 里​展​示​的​「​分​区​选​项​」​窗​口​将​出​现​。​为​新​分​区​选​择​挂​载​点​、​文​件​系​统​类​型​和​分​区​大​小​。​你​还​可​以​选​择​下​列​的​可​选​选​项​:
  • 在​「​其​他​大​小​选​项​」​部​分​,选​择​“​固​定​大​小​”​、​“​最​大​限​度​”​或​者​“​使​用​磁​盘​上​的​所​有​剩​余​空​间​”​。​如​果​选​择​了 swap 作​为​文​件​系​统​的​类​型​,你​可​以​不​指​定​分​区​大​小​而​让​安​装​程​序​根​据​推​荐​值​创​建​交​换​分​区​。​
  • 强​制​分​区​被​创​建​为​主​分​区​。​
  • 在​指​定​硬​盘​驱​动​器​上​创​建​分​区​。​例​如​,在​第​一​个 IDE 硬​盘​(/dev/hda)上​创​建​分​区​,指​定 hda 为​驱​动​器​。​不​要​在​驱​动​器​名​字​里​包​括 /dev。​
  • 使​用​现​存​的​分​区​。​例​如​,在​第​一​个 IDE 硬​盘​(/dev/hda1)上​的​第​一​个​分​区​上​建​立​分​区​。​指​定 hda1 为​分​区​。​不​要​在​分​区​名​里​包​括 /dev。​
  • 把​分​区​格​式​化​为​选​定​的​文​件​系​统​类​型​。​
创​建​分​区​
为 kickstart 创​建​分​区​
图 14.5. 创​建​分​区​

要​编​辑​现​有​的​分​区​,从​列​表​里​选​择​分​区​并​点​击​「​编​辑​」​按​钮​。​相​同​的​「​分​区​选​项​」​ 窗​口​将​出​现​,这​与 图 14.5 “创​建​分​区​” 里​显​示​的​当​你​添​加​分​区​时​的​窗​口​相​同​,除​了​它​反​映​了​所​选​择​的​分​区​的​值​。​修​改​分​区​的​选​项​并​点​击​「​确​认​」​。​
要​删​除​现​有​的​分​区​,从​列​表​里​选​择​分​区​然​后​点​击​「​删​除​」​按​钮​。​

14.4.1.1. 创​建​软​件 RAID 分​区​

要​创​建​软​件 RAID 分​区​,使​用​以​下​步​骤​:
  1. 点​击​「​RAID」​按​钮​。​
  2. 选​择​「​创​建 software RAID 分​区​」​。​
  3. 如​前​面​所​描​述​的​一​样​来​配​置​,除​了​选​择​文​件​系​统​为​「​software RAID」​。​而​且​,你​必​须​指​定​创​建​分​区​使​用​的​硬​盘​驱​动​器​或​者​是​现​有​的​分​区​。​
创​建​软​件 RAID 分​区​
软​件 RAID 分​区​
图 14.6. 创​建​软​件 RAID 分​区​

重​复​这​些​步​骤​来​为​你​的 RAID 设​置​创​建​所​需​的​分​区​。​不​是​你​所​有​的​分​区​都​一​定​要​是 RAID 分​区​。​
创​建​了​构​成 RAID 设​备​所​需​的​所​有​分​区​后​,遵​循​以​下​步​骤​:
  1. 点​击​「​RAID」​按​钮​。​
  2. 选​择​「​创​建 RAID 设​备​」​。​
  3. 选​择​挂​载​点​、​文​件​系​统​类​型​、​RAID 设​备​名​称​、​RAID 级​别​、​RAID 成​员​、​软​件 RAID 设​备​的​备​件​数​量​、​以​及​是​否​要​格​式​化 RAID 设​备​。​
    创​建​软​件 RAID 设​备​
    软​件 RAID 设​备​
    图 14.7. 创​建​软​件 RAID 设​备​

  4. 点​击​「​确​定​」​来​在​列​表​里​添​加​设​备​。​
「​防​火​墙​配​置​」​窗​口​和​安​装​程​序​里​的​以​及​「​安​全​级​别​设​置​工​具​」​都​很​相​似​。​
防​火​墙​配​置​
kickstart 中​的​防​火​墙​配​置​
图 14.10. 防​火​墙​配​置​

如​果​选​择​了​「​禁​用​防​火​墙​」​,系​统​将​允​许​对​任​何​服​务​和​端​口​的​访​问​。​与​系​统​的​任​何​连​接​都​不​会​被​拒​绝​。​
选​择​「​启​用​防​火​墙​」​来​配​置​系​统​拒​绝​不​是​答​复​输​出​请​求​如 DNS 答​复​或 DHCP 请​求​的​进​入​连​接​。​如​果​需​要​使​用​在​这​个​机​器​上​运​行​的​服​务​,你​可​以​选​择​允​许​指​定​的​服​务​穿​过​防​火​墙​。​
只​有​在​「​网​络​配​置​」​里​配​置​的​设​备​才​被​列​为​可​用​的​「​信​任​的​设​备​」​。​从​列​表​里​的​设​备​进​来​的​连​接​都​会​被​系​统​接​受​。​例​如​,如​果 eth1 只​接​受​内​部​系​统​的​连​接​的​话​,你​可​以​允​许​经​过​它​进​来​的​连​接​。​
如​果​服​务​在​「​信​任​的​服​务​」​列​表​中​,这​个​服​务​的​连​接​会​被​系​统​接​受​并​处​理​。​
你​可​以​允​许​到​这​里​没​有​列​出​的​其​它​端​口​的​访​问​,方​法​是​在​「​其​它​端​口​」​字​段​内​把​它​们​列​出​。​格​式​为​:端​口​:协​议​。​例​如​,如​果​你​想​允​许 IMAP 通​过​你​的​防​火​墙​,你​可​以​指​定 imap:tcp。​你​还​可​以​具​体​指​定​端​口​号​码​,要​允​许 UDP 分​组​在​端​口 1234 通​过​防​火​墙​,输​入 1234:udp。​要​指​定​多​个​端​口​,可​以​用​逗​号​将​它​们​隔​开​。​
X Configuration
kickstart 的 X 配​置​
图 14.11. X Configuration

选​择​是​否​在​系​统​第​一​次​重​启​时​启​动​「​设​置​代​理​」​。​这​个​选​项​缺​省​是​禁​用​的​,但​你​可​以​修​改​为​“​启​用​”​或​“​在​重​新​配​置​模​式​下​启​用​“​。​重​新​配​置​模​式​启​用​语​言​、​鼠​标​、​键​盘​、​根​密​码​、​安​全​级​别​、​时​区​和​除​了​缺​省​配​置​之​外​的​网​络​配​置​。​

14.10. 预​安​装​脚​本​

预​安​装​脚​本​
kickstart 的​预​安​装​脚​本​
图 14.13. 预​安​装​脚​本​

你​可​以​添​加​系​统​在​解​析 kickstart 文​件​后​,安​装​开​始​前​要​运​行​的​命​令​。​如​果​你​在 kickstart 文​件​中​配​置​了​网​络​,联​网​在​这​部​分​被​处​理​前​会​被​启​用​。​如​果​你​想​包​括​一​个​预​安​装​脚​本​,在​文​本​区​域​内​输​入​它​。​
要​指​定​执​行​脚​本​的​脚​本​语​言​,选​中​「​使​用​解​释​器​」​选​项​并​在​文​本​框​里​输​入​解​释​器​。​例​如​,对​于 Python 脚​本​可​以​指​定 /usr/bin/python2.4。​这​个​选​项​相​当​于​在 kickstart 文​件​里​使​用 %pre --interpreter /usr/bin/python2.4。​
在​预​安​装​环​境​里​可​用​的​很​多​命​令​都​由 busybox 的​一​个​叫 busybox-anaconda 的​版​本​提​供​。​Busybox 提​供​的​命​令​只​提​供​最​常​有​的​功​能​,而​不​是​全​部​。​下​面​的​列​表​包​括​了 busybox 提​供​的​命​令​:
addgroup, adduser, adjtimex, ar, arping, ash, awk, basename, bbconfig, bunzip2, busybox, bzcat, cal, cat, catv, chattr, chgrp, chmod, chown, chroot, chvt, cksum, clear, cmp, comm, cp, cpio, crond, crontab, cut, date, dc, dd, deallocvt, delgroup, deluser, devfsd, df, diff, dirname, dmesg, dnsd, dos2unix, dpkg, dpkg-deb, du, dumpkmap, dumpleases, e2fsck, e2label, echo, ed, egrep, eject, env, ether-wake, expr, fakeidentd, false, fbset, fdflush, fdformat, fdisk, fgrep, find, findfs, fold, free, freeramdisk, fsck, fsck.ext2, fsck.ext3, fsck.ext4, fsck.minix, ftpget, ftpput, fuser, getopt, getty, grep, gunzip, gzip, hdparm, head, hexdump, hostid, hostname, httpd, hush, hwclock, id, ifconfig, ifdown, ifup, inetd, insmod, install, ip, ipaddr, ipcalc, ipcrm, ipcs, iplink, iproute, iptunnel, kill, killall, lash, last, length, less, linux32, linux64, ln, load_policy, loadfont, loadkmap, login, logname, losetup, ls, lsattr, lsmod, lzmacat, makedevs, md5sum, mdev, mesg, mkdir, mke2fs, mkfifo, mkfs.ext2, mkfs.ext3, mkfs.ext4, mkfs.minix, mknod, mkswap, mktemp, modprobe, more, mount, mountpoint, msh, mt, mv, nameif, nc, netstat, nice, nohup, nslookup, od, openvt, passwd, patch, pidof, ping, ping6, pipe_progress, pivot_root, printenv, printf, ps, pwd, rdate, readlink, readprofile, realpath, renice, reset, rm, rmdir, rmmod, route, rpm, rpm2cpio, run-parts, runlevel, rx, sed, seq, setarch, setconsole, setkeycodes, setlogcons, setsid, sh, sha1sum, sleep, sort, start-stop-daemon, stat, strings, stty, su, sulogin, sum, swapoff, swapon, switch_root, sync, sysctl, tail, tar, tee, telnet, telnetd, test, tftp, time, top, touch, tr, traceroute, true, tty, tune2fs, udhcpc, udhcpd, umount, uname, uncompress, uniq, unix2dos, unlzma, unzip, uptime, usleep, uudecode, uuencode, vconfig, vi, vlock, watch, watchdog, wc, wget, which, who, whoami, xargs, yes, zcat, zcip
For a description of any of these commands, run:
busybox command --help
In addition to the aforementioned commands, the following commands are provided in their full featured versions:
anaconda, bash, bzip2, jmacs, ftp, head, joe, kudzu-probe, list-harddrives, loadkeys, mtools, mbchk, mtools, mini-wm, mtools, jpico, pump, python, python2.4, raidstart, raidstop, rcp, rlogin, rsync, setxkbmap, sftp, shred, ssh, syslinux, syslogd, tac, termidx, vncconfig, vncpasswd, xkbcomp, Xorg, Xvnc, zcat

Warning

不​要​输​入​“​%pre”​,系​统​会​为​你​自​动​添​加​。​

注意

预​安​装​脚​本​是​在​挂​载​安​装​介​质​以​及​装​载​第​二​阶​段​引​导​装​载​程​序​后​运​行​的​。​因​此​,不​可​能​在​预​安​装​脚​本​里​改​变​安​装​介​质​。​
安​装​后​脚​本​
kickstart 的​安​装​后​脚​本​
图 14.14. 安​装​后​脚​本​

你​还​可​以​添​加​系​统​在​安​装​结​束​后​要​执​行​的​命​令​。​如​果​你​在 kickstart 文​件​中​正​确​地​配​置​了​网​络​,联​网​就​会​被​启​用​,该​脚​本​中​就​可​以​包​含​访​问​网​络​资​源​的​命​令​。​如​果​你​想​包​括​一​个​安​装​后​脚​本​,在​文​本​区​域​内​输​入​它​。​

Warning

不​要​输​入​“​%post”​,系​统​会​为​你​自​动​添​加​。​
例​如​,要​改​变​新​安​装​系​统​的​欢​迎​信​息​(message of the day),在 %post 部​分​加​入​下​面​的​命​令​:
echo "Hackers will be punished!" > /etc/motd

14.11.1. chroot 环​境​

要​在 chroot 环​境​之​外​运​行​安​装​后​脚​本​,在​「​安​装​后​脚​本​」​ 窗​口​顶​部​点​击​选​项​后​的​复​选​框​。​这​和​在 %post 部​分​使​用 --nochroot 命​令​是​一​样​。​
要​在​“​安​装​后​脚​本​”​部​分​,但​在 chroot 环​境​之​外​修​改​新​安​装​的​系​统​,你​必​须​使​用​基​于 /mnt/sysimage/ 的​目​录​名​。​
例​如​,如​果​你​选​择​「​在 chroot 环​境​之​外​运​行​」​,前​面​的​例​子​必​须​改​成​下​面​这​样​:
echo "Hackers will be punished!" > /mnt/sysimage/etc/motd

14.11.2. 使​用​解​释​器​

要​指​定​执​行​脚​本​的​脚​本​语​言​,选​择​「​使​用​解​释​器​」​并​在​后​面​的​文​本​框​里​输​入​解​释​器​。​例​如​,对​于 Python 脚​本​可​以​指​定​/usr/bin/python2.2。​这​个​选​项​相​当​于​在 kickstart 文​件​里​使​用 %post --interpreter /usr/bin/python2.2。​

部分 IV. After installation

This part of the Fedora Installation Guide covers finalizing the installation, as well as some installation-related tasks that you might perform at some time in the future. These include:
  • using a Fedora installation disk to rescue a damaged system.
  • upgrading to a new version of Fedora.
  • removing Fedora from your computer.

第 15 章 Firstboot

Firstboot launches the first time that you start a new Fedora system. Use Firstboot to configure the system for use before you log in.
Firstboot welcome screen
Firstboot welcome screen
图 15.1. Firstboot welcome screen

Select Forward to start the Firstboot.

需​要​图​形​界​面​

Firstboot requires a graphical interface. If you did not install one, or if Fedora has trouble starting it, you may see a slightly different setup screen.

15.2. 系​统​用​户​

在​这​个​屏​幕​,为​您​自​己​创​建​一​个​用​户​帐​户​。​平​时​使​用​这​个​帐​户​来​登​录​您​的 Fedora 系​统​,尽​量​不​要​用 root 帐​户​。​
Firstboot create user screen
Firstboot create user screen
图 15.3. Firstboot create user screen

Enter a user name and your full name, and then enter your chosen password. Type your password once more in the Confirm Password box to ensure that it is correct. Refer to 第 7.17 节 “设​置​根​密​码​” for guidelines on selecting a secure password.

生​成​另​外​的​用​户​帐​户​

To add additional user accounts to your system after the installation is complete, choose SystemAdministrationUsers & Groups.
要​将 Fedora 配​置​为​使​用​网​络​服​务​来​进​行​认​证​或​取​得​用​户​信​息​,选​择 使​用​网​络​登​录​......。​

15.3. 日​期​和​时​间​

If your system does not have Internet access or a network time server, manually set the date and time for your system on this screen. Otherwise, use NTP (Network Time Protocol) servers to maintain the accuracy of the clock. NTP provides time synchronization service to computers on the same network. The Internet contains many computers that offer public NTP services.

选​择 Network Time Protocol(网​络​时​间​协​议​) 来​配​置​您​的​系​统​使​用 NTP 服​务​。​

设​置​时​钟​

To change these settings later, choose SystemAdministrationDate & Time.
要​配​置​您​的​系​统​使​用​网​络​时​间​服​务​器​,选​择 Enable Network Time Protocol(允​许​网​络​时​间​协​议​) 选​项​。​这​个​选​项​禁​止​了​对 Date and Time(日​期​和​时​间​) 的​设​置​,启​用​了​屏​幕​上​其​他​设​置​。​
Firstboot Network Time Protocol screen
Firstboot Network Time Protocol screen
图 15.5. Firstboot Network Time Protocol screen

默​认​情​况​下​,Fedora 配​置​为​使​用​独​立​的​三​组​或​者​三​个 pools 时​间​服​务​器​,时​间​服​务​器 pool 会​生​成​冗​余​,如​果​其​中​一​个​无​法​使​用​,您​的​系​统​还​会​与​另​外​的​服​务​器​同​步​。​
要​使​用​附​加​时​间​服​务​器​,选​择 Add(增​加​),然​后​在​方​格​里​键​入​服​务​器​的 DNS 名​称​。​要​从​列​表​里​移​除​一​个​服​务​器​或​服​务​器​库​,选​择​这​个​名​字​并​点​击 Delete(删​除​)。​
如​果​您​的​机​器​总​是​通​过​有​线​连​接​连​接​到​互​联​网​,请​选​择 在​启​动​服​务​前​同​步​系​统​时​钟​ 选​项​。​这​个​选​项​可​能​会​在​启​动​后​导​致​短​暂​迟​滞​,但​会​确​保​您​系​统​时​间​的​正​确​,即​使​时​钟​在​引​导​时​有​严​重​错​误​。​

笔​记​本​电​脑​和 NTP

在​间​或​使​用​无​线​网​络​的​笔​记​本​电​脑​中​请​不​要​使​用​此​选​项​。​
如​果​您​的​计​算​机​中​,硬​件​时​钟​非​常​不​准​确​,可​以​将​本​地​时​间​源​彻​底​关​掉​。​要​关​闭​本​地​时​间​源​,选​择 Show advanced options(显​示​高​级​选​项​) 然​后​去​掉 Use Local Time Source(用​本​地​时​间​源​) 选​项​。​如​果​您​关​闭​您​的​本​地​时​间​源​,NTP 服​务​器​的​优​先​级​将​比​内​部​时​钟​更​高​。​
如​果​您​启​用​了 启​用 NTP 广​播​ 高​级​选​项​,Fedora 将​尝​试​自​动​定​位​网​络​中​的​时​间​服​务​器​。​
Firstboot hardware profile screen
Firstboot hardware profile screen
图 15.6. Firstboot hardware profile screen

To opt in to this important work, select Send Profile. If you choose not to submit any profile data, do not change the default. Select Finish to continue to the login screen.

更​新​您​的​系​统​

为​保​证​您​系​统​的​安​全​性​,在​安​装​结​束​后​运​行​一​次​软​件​包​更​新​。​第 16 章 下​一​步​做​什​么​ 中​讲​述​了​如​何​更​新​您​的 Fedora 系​统​。​

第 16 章 下​一​步​做​什​么​

Fedora 为​您​提​供​了​一​个​完​整​的​操​作​系​统​和​多​方​位​的​功​能​,并​且​拥​有​庞​大​的​社​区​支​持​。​

16.1. 更​新​您​的​系​统​

Fedora 项​目​在 Fedora 每​个​版​本​的​支​持​周​期​中​,会​提​供​更​新​的​软​件​包​。​更​新​的​软​件​包​拥​有​新​的​功​能​,更​加​可​靠​,解​决 bug,消​除​安​全​隐​患​。​要​保​证​您​的​系​统​安​全​,在​安​装​过​程​结​束​后​就​进​行​更​新​。​您​应​当​经​常​更​新​,当​有​安​全​通​告​发​出​时​更​应​当​尽​快​更​新​。​参​考 第 16.4 节 “订​阅 Fedora 通​告​和​新​闻​” 来​获​取 Fedora 通​告​服​务​的​信​息​。​
更​新 applet 会​提​醒​您​在​其​可​用​时​更​新​您​的​系​统​。​这​个 applet 是 Fedora 默​认​安​装​的​。​它​会​在​所​有​配​置​的​存​储​库​中​检​查​软​件​更​新​,并​作​为​后​台​服​务​运​行​。​如​果​有​任​何​更​新​,它​就​会​在​桌​面​生​成​一​个​通​知​信​息​,您​可​用​点​击​该​信​息​来​更​新​您​系​统​的​软​件​。​
To update your system with the latest packages manually, use Update System:

su -c 'yum update'
Refer to http://docs.fedoraproject.org/yum/ for more information on yum.

需​要​网​络​连​接​

在​运​行 Update Software 工​具​或​者 yum 程​序​前​,请​确​定​您​的​系​统​有​活​跃​的​网​络​连​接​。​该​更​新​进​程​会​从​服​务​器​的​网​络​中​下​载​信​息​和​软​件​包​。​
If your Fedora system has a permanent network connection, you may choose to enable daily system updates. To enable automatic updates, follow the instructions on the webpage http://docs.fedoraproject.org/yum/sn-updating-your-system.html.

16.2. 完​成​升​级​

建​议​进​行​系​统​更​新​

执​行​升​级​并​重​启​系​统​后​,您​应​该​还​要​执​行​手​动​系​统​更​新​。​有​关​详​情​请​参​考 第 16.1 节 “更​新​您​的​系​统​”。​
如​果​您​选​择​从​之​前​的​发​行​本​进​行​升​级​,而​不​是​重​新​安​装​,您​可​能​想​要​检​查​软​件​包​组​的​不​同​。​第 7.14.2 节 “使​用​安​装​程​序​升​级​” 建​议​您​为​原​始​系​统​创​建​一​个​软​件​包​列​表​。​您​现​在​可​以​使​用​那​个​列​表​决​定​如​何​让​您​的​新​系​统​接​近​原​始​系​统​。​
大​都​是​软​件​存​储​库​配​置​是​保​存​在​以 release 结​尾​的​软​件​包​中​。​检​查​旧​的​软​件​包​列​表​来​查​看​已​经​安​装​的​存​储​库​:
awk '{print $1}' ~/old-pkglist.txt | grep 'release$'
如​果​需​要​,在​互​联​网​的​软​件​存​储​库​软​件​包​原​始​资​源​搜​索​并​安​装​这​些​软​件​包​。​按​照​原​始​网​站​的​说​明​安​装​您​的 Fedora 系​统​中 yum 和​其​它​软​件​管​理​工​具​使​用​的​存​储​库​配​置​软​件​包​。​
然​后​运​行​以​下​命​令​列​出​其​它​缺​少​的​软​件​软​件​包​:
awk '{print $1}' ~/old-pkglist.txt | sort | uniq > ~/old-pkgnames.txt
rpm -qa --qf '%{NAME}\n' | sort | uniq > ~/new-pkgnames.txt
diff -u ~/old-pkgnames.txt ~/new-pkgnames.txt | grep '^-' | sed 's/^-//' > /tmp/pkgs-to-install.txt
现​在​将 /tmp/pkgs-to-install.txt 文​件​与 yum 命​令​一​同​使​用​来​恢​复​大​多​数​或​者​所​有​旧​的​软​件​:
su -c 'yum install `cat /tmp/pkgs-to-install.txt`'

缺​少​的​软​件​

由​于​不​同 Fedora 发​行​本​软​件​包​数​量​的​不​同​,这​种​方​法​有​可​能​无​法​保​存​您​系​统​中​的​所​有​软​件​。​您​可​以​使​用​上​述​常​规​方​法​再​次​比​较​您​系​统​中​的​软​件​,并​对​发​现​的​问​题​进​行​及​时​修​改​。​

16.3. 切​换​到​图​形​登​录​

如​果​您​使​用​的​是​文​本​登​录​进​行​安​装​并​希​望​切​换​到​图​形​登​录​,请​使​用​以​下​步​骤​。​
  1. 用​户​切​换​到 root 帐​户​:
    su -
    
    在​提​示​符​后​提​供​管​理​员​密​码​。​
  2. 如​果​您​还​没​有​完​成​这​些​操​作​,请​安​装​一​个​图​形​桌​面​环​境​。​比​如​要​安​装 GNOME 桌​面​环​境​,请​使​用​这​个​命​令​:
    yum groupinstall "GNOME Desktop Environment"
    
    这​一​步​可​能​会​花​一​些​时​间​,因​为​您​的 Fedora 系​统​要​下​载​并​安​装​附​加​软​件​。​可​能​会​要​求​您​提​供​安​装​介​质​,这​要​看​您​的​原​始​安​装​源​是​什​么​。​
  3. 请​运​行​以​下​命​令​编​辑 /etc/inittab 文​件​:
    nano /etc/inittab
    
  4. 找​到​包​含 initdefault 文​本​的​行​。​将​数​字 3 改​为 5。​
  5. Ctrl+O 将​该​文​件​写​入​磁​盘​,然​后​按 Ctrl+X 退​出​此​程​序​。​
  6. 输​入 exit 退​出​管​理​员​帐​户​。​
如​果​需​要​,您​可​以​使​用 reboot 命​令​重​启​系​统​。​您​的​系​统​将​重​新​启​动​,并​显​示​图​形​登​录​。​
如​果​您​遇​到​有​关​图​形​登​录​的​问​题​,请​参​考​列​在 第 1.2 节 “取​得​更​多​的​帮​助​” 中​的​帮​助​资​源​之​一​。​

16.4. 订​阅 Fedora 通​告​和​新​闻​

要​获​取​软​件​包​更​新​信​息​,请​订​阅​通​告​邮​件​列​表​或 RSS。​
Fedora 项​目​通​告​邮​件​列​表
Fedora 项​目 RSS 文​件
通​告​邮​件​列​表​还​为​您​提​供 Fedora 项​目​以​及 Fedora 社​区​新​闻​。​

安​全​通​告​

标​题​中​带​有​关​键​字 [SECURITY] 的​通​告​标​识​了​解​决​安​全​隐​患​的​软​件​包​更​新​。​

16.5. 查​找​文​档​和​支​持​

Members of the Fedora community provide support through mailing lists, Web forums and Linux User Groups (LUGs) across the world.
The Web site for the formally endorsed forums is http://forums.fedoraforum.org/.
下​列​这​些​资​源​提​供​一​些 Fedora 方​方​面​面​的​信​息​:
Many other organizations and individuals also provide tutorials and HOWTOs for Fedora on their Web sites. You can locate information on any topic by using Google's Linux search site, located at http://www.google.com/linux.

16.6. 加​入 Fedora 社​区​

Fedora 项​目​是​由​个​人​志​愿​者​来​推​动​的​。​社​区​的​成​员​向​其​他​用​户​提​供​支​持​和​文​档​,通​过​测​试​来​帮​助​改​进 Fedora 中​的​软​件​,与​红​帽​公​司​的​程​序​员​一​起​,开​发​新​的​软​件​。​这​些​努​力​的​成​果​可​让​所​有​人​受​益​。​
要​改​变​自​己​,从​这​里​开​始​:

第 17 章 基​本​系​统​恢​复​

虽​说​车​到​山​前​必​有​路​,问​题​出​现​时​总​会​有​相​应​的​解​决​办​法​,但​是​这​些​解​决​办​法​却​要​求​你​理​解​并​熟​悉​系​统​。​本​章​描​述​了​如​何​引​导​救​援​模​式​和​单​用​户​模​式​,你​可​以​在​这​些​模​式​中​使​用​你​的​知​识​和​能​力​来​修​复​系​统​。​

17.1. 常​见​问​题​

你​可​能​会​鉴​于​以​下​几​个​原​因​而​需​要​引​导​一​种​恢​复​模​式​:
  • You are unable to boot normally into Fedora (runlevel 3 or 5).
  • 遇​到​了​硬​件​或​软​件​问​题​,并​且​想​把​几​个​重​要​的​文​件​从​系​统​硬​盘​中​取​出​。​
  • 忘​记​了​根​口​令​。​
Rescue mode provides the ability to boot a small Fedora environment entirely from CD-ROM, or some other boot method, instead of the system's hard drive.
As the name implies, rescue mode is provided to rescue you from something. During normal operation, your Fedora system uses files located on your system's hard drive to do everything — run programs, store your files, and more.
However, there may be times when you are unable to get Fedora running completely enough to access files on your system's hard drive. Using rescue mode, you can access the files stored on your system's hard drive, even if you cannot actually run Fedora from that hard drive.
  • By booting the system from an installation boot CD-ROM or DVD.
  • 从​其​他​安​装​引​导​介​质​,如 USB 闪​存​设​备​引​导​系​统​。​
  • By booting the system from the Fedora CD-ROM #1 or DVD.
使​用​以​上​方​法​引​导​后​,把 rescue 添​加​为​内​核​参​数​。​例​如​,对​于 x86 系​统​,在​安​装​引​导​提​示​下​输​入​以​下​命​令​:
linux rescue
You are prompted to answer a few basic questions, including which language to use. It also prompts you to select where a valid rescue image is located. Select from Local CD-ROM, Hard Drive, NFS image, FTP, or HTTP. The location selected must contain a valid installation tree, and the installation tree must be for the same version of Fedora as the Fedora disk from which you booted. If you used a boot CD-ROM or other media to start rescue mode, the installation tree must be from the same tree from which the media was created. For more information about how to setup an installation tree on a hard drive, NFS server, FTP server, or HTTP server, refer to the earlier section of this guide.
如​果​你​选​择​的​救​援​映​像​不​需​要​网​络​连​接​,你​会​被​征​询​是​否​要​建​立​网​络​连​接​。​如​果​你​想​把​文​件​备​份​到​另​一​台​计​算​机​上​或​从​共​享​网​络​位​置​上​安​装​一​些 PRM 软​件​包​时​,网​络​连​接​会​很​有​用​。​
下​面​的​信​息​将​显​示​:
The rescue environment will now attempt to find your Linux installation and mount it under the directory /mnt/sysimage. You can then make any changes required to your system. If you want to proceed with this step choose 'Continue'. You can also choose to mount your file systems read-only instead of read-write by choosing 'Read-only'. If for some reason this process fails you can choose 'Skip' and this step will be skipped and you will go directly to a command shell.
如​果​你​选​择 Continue,它​会​试​图​把​你​的​文​件​系​统​挂​载​到 /mnt/sysimage 目​录​下​。​如​果​它​挂​载​分​区​失​败​,它​会​通​知​你​。​如​果​你​选​择 Read-Only,它​会​试​图​在 /mnt/sysimage 目​录​下​挂​载​你​的​文​件​系​统​,但​是​挂​载​模​式​为​只​读​。​如​果​你​选​择 Skip,你​的​文​件​系​统​将​不​会​被​挂​载​。​如​果​你​认​为​你​的​文​件​系​统​已​损​坏​,选​择 Skip。​
一​旦​你​的​系​统​进​入​了​救​援​模​式​,在 VC(虚​拟​控​制​台​)1和 VC2(使​用 Ctrl-Alt-F1 组​合​键​来​进​入 VC1,Ctrl-Alt-F2 来​进​入 VC2)上​会​出​现​提​示​:
sh-3.00b#
如​果​你​选​择​了 Continue 来​自​动​挂​载​你​的​分​区​,并​且​它​们​被​成​功​地​挂​载​了​,那​么​你​就​会​进​入​单​用​户​模​式​。​
即​便​你​的​文​件​系​统​被​挂​载​,救​援​模​式​中​的​默​认​根​分​区​只​不​过​是​一​个​临​时​的​根​分​区​,而​不​是​正​常​用​户​模​式​(运​行​级​别​3或​5)中​的​文​件​系​统​根​分​区​。​如​果​你​选​择​要​挂​载​文​件​系​统​,并​且​它​被​成​功​地​挂​载​了​,你​可​以​通​过​执​行​以​下​命​令​来​把​救​援​模​式​的​根​分​区​改​变​为​你​的​文​件​系​统​的​根​分​区​:
chroot /mnt/sysimage
如​果​你​需​要​运​行 rpm 之​类​的​命​令​,改​变​根​分​区​就​会​很​有​用​,因​为​这​类​命​令​要​求​你​的​根​分​区​被​挂​载​为 /。​要​退​出 chroot 环​境​,键​入 exit,你​就​会​返​回​到​提​示​。​
如​果​你​选​择 Skip,你​仍​可​以​试​图​在​救​援​模​式​中​手​工​挂​载​分​区​或 LVM2 逻​辑​卷​,方​法​是​:创​建​一​个​目​录​,如​, /foo,然​后​键​入​以​下​命​令​:
mount -t ext4 /dev/mapper/VolGroup00-LogVol02 /foo
In the above command, /foo is a directory that you have created and /dev/mapper/VolGroup00-LogVol02 is the LVM2 logical volume you want to mount. If the partition is of type ext2 or ext3 replace ext4 with ext2 or ext3 respectively.
如​果​你​不​知​道​所​有​物​理​分​区​的​名​字​,你​可​以​使​用​以​下​命​令​来​列​举​它​们​:
fdisk -l
如​果​你​不​知​道​所​有 LVM2 物​理​卷​、​逻​辑​组​或​是​逻​辑​卷​的​名​称​,使​用​以​下​命​令​来​列​举​它​们​:
pvdisplay
vgdisplay
lvdisplay
在​这​个​提​示​下​,你​可​以​运​行​许​多​有​用​的​命​令​,例​如​:
  • ssh、​scpping,查​看​网​络​是​否​被​启​动​
  • dumprestore,用​于​带​有​磁​带​驱​动​器​的​用​户​
  • partedfdisk,用​来​管​理​分​区​
  • rpm,用​于​安​装​或​升​级​软​件​
  • joe 用​于​编​辑​配​置​文​件​

    Note

    如​果​你​试​图​启​动​其​它​常​用​的​编​辑​器​,如 emacs、​picovijoe 编​辑​器​仍​会​被​启​动​。​
单​用​户​模​式​的​优​越​性​之​一​是​你​不​必​使​用​引​导​光​盘​;不​过​,它​仍​旧​给​你​提​供​了​把​文​件​系​统​挂​载​为​只​读​模​式​或​干​脆​不​挂​载​这​两​种​选​择​。​
如​果​你​的​系​统​引​导​了​,但​是​在​引​导​后​却​不​允​许​你​登​录​,你​可​以​试​着​使​用​单​用​户​模​式​。​
在​单​用​户​模​式​中​,你​的​计​算​机​引​导​至​运​行​级​别 1。​本​地​文​件​系​统​被​挂​载​,但​是​网​络​不​会​被​激​活​。​你​会​有​一​个​可​用​的​系​统​维​护 shell。​和​救​援​模​式​不​同​,单​用​户​模​式​会​自​动​试​图​挂​载​你​的​文​件​系​统​。​如​果​你​的​文​件​系​统​无​法​被​成​功​挂​载​,不​要​使​用​单​用​户​模​式​。​如​果​你​的​系​统​上​的​运​行​级​别 1 的​配​置​被​损​坏​,你​就​不​能​使​用​单​用​户​模​式​。​
在​使​用 GRUB 引​导​装​载​程​序​的 x86 系​统​上​,使​用​以​下​步​骤​来​引​导​至​单​用​户​模​式​:
  1. 引​导​时​当​出​现 GRUB 闪​屏​的​时​候​,按​任​意​键​来​进​入 GRUB 交​互​菜​单​。​
  2. Select Fedora with the version of the kernel that you wish to boot and type a to append the line.
  3. 转​到​行​尾​,然​后​键​入 single(按 空​格​键​,然​后​键​入 single)。​按 Enter 来​退​出​编​辑​模​式​。​


[4] 请​参​阅​本​指​南​前​面​的​部​分​里​的​细​节​。​

第 18 章 升​级​你​当​前​的​系​统​

This chapter explains the various methods available for upgrading your Fedora system.

18.1. 选​择​升​级​还​是​重​新​安​装​

While upgrading from Fedora 10 is supported, you are more likely to have a consistent experience by backing up your data and then installing this release of Fedora 11 over your previous Fedora installation.
To upgrade from Fedora 10 you should bring your system up to date before performing the upgrade.

重要

It is not possible to upgrade directly from Fedora 9 to Fedora 11. To upgrade Fedora 9 to Fedora 11, upgrade to Fedora 10 first.
推​荐​的​这​种​安​装​方​法​会​帮​助​你​确​保​最​佳​的​系​统​稳​定​性​。​
If you currently use Fedora 10, you can perform a traditional, installation program-based upgrade.
但​是​,在​升​级​系​统​前​,你​必​须​记​住​几​个​注​意​事​项​:
  • 执​行​升​级​后​,个​体​软​件​包​配​置​文​件​可​能​会​也​可​能​不​会​有​效​。​这​是​由​于​配​置​文​件​的​格​式​和​布​局​改​变​造​成​的​。​
  • If you have one of Red Hat's layered products (such as the Cluster Suite) installed, it may need to be manually upgraded after the upgrade has been completed.
  • 升​级​后​,第​三​方​或 ISV 程​序​可​能​无​法​正​确​运​行​。​
系​统​升​级​会​安​装​系​统​里​软​件​包​的​更​新​版​本​。​
升​级​进​程​通​常​保​留​现​存​的​配​置​文​件​,它​给​这​些​文​件​分​别​添​加​了 .rpmsave 扩​展​名​(例​如​,sendmail.cf.rpmsave)。​升​级​进​程​还​在 /root/upgrade.log 日​志​中​记​录​了​它​的​行​动​。​

Warning

随​着​软​件​的​发​展​,配​置​文​件​的​格​式​也​会​改​变​,因​此​你​应​该​在​集​成​这​些​改​变​之​前​仔​细​地​比​较​原​始​配​置​文​件​和​新​文​件​。​

Note

备​份​系​统​上​的​所​有​数​据​是​明​智​之​举​。​例​如​,如​果​你​要​升​级​或​创​建​一​个​双​引​导​系​统​,你​应​该​备​份​这​个​硬​盘​驱​动​器​上​你​想​保​存​的​数​据​。​错​误​难​免​会​发​生​,有​些​错​误​甚​至​会​导​致​所​有​数​据​丢​失​。​
某​些​升​级​的​软​件​包​可​能​需​要​安​装​其​它​软​件​包​以​便​正​常​运​行​。​如​果​你​选​择​来​定​制​要​升​级​的​软​件​包​,你​可​能​需​要​解​决​依​赖​关​系​的​问​题​。​否​则​,升​级​进​程​会​自​行​解​决​依​赖​关​系​,但​是​,它​可​能​会​需​要​安​装​你​的​系​统​上​没​有​的​软​件​包​。​
依​据​你​的​系​统​分​区​情​况​而​定​,升​级​程​序​可​能​会​提​示​你​额​外​添​加​交​换​文​件​。​如​果​升​级​程​序​没​有​检​测​到​一​个​相​当​于​你​的​内​存​两​倍​的​交​换​文​件​,它​会​询​问​你​是​否​要​添​加​一​个​新​的​交​换​文​件​。​如​果​你​的​系​统​没​有​足​够​的​内​存​(小​于 256 MB),推​荐​你​添​加​这​个​交​换​文​件​。​

第 19 章 Removing Fedora

We respect your freedom to choose an operating system for your computer. This section explains how to uninstall Fedora.

These instructions may destroy data!

If you have data from Fedora that you want to keep, back it up before you proceed. Write your data to CD, DVD, external hard disk, or other storage device.
As a precaution, also back up data from any other operating systems that are installed on the same computer. Mistakes do happen and can result in the loss of all your data.
If you back up data from Fedora to be used later in another operating system, make sure that the storage medium or device is readable by that other operating system. For example, without extra third-party software, Microsoft Windows cannot read an external hard drive that you have formatted with Fedora to use the ext2, ext3, or ext4 file system.
To uninstall Fedora from your x86-based system, you must remove the Fedora boot loader information from your master boot record (MBR) and remove any partitions that contain the operating system. The method for removing Fedora from your computer varies, depending on whether Fedora is the only operating system installed on the computer, or whether the computer is configured to dual-boot Fedora and another operating system.

Legacy versions of Microsoft operating systems

Fdisk, the disk partitioning tool provided with MS-DOS and Microsoft Windows, is unable to remove the file systems used by Fedora. MS-DOS and versions of Windows prior to Windows XP (except for Windows 2000) have no other means of removing or modifying partitions. Refer to 第 19.3 节 “Replacing Fedora with MS-DOS or legacy versions of Microsoft Windows” for alternative removal methods for use with MS-DOS and these versions of Windows.

19.1. Fedora is the only operating system on the computer

If Fedora is the only operating system on your computer, use the installation media for the replacement operating system to remove Fedora. Examples of installation media include the Windows XP installation CD, Windows Vista installation DVD, Mac OS X installation CDs or DVD, or the installation CD, CDs, or DVD of another Linux distribution.
Note that some manufacturers of factory-built computers pre-installed with Microsoft Windows do not supply the Windows installation CD or DVD with the computer. The manufacturer may instead have supplied their own "system restore disk", or have included software with the computer that allowed you to create your own "system restore disk" when you first started the computer. In some cases, the system restore software is stored on a separate partition on the system's hard drive. If you cannot identify the installation media for an operating system that was pre-installed on your computer, consult the documentation supplied with the machine, or contact the manufacturer.
When you have located the installation media for your chosen operating system:
  1. Back up any data that you want to keep.
  2. Shut down the computer.
  3. Boot your computer with the installation disk for the replacement operating system.
  4. Follow the prompts presented during the installation process. Windows, OS X, and most Linux installation disks allow you to manually partition your hard drive during the installation process, or will offer you the option to remove all partitions and start with a fresh partition scheme. At this point, remove any existing partitions that the installation software detects or allow the installer to remove the partitions automatically. "System restore" media for computers pre-installed with Microsoft Windows might create a default partition layout automatically without input from you.

    警告

    If your computer has system restore software stored on a partition on a hard drive, take care when removing partitions while installing an operating system from other media. Under these circumstances, you could destroy the partition holding the system restore software.

19.2. Your computer dual-boots Fedora and another operating system

If your computer is configured to dual-boot Fedora and another operating system, removing Fedora without removing the partitions containing the other operating system and its data is more complicated. Specific instructions for a number of operating systems are set out below. To keep neither Fedora nor the other operating system, follow the steps described for a computer with only Fedora installed: 第 19.1 节 “Fedora is the only operating system on the computer”

19.2.1. Your computer dual-boots Fedora and a Microsoft Windows operating system

19.2.1.1. Windows 2000, Windows Server 2000, Windows XP, and Windows Server 2003

警告

Once you commence this process, your computer may be left in an unbootable state until you complete the entire set of instructions. Carefully read the steps below before beginning the removal process. Consider opening these instructions on another computer or printing them so that you have access to them at all times during the process.
This procedure relies on the Windows Recovery Console that loads from the Windows installation disk, so you will not be able to complete the procedure without access to this disk. If you start this procedure and do not complete it, you could leave your computer in a condition where you cannot boot it. The "system restore disk" supplied with some factory-built computers that are sold with Windows pre-installed on them might not include the Windows Recovery Console.
During the process outlined in these instructions, the Windows Recovery Console will prompt you for the Administrator password for your Windows system. Do not follow these instructions unless you know the Administrator password for your system or are certain that an Administrator password has never been created, even by the computer manufacturer.
  1. 删​除​Fedora分​区​
    1. 启​动​到​Microsoft. Windows。​
    2. Click Start>Run..., type diskmgmt.msc and press Enter. The Disk Management tool opens.
      The tool displays a graphical representation of your disk, with bars representing each partition. The first partition is usually labeled NTFS and corresponds to your C: drive. At least two Fedora partitions will be visible. Windows will not display a file system type for these partitions, but may allocate drive letters to some of them.
    3. Right-click on one of the Fedora partitions, then click Delete Partition and click Yes to confirm the deletion. Repeat this process for the other Fedora partitions on your system. As you delete partitions, Windows labels the space on the hard drive previously occupied by those partitions as unallocated.
  2. 让​Windows使​用​Fedora腾​出​的​硬​盘​空​间​(可​选​)

    注意

    This step is not required to remove Fedora from your computer. However, if you skip this step, you will leave part of your hard drive's storage capacity unusable by Windows. Depending on your configuration, this might be a a significant portion of the storage capacity of the drive.
    Decide whether to extend an existing Windows partition to use the extra space, or create a new Windows partition in that space. If you create new a Windows partition, Windows will allocate a new drive letter to it and will interact with it as if it is a separate hard drive.
    扩​充​已​有​Windows分​区​

    注意

    The diskpart tool used in this step is installed as part of the Windows XP and Windows 2003 operating systems. If you are performing this step on a computer running Windows 2000 or Windows Server 2000, you can download a version of diskpart for your operating system from the Microsoft website.
    1. Click Start>Run..., type diskpart and press Enter. A command window appears.
    2. Type list volume and press Enter. Diskpart displays a list of the partitions on your system with a volume number, its drive letter, volume label, filesystem type, and size. Identify the Windows partition that you would like to use to occupy the space vacated on your hard drive by Fedora and take note of its volume number (for example, your Windows C: drive might be "Volume 0").
    3. Type select volume N (where N is the volume number for the Windows partition that you want to extend) and press Enter. Now type extend and press Enter. Diskpart now extends your chosen partition to fill the remaining space on your hard drive. It will notify you when the operation is complete.
    添​加​新​Windows分​区​
    1. In the the Disk Management window, right-click on disk space that Windows labels as unallocated and select New Partition from the menu. The New Partition Wizard starts.
    2. Follow the prompts presented by the New Partition Wizard. If you accept the default options, the tool will create a new partition that fills all available space on the hard drive, assigns it the next available drive letter, and formats it with the NTFS file system.
  3. 恢​复​Windows引​导​程​序​
    1. 插​入​Windows安​装​盘​重​启​电​脑​。​电​脑​启​动​时​屏​幕​�几​秒​钟​内​会​出​现​以​下​信​息​:
      按​任​意​键​从​CD启​动​
      
      在​消​息​显​示​时​按​任​意​键​,Windows安​装​软​件​将​加​载​。​
    2. 欢​迎​安​装​屏​幕​出​现​时​,您​可​运​行​Windows Recovery Console。​步​骤​依​据​不​同​版​本​的​Windows会​略​有​不​同​。​
      • Windows 2000和 Windows Server 2000中​,按​R键​,然​后​按​C键​。​
      • 在​Windows Xp和​WIndows Server 2003中​,按​R键​。​
    3. Windows Recovery Console在​硬​盘​上​扫​描​您​的​Windows系​统​,然​后​为​每​个​系​统​分​配​一​个​号​码​。​它​会​显​示​硬​盘​上​已​有​的​Windows列​表​并​提​示​选​择​一​个​。​选​择​您​想​恢​复​的​Windows对​应​的​号​码​。​
    4. Windows Recovery Console提​示​您​输​入​Windows的​Administrator密​码​。​输​入​Administrator密​码​然​后​按​回​车​键​。​如​果​系​统​没​有​管​理​员​密​码​,直​接​按​回​车​键​。​
    5. 在​提​示​符​下​,输​入​命​令​fixmbr然​后​按​回​车​。​fixmbr工​具​会​为​系​统​恢​复​MBR。​
    6. 提​示​再​次​出​现​时​,输​入​exit然​后​按​回​车​键​。​
    7. 电​脑​会​重​启​并​进​入​Windows系​统​。​

19.2.1.2. Windows Vista和​Windows Server 2008

警告

Once you commence this process, your computer may be left in an unbootable state until you complete the entire set of instructions. Carefully read the steps below before beginning the removal process. Consider opening these instructions on another computer or printing them so that you have access to them at all times during the process.
This procedure relies on the Windows Recovery Environment that loads from the Windows installation disk and you will not be able to complete the procedure without access to this disk. If you start this procedure and do not complete it, you could leave your computer in a condition where you cannot boot it. The "system restore disk" supplied with some factory-built computers that are sold with Windows pre-installed on them might not include the Windows Recovery Environment.
  1. 删​除​Fedora分​区​
    1. 启​动​到​Microsoft. Windows。​
    2. Click Start then type diskmgmt.msc into the Start Search box and press Enter. The Disk Management tool opens.
      The tool displays a graphical representation of your disk, with bars representing each partition. The first partition is usually labeled NTFS and corresponds to your C: drive. At least two Fedora partitions will be visible. Windows will not display a file system type for these partitions, but may allocate drive letters to some of them.
    3. Right-click on one of the Fedora partitions, then click Delete Partition and click Yes to confirm the deletion. Repeat this process for the other Fedora partitions on your system. As you delete partitions, Windows labels the space on the hard drive previously occupied by those partitions as unallocated.
  2. 让​Windows使​用​Fedora腾​出​的​硬​盘​空​间​(可​选​)

    注意

    This step is not required to remove Fedora from your computer. However, if you skip this step, you will leave part of your hard drive's storage capacity unusable by Windows. Depending on your configuration, this might be a a significant portion of the storage capacity of the drive.
    Decide whether to extend an existing Windows partition to use the extra space, or create a new Windows partition in that space. If you create new a Windows partition, Windows will allocate a new drive letter to it and will interact with it as if it is a separate hard drive.
    扩​充​已​有​Windows分​区​
    1. In the Disk Management window, right-click on the Windows partition that you want to extend and select Extend Volume from the menu. The Extend Volume Wizard opens.
    2. Follow the prompts presented by the Extend Volume Wizard. If you accept the defaults that it offers you, the tool will extend the selected volume to fill all available space on the hard drive.
    添​加​新​Windows分​区​
    1. In the Disk Management window, right-click on disk space that Windows labels as unallocated and select New Simple Volume from the menu. The New Simple Volume Wizard starts.
    2. Follow the prompts presented by the New Simple Volume Wizard. If you accept the default options, the tool will create a new partition that fills all available space on the hard drive, assigns it the next available drive letter, and formats it with the NTFS file system.
  3. 恢​复​Windows引​导​程​序​
    1. 插​入​Windows安​装​盘​重​启​电​脑​。​电​脑​启​动​时​屏​幕​�几​秒​钟​内​会​出​现​以​下​信​息​:
      按​任​意​键​从​CD或​DVD启​动​
      
      在​消​息​显​示​时​按​任​意​键​,Windows安​装​软​件​将​加​载​。​
    2. 在​Install·Windows对​话​框​,·选​择​好​您​的​语​言​、​时​区​、​货​币​单​位​和​键​盘​类​型​,单​击​下​一​步​
    3. 点​修​复​您​的​电​脑​。​
    4. The Windows Recovery Environment (WRE) shows you the Windows installations that it can detect on your system. Select the installation that you want to restore, then click Next.
    5. 点​命​令​提​示​窗​口​。​将​打​开​命​令​行​窗​口​。​
    6. 输​入​bootrec /fixmbr然​后​按​回​车​。​
    7. 提​示​符​再​次​出​现​时​,关​闭​命​令​窗​口​,然​后​点​重​启​。​
    8. 电​脑​会​重​启​并​进​入​Windows系​统​。​

19.2.2. Your computer dual-boots Fedora and Mac OS X

The procedure to remove Fedora from a system that dual-boots Fedora and Mac OS X varies depending on whether you have installed Boot Camp on your computer:
You are not using Boot Camp on your computer
  1. Open the Disk Utility in /Applications/Utilities.
  2. Select the entry on the left for the disk volume containing Fedora.
  3. Click the Partition tab on the right side of the dialog.
  4. Select the Fedora partitions and click the minus button below the partition layout diagram.
  5. Resize your OS X partition to include the newly freed space.
You are using Boot Camp on your computer
  1. Open the Boot Camp Assistant in /Applications/Utilities.
  2. Select Create or remove a Windows partition and click Next.
  3. If your computer has a single internal disk, click Restore.
  4. If your computer has multiple internal disks, select the Linux disk, and then select Restore to a single Mac OS partition. Click Continue.

19.2.3. Your computer dual-boots Fedora and a different Linux distribution

注意

Because of the differences between the many different Linux distributions, these instructions are a general guide only. Specific details will vary according to your chosen distribution and the configuration of your particular computer. This example uses GParted as a partition editor and gedit as a text editor, but many other tools are available to perform these tasks. To follow these instructions exactly as written, install GParted and gedit.
  1. Remove Fedora partitions
    1. Boot the Linux version that you want to keep on your computer.
    2. Open GParted, either from a desktop menu or by typing gparted at the command line and pressing Enter.
    3. GParted displays the partitions that it detects on your computer, both as a graph and as a table.
      Right-click the Fedora partitions, then select Delete.
  2. Remove Fedora entries from your bootloader

    Example only

    These instructions assume that your system uses the GRUB bootloader. If you use a different bootloader (such as LILO) consult the documentation for that software to identify and remove Fedora entries from its list of boot targets and to ensure that your default operating system is correctly specified.
    1. At the command line, type su - and press Enter. When the system prompts you for the root password, type the password and press Enter.
    2. Type gedit /boot/grub/grub.conf and press Enter. This opens the grub.conf file in the gedit text editor.
    3. A typical Fedora entry in the grub.conf file consists of four lines:
      title Fedora (2.6.27.19-170.2.35.fc10.i686)
      root (hd0,1)
      kernel /vmlinuz-2.6.27.19-170.2.35.fc10.i686 ro root=UUID=04a07c13-e6bf-6d5a-b207-002689545705 rhgb quiet
      initrd /initrd-2.6.27.19-170.2.35.fc10.i686.img
      例 19.1. Example Fedora entry in grub.conf

      Depending on the configuration of your system, there may be multiple Fedora entries in grub.conf, each corresponding to a different version of the Linux kernel. Delete each of the Fedora entries from the file.
    4. Grub.conf contains a line that specifies the default operating system to boot, in the format default=N where N is a number equal to or greater than 0. If N is set to 0, GRUB will boot the first operating system in the list. If N is set to 1, it will boot the second operating system, and so forth.
      Identify the entry for the operating system that you want GRUB to boot by default and note its place in the order within the list.
      Make sure that the default= line contains the number one below the number of your chosen default operating system in the list.
      Save the updated grub.conf file and close gedit
  3. Make space available to your operating system

    注意

    This step is not required to remove Fedora from your computer. However, if you skip this step, you will leave part of your hard drive's storage capacity unusable by your other Linux operating system. Depending on your configuration, this might be a a significant portion of the storage capacity of the drive.

    注意

    To carry out this step, you require live media for a Linux distribution, for example, the Fedora Live CD or the Knoppix DVD.
    The method to make the space freed by removing the Fedora partitions available to your other Linux operating system differs, depending on whether your chosen operating system is installed on disk partitions configured to use Logical Volume Management (LVM) or not.
    • If you do not use LVM
      1. Boot your computer from Linux live media, and install gparted if it is not already present.
      2. Open GParted, either from a desktop menu or by typing gparted at the command line and pressing Enter.
      3. GParted displays the partitions on your system both as a graph and as a table. Click on the partition that you want to extend to use the space freed by removing Fedora, and click the Resize/Move button.
      4. A new dialog opens, allowing you to specify a new size for the partition by entering it as numbers, or by dragging the sides of the graphical representation of the partition so that it fills the available space. Click the Resize/Move button in this dialog to confirm your choice.
      5. Back in the main GParted window, click Apply. Take note of the name of the partition that you just resized, for example, /dev/sda3.
      6. When GParted finishes resizing the partition, type e2fsck partition at a command line and press Enter, where partition is the partition that you just resized. For example, if you just resized /dev/sda3, you would type e2fsck /dev/sda3.
        Linux now checks the file system of the newly-resized partition.
      7. When the file system check finishes, type resize2fs partition at a command line and press Enter, where partition is the partition that you just resized. For example, if you just resized /dev/sda3, you would type resize2fs /dev/sda3.
        Linux now resizes your file system to fill the newly-resized partition.
      8. Restart your computer. The extra space is now available to your Linux installation.
    • If you use LVM
      1. Boot your computer from Linux live media and install gparted and lvm2 if they are not already present.
      2. Create a new partition in the free space on the disk
        1. Open GParted, either from a desktop menu or by typing gparted at the command line and pressing Enter.
        2. GParted displays the partitions on your system both as a graph and as a table. The space freed by removing Fedora is labeled unallocated. Right-click on the unallocated space and select New. Accept the defaults and GParted will create a new partition that fills the space available on the drive.
        3. Click Apply. GParted writes the changes to your hard drive. Take note of the name of the partition that you just created, and the name of the device that holds the partition. For example, you may have created /dev/sda3 on device /dev/sda.
      3. Change the partition type identifier
        1. Fdisk is a partitioning tool capable of preparing partitions for LVM. At a command line, type fdisk device and press Enter, where device is the name of the device on which you just created a partition. For example, fdisk /dev/sda.
        2. At the prompt Command (m for help):, press T and Enter to use fdisk to change a partition type.
        3. At the prompt Partition number (1-4):, type the number of the partition that you just created. For example, if you just created partition /dev/sda3, type the number 3 and press Enter. This identifies the partition whose type fdisk will change.
        4. At the prompt Hex code (type L to list codes):, type the code 8e and press Enter. This is the code for a Linux LVM partition.
        5. At the prompt Command (m for help):, press W and Enter. Fdisk writes the new type code to the partition and exits.
      4. Expand the volume group
        1. At the command prompt, type lvm and press Enter to start the lvm2 tool.
        2. At the lvm> prompt, type pvcreate partition and press Enter, where partition is the partition that you recently created. For example, pvcreate /dev/sda3. This creates /dev/sda3 as a physical volume in LVM.
        3. At the lvm> prompt, type vgextend VolumeGroup partition and press Enter, where VolumeGroup is the LVM volume group on which Linux is installed and partition is the partition that you recently created. For example, if Linux is installed on /dev/VolumeGroup00, you would type vgextend /dev/VolumeGroup00 /dev/sda3 to extend that volume group to include the physical volume at /dev/sda3.
        4. At the lvm> prompt, type lvextend -l +100%FREE LogVol and press Enter, where LogVol is the logical volume that contains your Linux filesystem. For example, to extend LogVol00 to fill the newly-available space in its volume group, VolGroup00, type lvextend -l +100%FREE /dev/VolGroup00/LogVol00.
        5. At the lvm> prompt, type exit and press Enter to exit lvm2
      5. Type e2fsck LogVol at the command line and press Enter, where LogVol is the logical volume that you just resized. For example, if you just resized /dev/VolumeGroup00/LogVol00, you would type e2fsck /dev/VolumeGroup00/LogVol00.
        Linux now checks the file system of the newly-resized logical volume.
      6. When the file system check finishes, type resize2fs LogVol at a command line and press Enter, where LogVol is the partition that you just resized. For example, if you just resized /dev/VolumeGroup00/LogVol00, you would type resize2fs /dev/VolumeGroup00/LogVol00.
        Linux now resizes your file system to fill the newly-resized logical volume.
      7. Restart your computer. The extra space is now available to your Linux installation.

19.3. Replacing Fedora with MS-DOS or legacy versions of Microsoft Windows

在 DOS 和 Windows 系​统​中​,你​可​以​使​用 Windows fdisk 工​具​来​创​建​一​个​新​的​带​有 undocumented 标​志​的 MBR:/mbr。​这​只​重​写 MBR 来​引​导​主 DOS 分​区​。​该​命​令​类​似​:
fdisk /mbr
如​果​你​需​要​从​硬​盘​驱​动​器​中​删​除 Linux,并​且​已​经​试​图​用​默​认​的 DOS(Windows)fdisk 来​这​么​做​,你​将​会​遇​到​“​分​区​存​在​但​又​不​存​在​”​的​问​题​。​要​删​除​非 DOS 分​区​的​最​好​办​法​是​使​用​一​个​可​以​识​别 DOS 以​外​的​分​区​的​工​具​。​
To begin, insert the Fedora CD #1 and boot your system. Once you have booted off the CD, a boot prompt appears. At the boot prompt, type: linux rescue. This starts the rescue mode program.
You are prompted for your keyboard and language requirements. Enter these values as you would during the installation of Fedora.
Next, a screen appears telling you that the program attempts to find a Fedora install to rescue. Select Skip on this screen.
选​择​了​「​跳​过​」​之​后​,将​出​现​一​个​命​令​提​示​,在​这​里​你​可​以​访​问​要​删​除​的​分​区​。​
首​先​,键​入​命​令 list-harddrives。​这​条​命​令​会​列​出​你​的​系​统​上​所​有​被​安​装​程​序​识​别​的​硬​盘​驱​动​器​,以​及​它​们​的​大​小​(以 MB 为​单​位​)。​

Warning

请​注​意​,只​删​除​必​要​的​ 分​区​。​删​除​其​它​分​区​可​能​会​导​致​数​据​丢​失​或​导​致​系​统​环​境​受​损​。​
要​删​除​分​区​,使​用​分​区​工​具 parted。​启​动 parted,此​处​的 /dev/hda 是​要​删​除​的​分​区​所​在​的​设​备​:
parted /dev/hda
使​用 print 命​令​来​查​看​当​前​的​分​区​表​,从​而​判​定​要​删​除​的​分​区​的​号​码​:
print
print 命​令​还​可​以​显​示​分​区​的​类​型​(如​:linux-swap、​ext2、​ext3 等​等​)。​了​解​分​区​类​型​有​助​于​你​判​定​是​否​应​该​删​除​该​分​区​。​
使​用 rm 命​令​来​删​除​分​区​。​例​如​,要​删​除​次​要​号​码​(minor number)为 3 的​分​区​:
rm 3

Important

只​要​你​按​下 [Enter] 键​,这​些​改​变​就​会​生​效​,因​此​在​确​定​前​请​反​复​检​查​命​令​。​
删​除​分​区​后​,使​用 print 命​令​来​确​认​它​已​从​分​区​表​中​被​删​除​了​。​
一​旦​你​已​经​删​除​了 Linux 分​区​,并​且​做​完​了​所​有​必​要​的​改​变​,键​入 quit 来​退​出 parted。​
退​出 parted 后​,在​引​导​提​示​后​键​入 exit 来​退​出​救​援​模​式​并​重​新​启​动​系​统​,而​不​是​继​续​安​装​。​系​统​应​该​自​动​重​启​。​如​果​没​有​重​启​,你​可​以​用 Control+Alt+Delete 来​重​启​系​统​。​

部分 V. Technical appendixes

The appendixes in this section do not contain instructions that tell you how to install Fedora. Instead, they provide technical background that you might find helpful to understand the options that Fedora offers you at various points in the installation process.

目录

A. 磁​盘​分​区​简​介​
A.1. 硬​盘​基​本​概​念​
A.1.1. 不​是​你​写​入​什​么​,而​是​你​怎​么​写​入​
A.1.2. 分​区​:将​一​个​驱​动​器​变​成​多​个​驱​动​器​
A.1.3. 分​区​内​的​分​区 — 扩​展​分​区​概​述​
A.1.4. Making Room For Fedora
A.1.5. 分​区​命​名​方​案​
A.1.6. 磁​盘​分​区​以​及​其​它​操​作​系​统​
A.1.7. 磁​盘​分​区​和​挂​载​点​
A.1.8. 多​少​个​分​区​?
B. ISCSI disks
B.1. iSCSI disks in anaconda
B.2. iSCSI disks during start up
C. 磁​盘​加​密​向​导​
C.1. 什​么​是​块​设​备​加​密​?
C.2. 使​用​dm-crypt/LUKS加​密​块​设​备
C.2.1. LUKS概​要
C.2.2. 安​装​完​成​后​我​如​何​访​问​加​密​的​设​备​?(系​统​启​动​)
C.2.3. 选​择​一​个​安​全​性​好​的​密​码
C.3. 在​Anaconda中​创​建​加​密​块​设​备
C.3.1. 可​以​加​密​什​么​类​型​的​块​设​备​?
C.3.2. Anaconda块​设​备​加​密​支​持​的​限​制
C.4. 安​装​完​成​后​在​系​统​上​创​建​加​密​的​块​设​备​。
C.4.1. 创​建​块​设​备
C.4.2. 可​选​项​:使​用​随​机​数​据​填​充​设​备​
C.4.3. 将​设​备​格​式​化​为​dm-crypt/LUKS加​密​设​备
C.4.4. 创​建​一​个​映​射​来​允​许​访​问​设​备​中​未​加​密​的​内​容
C.4.5. Create filesystems on the mapped device, or continue to build complex storage structures using the mapped device
C.4.6. Add the mapping information to /etc/crypttab
C.4.7. Add an entry to /etc/fstab
C.5. Common Post-Installation Tasks
C.5.1. Set a randomly generated key as an additional way to access an encrypted block device
C.5.2. Add a new passphrase to an existing device
C.5.3. Remove a passphrase or key from a device
D. Understanding LVM
E. GRUB 引​导​装​载​程​序​
E.1. GRUB
E.1.1. GRUB 和 x86 引​导​过​程​
E.1.2. GRUB 的​特​征​
E.2. Installing GRUB
E.3. GRUB 术​语​
E.3.1. 设​备​名​
E.3.2. 文​件​名​和​块​列​表​(Blocklist)
E.3.3. 根​文​件​系​统​和 GRUB
E.4. GRUB 界​面​
E.4.1. 界​面​装​载​顺​序​
E.5. GRUB 命​令​
E.6. GRUB 菜​单​配​置​文​件​
E.6.1. 配​置​文​件​结​构​
E.6.2. 配​置​文​件​指​令​
E.7. 在​引​导​时​改​变​运​行​级​别​
E.8. 其​它​资​料​
E.8.1. 安​装​了​的​文​档​
E.8.2. 有​用​的​网​站​
E.8.3. 相​关​书​籍​
F. 引​导​过​程​、​初​始​化​和​关​闭​
F.1. 引​导​过​程​
F.2. 对​引​导​过​程​的​详​细​介​绍​
F.2.1. BIOS
F.2.2. 引​导​装​载​程​序​
F.2.3. 内​核​
F.2.4. /sbin/init 程​序​
F.3. 在​引​导​时​运​行​其​他​的​程​序​
F.4. SysV Init 运​行​级​别​
F.4.1. 运​行​级​别​
F.4.2. 运​行​级​别​工​具​
F.5. 关​机​
G. 其​他​技​术​文​档​

磁​盘​分​区​简​介​

Note

This appendix is not necessarily applicable to non-x86-based architectures. However, the general concepts mentioned here may apply.
This appendix is not necessarily applicable to non-x86-based architectures. However, the general concepts mentioned here may apply.
If you are reasonably comfortable with disk partitions, you could skip ahead to 第 A.1.4 节 “Making Room For Fedora”, for more information on the process of freeing up disk space to prepare for a Fedora installation. This section also discusses the partition naming scheme used by Linux systems, sharing disk space with other operating systems, and related topics.

A.1. 硬​盘​基​本​概​念​

硬​盘​功​能​极​为​简​单 — 它​们​被​用​来​可​靠​地​储​存​及​检​索​数​据​。​
未​使​用​过​的​磁​盘​驱​动​器​
未​使​用​过​的​磁​盘​驱​动​器​的​图​像​。​
图 A.1. 未​使​用​过​的​磁​盘​驱​动​器​

没​什​么​可​看​的​,是​不​是​?不​过​,若​我​们​仅​在​一​个​最​基​本​的​层​次​上​讨​论​磁​盘​驱​动​器​,此​图​表​已​足​够​。​假​设​我​们​要​在​这​个​磁​盘​驱​动​器​上​面​储​存​一​些​数​据​,就​目​前​而​言​,这​还​不​行​。​我​们​首​先​要​做​一​些​准​备​工​作​。​

A.1.1. 不​是​你​写​入​什​么​,而​是​你​怎​么​写​入​

有​经​验​的​计​算​机​用​户​可​能​对​此​心​中​有​数​。​我​们​需​要​格​式​化​(format)这​个​驱​动​器​。​格​式​化​又​称​“​制​作​文​件​系​统​(file system)”​,它​是​一​个​将​信​息​写​入​驱​动​器​,在​未​经​格​式​化​的​驱​动​器​内​的​空​白​空​间​中​建​立​秩​序​的​过​程​。​
有​文​件​系​统​的​磁​盘​驱​动​器​
格​式​化​的​磁​盘​驱​动​器​的​图​像​。​
图 A.2. 有​文​件​系​统​的​磁​盘​驱​动​器​

图 A.2 “有​文​件​系​统​的​磁​盘​驱​动​器​” 所​暗​示​的​,文​件​系​统​所​强​加​的​顺​序​涉​及​了​一​些​折​衷​方​案​:
  • 驱​动​器​上​极​小​的​一​部​分​可​用​空​间​被​用​来​储​存​与​文​件​系​统​有​关​的​数​据​,这​可​以​被​视​作​管​理​开​销​。​
  • 文​件​系​统​把​剩​余​的​空​间​划​分​为​小​的​、​大​小​一​致​的​段​。​在 Linux 中​,这​些​段​被​称​为​块​(block)[5]
由​于​文​件​系​统​带​来​创​建​目​录​和​文​件​的​可​能​性​,以​上​牺​牲​可​以​被​看​作​所​需​付​出​的​一​个​很​小​的​代​价​。​
It is also worth noting that there is no single, universal file system. As 图 A.3 “含​有​不​同​文​件​系​统​的​磁​盘​驱​动​器​”, shows, a disk drive may have one of many different file systems written on it. As you might guess, different file systems tend to be incompatible; that is, an operating system that supports one file system (or a handful of related file system types) may not support another. This last statement is not a hard-and-fast rule, however. For example, Fedora supports a wide variety of file systems (including many commonly used by other operating systems), making data interchange between different file systems easy.
含​有​不​同​文​件​系​统​的​磁​盘​驱​动​器​
含​有​不​同​文​件​系​统​的​磁​盘​驱​动​器​的​图​像​。​
图 A.3. 含​有​不​同​文​件​系​统​的​磁​盘​驱​动​器​

当​然​,将​文​件​系​统​写​入​磁​盘​仅​仅​是​一​个​开​端​。​这​个​过​程​的​目​标​实​际​上​是​储​存​并​且​检​索​数​据​。​写​入​一​些​文​件​后​,让​我​们​再​来​看​一​看​磁​盘​。​
已​写​入​数​据​的​磁​盘​驱​动​器​
已​写​入​数​据​的​磁​盘​驱​动​器​的​图​像​。​
图 A.4. 已​写​入​数​据​的​磁​盘​驱​动​器​

图 A.4 “已​写​入​数​据​的​磁​盘​驱​动​器​” 所​示​,某​些​之​前​的​空​数​据​块​现​在​也​存​放​着​数​据​。​然​而​,光​看​这​个​框​图​,我​们​不​能​确​认​有​多​少​个​文​件​系​统​在​这​个​磁​盘​上​。​这​有​可​能​是​一​个​,也​有​可​能​是​多​个​,因​为​所​有​的​文​件​都​使​用​至​少​一​个​数​据​块​而​有​些​文​件​则​使​用​多​块​。​另​外​一​个​值​得​注​意​的​地​方​是​,已​经​被​使​用​的​块​不​需​要​组​成​连​续​的​空​间​;未​使​用​的​和​已​使​用​的​块​可​以​散​布​着​排​列​。​这​被​称​作 fragmentation。​当​试​图​调​整​现​存​分​区​的​大​小​时​,Fragmentation 会​起​到​它​的​作​用​。​
如​同​许​多​与​计​算​机​相​关​的​科​技​,磁​盘​驱​动​器​自​问​世​后​一​直​在​不​断​地​变​化​。​特​别​是​,它​们​越​来​越​大​。​不​是​实​际​尺​寸​越​来​越​大​,而​是​它​们​储​存​信​息​的​能​力​越​来​越​大​。​这​种​新​增​的​容​量​导​致​了​磁​盘​驱​动​器​使​用​方​法​的​根​本​改​变​。​

A.1.2. 分​区​:将​一​个​驱​动​器​变​成​多​个​驱​动​器​

由​于​磁​盘​驱​动​器​容​量​的​不​断​增​大​,一​些​人​开​始​质​问​将​所​有​格​式​化​的​空​间​并​为​一​大​块​是​否​明​智​。​这​一​类​想​法​的​动​机​有​哲​学​上​的​,也​有​技​术​上​的​。​从​哲​学​角​度​上​讲​,一​个​较​大​的​磁​盘​驱​动​器​所​提​供​的​额​外​空​间​若​超​过​了​一​定​的​大​小​似​乎​只​会​造​成​更​多​的​杂​乱​无​章​。​从​技​术​角​度​上​讲​,某​些​文​件​系​统​不​是​为​支​持​大​于​一​定​容​量​的​磁​盘​驱​动​器​而​设​计​的​。​或​者​,某​些​文​件​系​统​可​能​会​支​持​拥​有​巨​大​容​量​的​较​大​的​驱​动​器​,但​是​由​文​件​系​统​跟​踪​文​件​所​强​加​于​上​的​管​理​费​用​也​随​之​变​得​过​高​过​大​。​
解​决​这​个​问​题​的​办​法​是​将​磁​盘​划​分​为​分​区 (partition)。​每​一​分​区​都​可​以​像​一​个​独​立​的​磁​盘​一​样​被​访​问​。​这​是​通​过​添​加​分​区​表​(partition table)来​做​到​的​。​

Note

虽​然​本​章​图​表​中​所​显​示​的​分​区​表​和​实​际​磁​盘​驱​动​器​是​分​开​的​,这​并​不​完​全​正​确​。​事​实​上​,分​区​表​被​保​存​在​磁​盘​的​最​起​首​,在​任​何​文​件​系​统​或​用​户​数​据​之​前​。​但​是​为​了​清​楚​起​见​,我​们​在​图​表​中​将​之​分​开​。​
带​有​分​区​表​的​磁​盘​驱​动​器​
带​有​分​区​表​的​磁​盘​驱​动​器​的​图​像​。​
图 A.5. 带​有​分​区​表​的​磁​盘​驱​动​器​

图 A.5 “带​有​分​区​表​的​磁​盘​驱​动​器​” 所​示​,分​区​表​被​分​成 4 个​部​分​或​者​说​是 4 个 primary 分​区​。​主​分​区​是​硬​盘​上​的​可​以​只​包​含​一​个​逻​辑​分​区​(或​部​分​)的​分​区​。​每​个​分​区​都​存​放​着​定​义​单​一​分​区​的​必​要​的​信​息​,这​意​味​着​分​区​表​最​多​可​以​定​义 4 个​分​区​。​
每​个​分​区​表​项​目​都​包​含​着​该​分​区​的​几​项​重​要​的​特​征​:
  • 在​磁​盘​上​分​区​开​始​和​结​束​的​地​点​(起​止​点​)
  • 分​区​是​否​“​活​跃​”​
  • 分​区​的​类​型​
让​我​们​来​仔​细​查​看​一​下​每​一​个​特​征​。​起​止​点​实​际​上​定​义​了​分​区​的​大​小​及​在​磁​盘​上​的​位​置​。​“​活​跃​”​标​志​是​被​某​些​操​作​系​统​的​引​导​装​载​程​序​所​用​。​换​一​句​话​说​,标​为​“​活​跃​”​的​分​区​上​的​操​作​系​统​将​会​被​引​导​。​
分​区​类​型​可​能​有​些​不​易​分​辨​。 类​型​是​标​识​分​区​将​会​被​如​何​使​用​的​数​字​。​如​果​这​句​话​听​起​来​有​些​笼​统​,那​是​因​为​分​区​类​型​术​语​本​身​也​有​些​笼​统​。​某​些​操​作​系​统​用​分​区​类​型​来​代​表​一​种​指​定​的​系​统​类​型​,或​将​分​区​标​为​与​某​个​操​作​系​统​相​关​联​的​分​区​,或​用​来​指​明​该​分​区​包​含​着​可​引​导​的​操​作​系​统​,或​是​以​上​三​者​的​结​合​。​
现​在​,你​可​能​想​知​道​怎​么​处​理​其​他​复​杂​的​情​况​。​你​可​以​参​阅 图 A.6 “只​有​一​个​分​区​的​磁​盘​驱​动​器​” 里​的​例​子​。​
只​有​一​个​分​区​的​磁​盘​驱​动​器​
只​有​一​个​分​区​的​磁​盘​驱​动​器​的​图​像​。​
图 A.6. 只​有​一​个​分​区​的​磁​盘​驱​动​器​

在​许​多​情​况​下​,整​个​磁​盘​上​只​有​一​个​分​区​,基​本​上​是​重​复​分​区​以​前​所​使​用​的​方​法​。​分​区​表​内​只​有​一​个​项​目​,它​指​向​分​区​的​起​点​。​
我​们​已​经​把​这​个​分​区​标​记​为 "DOS" 类​型​。​虽​然​这​只​是 表 A.1 “Partition Types” 里​列​出​的​可​能​类​型​里​的​其​中​一​种​,但​对​于​这​里​的​讨​论​来​说​,这​已​经​足​够​了​。​
表 A.1 “Partition Types”中​包​括​了​一​些​常​用​的​(和​罕​见​的​)分​区​类​型​,以​及​它​们​的​十​六​进​制​数​值​。​
Partition Type Value Partition Type Value
Empty 00 Novell Netware 386 65
DOS 12-bit FAT 01 PIC/IX 75
XENIX root 02 Old MINIX 80
XENIX usr 03 Linux/MINUX 81
DOS 16-bit <=32M 04 Linux swap 82
Extended 05 Linux native 83
DOS 16-bit >=32 06 Linux extended 85
OS/2 HPFS 07 Amoeba 93
AIX 08 Amoeba BBT 94
AIX bootable 09 BSD/386 a5
OS/2 Boot Manager 0a OpenBSD a6
Win95 FAT32 0b NEXTSTEP a7
Win95 FAT32 (LBA) 0c BSDI fs b7
Win95 FAT16 (LBA) 0e BSDI swap b8
Win95 Extended (LBA) 0f Syrinx c7
Venix 80286 40 CP/M db
Novell 51 DOS access e1
PPC PReP Boot 41 DOS R/O e3
GNU HURD 63 DOS secondary f2
Novell Netware 286 64 BBT ff
表 A.1. Partition Types

经​过​一​段​时​间​后​,四​个​分​区​很​明​显​将​不​够​用​。​随​着​磁​盘​驱​动​器​的​不​断​增​大​,配​置​了​四​个​相​当​大​的​分​区​后​仍​有​剩​余​空​间​的​可​能​性​会​越​来​越​大​。​我​们​需​要​有​一​些​创​建​更​多​分​区​的​方​法​。​
输​入​扩​展​分​区​。​你​可​能​已​经​注​意​到​了​,表 A.1 “Partition Types” 里​有​一​个 "Extended" 分​区​类​型​。​扩​展​分​区​里​处​于​核​心​地​位​的​就​是​这​个​类​型​。​
当​分​区​被​创​建​且​类​型​被​设​置​为 "Extended," 时​,扩​展​分​区​表​就​会​被​建​立​。​实​质​上​,扩​展​分​区​就​象​是​它​右​边​的​一​个​磁​盘 — 它​有​指​向​完​全​包​含​在​扩​展​分​区​里​的​一​个​或​多​个​分​区​(和 4 个 primary partitions 相​反​,这​被​称​作 logical partitions)的​分​区​表​。​图 A.7 “带​有​扩​展​分​区​的​磁​盘​驱​动​器​” 展​示​了​有​一​个​主​分​区​和​一​个​包​含​两​个​逻​辑​分​区​的​扩​展​分​区​的​磁​盘​(还​有​一​些​未​被​分​区​的​空​闲​空​间​)。​
带​有​扩​展​分​区​的​磁​盘​驱​动​器​
带​有​扩​展​分​区​的​磁​盘​驱​动​器​的​图​像​。​
图 A.7. 带​有​扩​展​分​区​的​磁​盘​驱​动​器​

如​图​表​中​所​暗​示​,主​分​区​与​逻​辑​分​区​之​间​有​一​个​区​别 — 主​分​区​只​能​有​四​个​,但​是​可​以​存​在​的​逻​辑​分​区​数​量​却​无​固​定​限​制​。​不​过​,鉴​于 Linux 进​入​分​区​的​方​式​,你​应​该​避​免​在​一​个​磁​盘​驱​动​器​上​定​义 12 个​以​上​逻​辑​分​区​。​
Now that we have discussed partitions in general, let us review how to use this knowledge to install Fedora.

A.1.4. Making Room For Fedora

当​你​试​图​为​你​的​硬​盘​重​新​分​区​时​,有​三​种​可​能​的​情​况​:
  • 有​可​用​的​未​分​区​的​空​闲​空​间​
  • 有​可​用​的​未​使​用​过​的​分​区​
  • 被​活​跃​使​用​的​分​区​内​有​可​用​的​空​闲​空​间​
让​我​们​依​次​来​看​一​看​每​一​种​情​况​。​

Note

Keep in mind that the following illustrations are simplified in the interest of clarity and do not reflect the exact partition layout that you encounter when actually installing Fedora.

A.1.4.1. 使​用​未​经​分​区​的​空​闲​空​间​

带​有​未​分​区​的​空​闲​空​间​的​磁​盘​驱​动​器​
带​有​未​分​区​的​空​闲​空​间​的​磁​盘​驱​动​器​的​图​像​。​1 代​表​带​有​未​被​拨​发​的​空​间​的​未​定​义​分​区​,2 代​表​带​有​已​被​拨​发​的​空​间​的​已​定​义​分​区​。​
图 A.8. 带​有​未​分​区​的​空​闲​空​间​的​磁​盘​驱​动​器​

图 A.8 “带​有​未​分​区​的​空​闲​空​间​的​磁​盘​驱​动​器​” 里​,1 代​表​带​有​未​被​分​配​的​空​间​的​未​定​义​分​区​,2 代​表​带​有​已​被​分​配​的​空​间​的​已​定​义​分​区​。​
如​果​细​想​一​下​,你​就​会​认​识​到​一​个​未​经​使​用​的​硬​盘​也​属​这​种​类​型​。​唯​一​的​区​别​是​后​者​的​全​部​空​间​都​不​属​于​任​何​定​义​的​分​区​。​
In any case, you can create the necessary partitions from the unused space. Unfortunately, this scenario, although very simple, is not very likely (unless you have just purchased a new disk just for Fedora). Most pre-installed operating systems are configured to take up all available space on a disk drive (refer to 第 A.1.4.3 节 “使​用​活​跃​分​区​中​的​空​闲​空​间​”).
接​下​来​,我​们​将​讨​论​一​种​更​普​遍​的​情​况​。​

A.1.4.2. 使​用​一​个​未​使​用​过​的​分​区​中​的​空​间​

带​有​未​使​用​分​区​的​磁​盘​驱​动​器​
带​有​未​使​用​分​区​的​磁​盘​驱​动​器​的​图​像​。​1 代​表​未​使​用​的​分​区​,2 代​表​为 Linux 重​新​拨​发​未​使​用​过​的​分​区​。​
图 A.9. 带​有​未​使​用​分​区​的​磁​盘​驱​动​器​

图 A.9 “带​有​未​使​用​分​区​的​磁​盘​驱​动​器​” 里​,1 代​表​未​使​用​的​分​区​,2 代​表​为 Linux 重​新​分​配​的​未​使​用​过​的​分​区​。​
如​果​你​发​现​自​己​处​于​这​种​情​况​,你​可​以​使​用​那​些​拨​给​未​使​用​分​区​的​空​间​。​首​先​,你​应​该​删​除​该​分​区​,然​后​在​其​上​创​建​相​应​的 Linux 分​区​。​你​可​以​在​安​装​过​程​中​删​除​未​用​分​区​,然​后​再​手​工​创​建​新​分​区​。​

A.1.4.3. 使​用​活​跃​分​区​中​的​空​闲​空​间​

这​是​最​常​见​的​情​况​。​不​幸​的​是​,这​也​是​最​难​处​理​的​情​况​。​主​要​问​题​是​,即​便​你​有​足​够​的​空​闲​空​间​,它​们​目​前​已​被​分​配​给​一​个​正​在​使​用​中​的​分​区​。​如​果​你​购​买​了​一​个​带​有​预​装​软​件​的​计​算​机​,很​可​能​整​个​硬​盘​是​一​个​单​个​的​带​有​操​作​系​统​和​数​据​的​大​分​区​。​
除​了​给​你​的​系​统​添​加​一​个​新​硬​盘​驱​动​器​外​,你​还​有​以​下​两​种​选​择​:
破​坏​性​重​新​分​区​
被​破​坏​性​重​新​分​区​的​磁​盘​驱​动​器​
被​破​坏​性​地​重​新​分​区​的​磁​盘​驱​动​器​的​图​像​。​1 代​表​之​前​的​情​景​,2 代​表​之​后​的​情​景​。​
图 A.10. 被​破​坏​性​重​新​分​区​的​磁​盘​驱​动​器​

图 A.10 “被​破​坏​性​重​新​分​区​的​磁​盘​驱​动​器​” 里​,1 代​表​之​前​的​情​景​,2 代​表​之​后​的​情​景​。​

Warning

图 A.10 “被​破​坏​性​重​新​分​区​的​磁​盘​驱​动​器​” 所​示​,在​最​初​的​分​区​里​的​数​据​都​因​没​有​正​确​部​分​而​丢​失​。​
非​破​坏​性​重​新​分​区​
图 A.11 “磁​盘​驱​动​器​被​压​缩​” 所​示​,第​一​步​是​压​缩​现​有​分​区​里​的​数​据​。​这​样​做​的​原​因​是​可​以​重​新​安​排​数​据​,以​便​分​区​末​端​的​可​用​空​间​最​大​化​。​
磁​盘​驱​动​器​被​压​缩​
磁​盘​驱​动​器​被​压​缩​后​的​图​像​。​1 代​表​之​前​的​情​景​,2 代​表​之​后​的​情​景​。​
图 A.11. 磁​盘​驱​动​器​被​压​缩​

图 A.11 “磁​盘​驱​动​器​被​压​缩​”1 代​表​之​前​的​情​景​,2 代​表​之​后​的​情​景​。​
这​一​步​骤​至​关​重​要​。​不​执​行​这​一​步​骤​,你​的​数​据​所​在​位​置​可​能​会​阻​止​分​区​被​重​新​划​分​为​想​要​的​大​小​。​还​请​注​意​的​是​,由​于​某​种​原​因​,某​些​数​据​不​能​被​移​动​。​如​果​情​况​如​此​(这​会​严​重​地​限​制​你​的​新​分​区​的​大​小​),你​可​能​会​被​迫​在​你​的​磁​盘​上​进​行​破​坏​性​重​新​分​区​。​
A.1.4.3.2. 重​新​划​分​现​存​分​区​的​大​小​
图 A.12 “分​区​大​小​被​重​新​划​分​的​磁​盘​驱​动​器​”显​示​了​重​新​划​分​分​区​大​小​的​实​际​过​程​。​这​一​过​程​的​结​果​要​依​你​所​使​用​的​软​件​而​定​。​多​数​情​况​下​,新​空​出​的​空​闲​空​间​被​用​来​创​建​一​个​与​原​有​分​区​同​类​的​未​格​式​化​的​分​区​。​
分​区​大​小​被​重​新​划​分​的​磁​盘​驱​动​器​
带​有​一​个​被​重​新​划​分​大​小​的​分​区​的​磁​盘​驱​动​器​。​1 代​表​之​前​的​情​景​,2代​表​之​后​的​情​景​。​
图 A.12. 分​区​大​小​被​重​新​划​分​的​磁​盘​驱​动​器​

图 A.12 “分​区​大​小​被​重​新​划​分​的​磁​盘​驱​动​器​”1 代​表​之​前​的​情​景​,2 代​表​之​后​的​情​景​。​
理​解​你​所​使​用​的​重​新​分​区​软​件​对​新​空​出​的​空​间​的​操​作​是​很​重​要​的​,只​有​这​样​,你​才​能​正​确​地​采​取​相​应​措​施​。​在​我​们​示​范​的​情​况​中​,最​佳​措​施​是​删​除​新​建​的 DOS 分​区​,然​后​创​建​恰​当​的 Linux 分​区​。​
A.1.4.3.3. 创​建​新​分​区​
如​前​面​的​步​骤​所​暗​示​的​,创​建​新​的​分​区​有​可​能​是​也​可​能​不​是​必​需​的​。​然​而​,除​非​用​来​调​整​大​小​的​软​件​是 Linux 软​件​,否​则​你​很​可​能​必​须​删​除​在​调​整​大​小​过​程​中​创​建​的​分​区​。​图 A.13 “带​有​最​终​分​区​配​置​的​磁​盘​驱​动​器​” 里​展​示​了​这​种​情​况​。​
带​有​最​终​分​区​配​置​的​磁​盘​驱​动​器​
带​有​最​终​分​区​配​置​的​磁​盘​驱​动​器​的​图​像​。​1 代​表​之​前​的​情​景​,2代​表​之​后​的​情​景​。​
图 A.13. 带​有​最​终​分​区​配​置​的​磁​盘​驱​动​器​

图 A.13 “带​有​最​终​分​区​配​置​的​磁​盘​驱​动​器​”1 代​表​之​前​的​情​景​,2代​表​之​后​的​情​景​。​

Note

下​列​信​息​是​基​于 intel 的​计​算​机​所​特​有​的​。​
为​了​方​便​用​户​,我​们​提​供​了 parted 工​具​。​它​是​一​个​可​免​费​获​得​的​重​新​划​分​分​区​大​小​的​程​序​。​
如​果​你​决​定​使​用 parted 来​重​新​给​你​的​硬​盘​驱​动​器​分​区​,你​必​须​熟​悉​磁​盘​贮​存​区​,并​备​份​了​你​的​计​算​机​上​的​数​据​。​这​一​点​至​关​重​要​。​你​应​该​给​你​的​计​算​机​上​重​要​的​数​据​做​两​个​备​份​。​这​些​备​份​应​该​保​存​在​可​移​介​质​上​(如​磁​盘​、​光​盘​或​磁​带​),而​且​你​应​该​在​继​续​前​确​定​它​们​可​以​被​读​取​。​
Should you decide to use parted, be aware that after parted runs you are left with two partitions: the one you resized, and the one parted created out of the newly freed space. If your goal is to use that space to install Fedora, you should delete the newly created partition, either by using the partitioning utility under your current operating system or while setting up partitions during installation.
Linux 使​用​字​母​和​数​字​的​组​合​来​指​代​磁​盘​分​区​。​这​可​能​有​些​使​人​迷​惑​不​解​,特​别​是​如​果​你​以​前​使​用​“​C 驱​动​器​”​这​种​方​法​来​指​代​硬​盘​及​它​们​的​分​区​。​在 DOS/Windows 的​世​界​里​,分​区​是​用​下​列​方​法​命​名​的​:
  • 每​个​分​区​都​被​检​查​过​以​便​判​定​它​是​否​可​被 DOS/Windows 读​取​。​
  • 如​果​分​区​类​型​是​兼​容​的​,它​会​被​指​派​给​一​个​“​驱​动​器​字​母​”​。​驱​动​器​字​母​从​“​C”​开​始​,然​后​依​据​要​标​签​的​分​区​数​量​而​按​字​母​顺​序​推​移​。​
  • 驱​动​器​字​母​可​以​用​来​指​代​那​个​分​区​,也​可​以​用​来​指​带​分​区​所​含​的​文​件​系​统​。​
Fedora uses a naming scheme that is more flexible and conveys more information than the approach used by other operating systems. The naming scheme is file-based, with file names in the form of /dev/xxyN.
下​面​说​明​了​解​析​分​区​命​名​方​案​的​方​法​:
/dev/
这​个​字​串​是​所​有​设​备​文​件​所​在​的​目​录​名​。​因​为​分​区​位​于​硬​盘​上​,而​硬​盘​是​设​备​,所​以​这​些​文​件​代​表​了​在​/dev/上​所​有​可​能​的​分​区​。​
xx
分​区​名​的​前​两​个​字​母​标​明​分​区​所​在​设​备​的​类​型​。​通​常​是 hd (IDE 磁​盘​)或 sd(SCSI 磁​盘​)。​
y
这​个​字​母​标​明​分​区​所​在​的​设​备​。​例​如​,/dev/hda(第​一​个 IDE 磁​盘​)或 /dev/sdb(第​二​个 SCSI 磁​盘​)
N
最​后​的​数​字​代​表​分​区​。​前​四​个​分​区​(主​分​区​或​扩​展​分​区​)是​用​数​字​从 1 排​列​到 4。​逻​辑​分​区​从 5 开​始​。​例​如​,/dev/hda3 是​在​第​一​个 IDE 硬​盘​上​的​第​三​个​主​分​区​或​扩​展​分​区​;/dev/sdb6 是​在​第​二​个 SCSI 硬​盘​上​的​第​二​个​逻​辑​分​区​。​

Note

There is no part of this naming convention that is based on partition type; unlike DOS/Windows, all partitions can be identified under Fedora. Of course, this does not mean that Fedora can access data on every type of partition, but in many cases it is possible to access data on a partition dedicated to another operating system.
Keep this information in mind; it makes things easier to understand when you are setting up the partitions Fedora requires.
令​许​多 Linux 的​新​用​户​感​到​困​惑​的​一​个​地​方​是​各​分​区​是​如​何​被 Linux 操​作​系​统​使​用​及​访​问​的​。​它​在 DOS/Windows 中​相​对​来​说​较​为​简​单​。​每​一​分​区​有​一​个​“​驱​动​器​字​母​”​,你​用​恰​当​的​驱​动​器​字​母​来​指​代​相​应​分​区​上​的​文​件​和​目​录​。​
这​与 Linux 处​理​分​区​及​磁​盘​贮​存​问​题​的​方​法​截​然​不​同​。​其​主​要​的​区​别​在​于​,Linux 中​的​每​一​个​分​区​都​是​构​成​支​持​一​组​文​件​和​目​录​所​必​需​的​贮​存​区​的​一​部​分​。​它​是​通​过​挂​载​(mounting)来​实​现​的​,挂​载​是​将​分​区​关​联​到​某​一​目​录​的​过​程​。​挂​载​分​区​使​起​始​于​这​个​指​定​目​录​(通​称​为​挂​载​点​,mount point)的​贮​存​区​能​够​被​使​用​。​
For example, if partition /dev/hda5 is mounted on /usr/, that would mean that all files and directories under /usr/ physically reside on /dev/hda5. So the file /usr/share/doc/FAQ/txt/Linux-FAQ would be stored on /dev/hda5, while the file /etc/gdm/custom.conf would not.
继​续​以​上​的​例​子​,/usr/ 之​下​的​一​个​或​多​个​目​录​还​有​可​能​是​其​它​分​区​的​挂​载​点​。​例​如​,某​个​分​区​(假​设​为​,/dev/hda7/)可​以​被​挂​载​到 /usr/local/ 下​,这​意​味​着 /usr/local/man/whatis 将​位​于 /dev/hda7 上​而​不​是 /dev/hda5 上​。​


[5] 与​图​解​所​示​不​同​,块​实​际​上​是​大​小​一​致​的​。​此​外​还​请​留​意​,一​个​普​通​的​磁​盘​驱​动​器​上​含​有​数​以​千​计​的​块​。​不​过​,在​本​次​讨​论​中​,我​们​可​以​忽​略​这​些​细​微​出​入​。​

ISCSI disks

Internet Small Computer System Interface (iSCSI) is a protocol that allows computers to communicate with storage devices by SCSI requests and responses carried over TCP/IP. Because iSCSI is based on the standard SCSI protocols, it uses some terminology from SCSI. The device on the SCSI bus to which requests get sent (and which answers these requests) is known as the target and the device issuing requests is known as the initiator. In other words, an iSCSI disk is a target and the iSCSI software equivalent of a SCSI controller or SCSI Host Bus Adapter (HBA) is called an initiator. This appendix only covers Linux as an iSCSI initiator: how Linux uses iSCSI disks, but not how Linux hosts iSCSI disks.
Linux has a software iSCSI initiator in the kernel that takes the place and form of a SCSI HBA driver and therefore allows Linux to use iSCSI disks. However, as iSCSI is a fully network-based protocol, iSCSI initiator support needs more than just the ability to send SCSI packets over the network. Before Linux can use an iSCSI target, Linux must find the target on the network and make a connection to it. In some cases, Linux must send authentication information to gain access to the target. Linux must also detect any failure of the network connection and must establish a new connection, including logging in again if necessary.
The discovery, connection, and logging in is handled in userspace by the iscsiadm utility, and the error handling is also handled in userspace by iscsid.
Both iscsiadm and iscsid are part of the iscsi-initiator-utils package under Fedora.

B.1. iSCSI disks in anaconda

Anaconda can discover (and then log in to) iSCSI disks in two ways:
  1. When anaconda starts, it checks if the BIOS or add-on boot ROMs of the system support iSCSI Boot Firmware Table (iBFT), a BIOS extension for systems which can boot from iSCSI. If the BIOS supports iBFT, anaconda will read the iSCSI target information for the configured boot disk from the BIOS and log in to this target, making it available as an installation target.
  2. The initial partitioning screen presents you with an Advanced storage configuration button that allows you to add iSCSI target information like the discovery IP-address. Anaconda will probe the given IP-address and log in to any targets that it finds. See 第 7.19 节 “Advanced Storage Options ” for the details that you can specify for iSCSI targets.
While anaconda uses iscsiadm to find and log into iSCSI targets, iscsiadm automatically stores any information about these targets iscsiadm iSCSI database. Anaconda then copies this database to the installed system and marks any iSCSI targets not used for / so that the system will automatically log in to them when it starts. If / is placed on an iSCSI target, initrd will log into this target and anaconda does not include this target in start up scripts to avoid multiple attempts to log into the same target.
If / is placed on an iSCSI target, anaconda sets NetworkManager to ignore any network interfaces that were active during the installation process. These interfaces will also be configured by initrd when the system starts. If NetworkManager were to reconfigure these interfaces, the system would lose its connection to /.

B.2. iSCSI disks during start up

ISCSI-related events might occur at a number of points while the system starts:
  1. The init script in the initrd will log in to iSCSI targets used for / (if any). This is done using the iscsistart utility (which can do this without requiring iscsid to run).
  2. When the root filesystem has been mounted and the various service initscripts get run, the iscsid initscript will get called. This script will then start iscsid if any iSCSI targets are used for /, or if any targets in the iSCSI database are marked to be logged in to automatically.
  3. After the classic network service script has been run (or would have been run if enabled) the iscsi initscript will run. If the network is accessible, this will log in to any targets in the iSCSI database which are marked to be logged in to automatically. If the network is not accessible, this script will exit quietly.
  4. When using NetworkManager to access the network (instead of the classic network service script), NetworkManager will call the iscsi initscript. See: /etc/NetworkManager/dispatcher.d/04-iscsi

    重要

    Because NetworkManager is installed in /usr, you cannot use it to configure network access if /usr is on network-attached storage such as an iSCSI target.
If iscsid is not needed as the system starts, it will not start automatically. If you start iscsiadm, iscsiadm will start iscsid in turn.

磁​盘​加​密​向​导​

C.1. 什​么​是​块​设​备​加​密​?

Block device encryption protects the data on a block device by encrypting it. To access the device's decrypted contents, a user must provide a passphrase or key as authentication. This provides additional security beyond existing OS security mechanisms in that it protects the device's contents even if it has been physically removed from the system.

C.2. 使​用​dm-crypt/LUKS加​密​块​设​备

LUKS (Linux Unified Key Setup) is a specification for block device encryption. It establishes an on-disk format for the data, as well as a passphrase/key management policy.
LUKS uses the kernel device mapper subsystem via the dm-crypt module. This arrangement provides a low-level mapping that handles encryption and decryption of the device's data. User-level operations, such as creating and accessing encrypted devices, are accomplished through the use of the cryptsetup utility.

C.2.1. LUKS概​要

  • LUKS干​什​么​:
    • LUKS加​密​整​个​块​设​备
      • LUKS is thereby well-suited for protecting the contents of mobile devices such as:
        • 可​移​动​存​储​介​质​
        • 笔​记​本​磁​盘​驱​动​器​
    • The underlying contents of the encrypted block device are arbitrary.
      • This makes it useful for encrypting swap devices.
      • This can also be useful with certain databases that use specially formatted block devices for data storage.
    • LUKS uses the existing device mapper kernel subsystem.
      • This is the same subsystem used by LVM, so it is well tested.
    • LUKS提​供​密​码​增​强​。
      • 这​可​以​防​止​字​典​攻​击​。​
    • LUKS devices contain multiple key slots.
      • This allows users to add backup keys/passphrases.
  • LUKS不​做​什​么​:
    • LUKS is not well-suited for applications requiring many (more than eight) users to have distinct access keys to the same device.
    • LUKS is not well-suited for applications requiring file-level encryption.

C.2.2. 安​装​完​成​后​我​如​何​访​问​加​密​的​设​备​?(系​统​启​动​)

During system startup you will be presented with a passphrase prompt. After the correct passphrase has been provided the system will continue to boot normally. If you used different passphrases for multiple encypted devices you may need to enter more than one passphrase during the startup.

提​示​

Consider using the same passphrase for all encrypted block devices in a given system. This will simplify system startup and you will have fewer passphrases to remember. Just make sure you choose a good passphrase!

C.2.3. 选​择​一​个​安​全​性​好​的​密​码

While dm-crypt/LUKS supports both keys and passphrases, the anaconda installer only supports the use of passphrases for creating and accessing encrypted block devices during installation.
LUKS does provide passphrase strengthening but it is still a good idea to choose a good (meaning "difficult to guess") passphrase. Note the use of the term "passphrase", as opposed to the term "password". This is intentional. Providing a phrase containing multiple words to increase the security of your data is important.

C.3. 在​Anaconda中​创​建​加​密​块​设​备

You can create encrypted devices during system installation. This allows you to easily configure a system with encrypted partitions.
To enable block device encryption, check the "Encrypt System" checkbox when selecting automatic partitioning or the "Encrypt" checkbox when creating an individual partition, software RAID array, or logical volume. After you finish partitioning, you will be prompted for an encryption passphrase. This passphrase will be required to access the encrypted devices. If you have pre-existing LUKS devices and provided correct passphrases for them earlier in the install process the passphrase entry dialog will also contain a checkbox. Checking this checkbox indicates that you would like the new passphrase to be added to an available slot in each of the pre-existing encrypted block devices.

提​示​

Checking the "Encrypt System" checkbox on the "Automatic Partitioning" screen and then choosing "Create custom layout" does not cause any block devices to be encrypted automatically.

提​示​

可​使​用​kickstart为​每​个​新​加​密​的​块​设​备​设​置​单​独​的​密​码​。​

C.3.1. 可​以​加​密​什​么​类​型​的​块​设​备​?

大​多​类​型​的​块​设​备​都​可​使​用​LUKS加​密​。​从​anaconda中​你​可​以​加​密​分​区​,LVM物​理​卷​,LVM逻​辑​卷​以​及​软​RAID阵​列​。​

C.3.2. Anaconda块​设​备​加​密​支​持​的​限​制

This section is about Anaconda's Block Device Encryption Support

C.4. 安​装​完​成​后​在​系​统​上​创​建​加​密​的​块​设​备​。

加​密​块​设​备​可​在​安​装​完​成​后​创​建​和​配​置​。​

C.4.1. 创​建​块​设​备

通​过​parted, pvcreatelvcreate和​mdadm创​建​你​要​加​密​的​块​设​备​。​

C.4.2. 可​选​项​:使​用​随​机​数​据​填​充​设​备​

加​密​前​使​用​随​机​数​据​填​充 <;设​备​> (eg: /dev/sda3)可​大​大​提​高​加​密​强​度​。​然​后​这​会​花​很​长​的​时​间​。​

Warning

以​下​的​命​令​将​会​破​坏​该​设​备​上​的​任​何​已​存​在​数​据​。​
  • 最​好​的​方​法​,就​是​很​高​质​量​的​随​机​数​据​但​是​时​间​较​长​(多​数​系​统​上​一​个​G需​要​几​分​钟​):
    dd if=/dev/urandom of=<device>
    
  • 最​快​的​方​法​,低​质​量​的​随​机​数​据​:
    badblocks -c 10240 -s -w -t random -v <device>
    

C.4.3. 将​设​备​格​式​化​为​dm-crypt/LUKS加​密​设​备

Warning

以​下​命​令​将​破​坏​该​设​备​上​所​有​已​有​数​据​。​
cryptsetup luksFormat <device>

提​示​

要​了​解​更​多​信​息​,请​阅​读​cryptsetup(8)的​man页​面​。​
输​入​两​次​密​码​后​设​备​将​格​式​化​,之​后​就​可​使​用​了​。​使​用​如​下​命​令​进​行​验​证​:
cryptsetup isLuks <device> && echo Success
使​用​以​下​命​令​来​查​看​设​备​的​加​密​信​息​:
cryptsetup luksDump <device>

C.4.4. 创​建​一​个​映​射​来​允​许​访​问​设​备​中​未​加​密​的​内​容

要​访​问​设​备​中​未​加​密​的​内​容​,必​须​使​用​内​核​device-mapper做​个​映​射​。​
为​映​射​起​个​有​实​际​意​义​的​名​字​是​很​有​用​的​。​LUKS为​每​个​设​备​都​提​供​了​UUID(Universally Unique Identifier)。​这​个​与​设​备​名​不​同​(例​如​/dev/sda3),在​LUKS头​保​持​完​好​时​,UUID会​保​持​不​变​。​使​用​以​下​命​令​查​找​LUKS设​备​的​UUID:
cryptsetup luksUUID <device>
An example of a reliable, informative and unique mapping name would be luks-<uuid>, where <uuid> is replaced with the device's LUKS UUID (eg: luks-50ec957a-5b5a-47ee-85e6-f8085bbc97a8). This naming convention might seem unwieldy but is it not necessary to type it often.
cryptsetup luksOpen <device> <name>
There should now be a device node, /dev/mapper/<name>, which represents the decrypted device. This block device can be read from and written to like any other unencrypted block device.
To see some information about the mapped device, use the following command:
dmsetup info <name>

提​示​

For more information, read the dmsetup(8) man page.

C.4.5. Create filesystems on the mapped device, or continue to build complex storage structures using the mapped device

Use the mapped device node (/dev/mapper/<name>) as any other block device. To create an ext2 filesystem on the mapped device, use the following command:
mke2fs /dev/mapper/<name>
To mount this filesystem on /mnt/test, use the following command:

重要

The directory /mnt/test must exist before executing this command.
mount /dev/mapper/<name> /mnt/test

C.4.6. Add the mapping information to /etc/crypttab

In order for the system to set up a mapping for the device, an entry must be present in the /etc/crypttab file. If the file doesn't exist, create it and change the owner and group to root (root:root) and change the mode to 0744. Add a line to the file with the following format:
<name>  <device>  none
The <device> field should be given in the form "UUID=<luks_uuid>", where <luks_uuid> is the LUKS uuid as given by the command cryptsetup luksUUID <device>. This ensures the correct device will be identified and used even if the device node (eg: /dev/sda5) changes.

提​示​

For details on the format of the /etc/crypttab file, read the crypttab(5) man page.

C.4.7. Add an entry to /etc/fstab

Add an entry to /etc/fstab. This is only necessary if you want to establish a persistent association between the device and a mountpoint. Use the decrypted device, /dev/mapper/<name> in the /etc/fstab file.
In many cases it is desirable to list devices in /etc/fstab by UUID or by a filesystem label. The main purpose of this is to provide a constant identifier in the event that the device name (eg: /dev/sda4) changes. LUKS device names in the form of /dev/mapper/luks-<luks_uuid> are based only on the device's LUKS UUID, and are therefore guaranteed to remain constant. This fact makes them suitable for use in /etc/fstab.

Title

For details on the format of the /etc/fstab file, read the fstab(5) man page.

C.5. Common Post-Installation Tasks

The following sections are about common post-installation tasks.

C.5.1. Set a randomly generated key as an additional way to access an encrypted block device

These sections are about generating keys and adding keys.

C.5.1.1. Generate a key

This will generate a 256-bit key in the file $HOME/keyfile.
dd if=/dev/urandom of=$HOME/keyfile bs=32 count=1
                chmod 600 $HOME/keyfile

C.5.1.2. Add the key to an available keyslot on the encrypted device

cryptsetup luksAddKey <device> ~/keyfile

C.5.2. Add a new passphrase to an existing device

cryptsetup luksAddKey <device>
After being prompted for any one of the existing passprases for authentication, you will be prompted to enter the new passphrase.

C.5.3. Remove a passphrase or key from a device

cryptsetup luksRemoveKey <device>
You will be prompted for the passphrase you wish to remove and then for any one of the remaining passphrases for authentication.

Understanding LVM

When a computer running Linux is turned on, the operating system is loaded into memory by a special program called a boot loader. A boot loader usually exists on the system's primary hard drive (or other media device) and has the sole responsibility of loading the Linux kernel with its required files or (in some cases) other operating systems into memory.
This appendix discusses commands and configuration options for the GRUB boot loader included with Fedora for the x86 architecture.

E.1. GRUB

GNU GRand Unified Boot loader(GRUB)是​允​许​在​系​统​引​导​时​选​择​已​安​装​的​操​作​系​统​或​内​核​的​程​序​。​它​也​允​许​用​户​把​参​数​传​给​内​核​。​

E.1.1. GRUB 和 x86 引​导​过​程​

GRUB 在​下​列​阶​段​把​它​自​己​载​入​内​存​:
  1. The Stage 1 or primary boot loader is read into memory by the BIOS from the MBR [6]. The primary boot loader exists on less than 512 bytes of disk space within the MBR and is capable of loading either the Stage 1.5 or Stage 2 boot loader.
  2. 如​果​有​需​要​,第 1.5 阶​段​的​引​导​装​载​程​序​由​第​一​阶​段​的​引​导​装​载​程​序​读​入​内​存​。​ 某​些​硬​件​在​进​入​第​二​阶​段​引​导​装​载​程​序​之​前​,要​求​一​个​中​间​步​骤​。​当 /boot/ 分​区​处​于​硬​盘​的 1024 柱​面​之​上​,或​者​使​用 LBA 模​式​时​,这​就​会​发​生​。​第 1.5 阶​段​引​导​装​载​程​序​位​于 /boot/ 分​区​或​者​是 MBR 和 /boot/ 分​区​的​一​小​部​分​空​间​里​。​
  3. 第​二​阶​段​或​第​二​级​的​引​导​装​载​程​序​被​读​入​内​存​。​ 第​二​级​引​导​装​载​程​序​显​示 GRUB 菜​单​和​命​令​环​境​。​这​个​界​面​允​许​用​户​选​择​引​导​哪​个​内​核​或​操​作​系​统​、​把​参​数​传​递​给​内​核​、​或​者​查​看​系​统​参​数​。​
  4. 第​二​级​的​引​导​装​载​程​序​把​操​作​系​统​或​内​核​,以​及 /boot/sysroot/ 里​的​内​容​读​入​内​存​。​ 一​旦 GRUB 决​定​启​动​哪​个​操​作​系​统​或​者​内​核​,它​就​会​把​它​载​入​内​存​并​把​机​器​的​控​制​权​交​给​那​个​操​作​系​统​。​
The method used to boot Linux is called direct loading because the boot loader loads the operating system directly. There is no intermediary between the boot loader and the kernel.
其​他​操​作​系​统​使​用​的​引​导​过​程​可​能​有​所​不​同​。​例​如​,Microsoft® Windows® 操​作​系​统​,以​及​其​他​的​操​作​系​统​,都​使​用 chain loading 的​方​式​装​载​。​在​这​种​方​式​下​,MBR 指​向​存​放​操​作​系​统​的​分​区​的​第​一​个​扇​区​,找​到​所​需​的​文​件​来​引​导​操​作​系​统​。​
GRUB 支​持 direct 和 chain 装​载​这​两​种​方​式​,这​使​它​几​乎​可​以​引​导​任​何​操​作​系​统​。​

Warning

在​安​装​过​程​中​,微​软​的 DOS 和 Windows 安​装​程​序​完​全​覆​盖​了 MBR(主​引​导​分​区​),这​会​毁​坏​任​何​现​有​的​引​导​装​载​程​序​。​如​果​要​创​建​一​个​双​重​引​导​系​统​,你​最​好​先​安​装​微​软​的​操​作​系​统​。​

E.1.2. GRUB 的​特​征​

GRUB 包​含​几​个​优​于 x86 体​系​结​构​的​其​他​引​导​装​载​程​序​的​特​征​。​下​面​是​这​些​重​要​特​征​的​一​个​列​表​:
在​使​用 GRUB 之​前​,需​要​了​解​的​最​重​要​的​一​件​事​情​就​是​它​怎​样​引​用​设​备​,如​硬​盘​和​分​区​。​这​些​信​息​在​配​置 GRUB 来​引​导​多​个​操​作​系​统​时​尤​为​重​要​。​

E.3.1. 设​备​名​

当​用 GRUB 引​用​特​定​的​设​备​时​,可​以​使​用​下​面​的​格​式​(注​意​,从​语​法​上​来​讲​,括​号​和​逗​号​都​是​非​常​重​要​的​):
(<type-of-device><bios-device-number>,<partition-number>)
<bios-device-number> 是 BIOS 设​备​号​码​。​主 IDE 硬​盘​编​号​为 0,次 IDE 硬​盘​则​编​号​为 1。​这​个​规​则​和​用​于​内​核​设​备​的​基​本​一​样​。​例​如​,内​核​所​使​用​的 hda 里​的 a 和 GRUB 所​使​用​的 hd0 里​的 0 类​似​,而 hdb 里​的 bhd1 里​的 1 类​似​,诸​如​此​类​。​
<partition-number> 指​定​设​备​上​的​分​区​的​号​码​。​如​同 <bios-device-number>,很​多​类​型​的​分​区​都​是​从 0 开​始​编​号​的​。​然​而​,BSD 分​区​却​由​字​母​指​定​,如 a 对​应 0b 对​应 1,等​等​。​

Note

GRUB 下​的​设​备​编​号​总​是​从 0,而​不​是​从 1 开​始​的​。​这​是​新​用​户​最​常​犯​的​错​误​之​一​。​
例​如​,如​果​系​统​有​一​个​以​上​的​硬​盘​,GRUB 会​用 (hd0) 来​引​用​第​一​个​硬​盘​,用 (hd1) 来​引​用​第​二​个​硬​盘​。​GRUB 用 (hd0,0) 引​用​第​一​个​硬​盘​里​的​第​一​个​分​区​,用 (hd1,2) 引​用​第​二​个​硬​盘​里​的​第​三​个​分​区​。​
GRUB 通​常​使​用​下​面​的​规​则​来​命​名​设​备​和​分​区​:
  • 不​管​系​统​的​硬​盘​驱​动​器​是 IDE 还​是 SCSI,所​有​的​硬​盘​驱​动​器​都​用​字​母 hd 开​始​。​而 fd 用​来​指​定 3.5 寸​软​盘​。​
  • 要​指​定​整​个​设​备​而​不​是​某​个​分​区​,可​以​把​分​区​号​码​和​逗​号​都​去​掉​。​当 GRUB 为​某​个​特​定​磁​盘​配​置​主​引​导​分​区​时​,这​很​重​要​。​例​如​,(hd0) 指​定​了​第​一​个​设​备​上​的​主​引​导​分​区​,(hd3) 指​定​第​四​个​设​备​上​的​主​引​导​分​区​。​
  • 如​果​系​统​有​多​个​驱​动​器​设​备​,在 BIOS 里​设​置​引​导​顺​序​就​很​重​要​。​如​果​系​统​只​有 IDE 或 SCSI 驱​动​器​,这​当​然​很​简​单​,但​是​如​果​两​种​设​备​都​有​的​话​,使​存​放​引​导​分​区​的​驱​动​器​先​被​访​问​就​很​关​键​了​。​

E.3.2. 文​件​名​和​块​列​表​(Blocklist)

当​在 GRUB 里​输​入​命​令​来​引​用​文​件​时​(如​菜​单​列​表​),你​必​须​在​设​备​和​分​区​号​码​后​面​紧​接​着​指​定​绝​对​文​件​路​径​。​
下​面​演​示​了​这​样​的​命​令​的​结​构​:
(<device-type><device-number>,<partition-number>)</path/to/file>
在​这​个​例​子​里​,用 hdfdnd 替​换 <device-type>。​用​整​数​来​替​换​设​备​的 <device-number>。​用​相​对​于​设​备​顶​层​的​绝​对​路​径​来​替​换 </path/to/file>。​
你​也​可​能​在 GRUB 里​指​定​实​际​上​并​不​在​文​件​系​统​里​的​文​件​,如​出​现​在​分​区​的​起​始​块​里​的 chain 装​载​程​序​。​要​装​载​这​样​的​文​件​,可​以​使​用​指​定​文​件​在​分​区​里​所​在​的​块​的 blocklist。​既​然​文​件​通​常​由​几​个​不​同​块​的​集​合​组​成​,块​列​表​使​用​了​特​殊​的​语​法​。​每​个​包​含​文​件​的​块​都​由​块​的​位​移​量​来​指​定​,后​面​跟​着​基​于​这​个​位​移​点​的​块​的​数​量​。​块​位​移​用​逗​号​隔​开​的​列​表​里​依​次​列​出​。​
以​下​是​一​个​块​列​表​的​例​子​:
0+50,100+25,200+1
这​个​例​子​指​定​了​从​分​区​的​第​一​个​块​开​始​的​文​件​,它​使​用​了​块 0 到 49、​100 到 124 以​及 200。​
当​使​用 GRUB 来​装​载​要​求 chain 装​载​的​操​作​系​统​时​,知​道​怎​样​去​编​写​块​列​表​是​很​有​用​的​。​如​果​从​块 0 开​始​的​话​,你​可​以​忽​略​块​的​位​移​量​。​例​如​,第​一​个​硬​盘​里​的​第​一​分​区​的 chain 装​载​文​件​会​有​下​面​的​名​字​:
(hd0,0)+1
下​面​是​在 GRUB 命​令​行​上​以​根​用​户​设​定​正​确​设​备​和​分​区​之​后​指​定​块​列​表​的 chainloader 命​令​:
chainloader +1

E.4. GRUB 界​面​

GRUB 提​供​三​个​具​有​不​同​层​次​的​功​能​的​界​面​。​每​个​界​面​都​允​许​用​户​引​导 Linux 内​核​或​者​其​他​操​作​系​统​。​
这​些​界​面​如​下​所​示​:

Note

只​有​在 GRUB 菜​单​消​失​前​的 3 秒​之​内​按​任​意​键​,才​可​以​进​入​下​面​的 GRUB 界​面​。​
菜​单​界​面​
这​是​安​装​程​序​配​置 GRUB 时​显​示​的​缺​省​界​面​。​操​作​系​统​或​者​预​配​置​内​核​的​列​表​会​出​现​并​按​名​字​排​序​。​用​箭​头​键​可​以​选​择​缺​省​选​项​之​外​的​其​他​选​项​,然​后​按 Enter 键​来​引​导​它​。​如​果​你​什​么​都​不​做​,在​超​过​预​定​时​间​后 GRUB 会​装​载​缺​省​选​项​。​
e 键​来​进​入​条​目​编​辑​器​界​面​,或​者​按 c 键​来​装​载​命​令​行​界​面​。​
请​参​阅 第 E.6 节 “GRUB 菜​单​配​置​文​件​” 来​了​解​这​个​界​面​的​配​置​的​详​情​。​
菜​单​条​目​编​辑​器​界​面​
要​访​问​菜​单​条​目​编​辑​器​,你​可​以​在​引​导​装​载​程​序​里​按 e 键​。​然​后​屏​幕​会​显​示​条​目​的 GRUB 命​令​行​,在​引​导​操​作​系​统​之​前​,用​户​可​以​修​改​这​些​命​令​行​,例​如​添​加​命​令​行​(o 在​当​前​行​之​后​插​入​新​的​一​行​,而 O 则​在​当​前​行​之​前​插​入​新​命​令​行​)、​编​辑​命​令​行​(e)或​者​删​除​命​令​行​(d)。​
在​完​成​了​所​有​的​修​改​后​,按 b 键​可​以​执​行​该​命​令​行​并​引​导​操​作​系​统​。​按 Esc 可​以​取​消​所​有​的​修​改​并​重​新​载​入​标​准​的​菜​单​界​面​。​按 c 键​可​以​装​载​命​令​行​界​面​。​

Note

关​于​用 GRUB 菜​单​条​目​编​辑​器​修​改​运​行​级​别​的​更​多​信​息​,请​参​考 第 E.7 节 “在​引​导​时​改​变​运​行​级​别​”。​
命​令​行​界​面​
命​令​行​界​面​是​最​基​本​的 GRUB 界​面​,但​它​也​是​可​以​进​行​最​大​限​度​控​制​的​界​面​。​你​可​以​输​入​任​何​相​关​的 GRUB 命​令​并​按 Enter 键​来​执​行​它​。​这​个​界​面​提​供​一​些​高​级​的​类​似​于 shell 的​特​征​,包​括​按 Tab 键​依​据​上​下​文​来​自​动​完​成​命​令​,Ctrl 键​组​合​如 Ctrl+a 来​移​动​到​一​行​的​起​始​处​、​以​及 Ctrl+e 移​动​到​一​行​的​末​尾​。​此​外​,就​象​在 bash shell 里​一​样​,你​也​可​以​使​用​箭​头​键​、​Home、​EndDelete 键​。​
请​参​考 第 E.5 节 “GRUB 命​令​” 里​关​于​一​些​常​用​命​令​的​用​法​。​

E.4.1. 界​面​装​载​顺​序​

当 GRUB 装​载​它​的​第​二​阶​段​引​导​装​载​程​序​时​,它​首​先​搜​寻​配​置​文​件​。​找​到​后​,菜​单​界​面​绕​过​屏​幕​(bypass screen)就​会​显​示​。​如​果​你​在 3 秒​之​内​按​了​任​何​键​,GRUB 将​建​立​一​个​菜​单​列​表​并​显​示​菜​单​界​面​。​如​果​没​有​按​任​何​键​,GRUB 菜​单​里​的​缺​省​内​核​条​目​将​会​被​使​用​。​
如​果​没​有​找​到​配​置​文​件​,或​者​配​置​文​件​是​不​可​读​的​,GRUB 将​装​载​命​令​行​界​面​,这​允​许​用​户​输​入​命​令​来​完​成​引​导​过​程​。​
如​果​配​置​文​件​是​无​效​的​,GRUB 会​打​印​出​错​误​并​要​求​输​入​。​这​可​以​帮​助​用​户​找​到​问​题​的​确​切​原​因​。​按​任​何​键​来​重​新​载​入​菜​单​界​面​,你​可​以​编​辑​菜​单​选​项​并​根​据 GRUB 报​告​的​错​误​来​进​行​更​正​。​如​果​更​正​失​败​的​话​,GRUB 又​将​报​告​错​误​并​重​新​载​入​菜​单​界​面​。​
GRUB 在​它​的​命​令​行​界​面​里​提​供​大​量​的​有​用​的​命​令​。​有​些​命​令​接​受​参​数​选​项​;这​些​选​项​应​该​和​命​令​以​及​其​他​选​项​用​空​格​分​隔​开​。​
下​面​是​一​个​有​用​的​命​令​的​列​表​:
  • boot — 引​导​操​作​系​统​或​者​最​后​被​装​载​的 chain 装​载​程​序​。​
  • chainloader </path/to/file> — 把​指​定​的​文​件​装​载​为 chain 装​载​程​序​。​如​果​这​个​文​件​位​于​指​定​分​区​的​第​一​个​扇​区​,则​使​用​块​列​表​标​记 +1 来​代​替​文​件​名​。​
    下​面​是 chainloader 命​令​的​一​个​示​例​:
    chainloader +1
    
  • displaymem — 根​据 BIOS 信​息​,显​示​当​前​的​内​存​使​用​情​况​。​这​对​在​引​导​前​确​认​系​统​有​多​少​内​存​很​有​用​。​
  • initrd </path/to/initrd> — Enables users to specify an initial RAM disk to use when booting. An initrd is necessary when the kernel needs certain modules in order to boot properly, such as when the root partition is formatted with the ext3 or ext4 file system.
    下​面​是 initrd 命​令​的​一​个​示​例​:
    initrd /initrd-2.6.8-1.523.img
    
  • install <stage-1> <install-disk> <stage-2> p config-file — 把 GRUB 安​装​到​系​统​的​主​引​导​分​区​里​。​
    • <stage-1> — 指​定​可​以​找​到​第​一​阶​段​引​导​装​载​程​序​映​像​的​设​备​、​分​区​和​文​件​,如​(hd0,0)/grub/stage1。​
    • <install-disk> — 指​定​用​来​安​装​第​一​阶​段​引​导​装​载​程​序​映​像​应​该​的​磁​盘​,如 (hd0)。​
    • <stage-2> — 把​第​二​阶​段​引​导​装​载​程​序​的​位​置​传​递​给​第​一​阶​段​引​导​装​载​程​序​,如 (hd0,0)/grub/stage2。​
    • p <config-file> — 这​个​选​项​告​诉 install 命​令​来​寻​找 <config-file> 所​指​定​的​菜​单​配​置​文​件​,如 (hd0,0)/grub/grub.conf。​

    Warning

    install 命​令​覆​盖​主​引​导​分​区​里​任​何​已​有​的​信​息​。​
  • kernel </path/to/kernel> <option-1> <option-N> ... — 指​定​引​导​操​作​系​统​时​装​载​的​内​核​文​件​。​用​相​对​于 root 命​令​指​定​的​分​区​的​绝​对​路​径​来​替​换 </path/to/kernel>。​用 Linux 内​核​选​项​来​替​换 <option-1>,如 root=/dev/VolGroup00/LogVol00 可​以​指​定​系​统​根​分​区​所​在​的​设​备​。​你​可​以​用​空​格​隔​开​传​入​内​核​的​多​个​选​项​。​
    下​面​是 kernel 命​令​的​一​个​示​例​:
    kernel /vmlinuz-2.6.8-1.523 ro root=/dev/VolGroup00/LogVol00
    
    前​面​例​子​里​的​选​项​指​定​了 Linux 的​根​文​件​系​统​位​于 hda5 分​区​。​
  • root (<device-type><device-number>,<partition>) — 配​置 GRUB 的​根​分​区​,如 (hd0,0),并​挂​载​这​个​分​区​。​
    下​面​是 root 命​令​的​一​个​示​例​:
    root (hd0,0)
    
  • rootnoverify (<device-type><device-number>,<partition>) — 配​置 GRUB 的​根​分​区​,就​象 root 命​令​一​样​,但​不​挂​载​此​分​区​。​

E.6. GRUB 菜​单​配​置​文​件​

E.6.1. 配​置​文​件​结​构​

GRUB 菜​单​界​面​配​置​文​件​是 /boot/grub/grub.conf。​为​菜​单​界​面​设​置​全​局​参​数​的​命​令​位​于​这​个​文​件​的​顶​部​,后​面​的​内​容​是​菜​单​里​列​出​的​每​个​操​作​系​统​或​者​内​核​。​
The following is a very basic GRUB menu configuration file designed to boot either Fedora or Microsoft Windows Vista:
default=0 
timeout=10 
splashimage=(hd0,0)/grub/splash.xpm.gz 
hiddenmenu 
title Fedora (2.6.27.19-170.2.35.fc10.i686)
root (hd0,1)
kernel /vmlinuz-2.6.27.19-170.2.35.fc10.i686 ro root=UUID=04a07c13-e6bf-6d5a-b207-002689545705 rhgb quiet
initrd /initrd-2.6.27.19-170.2.35.fc10.i686.img 

# section to load Windows 
title Windows         
rootnoverify (hd0,0)         
chainloader +1
This file configures GRUB to build a menu with Fedora as the default operating system and sets it to autoboot after 10 seconds. Two sections are given, one for each operating system entry, with commands specific to the system disk partition table.

Note

注​意​,default 被​设​置​为​一​个​整​数​。​这​指​定​了 GRUB 配​置​文​件​里​的​第​一​个 title 行​。​在​前​面​的​例​子​里​,如​果​要​把 Windows 设​置​为​缺​省​选​项​,你​可​以​把 default=0 修​改​为 default=1。​

E.6.2. 配​置​文​件​指​令​

下​面​是 GRUB 菜​单​配​置​文​件​里​常​用​的​指​令​:
  • chainloader </path/to/file> — 把​指​定​文​件​装​载​为 chain 装​载​程​序​。​用 chain 装​载​程​序​的​绝​对​路​径​替​换 </path/to/file>。​如​果​这​个​文​件​位​于​指​定​分​区​的​第​一​个​扇​区​,你​可​以​使​用​块​列​表​标​记 +1。​
  • color <normal-color> <selected-color> — 允​许​在​菜​单​里​使​用​特​定​的​颜​色​,如​配​置​前​景​色​和​背​景​色​。​你​可​以​使​用​简​单​的​颜​色​名​称​,如 red/black。​例​如​:
    color red/black green/blue
    
  • default=<integer> — 用​在​菜​单​界​面​超​时​后​装​载​的​缺​省​条​目​标​题​的​序​号​来​替​换 <integer>。​
  • fallback=<integer> — 用​在​第​一​次​尝​试​失​败​后​所​用​的​条​目​标​题​的​序​号​来​替​换 <integer>。​
  • hiddenmenu — 当​超​过 timeout 所​指​定​的​时​间​后​,阻​止 GRUB 菜​单​界​面​的​显​示​以​及​装​载 default 条​目​。​用​户​可​以​按 Esc 键​来​查​看​标​准 GRUB 菜​单​。​
  • initrd </path/to/initrd> — 使​用​户​可​以​指​定​在​引​导​时​所​用​的​初​始 RAM 磁​盘​文​件​。​用​初​始 RAM 磁​盘​文​件​的​绝​对​路​径​来​替​换 </path/to/initrd>。​
  • kernel </path/to/kernel> <option-1> <option-N> — 指​定​引​导​操​作​系​统​时​装​载​的​内​核​文​件​。​用 root 指​令​所​指​定​的​分​区​的​绝​对​路​径​来​替​换 </path/to/kernel>。​你​可​以​在​内​核​装​载​时​传​入​多​个​选​项​。​
  • password=<password> — 阻​止​不​知​道​密​码​的​用​户​编​辑​这​个​菜​单​的​条​目​。​
    另​外​,你​也​可​以​在 password=<password> 指​令​后​指​定​其​他​的​菜​单​配​置​文​件​。​在​这​种​情​况​下​,GRUB 会​重​新​启​动​第​二​阶​段​引​导​装​载​程​序​并​使​用​这​个​菜​单​配​置​文​件​来​建​立​菜​单​。​如​果​不​在​这​个​指​令​后​指​定​菜​单​配​置​文​件​,拥​有​密​码​的​用​户​就​可​以​编​辑​当​前​的​配​置​文​件​。​
    For more information about securing GRUB, refer to the chapter titled Workstation Security in the Red Hat Enterprise Linux Deployment Guide.
  • root (<device-type><device-number>,<partition>) — 配​置 GRUB 的​根​分​区​,如 (hd0,0),并​挂​载​这​个​分​区​。​
  • rootnoverify (<device-type><device-number>,<partition>) — 配​置 GRUB 的​根​分​区​,就​象 root 命​令​一​样​,但​不​挂​载​此​分​区​。​
  • timeout=<integer> — 指​定 GRUB 在​装​载 default 指​令​里​设​定​的​条​目​之​前​,所​等​待​的​以​秒​为​单​位​的​时​间​间​隔​。​
  • splashimage=<path-to-image> — 指​定 GRUB 引​导​时​所​使​用​的​闪​屏​映​像​文​件​的​位​置​。​
  • title group-title — 指​定​和​用​来​装​载​内​核​或​操​作​系​统​的​特​定​的​一​组​命​令​一​起​使​用​的​标​题​。​
菜​单​配​置​文​件​里​的​注​释​用​井​号​(#)开​头​。​


[6] For more on the system BIOS and the MBR, refer to 第 F.2.1 节 “BIOS”.

引​导​过​程​、​初​始​化​和​关​闭​

An important and powerful aspect of Fedora is the open, user-configurable method it uses for starting the operating system. Users are free to configure many aspects of the boot process, including specifying the programs launched at boot-time. Similarly, system shutdown gracefully terminates processes in an organized and configurable way, although customization of this process is rarely required.
理​解​引​导​和​关​闭​的​过​程​不​仅​可​以​允​许​对​它​们​进​行​自​定​义​,也​使​和​系​统​启​动​和​关​闭​相​关​的​故​障​的​解​决​更​为​容​易​。​

F.1. 引​导​过​程​

下​面​是 x86 系​统​的​引​导​过​程​的​基​本​阶​段​:
  1. 系​统 BIOS 检​查​系​统​并​启​动​存​放​于​主​硬​盘​的 MBR 里​的​第​一​阶​段​引​导​装​载​程​序​。​
  2. 第​一​阶​段​引​导​装​载​程​序​把​它​自​己​载​入​内​存​,并​从 /boot/ 分​区​启​动​第​二​阶​段​引​导​装​载​程​序​。​
  3. 第​二​阶​段​引​导​装​载​程​序​把​内​核​载​入​到​内​存​,然​后​按​顺​序​加​载​任​何​必​需​的​模​块​并​用​只​读​模​式​挂​载 root 分​区​。​
  4. 内​核​把​引​导​过​程​的​控​制​权​转​给 /sbin/init 程​序​。​
  5. /sbin/init 加​载​所​有​的​服​务​和​用​户​空​间​工​具​,然​后​挂​载 /etc/fstab 里​列​出​的​所​有​分​区​。​
  6. 刚​引​导​的 Linux 系​统​把​登​录​屏​幕​呈​现​在​用​户​面​前​。​
因​为​对​引​导​过​程​的​配​置​比​关​闭​过​程​的​配​置​更​为​普​遍​,本​章​的​余​下​内​容​将​详​细​讨​论​引​导​过​程​和​怎​么​样​对​它​进​行​定​制​来​符​合​特​殊​需​要​。​
引​导​过​程​的​开​始​阶​段​根​据​硬​件​平​台​的​不​同​而​不​同​。​然​而​,一​旦​内​核​被​引​导​装​载​程​序​发​现​并​载​入​,在​所​有​体​系​结​构​的​机​器​上​缺​省​的​引​导​过​程​就​都​是​一​样​的​。​本​章​主​要​着​重​于 x86 体​系​结​构​。​

F.2.1. BIOS

当 x86 被​引​导​后​,处​理​器​会​在​系​统​内​存​的​末​端​寻​找 基​本​输​入​/输​出​系​统​(Basic Input/Output System) 或​者 BIOS 程​序​并​运​行​它​。​BIOS 不​仅​控​制​引​导​过​程​的​第​一​个​步​骤​,也​提​供​外​部​设​比​的​最​底​层​接​口​。​因​此​,它​被​编​写​为​只​读​的​、​常​驻​内​存​并​且​是​一​直​可​用​的​。​
其​他​平​台​所​使​用​的​执​行​底​层​任​务​的​程​序​和 x86 系​统​的 BIOS 是​基​本​一​样​的​。​例​如​,基​于 Itanium 的​机​器​使​用 Extensible Firmware InterfaceEFIShell。​
一​旦​被​装​载​,BIOS 会​测​试​系​统​,寻​找​并​检​查​外​设​,然​后​定​位​可​以​引​导​系​统​的​有​效​设​备​。​通​常​,它​检​查​所​有​的​软​盘​驱​动​器​和​光​盘​驱​动​器​来​下​寻​找​可​引​导​的​介​质​,如​果​没​有​找​到​,它​会​尝​试​系​统​的​硬​盘​。​在​大​多​数​情​况​下​,寻​找​驱​动​器​的​顺​序​是​由 BIOS 里​的​设​置​所​控​制​的​,首​先​是​主 IDE 总​线​上​的​主 IDE 设​备​。​BIOS 然​后​把​这​个​设​备​的​第​一​个​扇​区​的​内​容​载​入​内​存​,它​被​称​作 主​引​导​记​录​(Master Boot Record) 或​者 MBR。​MBR 只​有 512 个​字​节​大​小​,它​包​含​了​被​称​作​引​导​装​载​程​序​的​引​导​机​器​的​代​码​指​令​,以​及​分​区​表​。​一​旦 BIOS 找​到​引​导​装​载​程​序​并​把​它​载​入​到​内​存​里​,BIOS 就​会​把​引​导​过​程​的​控​制​权​交​给​它​。​
x86 平​台​的​引​导​装​载​程​序​至​少​分​为​两​个​阶​段​。​第​一​阶​段​是 MBR 里​的​小​型​机​器​二​进​制​代​码​。​它​的​唯​一​作​用​就​是​定​位​第​二​阶​段​的​引​导​装​载​程​序​并​把​它​的​第​一​部​分​载​入​内​存​。​
GRUB has the advantage of being able to read ext2 and ext3 [7] partitions and load its configuration file — /boot/grub/grub.conf — at boot time. Refer to 第 E.6 节 “GRUB 菜​单​配​置​文​件​” for information on how to edit this file.

ext4 and Btrfs

The GRUB bootloader does not support the ext4 or Btrfs file systems.

Note

如​果​用 「​Red Hat 更​新​代​理​」​进​行​升​级​,引​导​装​载​程​序​的​配​置​文​件​将​被​自​动​更​新​。​关​于 Red Hat Network 的​更​多​信​息​,你​可​以​访​问​:https://rhn.redhat.com/。​
一​旦​第​二​阶​段​的​引​导​装​载​程​序​被​载​入​内​存​,它​就​会​显​示​一​个​图​形​屏​幕​供​用​户​选​择​不​同​操​作​系​统​或​内​核​。​在​这​个​屏​幕​上​,用​户​可​以​用​箭​头​键​来​选​择​想​引​导​的​操​作​系​统​或​内​核​,并​按 Enter 键​。​如​果​不​按​任​何​键​,引​导​装​载​程​序​将​在​一​定​时​间​(可​配​置​)后​加​载​缺​省​的​选​项​。​
一​旦​第​二​阶​段​的​引​导​装​载​程​序​已​经​决​定​引​导​哪​个​内​核​,它​就​会​寻​找 /boot/ 目​录​里​相​应​的​内​核​二​进​制​代​码​。​内​核​二​进​制​代​码​是​以​下​面​的​格​式​命​名​的 — /boot/vmlinuz-<kernel-version> file(在​这​里 <kernel-version> 对​应​转​载​引​导​程​序​的​设​置​里​指​定​的​内​核​版​本​)。​
关​于​用​引​导​装​载​程​序​给​内​核​传​入​命​令​行​参​数​的​说​明​,请​参​考 附录 E, GRUB 引​导​装​载​程​序​。​如​要​在​引​导​装​载​程​序​提​示​下​改​变​运​行​级​别​,请​参​考 第 E.7 节 “在​引​导​时​改​变​运​行​级​别​”。​
The boot loader then places one or more appropriate initramfs images into memory. Next, the kernel decompresses these images from memory to /sysroot/, a RAM-based virtual file system, via cpio. The initramfs is used by the kernel to load drivers and modules necessary to boot the system. This is particularly important if SCSI hard drives are present or if the systems use the ext3 or ext4 file system.
一​旦​内​核​和 initramfs 映​像​被​载​入​了​内​存​,引​导​装​载​程​序​就​把​引​导​过​程​的​控​制​权​交​给​内​核​。​
关​于 GRUB 引​导​装​载​程​序​的​详​细​信​息​,请​参​阅 附录 E, GRUB 引​导​装​载​程​序​。​

F.2.3. 内​核​

在​内​核​被​装​载​后​,它​马​上​初​始​化​和​配​置​机​器​的​内​存​和​附​加​的​各​种​硬​件​,其​中​包​括​所​有​的​处​理​器​,输​入​/输​出​子​系​统​和​存​储​设​备​。​然​后​,它​会​在​内​存​里​预​定​的​位​置​寻​找​压​缩​的 initramfs 映​像​,并​把​这​些​映​像​直​接​解​压​到 /sysroot/,然​后​再​装​载​必​要​的​驱​动​。​其​次​,在​完​成 initramfs 过​程​和​释​放​所​有​磁​盘​映​像​曾​占​据​的​内​存​之​前​,它​会​初​始​化​和​文​件​系​统​相​关​联​的​虚​拟​设​备​,如 LVM 或 software RAID。​
然​后​,内​核​创​建​一​个​根​设​备​,以​只​读​方​式​挂​载​根​分​区​,并​释​放​所​有​未​被​使​用​的​内​存​。​
现​在​,内​核​已​被​载​入​内​存​且​是​可​操​作​的​。​然​而​,既​然​还​没​有​用​户​应​用​程​序​接​受​有​意​义​的​输​入​,系​统​还​不​能​做​更​多​的​事​情​。​
为​了​设​置​用​户​环​境​,内​核​执​行 /sbin/init 程​序​。​
/sbin/init 程​序​(也​称​作 init)协​调​余​下​的​引​导​过​程​并​为​用​户​配​置​环​境​。​
init 命​令​启​动​时​,它​成​为​系​统​里​所​有​自​动​启​动​的​进​程​的​父​进​程​或​者​祖​父​(grandparent)进​程​。​首​先​,它​运​行 /etc/rc.d/rc.sysinit 脚​本​,这​会​设​置​环​境​路​径​、​启​动​交​换​空​间​、​检​查​文​件​系​统​并​执​行​所​有​系​统​初​始​化​所​需​的​其​他​步​骤​。​例​如​,多​数​系​统​会​使​用​时​钟​,rc.sysinit 读​入 /etc/sysconfig/clock 配​置​文​件​来​初​始​化​硬​件​时​钟​。​另​外​一​个​例​子​是​,如​果​有​必​须​初​始​化​的​特​殊​串​口​进​程​,rc.sysinit 会​执​行 /etc/rc.serial 脚​本​。​
接​着​,init 命​令​为​系​统​设​置 source function library,/etc/rc.d/init.d/functions,配​置​怎​样​启​动​、​杀​死​和​决​定​程​序​的​进​程​号​(PID)。​
init 程​序​根​据 /etc/inittab 里​指​定​的​缺​省​运​行​级​别​遍​历​合​适​的 rc 目​录​,启​动​所​有​的​后​台​进​程​。​不​同​的​运​行​级​别​对​应​不​同​的​rc 目​录​。​例​如​,/etc/rc.d/rc5.d/ 是​对​应​运​行​级​别 5 的​目​录​。​
当​引​导​至​运​行​级​别 5 时​,init 程​序​会​遍​历 /etc/rc.d/rc5.d/ 来​决​定​启​动​和​停​止​哪​些​进​程​。​
下​面​是 /etc/rc.d/rc5.d/ 目​录​内​容​的​示​例​:
K05innd -> ../init.d/innd 
K05saslauthd -> ../init.d/saslauthd 
K10dc_server -> ../init.d/dc_server 
K10psacct -> ../init.d/psacct 
K10radiusd -> ../init.d/radiusd 
K12dc_client -> ../init.d/dc_client 
K12FreeWnn -> ../init.d/FreeWnn 
K12mailman -> ../init.d/mailman 
K12mysqld -> ../init.d/mysqld 
K15httpd -> ../init.d/httpd 
K20netdump-server -> ../init.d/netdump-server 
K20rstatd -> ../init.d/rstatd 
K20rusersd -> ../init.d/rusersd 
K20rwhod -> ../init.d/rwhod 
K24irda -> ../init.d/irda 
K25squid -> ../init.d/squid 
K28amd -> ../init.d/amd 
K30spamassassin -> ../init.d/spamassassin 
K34dhcrelay -> ../init.d/dhcrelay 
K34yppasswdd -> ../init.d/yppasswdd 
K35dhcpd -> ../init.d/dhcpd 
K35smb -> ../init.d/smb 
K35vncserver -> ../init.d/vncserver 
K36lisa -> ../init.d/lisa 
K45arpwatch -> ../init.d/arpwatch 
K45named -> ../init.d/named 
K46radvd -> ../init.d/radvd 
K50netdump -> ../init.d/netdump 
K50snmpd -> ../init.d/snmpd 
K50snmptrapd -> ../init.d/snmptrapd 
K50tux -> ../init.d/tux 
K50vsftpd -> ../init.d/vsftpd 
K54dovecot -> ../init.d/dovecot 
K61ldap -> ../init.d/ldap 
K65kadmin -> ../init.d/kadmin 
K65kprop -> ../init.d/kprop 
K65krb524 -> ../init.d/krb524 
K65krb5kdc -> ../init.d/krb5kdc 
K70aep1000 -> ../init.d/aep1000 
K70bcm5820 -> ../init.d/bcm5820 
K74ypserv -> ../init.d/ypserv 
K74ypxfrd -> ../init.d/ypxfrd 
K85mdmpd -> ../init.d/mdmpd 
K89netplugd -> ../init.d/netplugd 
K99microcode_ctl -> ../init.d/microcode_ctl 
S04readahead_early -> ../init.d/readahead_early 
S05kudzu -> ../init.d/kudzu 
S06cpuspeed -> ../init.d/cpuspeed 
S08ip6tables -> ../init.d/ip6tables 
S08iptables -> ../init.d/iptables 
S09isdn -> ../init.d/isdn 
S10network -> ../init.d/network 
S12syslog -> ../init.d/syslog 
S13irqbalance -> ../init.d/irqbalance 
S13portmap -> ../init.d/portmap 
S15mdmonitor -> ../init.d/mdmonitor 
S15zebra -> ../init.d/zebra 
S16bgpd -> ../init.d/bgpd 
S16ospf6d -> ../init.d/ospf6d 
S16ospfd -> ../init.d/ospfd 
S16ripd -> ../init.d/ripd 
S16ripngd -> ../init.d/ripngd 
S20random -> ../init.d/random 
S24pcmcia -> ../init.d/pcmcia 
S25netfs -> ../init.d/netfs 
S26apmd -> ../init.d/apmd 
S27ypbind -> ../init.d/ypbind 
S28autofs -> ../init.d/autofs 
S40smartd -> ../init.d/smartd 
S44acpid -> ../init.d/acpid 
S54hpoj -> ../init.d/hpoj 
S55cups -> ../init.d/cups 
S55sshd -> ../init.d/sshd 
S56rawdevices -> ../init.d/rawdevices 
S56xinetd -> ../init.d/xinetd 
S58ntpd -> ../init.d/ntpd 
S75postgresql -> ../init.d/postgresql 
S80sendmail -> ../init.d/sendmail 
S85gpm -> ../init.d/gpm 
S87iiim -> ../init.d/iiim 
S90canna -> ../init.d/canna 
S90crond -> ../init.d/crond 
S90xfs -> ../init.d/xfs 
S95atd -> ../init.d/atd 
S96readahead -> ../init.d/readahead 
S97messagebus -> ../init.d/messagebus 
S97rhnsd -> ../init.d/rhnsd 
S99local -> ../rc.local
如​这​个​列​表​所​示​,所​有​真​正​启​动​和​停​止​服​务​的​脚​本​都​不​在 /etc/rc.d/rc5.d/ 目​录​里​。​相​反​,/etc/rc.d/rc5.d/ 里​所​有​文​件​都​是​指​向 /etc/rc.d/init.d/ 里​的​脚​本​的​符​号​链​接​。​在 rc 里​使​用​符​号​链​接​,通​过​创​建​、​修​改​和​删​除​这​些​链​接​,就​可​以​对​不​同​的​运​行​级​别​进​行​重​新​配​置​,而​不​需​要​影​响​它​们​所​引​用​的​真​正​的​脚​本​。​
每​个​符​号​链​接​的​名​字​都​以 K 或​者 S 开​头​。​以 K 开​头​的​链​接​是​在​这​个​运​行​级​别​需​要​杀​死​的​进​程​,而​以 S 开​头​的​链​接​是​需​要​启​动​的​进​程​。​
首​先​,init 命​令​通​过 /etc/rc.d/init.d/<command> stop 命​令​来​停​止​目​录​里​的​所​有 K 符​号​链​接​,在​这​里​,<command> 是​需​要​杀​死​的​进​程​名​。​然​后​,它​他​通​过 /etc/rc.d/init.d/<command> start 来​启​动​所​有​的 S 符​号​链​接​。​

Note

在​系​统​完​成​引​导​后​,你​也​可​以 root 登​录​并​执​行​这​些​脚​本​来​启​动​和​停​止​服​务​。​例​如​,/etc/rc.d/init.d/httpd stop 可​用​来​停​止 Apache HTTP 服​务​器​。​
每​个​符​号​链​接​都​用​数​字​结​尾​来​指​明​开​始​的​顺​序​。​可​以​修​改​这​个​数​字​来​决​定​服​务​启​动​或​停​止​的​顺​序​。​数​字​越​小​,就​越​早​开​始​运​行​。​有​着​相​同​数​字​的​符​号​链​接​则​按​字​母​顺​序​来​运​行​。​

Note

init 程​序​最​后​执​行​的​是 /etc/rc.d/rc.local 脚​本​。​这​个​文​件​对​于​定​制​系​统​很​有​用​。​请​参​考 第 F.3 节 “在​引​导​时​运​行​其​他​的​程​序​” 里​关​于​使​用 rc.local 文​件​的​更​多​信​息​。​
After the init command has progressed through the appropriate rc directory for the runlevel, the /etc/inittab script forks an /sbin/mingetty process for each virtual console (login prompt) allocated to the runlevel. Runlevels 2 through 5 have all six virtual consoles, while runlevel 1 (single user mode) has one, and runlevels 0 and 6 have none. The /sbin/mingetty process opens communication pathways to tty devices[8], sets their modes, prints the login prompt, accepts the user's username and password, and initiates the login process.
In runlevel 5, the /etc/inittab runs a script called /etc/X11/prefdm. The prefdm script executes the preferred X display manager[9]gdm, kdm, or xdm, depending on the contents of the /etc/sysconfig/desktop file.
运​行​完​毕​后​,系​统​将​在​运​行​级​别 5 下​操​作​并​显​示​一​个​登​录​屏​幕​。​
SysV init runlevel 系​统​提​供​一​个​控​制​当​初​始​化​运​行​级​别​时 init 启​动​和​停​止​哪​个​程​序​的​标​准​过​程​。​选​择 SysV init 的​原​因​是​易​于​使​用​且​比​传​统​的 BSD 风​格​的 init 进​程​更​加​灵​活​。​
SysV init 的​配​置​文​件​存​放​在 /etc/rc.d/ 目​录​。​在​这​个​目​录​下​,有 rc、​rc.local、​rc.sysinit 和​可​选​的 rc.serial 脚​本​,以​及​下​面​的​目​录​:
init.d/ rc0.d/ rc1.d/ rc2.d/ rc3.d/ rc4.d/ rc5.d/ rc6.d/
The init.d/ directory contains the scripts used by the /sbin/init command when controlling services. Each of the numbered directories represent the six runlevels configured by default under Fedora.

F.4.1. 运​行​级​别​

SysV init runlevel 的​目​的​是​在​不​同​的​方​式​下​使​用​系​统​。​例​如​,X Window 系​统​占​用​一​定​的​系​统​资​源​,没​有​它​的​话​,服​务​器​的​运​行​效​率​会​更​高​。​或​者​,有​时​候​系​统​管​理​员​需​要​在​一​个​更​低​的​运​行​级​别​下​来​执​行​某​些​诊​断​任​务​,如​在​运​行​级​别 1 下​修​复​磁​盘​。​
给​定​运​行​级​别​的​特​征​决​定​了 init 启​动​和​停​止​哪​些​服​务​。​例​如​,运​行​级​别 1(单​用​户​模​式​)停​止​所​有​的​网​路​服​务​,而​运​行​级​别 3 则​会​启​动​这​些​服​务​。​通​过​在​某​个​运​行​级​别​下​设​定​启​动​和​停​止​的​服​务​,init 可​以​快​速​地​改​变​机​器​运​行​的​模​式​而​不​需​要​用​户​手​工​停​止​和​启​动​服​务​。​
The following runlevels are defined by default under Fedora:
  • 0 — 停​止​
  • 1 — 单​用​户​文​本​模​式​
  • 2 — 未​使​用​(用​户​可​自​定​义​)
  • 3 — 完​全​的​多​用​户​文​本​模​式​
  • 4 — 为​使​用​(用​户​可​自​定​义​)
  • 5 — 完​全​的​多​用​户​图​形​模​式​(基​于 X Window 的​登​录​屏​幕​)
  • 6 — 重​启​模​式​
In general, users operate Fedora at runlevel 3 or runlevel 5 — both full multi-user modes. Users sometimes customize runlevels 2 and 4 to meet specific needs, since they are not used.
系​统​的​缺​省​运​行​级​别​在 /etc/inittab 里​定​义​。​要​找​到​系​统​的​缺​省​运​行​级​别​,可​以​在 /etc/inittab 靠​顶​部​的​地​方​找​如​下​的​一​行​:
id:5:initdefault:
如​第​一​个​分​号​后​所​指​出​的​,这​个​例​子​里​的​缺​省​运​行​级​别​是 5。​要​改​变​它​,可​以​根​用​户​来​编​辑 /etc/inittab。​

Warning

编​辑 /etc/inittab 要​非​常​小​心​。​简​单​的​输​入​错​误​就​可​以​导​致​系​统​不​能​启​动​。​如​果​发​生​了​这​样​的​事​情​,可​以​使​用​启​动​软​盘​,进​入​单​用​户​模​式​,或​者​进​入​救​援​模​式​来​引​导​系​统​并​修​复​这​个​文​件​。​
For more information on single-user and rescue mode, refer to the chapter titled Basic System Recovery in the Red Hat Enterprise Linux Deployment Guide.


[7] GRUB reads ext3 file systems as ext2, disregarding the journal file. Refer to the chapter titled The ext3 File System in the Red Hat Enterprise Linux Deployment Guide for more information on the ext3 file system.

[8] Refer to the Red Hat Enterprise Linux Deployment Guide for more information about tty devices.

[9] Refer to the Red Hat Enterprise Linux Deployment Guide for more information about display managers.

其​他​技​术​文​档​

This document provides a reference for using the Fedora installation software, known as anaconda. To learn more about anaconda, visit the project Web page: http://www.fedoraproject.org/wiki/Anaconda.
anaconda 和 Fedora 系​统​使​用​相​同​的​软​件​组​件​集​合​。​关​键​技​术​的​详​细​信​息​,请​访​问​下​面​列​表​的​网​站​:
引​导​加​载​程​序​
磁​盘​分​区​
Fedora uses parted to partition disks. Refer to http://www.gnu.org/software/parted/ for more information.
存​储​管​理​
音​频​支​持​
图​形​系​统​
远​程​显​示​
命​令​行​界​面​
By default, Fedora uses the GNU bash shell to provide a command-line interface. The GNU Core Utilities complete the command-line environment. Refer to http://www.gnu.org/software/bash/bash.html for more information on bash. To learn more about the GNU Core Utilities, refer to http://www.gnu.org/software/coreutils/.
远​程​系​统​访​问​
访​问​控​制​
防​火​墙​
软​件​安​装​
Virtualization

Contributors and production methods

H.1. 贡​献​者​

  • Fabian Affolter (翻​译 - 德​语​)
  • Amanpreet Singh Alam (翻​译 - Punjabi)
  • Jean-Paul Aubry (translator - French)
  • David Barzilay (translator - Brazilian Portuguese)
  • Domingo Becker (翻​译 - 西​班​牙​语​)
  • Subhransu Behera (translator - Oriya)
  • Michał Bentkowski (翻​译 - 波​兰​语​)
  • Rahul Bhalerao (translator - Marathi)
  • Runa Bhattacharjee (translator - Bengali (India))
  • Teta Bilianou (翻​译 - 希​腊​语​)
  • Lucas Brausch (翻​译 - 德​语​)
  • Hector Daniel Cabrera (translator - Spanish)
  • David Cantrell (作​者 - VNC安​装​)
  • Guido Caruso (翻​译 - 意​大​利​语​)
  • Guillaume Chardin (翻​译 - 法​语​)
  • Nikos Charonitakis (翻​译 - 希​腊​语​)
  • Chester Cheng (translator - Chinese (Traditional))
  • Glaucia Cintra (translator - Brazilian Portuguese)
  • Fabien Decroux (翻​译 - 法​语​)
  • Hans De Goede (作​者 - iSCSI)
  • Claudio Rodrigo Pereyra Diaz (translator - Spanish)
  • Piotr Drąg (翻​译 - 波​兰​语​)
  • Damien Durand (翻​译 - 法​语​)
  • Stuart Ellis (作​者​, 编​辑​)
  • Ali Fakoor (translator - Persian)
  • Felix I (translator - Tamil)
  • Tony Fu (translator - Chinese (Simplified))
  • Paul W. Frields (作​者​, 编​辑​)
  • Paul Gampe (translator - Japanese)
  • Sree Ganesh (translator - Telugu)
  • Dimitris Glezos (翻​译 - 希​腊​语​)
  • Guillermo Gómez (translator - Spanish)
  • Rui Gouveia (translator - Portuguese)
  • Kiyoto James Hashida (translator - Japanese)
  • Severin Heiniger (translator - German)
  • Xi Huang (translator - Chinese (Simplified))
  • Ryuichi Hyugabaru (translator - Japanese)
  • Jayaradha N (translator - Tamil)
  • Chris Johnson (writer)
  • Eunju Kim (translator - Korean)
  • Michelle J Kim (translator - Korean)
  • Miloš Komarčević (translator - Serbian)
  • Alexey Kostyuk (translator - Russian)
  • Daniela Kugelmann (translator - German)
  • Rüdiger Landmann (writer, editor)
  • Magnus Larsson (translator - Swedish)
  • Christopherus Laurentius (translator - Indonesian)
  • Florent Le Coz (translator - French)
  • Erick Lemon (writer)
  • Andy Liu (translator - Chinese (Traditional))
  • Wei Liu (translator - Chinese (Simplified))
  • Yelitza Louze (translator - Spanish)
  • Gan Lu (translator - Chinese (Simplified))
  • Igor Miletić (translator - Serbian)
  • Noriko Mizumoto (translator - Japanese)
  • Jeremy W. Mooney (writer)
  • Enikő Nagy (translator - Hungarian)
  • Igor Nestorović (translator - Serbian)
  • David Nalley (writer, editor)
  • John Nguyen (writer)
  • Manuel Ospina (translator - Spanish)
  • Janis Ozolins (translator - Latvian)
  • Ankit Patel (translator - Gujarati)
  • Davidson Paulo (translator - Brazilian Portuguese)
  • Ani Peter (translator - Malayalam)
  • Amitakhya Phukan (translator - Assamese)
  • Silvio Pierro (translator - Italian)
  • Micha Pietsch (translator - German)
  • José Nuno Pires (translator - Portuguese)
  • Piotr Podgórski (translator - Polish)
  • Yulia Poyarkova (translator - Russian)
  • Shankar Prasad (translator - Kannada)
  • Rajesh Ranjan (translator - Hindi)
  • Tim Richert (translator - German)
  • Dominik Sandjaja (translator - German)
  • Sharuzzaman Ahmat Raslan (translator - Malay)
  • Mohsen Saeedi (translator - Persian)
  • Tian Shixiong (translator - Chinese (Simplified))
  • Audrey Simons (translator - French)
  • Keld Simonsen (translator - Danish)
  • Jared K. Smith (writer, editor)
  • Espen Stefansen (translator - Norwegian Bokmål)
  • Sulyok Péter (translator - Hungarian)
  • Sümegi Zoltán (translator - Hungarian)
  • Francesco Tombolini (translator - Italian)
  • Timo Trinks (translator - German)
  • Dimitris Typaldos (translator - Greek)
  • Göran Uddeborg (translator - Swedish)
  • Michaël Ughetto (translator - French)
  • Francesco Valente (translator - Italian)
  • Karsten Wade (writer, editor, publisher)
  • Sarah Saiying Wang (translator - Chinese (Simplified))
  • Geert Warrink (translator - Dutch)
  • Elizabeth Ann West (editor)
  • Tyronne Wickramarathne (translator - Sinhalese)
  • Ben Wu (translator - Chinese (Traditional))
  • Xiaofan Yang (translator - Chinese (Simplified))
  • Yuan Yijun (translator - Chinese (Simplified))
  • Diego Búrigo Zacarão (translator - Brazilian Portuguese)
  • Izaac Zavaleta (translator - Spanish)

H.2. Production methods

Writers produce the Install Guide directly in DocBook XML in a revision control repository. They collaborate with other subject matter experts during the beta release phase of Fedora to explain the installation process. The editorial team ensures consistency and quality of the finished guide. At this point, the team of translators produces other language versions of the release notes, and then they become available to the general public as part of Fedora. The publication team also makes the guide, and subsequent errata, available via the Web.

Revision History

修订历史
修订 11.0.0Wed Apr 01 2009Hans De Goede, Paul W. Frields, Ruediger Landmann, David Nalley, The anaconda team, Red Hat Engineering Content Services
Major update, incorporating material from the Red Hat Enterprise Linux Installation Guide and elsewhere, plus fixes for numerous bugs
修订 10.0.1Mon Feb 16 2009Ruediger Landmann
Convert to build in Publican
修订 10.0.0Mon Nov 24 2008Karsten Wade
Build and publish Fedora 10 version
修订 9.9.2Sat Oct 18 2008Jared K. Smith
Prepare for release of Fedora 10
修订 9.0.2Fri Jul 25 2008Paul W. Frields
修​复​不​正​确​的 livecd 工​具​指​令​
修订 9.0.1Sat Jun 28 2008Paul W. Frields
很​多​的​臭​虫​得​到​修​复​
修订 9.0.0Tue May 13 2008Paul W. Frields
添​加​关​于​升​级​一​个​发​行​版​的​信​息​

索引

符号

/boot/ 分​区​
recommended partitioning,推​荐​的​分​区​方​案​
/root/install.log
安​装​日​志​文​件​位​置​,准​备​安​装
/var/ 分​区​
recommended partitioning,推​荐​的​分​区​方​案​
串​口​ (见 setserial 命​令​)
交​换​分​区​
recommended partitioning,推​荐​的​分​区​方​案​
交​换​文​件​
升​级​,选​择​升​级​还​是​重​新​安​装​
停​止​,关​机​
(参见 关​闭​)
关​闭​,关​机​
(参见 停​止​)
内​核​
在​引​导​过​程​中​的​角​色​,内​核​
删​除​
Fedora,Removing Fedora
升​级​,选​择​升​级​还​是​重​新​安​装​
添​加​一​个​交​换​文​件​,选​择​升​级​还​是​重​新​安​装​
单​用​户​模​式​,引​导​单​用​户​模​式​
卸​装​,Removing Fedora
反​馈​
本​手​册​的​联​系​人​,我​们​需​要​您​的​反​馈​!
取​消​安​装​,从​光​盘​中​安​装​
启​动​方​法​
USB pen 启​动​器​,其​它​引​导​方​法​
引​导​光​盘​,其​它​引​导​方​法​
基​本​的​输​入​/输​出​系​统​(BIOS) (见 BIOS)
安​装​介​质​
测​试​,筹​备​硬​盘​驱​动​器​安​装​
安​装​日​志​文​件​
/root/install.log,准​备​安​装
安​装​软​件​包​,Package Group Selection
密​码​
引​导​装​载​程​序​,x86、​AMD64 和 Intel 64 系​统​的​引​导​装​载​程​序​(Boot Loader)的​配​置​
设​置​根​用​户​,设​置​根​密​码​
引​导​光​盘​,其​它​引​导​方​法​
creating,制​作​安​装​引​导​光​盘​
引​导​装​载​程​序​,x86、​AMD64 和 Intel 64 系​统​的​引​导​装​载​程​序​(Boot Loader)的​配​置​GRUB
(参见 GRUB)
configuration,x86、​AMD64 和 Intel 64 系​统​的​引​导​装​载​程​序​(Boot Loader)的​配​置​
definition of,GRUB 引​导​装​载​程​序​
GRUB,x86、​AMD64 和 Intel 64 系​统​的​引​导​装​载​程​序​(Boot Loader)的​配​置​
MBR,高​级​引​导​装​载​程​序​配​置​
在​引​导​分​区​上​安​装​,高​级​引​导​装​载​程​序​配​置​
密​码​,x86、​AMD64 和 Intel 64 系​统​的​引​导​装​载​程​序​(Boot Loader)的​配​置​
引​导​装​载​程​序​密​码​,x86、​AMD64 和 Intel 64 系​统​的​引​导​装​载​程​序​(Boot Loader)的​配​置​
挂​载​点​
分​区​和​,磁​盘​分​区​和​挂​载​点​
救​援​模​式​
definition of,引​导​救​援​模​式​
可​用​工​具​,引​导​救​援​模​式​
文​件​系​统​
格​式​,概​述​,不​是​你​写​入​什​么​,而​是​你​怎​么​写​入​
文​件​系​统​类​型​,文​件​系​统​类​型​
无​磁​盘​环​境​
DHCP 配​置​,配​置 DHCP 服​务​器​
服​务​
用 chkconfig 进​行​配​置 ,运​行​级​别​工​具​
用 ntsysv 进​行​配​置 ,运​行​级​别​工​具​
用​服​务​配​置​工​具​(Services Configuration Tool)进​行​配​置 ,运​行​级​别​工​具​
服​务​配​置​工​具​(Services Configuration Tool),运​行​级​别​工​具​
(参见 服​务​)
构​架​,我​的​电​脑​属​于​哪​一​种​架​构​?
决​定​中​,我​的​电​脑​属​于​哪​一​种​架​构​?
根​(/)分​区​
recommended partitioning,推​荐​的​分​区​方​案​
用​户​界​面​,文​本​模​式​
installation program,文​本​模​式​安​装​程​序​用​户​界​面​
硬​件​
configuration,System Specifications List
磁​盘​
介​质​,用​于 Intel 或 AMD 系​统​的​驱​动​介​质​
磁​盘​分​区​,Disk Partitioning Setup
磁​盘​分​区​工​具​
adding partitions,添​加​分​区​
磁​盘​空​间​,你​有​足​够​的​磁​盘​空​间​吗​?
程​序​
在​引​导​时​运​行​,在​引​导​时​运​行​其​他​的​程​序​
系​统​恢​复​,基​本​系​统​恢​复​
常​见​问​题​,常​见​问​题​
unable to boot into Fedora,Unable to Boot into Fedora
忘​记​根​口​令​,Root Password
硬​件​或​软​件​问​题​,硬​件​或​软​件​问​题​
重​新​安​装​引​导​装​载​程​序​,重​新​安​装​引​导​装​载​程​序​
紧​急​模​式​,引​导​紧​急​模​式​
终​端​,虚​拟​,A Note about Virtual Consoles
运​行​级​别​ (见 init 命​令​)
用 GRUB 进​行​修​改​,GRUB 界​面​
配​置​,运​行​级​别​工​具​
(参见 服​务​)
运​行​级​别​1,引​导​单​用​户​模​式​
重​新​安​装​,选​择​升​级​还​是​重​新​安​装​
键​盘​映​射​表​
选​择​键​盘​类​型​,Keyboard Configuration
镜​像​,从​映​像​点​站​
驱​动​程​序​介​质​,用​于 Intel 或 AMD 系​统​的​驱​动​介​质​
使​用​驱​动​程​序​映​像​,在​安​装​过​程​中​使​用​驱​动​程​序​映​像​
根​据​映​像​创​建​磁​盘​,根​据​映​像​文​件​创​建​驱​动​程​序​盘​
由​他​方​制​作​,如​何​获​取​驱​动​程​序​介​质​
由​红​帽​制​作​,如​何​获​取​驱​动​程​序​介​质​

A

adding partitions,添​加​分​区​
file system type,文​件​系​统​类​型​
Anaconda,其​他​技​术​文​档​
array (见 RAID)
ATAPI 光​盘​
unrecognized, problems with,如​果​没​有​发​现 IDE 光​盘​怎​么​办​?
automatic partitioning,Disk Partitioning SetupCreate Default Layout

B

BIOS
定​义​,BIOS
(参见 引​导​过​程​)
BIOS(基​本​输​入​/输​出​系​统​),我​如​何​才​能​启​动​安​装​程​序​?
BitTorrent,从 BitTorrent
seeding,从 BitTorrent
boot loader,更​新​引​导​加​载​程​序​
(参见 GRUB)
upgrading,更​新​引​导​加​载​程​序​
boot options,Additional Boot Options
boot.iso,Additional Boot Options
linux mediacheck,筹​备​硬​盘​驱​动​器​安​装​
mediacheck,Additional Boot Options
serial mode,Additional Boot Options
UTF-8,Additional Boot Options
text mode,Additional Boot Options
boot process,引​导​过​程​、​初​始​化​和​关​闭​对​引​导​过​程​的​详​细​介​绍​
(参见 引​导​装​载​程​序​)
对​于 x86,对​引​导​过​程​的​详​细​介​绍​
直​接​装​载​,GRUB 和 x86 引​导​过​程​
链​式​装​载​,GRUB 和 x86 引​导​过​程​
阶​段​,引​导​过​程​对​引​导​过​程​的​详​细​介​绍​
/sbin/init 命​令​,/sbin/init 程​序​
BIOS,BIOS
boot loader,引​导​装​载​程​序​
EFI shell,BIOS
内​核​,内​核​
boot.iso,制​作​安​装​引​导​光​盘​Additional Boot Options
booting
installation program
x86, AMD64 and Intel 64,Booting the Installation Program on x86, AMD64, and Intel 64 Systems
单​用​户​模​式​,引​导​单​用​户​模​式​
救​援​模​式​,引​导​救​援​模​式​
紧​急​模​式​,引​导​紧​急​模​式​

D

DHCP
PXE 安​装​,配​置 DHCP 服​务​器​
无​磁​盘​环​境​,配​置 DHCP 服​务​器​
DHCP(动​态​主​机​配​置​协​议​),Network Configuration
dmraid
installation,Advanced Storage Options
domain name,Network Configuration
driver diskette,Starting the Installation Program
driver disks,用​驱​动​磁​盘​支​持​增​加​的​硬​件​

E

EFI shell
定​义​,BIOS
(参见 引​导​过​程​)
ext2 (见 file systems)
ext3 (见 file systems)
ext4 (见 file systems)
extended partitions,分​区​内​的​分​区 — 扩​展​分​区​概​述​
Extensible Firmware Interface shell (见 EFI shell)

G

GRUB,x86、​AMD64 和 Intel 64 系​统​的​引​导​装​载​程​序​(Boot Loader)的​配​置​引​导​装​载​程​序​
(参见 引​导​装​载​程​序​)
configuration,x86、​AMD64 和 Intel 64 系​统​的​引​导​装​载​程​序​(Boot Loader)的​配​置​
definition of,GRUB
documentation,其​他​技​术​文​档​
installing,Installing GRUB
其​它​资​料​,其​它​资​料​
安​装​了​的​文​档​,安​装​了​的​文​档​
有​用​的​网​站​,有​用​的​网​站​
相​关​书​籍​,相​关​书​籍​
其​它​选​项​,其​它​可​选​的​引​导​装​载​程​序​
命​令​,GRUB 命​令​
在​引​导​时​改​变​运​行​级​别​,在​引​导​时​改​变​运​行​级​别​
在​引​导​过​程​中​的​角​色​,引​导​装​载​程​序​
引​导​过​程​,GRUB 和 x86 引​导​过​程​
改​变​运​行​级​别​,GRUB 界​面​
术​语​,GRUB 术​语​
文​件​,文​件​名​和​块​列​表​(Blocklist)
根​文​件​系​统​,根​文​件​系​统​和 GRUB
设​备​,设​备​名​
特​性​,GRUB 的​特​征​
界​面​,GRUB 界​面​
命​令​行​,GRUB 界​面​
菜​单​,GRUB 界​面​
菜​单​条​编​辑​器​,GRUB 界​面​
顺​序​,界​面​装​载​顺​序​
菜​单​配​置​文​件​,GRUB 菜​单​配​置​文​件​
指​令​,配​置​文​件​指​令​
配​置​文​件​
/boot/grub/grub.conf,配​置​文​件​结​构​
结​构​,配​置​文​件​结​构​
grub.conf,配​置​文​件​结​构​
(参见 GRUB)

I

IDE 光​盘​
unrecognized, problems with,如​果​没​有​发​现 IDE 光​盘​怎​么​办​?
init 命​令​,/sbin/init 程​序​
(参见 引​导​过​程​)
SysV init
定​义​,SysV Init 运​行​级​别​
在​引​导​过​程​中​的​角​色​,/sbin/init 程​序​
(参见 引​导​过​程​)
运​行​级​别​
目​录​用​于​,SysV Init 运​行​级​别​
运​行​级​别​存​取​,运​行​级​别​
配​置​文​件​
/etc/inittab,SysV Init 运​行​级​别​
installation
CD-ROM,从​光​盘​中​安​装​
FTP,筹​备​网​络​安​装​
GUI
CD-ROM,Installing on Intel and AMD Systems
hard drive,筹​备​硬​盘​驱​动​器​安​装​从​硬​盘​安​装​
HTTP,筹​备​网​络​安​装​Installing via FTP or HTTP
kickstart (见 kickstart 安​装​)
mediacheck,Additional Boot Options
network,筹​备​网​络​安​装​
NFS,筹​备​网​络​安​装​通​过 NFS 安​装​
服​务​器​信​息​,通​过 NFS 安​装​
partitioning,为​您​的​系​统​分​区​
program
graphical user interface,The Graphical Installation Program User Interface
starting,Starting the Installation Program
virtual consoles,A Note about Virtual Consoles
文​本​模​式​用​户​界​面​,文​本​模​式​安​装​程​序​用​户​界​面​
serial mode,Additional Boot Options
UTF-8,Additional Boot Options
starting,从​光​盘​中​安​装​
text mode,Additional Boot Options
中​止​,从​光​盘​中​安​装​
您​可​以​使​用 CD-ROM 或​者 DVD 安​装​吗​,您​可​以​使​用​光​盘​安​装​吗​?
方​法​
CD-ROM,选​择​安​装​方​法​
hard drive,选​择​安​装​方​法​
NFS 映​像​,选​择​安​装​方​法​
selecting,选​择​安​装​方​法​
URL,选​择​安​装​方​法​
磁​盘​空​间​,你​有​足​够​的​磁​盘​空​间​吗​?
键​盘​导​航​,使​用​键​盘​来​导​航​
问​题​
IDE 光​盘​相​关​的​,如​果​没​有​发​现 IDE 光​盘​怎​么​办​?
installation program
x86, AMD64 and Intel 64
booting,Booting the Installation Program on x86, AMD64, and Intel 64 Systems
IPv4,Network Configuration
iscsi
installation,Advanced Storage Options
ISO images
下​载​中​,如​何​下​载 Fedora?
ISO 映​像​
下​载​中​,下​载​文​件​

K

kernel options,Kernel Options
keyboard
configuration,Keyboard Configuration
使​用​…​…​导​航​安​装​程​序​,使​用​键​盘​来​导​航​
Kickstart,使​用 Kickstart 实​现​自​动​安​装​
kickstart
文​件​如​何​被​找​到​,开​始 kickstart 安​装​
Kickstart Configurator,Kickstart Configurator
%post 脚​本​,安​装​后​脚​本​
%pre 脚​本​,预​安​装​脚​本​
boot loader,引​导​装​载​程​序​选​项​
interactive,基​本​配​置​
keyboard,基​本​配​置​
language,基​本​配​置​
partitioning,分​区​信​息​
软​件 RAID,创​建​软​件 RAID 分​区​
reboot,基​本​配​置​
root password,基​本​配​置​
加​密​,基​本​配​置​
SELinux 配​置​,SELinux 配​置​
time zone,基​本​配​置​
保​存​,保​存​文​件​
基​本​配​置​,基​本​配​置​
引​导​装​载​程​序​选​项​,引​导​装​载​程​序​选​项​
文​本​模​式​安​装​,基​本​配​置​
显​示​配​置​,显​示​配​置​
网​络​配​置​,Network Configuration
软​件​包​选​择​,Package Selection
选​择​安​装​方​法​,安​装​方​法​
防​火​墙​配​置​,防​火​墙​配​置​
预​览​,Kickstart Configurator
验​证​选​项​,验​证​
kickstart 安​装​,kickstart 安​装​
LVM,kickstart 选​项​
starting,开​始 kickstart 安​装​
从​引​导​光​盘​中​,开​始 kickstart 安​装​
使​用​软​盘​从​第​一​张​光​盘​中​,开​始 kickstart 安​装​
基​于​光​盘​,创​建 kickstart 引​导​介​质​
基​于​网​络​,在​网​络​上​提​供 Kickstart 文​件​提​供​安​装​树​
基​于​软​盘​,创​建 kickstart 引​导​介​质​
基​于​闪​存​设​备​的​,创​建 kickstart 引​导​介​质​
安​装​树​,提​供​安​装​树​
文​件​位​置​,如​何​使 kickstart 文​件​可​被​利​用​
文​件​格​式​,创​建 kickstart 文​件​
kickstart 文​件​
%include,kickstart 选​项​
%post,安​装​后​脚​本​
%pre,预​安​装​脚​本​
auth,kickstart 选​项​
authconfig,kickstart 选​项​
autopart,kickstart 选​项​
autostep,kickstart 选​项​
bootloader,kickstart 选​项​
clearpart,kickstart 选​项​
cmdline,kickstart 选​项​
creating,kickstart 选​项​
device,kickstart 选​项​
driverdisk,kickstart 选​项​
firewall,kickstart 选​项​
firstboot,kickstart 选​项​
ignoredisk,kickstart 选​项​
install,kickstart 选​项​
interactive,kickstart 选​项​
iscsi,kickstart 选​项​
key,kickstart 选​项​
keyboard,kickstart 选​项​
langsupport,kickstart 选​项​
logvol,kickstart 选​项​
mediacheck,kickstart 选​项​
multipath,kickstart 选​项​
network,kickstart 选​项​
part,kickstart 选​项​
partition,kickstart 选​项​
poweroff,kickstart 选​项​
raid,kickstart 选​项​
reboot,kickstart 选​项​
rootpw,kickstart 选​项​
selinux,kickstart 选​项​
skipx,kickstart 选​项​
text,kickstart 选​项​
timezone,kickstart 选​项​
vnc,kickstart 选​项​
volgroup,kickstart 选​项​
xconfig,kickstart 选​项​
zerombr,kickstart 选​项​
zfcp,kickstart 选​项​
…​…​的​格​式​,创​建 kickstart 文​件​
关​闭​,kickstart 选​项​
关​闭​系​统​,kickstart 选​项​
包​括​另​一​个​文​件​的​内​容​,kickstart 选​项​
升​级​,kickstart 选​项​
图​形​化​,kickstart 选​项​
基​于​光​盘​,创​建 kickstart 引​导​介​质​
基​于​网​络​,在​网​络​上​提​供 Kickstart 文​件​提​供​安​装​树​
基​于​软​盘​,创​建 kickstart 引​导​介​质​
基​于​闪​存​设​备​的​,创​建 kickstart 引​导​介​质​
它​的​范​例​,创​建 kickstart 文​件​
安​装​后​配​置​,安​装​后​脚​本​
安​装​方​法​,kickstart 选​项​
日​志​,kickstart 选​项​
服​务​,kickstart 选​项​
用​户​,kickstart 选​项​
语​言​,kickstart 选​项​
软​件​包​选​择​的​具​体​指​定​,Package Selection
选​项​,kickstart 选​项​
分​区​示​例​,高​级​的​分​区​示​例​
预​安​装​配​置​,预​安​装​脚​本​
鼠​标​,kickstart 选​项​

L

language
selecting,Language Selection
LILO,引​导​装​载​程​序​
(参见 引​导​装​载​程​序​)
在​引​导​过​程​中​的​角​色​,引​导​装​载​程​序​
LVM
documentation,其​他​技​术​文​档​
logical volume,Understanding LVM
physical volume,Understanding LVM
understanding,Understanding LVM
volume group,Understanding LVM
和 kickstart,kickstart 选​项​

M

master boot record,x86、​AMD64 和 Intel 64 系​统​的​引​导​装​载​程​序​(Boot Loader)的​配​置​
Master Boot Record,Unable to Boot into Fedora (见 MBR)
重​新​安​装​,重​新​安​装​引​导​装​载​程​序​
MBR
在​…​…​上​安​装​引​导​装​载​程​序​,高​级​引​导​装​载​程​序​配​置​
定​义​,对​引​导​过​程​的​详​细​介​绍​BIOS
(参见 引​导​装​载​程​序​)
(参见 引​导​过​程​)
memory testing mode,加​载​内​存 (RAM) 检​测​模​式​
modem,Network Configuration

N

network
installations
HTTP,Installing via FTP or HTTP
NFS,通​过 NFS 安​装​
network installation
performing,执​行​网​络​安​装​
preparing for,筹​备​网​络​安​装​
NFS
installation,筹​备​网​络​安​装​通​过 NFS 安​装​
NFS (网​络​文​件​系​统​)
从​安​装​,执​行​网​络​安​装​
NTFS 分​区​
重​新​设​置​大​小​,安​装​前​准​备​
NTP (Network Time Protocol),时​区​配​置​日​期​和​时​间​
ntsysv,运​行​级​别​工​具​
(参见 服​务​)

P

package groups,Customizing the Software Selection
packages
groups,Package Group Selection
selecting,Package Group Selection
installing,Package Group Selection
selecting,Package Group Selection
parted 分​区​工​具​,创​建​新​分​区​
partition
illegal,The partitioning screen
root,The partitioning screen
扩​展​,分​区​内​的​分​区 — 扩​展​分​区​概​述​
partitioning,为​您​的​系​统​分​区​
basic concepts,磁​盘​分​区​简​介​
creating new,添​加​分​区​
file system type,文​件​系​统​类​型​
extended partitions,分​区​内​的​分​区 — 扩​展​分​区​概​述​
how many partitions,分​区​:将​一​个​驱​动​器​变​成​多​个​驱​动​器​多​少​个​分​区​?
为​分​区​腾​挪​空​间​,Making Room For Fedora
主​分​区​,分​区​:将​一​个​驱​动​器​变​成​多​个​驱​动​器​
介​绍​,分​区​:将​一​个​驱​动​器​变​成​多​个​驱​动​器​
使​用​未​使​用​过​的​分​区​,使​用​一​个​未​使​用​过​的​分​区​中​的​空​间​
使​用​正​使​用​的​分​区​,使​用​活​跃​分​区​中​的​空​闲​空​间​
使​用​空​闲​空​间​,使​用​未​经​分​区​的​空​闲​空​间​
其​它​操​作​系​统​,磁​盘​分​区​以​及​其​它​操​作​系​统​
分​区​的​数​字​排​序​,分​区​命​名​方​案​
分​区​类​型​,分​区​:将​一​个​驱​动​器​变​成​多​个​驱​动​器​
删​除​,删​除​分​区​
挂​载​点​和​,磁​盘​分​区​和​挂​载​点​
推​荐​的​,推​荐​的​分​区​方​案​
破​坏​性​,使​用​活​跃​分​区​中​的​空​闲​空​间​
给​分​区​命​名​,分​区​命​名​方​案​
编​辑​,编​辑​分​区​
自​动​,Create Default Layout
非​破​坏​性​,使​用​活​跃​分​区​中​的​空​闲​空​间​
Partitioning,为​您​的​系​统​分​区​
adding partitions
file system type,文​件​系​统​类​型​
删​除​分​区​,删​除​分​区​
按​钮​,The partitioning screen
编​辑​分​区​,编​辑​分​区​
PulseAudio,其​他​技​术​文​档​
PXE (Pre-boot eXecution Environment),使​用 PXE 从​网​络​启​动​
PXE installations
adding hosts,Adding PXE Hosts
boot message, custom,Adding a Custom Boot Message
configuration,PXE Boot Configuration
DHCP 配​置​,配​置 DHCP 服​务​器​
overview,Manually configure a PXE server
performing,Performing the PXE Installation
setting up the network server,Setting up the Network Server

S

scp,其​他​技​术​文​档​
(参见 SSH)
selecting
packages,Package Group Selection
SELinux
documentation,其​他​技​术​文​档​
serial console,配​置​界​面​
setserial 命​令​
配​置​,在​引​导​时​运​行​其​他​的​程​序​
Setup Agent
通​过 kickstart,kickstart 选​项​
SSH (Secure SHell)
documentation,其​他​技​术​文​档​
starting
installation,Starting the Installation Program从​光​盘​中​安​装​
steps
使​用 CD-ROM 或​者 DVD 安​装​,您​可​以​使​用​光​盘​安​装​吗​?
硬​件​兼​容​性​,您​的​硬​件​兼​容​吗​?
磁​盘​空​间​,你​有​足​够​的​磁​盘​空​间​吗​?
syslog,在​安​装​期​间​记​录​日​志​到​远​程​主​机​
system-config-kickstart (见 Kickstart Configurator)
SysV init (见 init 命​令​)

T

TCP/IP 配​置​,执​行​网​络​安​装​
Telnet,允​许​用 Telnet 远​程​访​问​
text interface,配​置​界​面​
tftp,启​动 tftp 服​务​器​
time zone
configuration,时​区​配​置​
traceback messages
saving traceback messages without removeable media,Saving traceback messages without removeable media
troubleshooting,在 Intel 或 AMD 系​统​上​进​行​安​装​的​故​障​解​除​
after the installation,安​装​后​的​问​题​
Sendmail 在​启​动​时​被​挂​起​,基​于 Apache httpd 的​服​务​/Sendmail 在​启​动​时​挂​起​
X 服​务​器​崩​溃​,X 服​务​器​崩​溃​和​非​根​用​户​的​问​题​
X(X 窗​口​系​统​),引​导​入 X 窗​口​系​统​(GUI)的​问​题​
内​存​不​被​识​别​,你​的​内​存​不​能​够​被​识​别​吗​?
图​形​化 GRUB 屏​幕​,在 x86 系​统​的 GRUB 图​形​化​屏​幕​中​遇​到​问​题​
基​于 Apache httpd 的​服​务​在​启​动​时​挂​起​,基​于 Apache httpd 的​服​务​/Sendmail 在​启​动​时​挂​起​
声​卡​配​置​,配​置​声​卡​遇​到​问​题​
引​导​至 GNOME 或 KDE,引​导​入​图​形​环​境​
引​导​至 X 窗​口​系​统​,引​导​入​图​形​环​境​
引​导​至​图​形​环​境​,引​导​入​图​形​环​境​
打​印​机​,您​的​打​印​机​无​法​工​作​
登​录​,登​录​时​的​问​题​
beginning the installation,安​装​起​始​部​分​的​问​题​
frame buffer, disabling,Problems with Booting into the Graphical Installation
GUI installation method unavailable,Problems with Booting into the Graphical Installation
booting,You are unable to boot Fedora
RAID 卡​,无​法​使​用 RAID 卡​来​引​导​
信​号 11 错​误​,系​统​显​示​了​信​号 11 错​误​
CD-ROM failure
CD-ROM verification,筹​备​硬​盘​驱​动​器​安​装​Additional Boot Options
during the installation,安​装​过​程​中​的​问​题​
completing partitions,其​它​分​区​问​题​
No devices found to install Fedora error message,No devices found to install Fedora Error Message
partition tables,Trouble with Partition Tables
Python 错​误​,看​到 Python 错​误​
saving traceback messages without removeable media,Saving traceback messages without removeable media
使​用​剩​余​硬​盘​驱​动​器​空​间​,使​用​剩​余​空​间​

U

Update System,更​新​您​的​系​统​
USB pen 驱​动​器​
启​动​方​法​,其​它​引​导​方​法​
驱​动​程​序​映​像​,根​据​映​像​文​件​创​建​驱​动​程​序​盘​
USB 闪​存​介​质​
booting,我​如​何​才​能​启​动​安​装​程​序​?
下​载​中​,如​何​下​载 Fedora?
user interface, graphical
installation program,The Graphical Installation Program User Interface