版 1.0
版权 © 2009 Red Hat, Inc. and others
固定粗体
要看到文件您当前工作目录中文件my_next_bestselling_novel
的内容,请在 shell 提示符后输入cat my_next_bestselling_novel
命令并按 Enter 键执行该命令。
按 Enter 执行该命令。按 Ctrl+Alt+F1 切换到第一个虚拟终端。Ctrl+Alt+F7 返回您的 X-Windows 会话。
固定粗体
。例如:
与文件相关的等级包括用于文件系统的filesystem
、用于文件的file
以及用于目录的dir
。每个等级都有其自身相关的权限。
选择 Mouse Preferences。在 按钮 标签中点击惯用左手鼠标 复选框并点击 将首选鼠标按键从左切换到右(让鼠标适合左手使用)。启动要在 gedit 文件中插入一个特殊字符,请在主菜单栏中选择 。下面请在字符映射表 主菜单栏中选择 ,在搜索 字段输入字符名称,并点击 。那么会在 字符表中突出您看到的字符。双击该字符将其放置于 要复制的文本字段并点击 按钮。现在返回您的文档,在 gedit 菜单栏选择 。
固定粗斜体
或者 比例粗斜体
要使用 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
当 Apache HTTP 服务器接受请求时,它会分派子进程或者线程对其进行处理。这组子进程或者线程就是 服务器池(server-pool)。在 Apache HTTP 服务器 2.0 中,创建和维护服务器池的任务是由名为 多进程模块(Multi-Processing Modules)(MPMs)的模块负责的。和其它模块不同,Apache HTTP 服务器只能载入 MPM 组中的一个模块。
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")); } }
boot.iso
映像。将该映像写入适当的物理介质以创建可引导介质。该引导介质中没有任何软件包但必须指向硬盘或者在线程序库来完成安装。
netinst.iso
映像。将该映像写入适当的物理介质以创建可引导介质。
isolinux/
目录中下载内核文件 vmlinuz
以及 ramdisk 映像 initrd.img
。请将您的系统配置为从内核引导并载入 ramdisk 映像。有关无介质安装的详情请参考 第 10 章 无介质的安装。
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
.
Processor manufacturer and model | Architecture type for Fedora |
---|---|
Intel (except Atom 230, Atom 330, Core 2 Duo, Centrino Core2 Duo, and recent vintage Xeon); AMD (except Athlon 64, Athlon x2, Sempron 64, and Opteron); VIA C3, C7 |
i386
|
Intel Atom 230, Atom 330, Core 2 Duo, Centrino Core 2 Duo, and Xeon; AMD Athlon 64, Athlon x2, Sempron64, and Opteron; Apple MacBook, MacBook Pro, and MacBook Air |
x86_64
|
Apple Macintosh G3, G4, G5, PowerBook, and other non-Intel models |
ppc
|
i386
.
i386
architecture. The 230 and 330 Series Atom processors are based on thex86_64
architecture. Refer to http://ark.intel.com/cpugroup.aspx?familyID=29035 for more details.
Fedora-11-x86_64-DVD.iso
. Refer to 第 2.2 节 “我的电脑属于哪一种架构?” if you are unsure of your computer's architecture.
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.
arch
with the architecture of the computer being installed.
Media type | File locations |
---|---|
DVD 上的完整套件 |
fedora/linux/releases/11/Fedora/
|
实时映像 |
fedora/linux/releases/11/Live/ , fedora/linux/releases/11/Live/
|
小容量启动光盘 |
fedora/linux/releases/11/Fedora/
|
su -c 'yum -y install livecd-tools'
/dev/disk/by-label
中,或者使用 findfs
查找该名称:
su -c 'findfs LABEL="MyLabel
"'
/var/log/messages
日志:
su -c 'less /var/log/messages'
livecd-iso-to-disk
命令将 ISO 映像写入该介质:
su -c 'livecd-iso-to-diskthe_image.iso
/dev/sdX1
'
sdX1
。大都是闪存驱动器和外置硬盘只使用一个分区。如果您改变了这个行为或者使用奇怪分区的介质,您需要咨询有关人士以获得帮助。
/
and swap
) must be dedicated to Fedora.
dd
命令复制 CD-ROM #1 中的 /images/
目录中的 diskboot.img
映像文件。如:
dd if=diskboot.img of=/dev/sda
images/
directory on the installation DVD contains the boot.iso
file. This file is an image of a disc that you can burn to a CD and use to boot the installation program. To use this boot CD, your computer must be able to boot from its CD-ROM drive, and its BIOS settings must be configured to do so.
boot.iso
image, make sure that you select the option to burn an image file to disc
in your CD burning software. The exact wording of this option varies, depending on the software that you use, but should contain the word "image". Note that not all CD burning software includes this option. In particular, the CD burning software built into Microsoft Windows XP and Windows Vista does not offer this capability. There are many programs available that add this capability to Windows operating systems; Infrarecorder is a free and open-source example available from http://www.infrarecorder.org/.
boot:
prompt:
linux mediacheck
/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.
dd if=/dev/dvd
of=/location/of/disk/space/
f11.iso
dvd
指的是 DVD 驱动设备:
README-en
file in disk1
.
mv /location/of/disk/space/
f11.iso /publicly/available/directory/
mv /location/of/disk/space/
f11-disk*.iso /publicly/available/directory/
/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)
/sbin/service nfs start
). If NFS is already running, reload the configuration file (on a Fedora system use /sbin/service nfs reload
).
dd if=/dev/cdrom of=/tmp/file-name
.iso
boot:
prompt:
linux mediacheck
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.
/boot
on sda1
, /
on sda2
, and /home
on sdb1
. This will allow you to identify specific partitions during the partitioning process.
linux dd
at the installation boot prompt.
linux dd=url
命令来替代 linux dd
引导命令,其中的 url
是驱动程序映像所在的 HTTP、FTP、或 NFS 地址。
drvnet.img
)的同一目录下,以根用户身份键入 dd if=drvnet.img
of=/dev/fd0
。
driverdisk.img
onto the flash drive. For example:
dd if=driverdisk.img of=/dev/sda
boot:
prompt, enter linux dd
if using an x86 or x86-64 system. Refer to 第 7.3.1 节 “Booting the Installation Program on x86, AMD64, and Intel 64 Systems” for details on booting the installation program.
目录
linux askmethod
to the end of the line that appears below the menu.
Boot method | 安装方法 |
---|---|
DVD | DVD,网络,或硬盘 |
最小的启动光盘或 U 盘,救援光盘 | 网络或硬盘 |
Live CD 或 U 盘 | 安装到硬盘程序 |
Network Boot
或 Boot Services
。一旦您正确地配置了 PXE 启动,电脑将不需要其他介质启动 Fedora 安装系统。
pxelinux.cfg/*
config files:
IPAPPEND 2
APPEND ksdevice=bootif
ksdevice=link
linux text
at the boot:
prompt.
X
键组合来点击按钮或选择其它屏幕,这里的 X
代表屏幕中带下划线的字母。
boot:
prompt:
linux text
终端 | 击键 | 内容 |
---|---|---|
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 | 图形化显示 |
xdriver=vesa
选项启动–;参考 第 9 章 启动选项
boot:
提示的屏幕。该屏幕内容包含多个启动选项。每个选项又包含一个或多个帮助屏幕。要进入帮助屏幕,请根据屏幕下方提示按合适的键。
boot:
提示符出现,在一分钟内不做操作的话安装程序将自动启动。要禁用此特性,按帮助屏幕的功能键。
linux text
linux mediacheck
images/
directory is the boot.iso
file. This file is an ISO image than can be used to boot the installation program. To use the boot.iso
, your computer must be able to boot from its CD-ROM drive, and its BIOS settings must be configured to do so. You must then burn the boot.iso
file onto a recordable/rewriteable CD-ROM.
linux console=<device>
linux text console=<device>
<device>
should be the device you are using (such as ttyS0 or ttyS1). For example, linux text console=ttyS0
.
utf8
command as a boot-time option to the installation program. For example:
linux console=ttyS0 utf8
linux updates
linux text updates
rhupdates/
on the server.
linux askmethod
boot option). Refer to 第 7.6 节 “从硬盘安装”, for hard drive installation instructions.
linux askmethod
boot option). Refer to 第 7.8 节 “通过 NFS 安装” for network installation instructions. Note that NFS installations may also be performed in GUI mode.
linux askmethod
boot option). Refer to 第 7.9 节 “Installing via FTP or HTTP”, for FTP and HTTP installation instructions.
askmethod
, the next stage loads automatically from the DVD. Proceed to 第 7.10 节 “欢迎使用”.
boot:
提示后输入 linux hdX
=cdrom
。根据光盘连接的接口以及它是被配置为主还是次而定,把 X
替换成以下字母之一:
a
— 第一个 IDE 控制器,主
b
— 第一个 IDE 控制器,次
c
— 第二个 IDE 控制器,主
d
— 第二个 IDE 控制器,次
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.
install.img
:
mount -t iso9660 /path/to/Fedora11.iso /mnt/point -o loop,ro
cp -pr /mnt/point/images /path/images/
umount /mnt/point
fdisk
。
/dev/sd
开头。每个独立驱动器都有对应的字母,例如/dev/sda
。驱动器上的分区按数字排列,例如/dev/sda1
。
Partition type | 卷 | 到文件的原始路径 | 要使用的目录 |
---|---|---|---|
VFAT | D:\ | D:\Downloads\F11 | /Downloads/F11 |
ext2, ext3, ext4 | /home | /home/user1/F11 | /user1/F11 |
/
。如果ISO镜像位于挂载分区的子目录中,则输入那个分区中包含ISO镜像的目录名。例如,ISO镜像所在分区通常挂载为/home/
,镜像位于/home/new/
下,那么您需输入/new/
。
/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
.
example.com
域的 eastcoast
主机上安装的话,在「NFS 服务器」 字段中输入 eastcoast.example.com
。
/export/directory/
。
/mirrors/Fedora/arch
/
, enter /mirrors/Fedora/arch
/
(where arch
is replaced with the architecture type of your system, such as i386). If everything was specified properly, a message box appears indicating that files are being retrieved from the server.
mkdir discX
mount -o loop Fedora11-discX
.iso discX
X
with the corresponding disc number.
system-config-keyboard
命令来启动「键盘配置工具」。如果你不是根用户,它会提示你输入根口令再继续。
/home
partition and perform a fresh installation. For more information on partitions and how to set them up, refer to 第 7.18 节 “Disk Partitioning Setup”.
rpm -qa --qf '%{NAME} %{VERSION}-%{RELEASE} %{ARCH}\n' > ~/old-pkglist.txt
su -c 'tar czf /tmp/etc-`date +%F`.tar.gz /etc' su -c 'mv /tmp/etc-*.tar.gz /home'
/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盘片或者外置硬盘。
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.
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.
machine1.example.com
. The machine name (or "short hostname") is machine1
, and the
domain name is example.com
.
address
/ netmask
, along with the gateway address and nameserver address for your network.
system-config-date
命令来启动「时间和日期属性工具」。如果您不是根用户,它会提示您输入根密码后再继续。
timeconfig
命令。
su -
命令暂时登录为根用户。遵循这些最基本的原则将会减少你因键入错误或不正确的命令而损害系统的机会。
su -
,并按 回车 键,然后输入根密码并按 回车 键。
system-config-rootpassword
命令来启动「根密码工具」。如果您不是根用户,它会提示您输入根密码后再继续。
root
密码。为安全起见Fedora将字符显示为星号。Confirm中再次输入密码以保证输入无误。设置好root密码后,选择 继续。
/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.
/boot/
分区一定要在 RAID 阵列之外的分区上创建,比如在一个分开的硬盘驱动器上。用有问题的 RAID 卡来创建分区,有必要使用一个内部硬盘驱动器。
/boot/
分区也是软件 RAID 设置所必需的。
/boot/
分区。
/boot
分区之外的所有分区。
/boot/efi/
分区、至少 512 MB 的交换分区和大小合适的根分区(/
)。
/bin/
, /dev/
, /etc/
, /lib/
, /proc/
, /root/
, and /sbin/
directories may not be used for separate partitions in Disk Druid. These directories reside on the
/
(root) partition.
/boot
partition may not reside on an LVM volume group. Create the /boot
partition before configuring any volume groups.
lvm
command. To return to the text-mode installation, hit Alt+F1.
swap
partition
/boot
partition
/
partition
If M < 2 S = M *2 Else S = M + 2
/boot/
partition (100 MB)/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.
/
(根)分区使用硬盘上的所有剩余空间,你可能需要创建一个 /boot
分区。
/boot/
分区必须在 RAID 阵列之外被创建,如在一个单独的硬盘驱动器上创建。
root
partition (3.0 GB - 5.0 GB)/
" (the root directory) is located. In this setup, all files (except those stored in /boot
) are on the root partition.
/
(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.
/home
partition on systems that store user data. Refer to 第 7.21.4.1.1 节 “Advice on Partitions” for more information.
/
partition, upgrades become easier. Refer to the description of Disk Druid's Edit option in 第 7.21.2 节 “The partitioning screen” for more information.
/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 |
/home
目录创建一个独立的分区。有了独立的/home
分区后,升级或重装Fedora时就不再需要删除用户的文件了。
/boot
partition. Unless you plan to install a great many kernels, the default partition size of 100 MB for /boot
should suffice.
/boot
.
/var
目录包含了大量的安装程序文件,包括Apacheweb服务器。同时它也存放下载的更新包。确保/var
目录所在分区有足够的空间来保存下载的更新和您的其它内容。
/usr
目录存放主要软件。对于安装默认的软件包来说,至少需要4GB空间。如果您是程序开发员或打算用Fedora学习软件开发,则需要8GB以上的空间。
/usr
是/
之外一个独立分区的话,启动过程会变得更加复杂,某些情况下(如在iSCSI设备上安装)可能还会不工作。
/var/lib/mysql
中运行MySQL数据库,如果以后打算重装那么就应该把该目录单独分一个区。
Partition | Size and type |
---|---|
/boot
|
100 MB ext3 partition
|
swap
| 2 GB swap |
LVM物理卷 | 保留空间,做为一个LVM卷组 |
Partition | Size and type |
---|---|
/
| 13 GB ext4 |
/var
| 4 GB ext4 |
/home
| 50 GB ext4 |
/
;如果是 /boot
分区,输入 /boot
,等等。你还可以使用拉下菜单来为你的分区选择正确的挂载点。而对于交换空间分区,则不应该设置挂载点 - 把文件系统类型设置为 swap 就足够了。
·icantbelieveitsnotbtr
命令选项。具体查看第 9 章 启动选项 的介绍
fsck
[3] 文件系统。
/boot/efi
分区上使用。
/boot/grub/grub.conf
中的密码一项。如果您无法启动,那么可以用第一张 Fedora 安装光盘以 "rescue" 模式来进入系统,重置 GRUB 密码。
grub-md5-crypt
实用工具。关于如何使用这个工具,可以在终端下用命令 man grub-md5-crypt
来查看手册。
/boot
分区所在的同一驱动器上的 MBR。
/boot
Linux 保留足够空间以便引导 Linux。其它 Linux 分区可以位于柱面 1024 之后。
parted
中,1024 柱面相当于 528MB。详情请参阅:
http://www.pcguide.com/ref/hdd/bios/sizeMB504-c.html
linux rescue
at the installation boot prompt.
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.
[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 文件系统。
GRUB:
)以及一个闪动的光标。如果情况如此,你将会需要重新为你的系统分区。
/boot
分区。对于有问题的 RAID 卡,你必须有一个用于创建分区的内部硬盘驱动器。
/boot/
分区的同一驱动器上。
boot:
prompt:
linux mediacheck
http://www.bitwizard.nl/sig11/
resolution=
boot option. This option may be most helpful for laptop users. Another solution to try is the driver=
option to specify the driver that should be loaded for your video card. If this works, it should be reported as a bug as the installer has failed to autodetect your videocard. Refer to 第 9 章 启动选项 for more information on boot options.
nofb
boot option. This command may be necessary for accessibility with some screen reading hardware.
No devices found to install Fedora
Error MessageNo devices found to install Fedora
, there is probably a SCSI controller that is not being recognized by the installation program.
scp
the error message to a remote system.
/tmp/anacdump.txt
的文件。一旦这个对话框出现,键入 Ctrl+Alt+F2
来切换到一个新的 tty(虚拟控制台),然后使用 scp
命令把消息写入一个已知运行的远程系统上的 /tmp/anacdump.txt
文件中。
swap
和一个 /
(根)分区,而且选择了要让根分区使用剩余空间,但是它并不一定会填满整个硬盘驱动器。
/boot
分区才能使 /
(根)分区使用你的硬盘上的所有剩余空间。
/
(root) partition
/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/
自从创建以来已被改变。这些符号链接或被改变的链接在安装进程中无效,因此安装程序无法在其中写入信息而失败。
http://fedoraproject.org/wiki/Anaconda/Updates
http://fedoraproject.org/wiki/Anaconda
http://bugzilla.redhat.com/bugzilla/
/boot/grub/grub.conf
文件,然后重新引导系统来达到这一目的。
grub.conf
文件中开头为 splashimage
的行变为注释。要将某一行变为注释,在这一行的起首插入 #
字符。
b
来引导系统。
grub.conf
文件将会被重读,你所做的改变就会生效。
grub.conf
文件中不注释掉(或添加)以上提到的那一行。
startx
.
/etc/inittab
这个文件,只需改变运行级别部分中的一个数字即可。编辑完毕后,重新引导计算机,您下次登录时就会看到图形化登录提示。
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
。
3
改为 5
。
id:5:initdefault:
df -h
df
命令会帮助您诊断哪个分区已满。关于 df
命令及其选项(如本例中使用的 -h
选项)的更多信息,请参阅 df
的说明书页,方法是在 shell 提示下键入 man df
。
/home/
和 /tmp/
分区有时会被用户文件很快填满。您可以删除些老文件来在分区里腾出些位置。腾出些空间后,试着再以普通用户身份运行 X 服务器。
linux single
。
e
来编辑。您会看到您所选定的引导标签的配置文件中的项目列表。
kernel
开始的行并输入 e
来编辑这个启动项。
kernel
行的结尾处,添加:
single
b
to boot the system.
#
提示符后,您需要输入 passwd root
,它允许您为根用户输入一个新口令。然后,您可以输入 shutdown -r now
来使用新的根用户口令重新启动这个系统。
su -
,在提示后输入根口令,然后键入 passwd <username>
。这将会允许您为某一指定的用户帐号输入一个新口令。
http://www.linuxquestions.org/hcl/index.php
cat /proc/meminfo
命令来校验。
/boot/grub/grub.conf
文件中添加以下一行:
mem=xx
M
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
文件中的改变将会反映在您的系统中。
e
来编辑。 您所选定的引导标签的配置文件中的项目列表就会在您面前出现。
kernel
的行,然后键入 e
来编辑这一引导项目。
kernel
行的末尾,添加:
mem=xx
M
xx
与你系统的内存数量相同。
b
to boot the system.
elilo
followed by the boot command.
xx
替换成您系统的内存数量。按 Enter 键来引导。
system-config-printer
命令来启动「打印机配置工具」。如果您不是根用户,它会提示您输入根密码后再继续。
system-config-soundcard
)。
system-config-soundcard
命令来启动 「声卡配置工具」。如果您不是根用户,它会提示您输入根密码后再继续。
目录
boot:
提示符下输入 linux option
。
linux 选项1
选项2
选项3
version
/Documentation/kernel-parameters.txt, which is installed with the kernel-doc package.
lang
选项指定语言的ISO编码。用keymap
选项配置正确的键盘布局。
el_GR
和 gr
分别是希腊语和希腊键盘布局:
linux lang=el_GR
keymap=gr
lowres
选项强制使用可用的最低分辨率 (640x480) 安装系统。要指定显示分辨率,在引导选项输入 resolution=setting
。例如,要设置显示分辨率为1024x768, 输入:
linux resolution=1024x768
linux text
display=ip
:0
来转发远程显示。此命令中ip
应替换为您想用来显示的计算机的IP地址。
xhost +remotehostname
,这里,remotehostname
是原来要进行显示的主机,使用命令xhost +remotehostname
用来限制远程终端的访问,禁止未授权者进行远程访问。
linux updates
rhupdates/
on the server.
linux updates=
askmethod
选项来显示您能指定的安装方法和网络设置的附加菜单。您也能在boot:
提示符下配置安装方法和网络设置。
Installation method | Option format |
---|---|
CD 或 DVD 驱动器 |
method=
|
Hard Drive |
method=
|
HTTP Server |
method=
|
FTP Server |
method=
|
NFS Server |
method=
|
boot:
提示符下任选其一输入。 在提示符下,您可以为安装系统指定 ip
地址, netmask
, gateway
, 和 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
linux vnc vncpassword=qwerty
vnc
选项允许 VNC 服务。vncpassword
选项设置一个远程访问密码。这个例子中显示上面的密码设置是 qwerty
。
正在启动VNC... VNC 服务器已开始运行 请连接computer.mydomain.com:1 开始安装... 开始图形化安装... 按 <回车> 打开shell
computer.mydomain.com:1
.
-listen
option to run vncviewer as a listener. In a terminal window, enter the command:
vncviewer -listen
5500
in the Port(s) field, and specify tcp
as the Protocol.
boot:
提示符下设置 VNC 选项。除vnc
和 vncpassword
选项之外,用vncconnect
选项来指定监听的客户端的名字或IP地址。要指定监听者的TCP端口,给系统名增加一个冒号和端口号。
desktop.mydomain.com
的 5500
端口上的一个 VNC 客户端,在boot:
提示符下输入下面的 :
linux vnc vncpassword=qwerty
vncconnect=desktop.mydomain.com:5500
linux text telnet
telnet
实用程序连接到安装系统。telnet
命令需要安装系统的名字或IP地址:
telnet computer.mydomain.com
telnet
安装系统
syslog
选项。指定记录系统的IP地址,和该系统日志服务的 UDP 端口号。默认情况下,syslog 服务在 UDP 端口514
上监听远程信息。
192.168.1.20
上的syslog服务,在boot:
提示符下输入下面的:
linux syslog=192.168.1.20:514
rsyslog
to provide a syslog service. The default configuration of rsyslog
rejects messages from remote systems.
rsyslog
configuration detailed below does not make use of any of the security measures available in rsyslog
Crackers may slow or crash systems that permit access to the logging service, by sending large quantities of false log messages. In addition, hostile users may intercept or falsify messages sent to the logging service over the network.
/etc/rsyslog.conf
. You must use root
privileges to edit the file /etc/rsyslog.conf
. Uncomment the following lines by removing the hash preceding them:
$ModLoad imudp.so
$UDPServerRun 514
rsyslog
service to apply the change:
su -c '/sbin/service rsyslog restart'
root
password when prompted.
514
in the Port(s) field, and specify udp
as the Protocol.
/root/anaconda-ks.cfg
。您能用这个文件用同样的设置重复安装系统。或者修改拷贝来细化其他系统的设置。
system-config-kickstart
to install this utility. To load the Fedora Kickstart editor, choose → → .
ks
选项指定文件的名字和位置:
linux ks=location/kickstart-file.cfg
Kickstart source | Option format |
---|---|
CD 或 DVD 驱动器 |
ks=
|
Hard Drive |
ks=
|
其它设备 |
ks=
|
HTTP Server |
ks=
|
FTP Server |
ks=
|
NFS Server |
ks=
|
ks=
选项指定这个应用的 URL 链接。如果您增加 kssendmac
选项,请求也将发送 HTTP 报头到网络应用程序。您的应用程序能用这个报头来识别电脑。这行发送一个带报头的请求给应用程序http://server.mydomain.com/kickstart.cgi:
linux ks=http://server.mydomain.com/kickstart.cgi kssendmac
.zip
, or .tar.gz
. To extract the contents of a zipped file with a Fedora system, choose → → .
dd
实用程序。例如,准备要用镜像文件 drivers.img
来做一个磁碟,在终端窗口输入这个命令:
dd if=drivers.img of=/dev/fd0
boot:
提示符下用 dd
选项。
linux dd
dd
选项与driverdisk
选项通用。
Image source | Option format |
---|---|
选择一个驱动器和设备。 |
dd
|
HTTP Server |
dd=
|
FTP Server |
dd=
|
NFS Server |
dd=
|
Compatibility | Option |
---|---|
禁止所有硬件检测 |
noprobe
|
禁止图形,键盘,和鼠标检测 |
headless
|
禁用将键盘和鼠标信息传递给安装的第二步 |
nopass
|
为视频使用基本的 VESA 驱动 |
xdriver=vesa
|
安装过程中禁止shell访问虚拟终端2 |
noshell
|
禁用高级电源配置界面(ACPI) |
acpi=off
|
禁用计算机检查例外(MCE)CPU自检。 |
nomce
|
在AMD64架构下禁用非均匀内存访问 |
numa-off
|
强制内核探测指定数额的内存,xxx 以MB为单位。
|
mem=
|
仅为 IDE 和 SATA 驱动器启用 DMA |
libata.dma=1
|
禁止 BIOS-assisted RAID |
nodmraid
|
禁止火线设备检测 |
nofirewire
|
禁止并行端口检测 |
noparport
|
禁止 PC 卡 (PCMCIA) 设备检测 |
nopcmcia
|
禁止 USB 存储设备检测 |
nousbstorage
|
禁止所有 USB 设备检测 |
nousb
|
禁止所有网络设备探测 |
nonet
|
isa
选项让系统在安装过程的开始显示一个附加文本界面。用这个屏幕配置您电脑上的 ISA 设备。
mediacheck
选项启动Fedora。
/mnt/sysimage/
下来修复系统
upgrade
,已由安装过程中的一个阶段代替,安装过程中会提示您升级或重新安装在您计算机上检测出的早期版本的Fedora。
/etc/fedora-release
文件内容被改过的话,安装程序可能无法正确的检测出旧版本的Fedora。启动选项upgradeany
会跳过安装程序的这个检测并允许您在旧版本未被正确识别的情况下升级Fedora。
isolinux/
文件夹:
isolinux/
文件夹。
releases/11/Fedora/arch
/os/isolinux/
folder.
vmlinuz
和 initrd.img
复制到 /boot/
目录,将其重新命名为 vmlinuz-install
和 initrd.img-install
。您必须有 root
权限以便可将文件写入 /boot/
目录。
/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 之外的接口)
vnc
和 vncpassword=
用于远程安装
/boot/grub/grub.conf
文件中更改 default
选项指向您新添加的第一个字段:
default 0
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.
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.
root
账户来进行。切换的命令是su -
。另外一种方法是每次运行命令是在前面加上su -c
,使命令行成为su -c 'command
'
。
yum -y install cobbler
cobbler
命令可以进行设置的自检并报告检测结过。运行以下命令以检测设置:
cobbler check
/var/lib/cobbler/settings
文件的设置来反映服务器的 IP 地址信息。您至少需要修改 server
和next_server
两项,虽然有时它们的 IP 地址相同
manage_dhcp
参数为 1
。 如果您已有一个运行的 DHCP 服务器,请根据 syslinux 软件包的内容进行配置。更多信息参考本地文件 /usr/share/doc/syslinux-version
/syslinux.doc
和 /usr/share/doc/syslinux-version
/pxelinux.doc
。
mkdir /mnt/dvd
mount -o context=system_u:object_r:httpd_sys_content_t:s0 /dev/dvd /mnt/dvd
mount -ro loop,context=system_u:object_r:httpd_sys_content_t:s0 /path/to/image.iso /mnt/dvd
/etc/exports
,添加如下内容
/mnt/dvd *(ro,async)
/sbin/service rpcbind start /sbin/service nfs start
yum
进行安装:
yum -y install httpd
ln -s /mnt/dvd /var/www/html/distro
cobbler
来配置一个发布服务器。cobbler
命令在导入过程中可以从网络获取发布目录
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
cobbler import
。建议用安装方法作为名称的一部分,这样客户端的启动目录里会得到体现
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 地址。
cobbler sync
提交。用 netstat -lp
命令检查 cobbler
服务器是否监听相应端口。
system-config-securitylevel
来设置防火墙以允许相应的网络服务:
cobbler
服务器提供 HTTP 安装服务
cobbler
服务器提供 FTP 安装服务
cobbler
服务器提供 NFS 安装服务
tftp
server necessary for PXE booting.
tftp
service.
tftp
server so they can be found when the client requests them. The tftp
server is usually the same server as the network server exporting the installation tree.
http://server.example.com/kickstart/ks.cfg
. This file can be created with the Kickstart Configurator. Refer to 第 14 章 Kickstart Configurator for details.
tftp
服务器tftp-server
package is installed with the command rpm -q tftp-server
.
tftp
是基于 xinetd 的服务;用下面的命令启动它:
/sbin/chkconfig --level 345 xinetd on /sbin/chkconfig --level 345 tftp on
tftp
和 xinetd
服务,并设置在运行级别 3、4 和 5 下引导时启动。
allow booting; allow bootp; class "pxeclients" { match if substring(option vendor-class-identifier, 0, 9) = "PXEClient"; next-server <server-ip>
; filename "linux-install/pxelinux.0"; }
<server-ip>
应该用 tftp
服务器的 IP 地址来替换。
/tftpboot/linux-install/msgs/boot.msg
to use a custom boot message.
vncviewer
is available on Red Hat Enterprise Linux and Fedora Linux by installing the vnc
package:
# yum install vnc
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.
vnc
as a boot argument.
vnc
command in the kickstart file used for installation.
Running anacondaVERSION
, thePRODUCT
system installer - please wait...
vncconnect
boot parameter:
boot: linux vncconnect=HOST
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
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
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.
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.
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.
vncpassword
option. It should not be a password you use on any systems, especially a real root password.
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).
/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.
%packages
部分 — 详情请参考 第 13.5 节 “Package Selection”。
%pre
和 %post
部分 — 这两个部分可以按任何顺序排列而且不是必需的。详情请参考 第 13.6 节 “预安装脚本” 和 第 13.7 节 “安装后脚本”。
upgrade
关键字
autopart
(可选) /
)、交换分区和适合于不同体系结构的引导分区。一个或多个缺省分区的大小可以用 part
指令重新定义。
--encrypted
— Should all devices with support be encrypted by default? This is equivalent to checking the Encrypt checkbox on the initial partitioning screen.
--passphrase=
— Provide a default system-wide passphrase for all encrypted devices.
ignoredisk
(可选) ignoredisk
,如要试图在 SAN-cluster 系统里部署,kickstart 就会失败,因为安装程序检测到 SAN 不返回分区表的被动路径(passive path)。
ignoredisk
选项也有用处。
ignoredisk --drives=drive1,drive2
,...
driveN
是 sda
、sdb
... hda
等等中的一个。
autostep
(可选) --autoscreenshot
— Take a screenshot at every step during installation and copy the images over to /root/anaconda-screenshots
after installation is complete. This is most useful for documentation.
auth
或 authconfig
(必需) authconfig
命令相似。在缺省情况下,密码通常被加密但不使用影子文件(shadowed)。
--enablemd5
— Use md5 encryption for user passwords.
--enablenis
— Turns on NIS support. By default, --enablenis
uses whatever domain it finds on the network. A domain should almost always be set by hand with the --nisdomain=
option.
--nisdomain=
— NIS domain name to use for NIS services.
--nisserver=
— Server to use for NIS services (broadcasts by default).
--useshadow
or --enableshadow
— Use shadow passwords.
--enableldap
— Turns on LDAP support in /etc/nsswitch.conf
, allowing your system to retrieve information about users (UIDs, home directories, shells, etc.) from an LDAP directory. To use this option, you must install the nss_ldap
package. You must also specify a server and a base DN (distinguished name) with --ldapserver=
and --ldapbasedn=
.
--enableldapauth
— Use LDAP as an authentication method. This enables the pam_ldap
module for authentication and changing passwords, using an LDAP directory. To use this option, you must have the nss_ldap
package installed. You must also specify a server and a base DN with --ldapserver=
and --ldapbasedn=
.
--ldapserver=
— If you specified either --enableldap
or --enableldapauth
, use this option to specify the name of the LDAP server to use. This option is set in the /etc/ldap.conf
file.
--ldapbasedn=
— If you specified either --enableldap
or --enableldapauth
, use this option to specify the DN in your LDAP directory tree under which user information is stored. This option is set in the /etc/ldap.conf
file.
--enableldaptls
— Use TLS (Transport Layer Security) lookups. This option allows LDAP to send encrypted usernames and passwords to an LDAP server before authentication.
--enablekrb5
— Use Kerberos 5 for authenticating users. Kerberos itself does not know about home directories, UIDs, or shells. If you enable Kerberos, you must make users' accounts known to this workstation by enabling LDAP, NIS, or Hesiod or by using the /usr/sbin/useradd
command. If you use this option, you must have the pam_krb5
package installed.
--krb5realm=
— The Kerberos 5 realm to which your workstation belongs.
--krb5kdc=
— The KDC (or KDCs) that serve requests for the realm. If you have multiple KDCs in your realm, separate their names with commas (,).
--krb5adminserver=
— The KDC in your realm that is also running kadmind. This server handles password changing and other administrative requests. This server must be run on the master KDC if you have more than one KDC.
--enablehesiod
— Enable Hesiod support for looking up user home directories, UIDs, and shells. More information on setting up and using Hesiod on your network is in /usr/share/doc/glibc-2.x.x/README.hesiod
, which is included in the glibc
package. Hesiod is an extension of DNS that uses DNS records to store information about users, groups, and various other items.
--hesiodlhs
— The Hesiod LHS ("left-hand side") option, set in /etc/hesiod.conf
. This option is used by the Hesiod library to determine the name to search DNS for when looking up information, similar to LDAP's use of a base DN.
--hesiodrhs
— The Hesiod RHS ("right-hand side") option, set in /etc/hesiod.conf
. This option is used by the Hesiod library to determine the name to search DNS for when looking up information, similar to LDAP's use of a base DN.
jim:*:501:501:Jungle Jim:/home/jim:/bin/bash
)的 TXT 记录。对于组,情况是相同的,除了将使用 jim.group<LHS><RHS>。
--enablesmbauth
— Enables authentication of users against an SMB server (typically a Samba or Windows server). SMB authentication support does not know about home directories, UIDs, or shells. If you enable SMB, you must make users' accounts known to the workstation by enabling LDAP, NIS, or Hesiod or by using the /usr/sbin/useradd
command to make their accounts known to the workstation. To use this option, you must have the pam_smb
package installed.
--smbservers=
— The name of the server(s) to use for SMB authentication. To specify more than one server, separate the names with commas (,).
--smbworkgroup=
— The name of the workgroup for the SMB servers.
--enablecache
— Enables the nscd
service. The nscd
service caches information about users, groups, and various other types of information. Caching is especially helpful if you choose to distribute information about users and groups over your network using NIS, LDAP, or hesiod.
bootloader
(必需)--append=
— Specifies kernel parameters. To specify multiple parameters, separate them with spaces. For example:
bootloader --location=mbr --append="hdd=ide-scsi ide=nodma"
--driveorder
— Specify which drive is first in the BIOS boot order. For example:
bootloader --driveorder=sda,hda
--location=
— Specifies where the boot record is written. Valid values are the following: mbr
(the default), partition
(installs the boot loader on the first sector of the partition containing the kernel), or none
(do not install the boot loader).
--password=
— If using GRUB, sets the GRUB boot loader password to the one specified with this option. This should be used to restrict access to the GRUB shell, where arbitrary kernel options can be passed.
--md5pass=
— If using GRUB, similar to --password=
except the password should already be encrypted.
--upgrade
— Upgrade the existing boot loader configuration, preserving the old entries. This option is only available for upgrades.
clearpart
(可选) clearpart
命令,--onpart
命令就不能够用在逻辑分区上。
--all
— Erases all partitions from the system.
--drives=
— Specifies which drives to clear partitions from. For example, the following clears all the partitions on the first two drives on the primary IDE controller:
clearpart --drives=hda,hdb --all
--initlabel
— Initializes the disk label to the default for your architecture (for example msdos
for x86 and gpt
for Itanium). It is useful so that the installation program does not ask if it should initialize the disk label if installing to a brand new hard drive.
--linux
— Erases all Linux partitions.
--none
(default) — Do not remove any partitions.
cmdline
(可选) device
(可选) device
命令用来告诉安装程序安装额外的模块,它有着这样的格式:
device<type>
<moduleName>
--opts=<options>
<type>
— Replace with either scsi
or eth
.
<moduleName>
— Replace with the name of the kernel module which should be installed.
--opts=
— Mount options to use for mounting the NFS export. Any options that can be specified in /etc/fstab
for an NFS mount are allowed. The options are listed in the nfs(5)
man page. Multiple options are separated with a comma.
driverdisk
(可选) 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
<partition>
— Partition containing the driver disk.
--type=
— File system type (for example, vfat or ext2).
firewall
(可选) firewall --enabled|--disabled [--trust=] <device>
[--port=]
--enabled
or --enable
— Reject incoming connections that are not in response to outbound requests, such as DNS replies or DHCP requests. If access to services running on this machine is needed, you can choose to allow specific services through the firewall.
--disabled
or --disable
— Do not configure any iptables rules.
--trust=
— Listing a device here, such as eth0, allows all traffic coming from that device to go through the firewall. To list more than one device, use --trust eth0 --trust eth1
. Do NOT use a comma-separated format such as --trust eth0, eth1
.
<incoming>
— Replace with one or more of the following to allow the specified services through the firewall.
--ssh
--telnet
--smtp
--http
--ftp
--port=
— You can specify that ports be allowed through the firewall using the port:protocol format. For example, to allow IMAP access through your firewall, specify imap:tcp
. Numeric ports can also be specified explicitly; for example, to allow UDP packets on port 1234 through, specify 1234:udp
. To specify multiple ports, separate them by commas.
firstboot
(可选) firstboot
软件包必须被安装。如果不指定,这个选项是缺省为禁用的。
--enable
or --enabled
— The Setup Agent is started the first time the system boots.
--disable
or --disabled
— The Setup Agent is not started the first time the system boots.
--reconfig
— Enable the Setup Agent to start at boot time in reconfiguration mode. This mode enables the language, mouse, keyboard, root password, security level, time zone, and networking configuration options in addition to the default ones.
halt
(可选) reboot
选项。
halt
选项基本和 shutdown -h
命令相同。
poweroff
、reboot
和 shutdown
选项。
graphical
(可选) install
(可选) cdrom
、harddrive
、nfs
或 url
(FTP 或 HTTP 安装)。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=
--partition=
--dir=
variant
目录的目录。
harddrive --partition=hdb2 --dir=/tmp/install-tree
nfs
— Install from the NFS server specified.
--server=
--dir=
variant
目录的目录。
--opts=
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
(可选)--target
—
--port=
—
--user=
—
--password=
—
key
(可选)--skip
— Skip entering a key. Usually if the key command is not given, anaconda will pause at this step to prompt for a key. This option allows automated installation to continue if you do not have a key or do not want to provide one.
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
/usr/lib/python2.2/site-packages/rhpl/keyboard_models.py
也包含这个列表而且是 rhpl
软件包的一部分。
lang
(必需)
lang en_US
/usr/share/system-config-language/locale-list
里每一行的第一个字段提供了一个有效语言代码的列表,它是 system-config-language
软件包的一部分。
langsupport
(deprecated)
%packages
部分列出所支持的语言的支持软件包组。例如,要支持法语,你应该把下面的语句加入到 %packages
:
@french-support
logvol
(可选)
logvol<mntpoint>
--vgname=<name>
--size=<size>
--name=<name>
<options>
--noformat
— Use an existing logical volume and do not format it.
--useexisting
— Use an existing logical volume and reformat it.
--fstype=
— Sets the file system type for the logical volume. Valid values are xfs
, ext2
, ext3
, ext4
, swap
, vfat
, and hfs
.
--fsoptions=
— Specifies a free form string of options to be used when mounting the filesystem. This string will be copied into the /etc/fstab
file of the installed system and should be enclosed in quotes.
--bytes-per-inode=
— Specifies the size of inodes on the filesystem to be made on the logical volume. Not all filesystems support this option, so it is silently ignored for those cases.
--grow=
— Tells the logical volume to grow to fill available space (if any), or up to the maximum size setting.
--maxsize=
— The maximum size in megabytes when the logical volume is set to grow. Specify an integer value here, and do not append the number with MB.
--recommended=
— Determine the size of the logical volume automatically.
--percent=
— Specify the size of the logical volume as a percentage of available space in the volume group.
part pv.01 --size 3000 volgroup myvg pv.01 logvol / --vgname=myvg --size=2000 --name=rootvol
logging
(可选)
--host=
— Send logging information to the given remote host, which must be running a syslogd process configured to accept remote logging.
--port=
— If the remote syslogd process uses a port other than the default, it may be specified with this option.
--level=
— One of debug, info, warning, error, or critical.
mediacheck
(可选)
monitor
(可选)
--hsync=
— Specifies the horizontal sync frequency of the monitor.
--monitor=
— Use specified monitor; monitor name should be from the list of monitors in /usr/share/hwdata/MonitorsDB from the hwdata package. The list of monitors can also be found on the X Configuration screen of the Kickstart Configurator. This is ignored if --hsync or --vsync is provided. If no monitor information is provided, the installation program tries to probe for it automatically.
--noprobe=
— Do not try to probe the monitor.
--vsync=
— Specifies the vertical sync frequency of the monitor.
mouse
(已取消)
network
(可选)
network
选项为通过网络的 kickstart 安装以及所安装的系统配置联网信息。
--bootproto=
— One of dhcp
, bootp
, or static
.
dhcp
。bootp
和 dhcp
被认为是相同的.
network --bootproto=dhcp
network --bootproto=bootp
network --bootproto=static --ip=10.0.2.15 --netmask=255.255.255.0 \ --gateway=10.0.2.254 --nameserver=10.0.2.1
network --bootproto=static --ip=10.0.2.15 --netmask=255.255.255.0 \ --gateway=10.0.2.254 --nameserver 192.168.2.1,192.168.3.1
--device=
— Used to select a specific Ethernet device for installation. Note that using --device=
is not effective unless the kickstart file is a local file (such as ks=floppy
), since the installation program configures the network to find the kickstart file. For example:
network --bootproto=dhcp --device=eth0
--ip=
— IP address for the machine to be installed.
--gateway=
— Default gateway as an IP address.
--nameserver=
— Primary nameserver, as an IP address.
--nodns
— Do not configure any DNS server.
--netmask=
— Netmask for the installed system.
--hostname=
— Hostname for the installed system.
--ethtool=
— Specifies additional low-level settings for the network device which will be passed to the ethtool program.
--essid=
— The network ID for wireless networks.
--wepkey=
— The encryption key for wireless networks.
--onboot=
— Whether or not to enable the device at boot time.
--class=
— The DHCP class.
--mtu=
— The MTU of the device.
--noipv4
— Disable IPv4 on this device.
--noipv6
— Disable IPv6 on this device.
multipath
(可选)
part
或 partition
(对于安装是必需的,升级可忽略)。 --noformat
和 --onpart
。
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
raid.<id>
raid
)。
pv.<id>
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.
--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.
poweroff
(可选) reboot
选项。
poweroff
选项和 shutdown -p
基本相同。
poweroff
选项和系统硬件非常相关。特别是,某些硬件部件如 BIOS、APM(高级电源管理)和 ACPI(高级配置和电源接口)必须能和系统内核相互作用。关于系统的 APM/ACPI 能力的更多信息,请和生产商联系。
halt
、reboot
和 shutdown
kickstart 选项。
raid
(可选) raid<mntpoint>
--level=<level>
--device=<mddevice>
<partitions*>
<mntpoint>
— Location where the RAID file system is mounted. If it is /
, the RAID level must be 1 unless a boot partition (/boot
) is present. If a boot partition is present, the /boot
partition must be level 1 and the root (/
) partition can be any of the available types. The <partitions*>
(which denotes that multiple partitions can be listed) lists the RAID identifiers to add to the RAID array.
--level=
— RAID level to use (0, 1, or 5).
--device=
— Name of the RAID device to use (such as md0 or md1). RAID devices range from md0 to md15, and each may only be used once.
--bytes-per-inode=
— Specifies the size of inodes on the filesystem to be made on the RAID device. Not all filesystems support this option, so it is silently ignored for those cases.
--spares=
— Specifies the number of spare drives allocated for the RAID array. Spare drives are used to rebuild the array in case of drive failure.
--fstype=
— Sets the file system type for the RAID array. Valid values are xfs
, ext2
, ext3
, ext4
, swap
, vfat
, and hfs
.
--fsoptions=
— Specifies a free form string of options to be used when mounting the filesystem. This string will be copied into the /etc/fstab file of the installed system and should be enclosed in quotes.
--noformat
— Use an existing RAID device and do not format the RAID array.
--useexisting
— Use an existing RAID device and reformat it.
--encrypted
— Specifies that this RAID device should be encrypted.
--passphrase=
— Specifies the passphrase to use when encrypting this RAID device. 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.
/
上的 RAID 1 分区,以及 /usr
上的 RAID 5 分区。它也为每个磁盘创建一个交换分区,一共三个。
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
raid
的详细示例。
reboot
(可选) reboot
选项基本和 shutdown -r
命令相同。
reboot
选项可能会导致安装的死循环,这依赖于安装介质和方法。
reboot
选项是缺省的完成方法。
halt
、poweroff
和 shutdown
kickstart 选项。
repo
(可选)
repo --name=<repoid>
[--baseurl=<url>
| --mirrorlist=<url>
]
--name=
— The repo id. This option is required.
--baseurl=
— The URL for the repository. The variables that may be used in yum repo config files are not supported here. You may use one of either this option or --mirrorlist, not both.
--mirrorlist=
— The URL pointing at a list of mirrors for the repository. The variables that may be used in yum repo config files are not supported here. You may use one of either this option or --baseurl, not both.
rootpw
(必需) rootpw [--iscrypted] <password>
--iscrypted
— If this is present, the password argument is assumed to already be encrypted.
selinux
(可选) selinux [--disabled|--enforcing|--permissive]
--enforcing
— Enables SELinux with the default targeted policy being enforced.
selinux
选项,SELinux 将被启用并缺省设置为 --enforcing
。
--permissive
— Outputs warnings based on the SELinux policy, but does not actually enforce the policy.
--disabled
— Disables SELinux completely on the system.
services
(可选) --disabled
— Disable the services given in the comma separated list.
--enabled
— Enable the services given in the comma separated list.
services --disabled auditd, cups,smartd, nfslock
services --disabled auditd,cups,smartd,nfslock
shutdown
(可选) shutdown
选项和 shutdown
命令大体相同。
halt
、poweroff
和 reboot
kickstart 选项。
skipx
(可选) text
(可选) timezone
(可选) timezone [--utc] <timezone>
--utc
— If present, the system assumes the hardware clock is set to UTC (Greenwich Mean) time.
upgrade
(可选) user
(可选) user --name=<username>
[--groups=<list>
] [--homedir=<homedir>
] [--password=<password>
] [--iscrypted] [--shell=<shell>
] [--uid=<uid>
]
--name=
— Provides the name of the user. This option is required.
--groups=
— In addition to the default group, a comma separated list of group names the user should belong to.
--homedir=
— The home directory for the user. If not provided, this defaults to /home/<username>
.
--password=
— The new user's password. If not provided, the account will be locked by default.
--iscrypted=
— Is the password provided by --password already encrypted or not?
--shell=
— The user's login shell. If not provided, this defaults to the system default.
--uid=
— The user's UID. If not provided, this defaults to the next available non-system UID.
vnc
(可选) vnc [--host=<hostname>
] [--port=<port>
] [--password=<password>
]
--host=
— Instead of starting a VNC server on the install machine, connect to the VNC viewer process listening on the given hostname.
--port=
— Provide a port that the remote VNC viewer process is listening on. If not provided, anaconda will use the VNC default.
--password=
— Set a password which must be provided to connect to the VNC session. This is optional, but recommended.
volgroup
(可选) volgroup<name>
<partition>
<options>
--noformat
— Use an existing volume group and do not format it.
--useexisting
— Use an existing volume group and reformat it.
--pesize=
— Set the size of the physical extents.
part pv.01 --size 3000 volgroup myvg pv.01 logvol / --vgname=myvg --size=2000 --name=rootvol
volgroup
的详细示例。
xconfig
(可选) --driver
— Specify the X driver to use for the video hardware.
--videoram=
— Specifies the amount of video RAM the video card has.
--defaultdesktop=
— Specify either GNOME or KDE to set the default desktop (assumes that GNOME Desktop Environment and/or KDE Desktop Environment has been installed through %packages
).
--startxonboot
— Use a graphical login on the installed system.
--resolution=
— Specify the default resolution for the X Window System on the installed system. Valid values are 640x480, 800x600, 1024x768, 1152x864, 1280x1024, 1400x1050, 1600x1200. Be sure to specify a resolution that is compatible with the video card and monitor.
--depth=
— Specify the default color depth for the X Window System on the installed system. Valid values are 8, 16, 24, and 32. Be sure to specify a color depth that is compatible with the video card and monitor.
zerombr
(可选) zerombr
is specified any invalid partition tables found on disks are initialized. This destroys all of the contents of disks with invalid partition tables.
zerombr yes
. This form is now deprecated; you should now simply specify zerombr
in your kickstart file instead.
zfcp
(可选) zfcp [--devnum=<devnum>
] [--fcplun=<fcplun>
] [--scsiid=<scsiid>
] [--scsilun=<scsilun>
] [--wwpn=<wwpn>
]
%include
(optional)clearpart
、raid
part
、 volgroup
和 logvol
等 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
%packages
命令来列出你想安装的软件包(仅用于全新安装,升级安装时不支持软件包指令)。
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.
Core
和 Base
组总是缺省被选择,所以并不需要在 %packages
部分指定它们。
%packages
选择的示例:
%packages @ X Window System @ GNOME Desktop Environment @ Graphical Internet @ Sound and Video dhcp
@
符号开头,后面是 comps.xml
文件里给出的组全名。组也可以用组的 id 指定,如 gnome-desktop
。不需要额外字符就可以指定单独的软件包(上例里的 dhcp
行就是一个单独的软件包)。
-autofs
%packages
指令也支持下面的选项:
--nobase
--resolvedeps
--ignoredeps
--ignoremissing
%packages --ignoremissing
ks.cfg
文件被解析后马上加入要运行的命令。这个部分必须处于 kickstart 文件的最后(在命令部分之后)而且必须用 %pre
命令开头。你可以在 %pre
部分访问网络;然而,此时命名服务还未被配置,所以只能使用 IP 地址。
--interpreter /usr/bin/python
/usr/bin/python
替换成你想使用的脚本语言。
%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
%include /tmp/part-include
%post
命令开头。它被用于实现某些功能,如安装其他的软件和配置其他的命名服务器。
%post
部分访问和解析 IP 地址。如果你使用 DHCP 配置网络,当安装程序执行到 %post
部分时,/etc/resolv.conf
文件还没有准备好。此时,你可以访问网络,但是你不能解析 IP 地址。因此,如果你使用 DHCP,你必须在 %post
部分指定 IP 地址。
--nochroot
/etc/resolv.conf
文件复制到刚安装的文件系统里。
%post --nochroot cp /etc/resolv.conf /mnt/sysimage/etc/resolv.conf
--interpreter /usr/bin/python
/usr/bin/python
替换成你想使用的脚本语言。
%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
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
-o nolock
选项。
ks.cfg
.
ks.cfg
and must be located in the boot CD-ROM's top-level directory. Since a CD-ROM is read-only, the file must be added to the directory used to create the image that is written to the CD-ROM. Refer to 第 3.4.2 节 “制作安装引导光盘” for instructions on creating boot media; however, before making the file.iso
image file, copy the ks.cfg
kickstart file to the isolinux/
directory.
ks.cfg
且必须位于闪存设备的顶层目录里。现创建引导映像,然后再复制 ks.cfg
文件。
dd
命令把引导映像文件转移到笔型驱动器(/dev/sda
):
dd if=diskboot.img of=/dev/sda bs=1M
dhcpd.conf
文件里的一行:
filename
"/usr/new-machine/kickstart/"
; next-serverblarg.redhat.com;
filename
后的值,并且用 NFS 服务器的名字替换 next-server
后的值。
<ip-addr>
-kickstart
<ip-addr>
部分应该用客户机的 IP 地址替换。例如,IP 地址为 10.10.0.1 的机器的文件名将是 10.10.0.1-kickstart
。
/kickstart
并用上面描述的 <ip-addr>
-kickstart
文件名来寻找 kickstart 文件。
ks
command line argument is passed to the kernel.
linux ks=floppy
command also works if the ks.cfg
file is located on a vfat or ext2 file system on a diskette and you boot from the Fedora CD-ROM #1.
boot:
prompt:
linux ks=hd:fd0:/ks.cfg
dd
选项。例如,从软盘引导并使用驱动盘,你可以在 boot:
提示下输入下面的命令:
linux ks=floppy dd
boot:
提示下输入下面的命令(这里的 ks.cfg
是 kickstart 文件的名字):
linux ks=cdrom:/ks.cfg
askmethod
autostep
debug
dd
dhcpclass=<class>
dns=<dns>
driverdisk
expert
gateway=<gw>
图形化
isa
ip=<ip>
keymap=<keymap>
ks=nfs:<server>
:/<path>
<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>
<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 提供的引导文件将在 NFS 服务器上寻找。
/
开头,DHCP 提供的引导文件将在 NFS 服务器的 /kickstart
目录里寻找。
/kickstart/1.2.3.4-kickstart
,这里的 1.2.3.4
是被安装的机器的数字化 IP 地址。
ksdevice=<device>
boot:
提示下使用 ks=nfs:<server>
:/<path>
ksdevice=eth1
命令。
kssendmac
lang=<lang>
loglevel=<level>
lowres
mediacheck
method=cdrom
method=ftp://<path>
method=hd:<dev>
:<path>
method=http://<path>
method=nfs:<path>
netmask=<nm>
nofallback
nofb
nofirewire
noipv6
nokill
nomount
nonet
noparport
nopass
nopcmcia
noprobe
noshell
nostorage
nousb
nousbstorage
rescue
resolution=<mode>
serial
skipddc
syslog=<host>
[:<port>
]
<host>
的可选端口 <port>
上的 syslog 进程。这要求远程 syslog 进程接受连接(-r 选项)。
text
updates
updates=ftp://<path>
updates=http://<path>
upgradeany
vnc
vncconnect=<host>
[:<port>
]
<host>
上的 vnc 客户端,你也可以使用可选端口 <port>
。
vncpassword=<password>
/usr/sbin/system-config-kickstart
命令。
variant
目录的 NFS 目录的名字。例如,如果 NFS 服务器包含了 /mirrors/redhat/i386/Server/
目录,则输入 /mirrors/redhat/i386/
作为 NFS 目录。
variant
目录的 FTP 目录的名字。例如,如果 FTP 服务器包含了目录 /mirrors/redhat/i386/Server/
,输入 /mirrors/redhat/i386/Server/
作为 FTP 目录。如果 FTP 服务器要求用户名和密码,在此也需要指定。
variant
目录的 HTTP 目录的名字。例如,如果 HTTP 服务器包含了 /mirrors/redhat/i386/Server/
目录,就输入 /mirrors/redhat/i386/Server/
作为 HTTP 目录。
md5sum
program as well as the linux mediacheck
boot option as discussed in 第 6.3 节 “正在检查介质”. Enter the hard drive partition that contains the ISO images (for example, /dev/hda1
) in the Hard Drive Partition text box. Enter the directory that contains the ISO images in the Hard Drive Directory text box.
/boot
分区的第一个扇区)。如果你计划把它作为主引导装载程序,就安装在主引导分区上。
hdd=ide-scsi
作为内核参数(这里的 hdd
是 CD-ROM 设备),这告诉内核使用必须在使用 cdrecord
之前装载的 SCSI 仿真驱动。
msdos
和 Itanium 的 gpt
),选择「初始化磁盘标签」。
anaconda
和 kickstart
支持逻辑卷管理(Logical Volume Management,LVM),目前还没有用「Kickstart 配置程序」配置它的机制。
/dev/hda
)上创建分区,指定 hda
为驱动器。不要在驱动器名字里包括 /dev
。
/dev/hda1
)上的第一个分区上建立分区。指定 hda1
为分区。不要在分区名里包括 /dev
。
system-config-network
). Refer to the Red Hat Enterprise Linux Deployment Guide for details.
端口:协议
。例如,如果你想允许 IMAP 通过你的防火墙,你可以指定 imap:tcp
。你还可以具体指定端口号码,要允许 UDP 分组在端口 1234 通过防火墙,输入 1234:udp
。要指定多个端口,可以用逗号将它们隔开。
skipx
option is written to the kickstart file.
%packages
部分进行修改。详情请参考 第 13.5 节 “Package Selection”。
/usr/bin/python2.4
。这个选项相当于在 kickstart 文件里使用 %pre --interpreter /usr/bin/python2.4
。
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
busybox command
--help
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
%pre
”,系统会为你自动添加。
%post
”,系统会为你自动添加。
%post
部分加入下面的命令:
echo "Hackers will be punished!" > /etc/motd
%post
部分使用 --nochroot
命令是一样。
/mnt/sysimage/
的目录名。
echo "Hackers will be punished!" > /mnt/sysimage/etc/motd
/usr/bin/python2.2
。这个选项相当于在 kickstart 文件里使用 %post --interpreter /usr/bin/python2.2
。
root
帐户。
yum
utility. Type this command to begin a full update of your system with yum
:
su -c 'yum update'
root
password when prompted.
yum
.
yum
程序前,请确定您的系统有活跃的网络连接。该更新进程会从服务器的网络中下载信息和软件包。
release
结尾的软件包中。检查旧的软件包列表来查看已经安装的存储库:
awk '{print $1}' ~/old-pkglist.txt | grep 'release$'
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`'
root
帐户:
su -
yum groupinstall "GNOME Desktop Environment"
/etc/inittab
文件:
nano /etc/inittab
initdefault
文本的行。将数字 3
改为 5
。
exit
退出管理员帐户。
reboot
命令重启系统。您的系统将重新启动,并显示图形登录。
/
分区的分区号码改变了,引导装载程序将无法找到它来挂载这个分区。要解决这个问题,引导救援模式,若使用 GRUB,修改 /boot/grub/grub.conf
文件。
rescue
添加为内核参数。例如,对于 x86 系统,在安装引导提示下输入以下命令:
linux rescue
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.
/mnt/sysimage
目录下。如果它挂载分区失败,它会通知你。如果你选择 ,它会试图在 /mnt/sysimage
目录下挂载你的文件系统,但是挂载模式为只读。如果你选择 ,你的文件系统将不会被挂载。如果你认为你的文件系统已损坏,选择 。
sh-3.00b#
chroot /mnt/sysimage
rpm
之类的命令,改变根分区就会很有用,因为这类命令要求你的根分区被挂载为 /
。要退出 chroot
环境,键入 exit
,你就会返回到提示。
/foo
,然后键入以下命令:
mount -t ext4 /dev/mapper/VolGroup00-LogVol02 /foo
/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
pvdisplay
vgdisplay
lvdisplay
ssh
、scp
和 ping
,查看网络是否被启动
dump
和 restore
,用于带有磁带驱动器的用户
parted
和 fdisk
,用来管理分区
rpm
,用于安装或升级软件
joe
用于编辑配置文件
emacs
、pico
或 vi
,joe
编辑器仍会被启动。
linux rescue
来进入救援环境。
chroot /mnt/sysimage
来挂载根分区。
/sbin/grub-install /dev/hda
来重新安装 GRUB 引导装载程序,这里的 /dev/hda
是 boot 分区。
/boot/grub/grub.conf
文件,因为要控制其他的操作系统,GRUB 需要额外的条目。
a
to append the line.
single
(按 空格键,然后键入 single
)。按 Enter 来退出编辑模式。
init
文件没有被载入。如果 init
被损坏或停止运行,你仍可以挂载文件来恢复在重新安装中会丢失的数据。
single
替换成 emergency
。
.rpmsave
扩展名(例如,sendmail.cf.rpmsave
)。升级进程还在 /root/upgrade.log
日志中记录了它的行动。
/etc/fedora-release
file have been changed from the default, your Fedora installation may not be found when attempting an upgrade to Fedora 11.
linux upgradeany
linux upgradeany
command if your Fedora installation was not given as an option to upgrade.
diskmgmt.msc
and press Enter. The Disk Management tool opens.
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.
unallocated
.
diskpart
and press Enter. A command window appears.
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").
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.
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.
按任意键从CD启动
欢迎安装
屏幕出现时,您可运行Windows Recovery Console。步骤依据不同版本的Windows会略有不同。
fixmbr
然后按回车。fixmbr工具会为系统恢复MBR。
exit
然后按回车键。
diskmgmt.msc
into the Start Search box and press Enter. The Disk Management tool opens.
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.
unallocated
.
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.
按任意键从CD或DVD启动
bootrec /fixmbr
然后按回车。
/Applications/Utilities
.
/Applications/Utilities
.
gparted
at the command line and pressing Enter.
su -
and press Enter. When the system prompts you for the root password, type the password and press Enter.
gedit /boot/grub/grub.conf
and press Enter. This opens the grub.conf
file in the gedit text editor.
grub.conf
file consists of four lines:
grub.conf
grub.conf
, each corresponding to a different version of the Linux kernel. Delete each of the Fedora entries from the file.
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.
default=
line contains the number one below the number of your chosen default operating system in the list.
grub.conf
file and close gedit
gparted
at the command line and pressing Enter.
/dev/sda3
.
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
.
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
.
gparted
at the command line and pressing Enter.
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.
/dev/sda3
on device /dev/sda
.
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
.
Command (m for help):
, press T and Enter to use fdisk to change a partition type.
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.
Hex code (type L to list codes):
, type the code 8e
and press Enter. This is the code for a Linux LVM partition.
Command (m for help):
, press W and Enter. Fdisk writes the new type code to the partition and exits.
lvm
and press Enter to start the lvm2 tool.
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.
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
.
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
.
lvm>
prompt, type exit
and press Enter to exit lvm2
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
.
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
.
fdisk
工具来创建一个新的带有 undocumented 标志的 MBR:/mbr
。这只重写 MBR 来引导主 DOS 分区。该命令类似:
fdisk /mbr
linux rescue
. This starts the rescue mode program.
list-harddrives
。这条命令会列出你的系统上所有被安装程序识别的硬盘驱动器,以及它们的大小(以 MB 为单位)。
parted
。启动 parted
,此处的 /dev/hda
是要删除的分区所在的设备:
parted /dev/hda
print
命令来查看当前的分区表,从而判定要删除的分区的号码:
print
命令还可以显示分区的类型(如:linux-swap、ext2、ext3 等等)。了解分区类型有助于你判定是否应该删除该分区。
rm
命令来删除分区。例如,要删除次要号码(minor number)为 3 的分区:
rm 3
print
命令来确认它已从分区表中被删除了。
quit
来退出 parted
。
parted
后,在引导提示后键入 exit
来退出救援模式并重新启动系统,而不是继续安装。系统应该自动重启。如果没有重启,你可以用 Control+Alt+Delete 来重启系统。
目录
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 |
parted
工具。它是一个可免费获得的重新划分分区大小的程序。
parted
来重新给你的硬盘驱动器分区,你必须熟悉磁盘贮存区,并备份了你的计算机上的数据。这一点至关重要。你应该给你的计算机上重要的数据做两个备份。这些备份应该保存在可移介质上(如磁盘、光盘或磁带),而且你应该在继续前确定它们可以被读取。
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.
/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 硬盘上的第二个逻辑分区。
/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
上。
swap
、/boot/
(或者是用于 Itanium 系统的 /boot/efi/
分区)、用于 Itanium 系统的 /var/
分区以及 /
(根分区)。
[5] 与图解所示不同,块实际上是大小一致的。此外还请留意,一个普通的磁盘驱动器上含有数以千计的块。不过,在本次讨论中,我们可以忽略这些细微出入。
/
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.
/
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 /
.
/
(if any). This is done using the iscsistart utility (which can do this without requiring iscsid to run).
/
, or if any targets in the iSCSI database are marked to be logged in to automatically.
/etc/NetworkManager/dispatcher.d/04-iscsi
/usr
, you cannot use it to configure network access if /usr
is on network-attached storage such as an iSCSI target.
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.
swap
devices.
kickstart
为每个新加密的块设备设置单独的密码。
parted
, pvcreate
,lvcreate
和mdadm
创建你要加密的块设备。
/dev/sda3
)可大大提高加密强度。然后这会花很长的时间。
dd if=/dev/urandom of=<device>
badblocks -c 10240 -s -w -t random -v <device>
cryptsetup luksFormat <device>
cryptsetup(8)
的man页面。
cryptsetup isLuks <device> && echo Success
cryptsetup luksDump <device>
device-mapper
做个映射。
/dev/sda3
),在LUKS头保持完好时,UUID会保持不变。使用以下命令查找LUKS设备的UUID:
cryptsetup luksUUID <device>
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>
/dev/mapper/<name>
, which represents the decrypted device. This block device can be read from and written to like any other unencrypted block device.
dmsetup info <name>
dmsetup(8)
man page.
/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>
/mnt/test
, use the following command:
/mnt/test
must exist before executing this command.
mount /dev/mapper/<name> /mnt/test
/etc/crypttab
/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
cryptsetup luksUUID <device>
. This ensures the correct device will be identified and used even if the device node (eg: /dev/sda5
) changes.
/etc/crypttab
file, read the crypttab(5)
man page.
/etc/fstab
/dev/mapper/<name>
in the /etc/fstab
file.
/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
.
/etc/fstab
file, read the fstab(5)
man page.
$HOME/keyfile
.
dd if=/dev/urandom of=$HOME/keyfile bs=32 count=1 chmod 600 $HOME/keyfile
cryptsetup luksAddKey <device> ~/keyfile
cryptsetup luksAddKey <device>
cryptsetup luksRemoveKey <device>
ext4
, and a mount point.
/boot
partition.
/
and swap partitions within LVM volumes, with a separate /boot
partition.
/boot/
分区处于硬盘的 1024 柱面之上,或者使用 LBA 模式时,这就会发生。第 1.5 阶段引导装载程序位于 /boot/
分区或者是 MBR 和 /boot/
分区的一小部分空间里。
/boot/sysroot/
里的内容读入内存。 一旦 GRUB 决定启动哪个操作系统或者内核,它就会把它载入内存并把机器的控制权交给那个操作系统。
/boot/grub/grub.conf
,在每次系统引导时如果配置有修改,用户就不需要把第一阶段引导装载程序的新版本写入到主引导分区(MBR)里。用户唯一需要在主引导分区重新安装 GRUB 的时候,就是当 /boot/
分区在磁盘上的物理位置已经改变的时候。关于在主引导分区里安装 GRUB 的详情,请参考 第 E.2 节 “Installing GRUB”。
/sbin/grub-install <location>
命令,在这里 <location>
是 GRUB 第一阶段引导装载程序安装的位置。例如,下面的命令把 GRUB 安装到主 IDE 总线上的主 IDE 设备的 MBR 里:
/sbin/grub-install /dev/hda
(<type-of-device><bios-device-number>
,<partition-number>
)
<type-of-device>
指定 GRUB 引导的设备的类型。最常用的两个选项是代表硬盘的 hd
或代表 3.5 寸磁盘的 fd
。另外一个较少使用的设备类型是代表网络磁盘的 nd
。关于配置 GRUB 从网络引导的说明,你可以访问 http://www.gnu.org/software/grub/manual/。
<bios-device-number>
是 BIOS 设备号码。主 IDE 硬盘编号为 0
,次 IDE 硬盘则编号为 1
。这个规则和用于内核设备的基本一样。例如,内核所使用的 hda
里的 a
和 GRUB 所使用的 hd0
里的 0
类似,而 hdb
里的 b
和 hd1
里的 1
类似,诸如此类。
<partition-number>
指定设备上的分区的号码。如同 <bios-device-number>
,很多类型的分区都是从 0
开始编号的。然而,BSD 分区却由字母指定,如 a
对应 0
,b
对应 1
,等等。
0
,而不是从 1
开始的。这是新用户最常犯的错误之一。
(hd0)
来引用第一个硬盘,用 (hd1)
来引用第二个硬盘。GRUB 用 (hd0,0)
引用第一个硬盘里的第一个分区,用 (hd1,2)
引用第二个硬盘里的第三个分区。
hd
开始。而 fd
用来指定 3.5 寸软盘。
(hd0)
指定了第一个设备上的主引导分区,(hd3)
指定第四个设备上的主引导分区。
(<device-type><device-number>
,<partition-number>
)</path/to/file>
hd
,fd
或 nd
替换 <device-type>
。用整数来替换设备的 <device-number>
。用相对于设备顶层的绝对路径来替换 </path/to/file>
。
0+50,100+25,200+1
(hd0,0)+1
chainloader
命令:
chainloader +1
(hd0,0)/grub/splash.xpm.gz
位于 (hd0,0)
分区(实际上是系统的 /boot/
分区)的顶层(或根)的 /grub/
目录。
kernel
命令被执行。一旦 Linux 内核被引导,它设立 Linux 用户所熟悉的根文件系统。之前的 GRUB 根文件系统和它所挂载的文件系统都不再被使用;它们只在引导内核文件时存在。
bash
shell 里一样,你也可以使用箭头键、Home、End 和 Delete 键。
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
。
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
hda5
分区。
root (<device-type>
<device-number>
,<partition>
)
— 配置 GRUB 的根分区,如 (hd0,0)
,并挂载这个分区。
root
命令的一个示例:
root (hd0,0)
rootnoverify (<device-type>
<device-number>
,<partition>
)
— 配置 GRUB 的根分区,就象 root
命令一样,但不挂载此分区。
help --all
来获取命令的完整列表。关于所有 GRUB 命令的描述,请参考 http://www.gnu.org/software/grub/manual/ 上的在线文档。
/boot/grub/grub.conf
)用来创建 GRUB 菜单界面里的操作系统引导列表,它允许用户选择预先设置的一组命令。你可以使用 第 E.5 节 “GRUB 命令” 里的命令,以及仅在配置文件里可用的特殊命令。
/boot/grub/grub.conf
。为菜单界面设置全局参数的命令位于这个文件的顶部,后面的内容是菜单里列出的每个操作系统或者内核。
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
title
行。在前面的例子里,如果要把 Windows
设置为缺省选项,你可以把 default=0
修改为 default=1
。
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 会重新启动第二阶段引导装载程序并使用这个菜单配置文件来建立菜单。如果不在这个指令后指定菜单配置文件,拥有密码的用户就可以编辑当前的配置文件。
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
— 指定和用来装载内核或操作系统的特定的一组命令一起使用的标题。
#
)开头。
kernel
命令后附加选项。
<space><runlevel>
来进入相应的运行级别。例如,下面的条目将引导过程初始化至运行级别 3:
grub append> ro root=/dev/VolGroup00/LogVol00 rhgb quiet 3
/usr/share/doc/grub-<version-number>
/
— 这个目录包含了很好的使用和配置 GRUB 的信息,在这里,<version-number>
对应安装的 GRUB 软件包的版本号。
info grub
— GRUB info 页包含了指南、用户参考手册、程序员参考手册和关于 GRUB 及其用法的 FAQ 文档。
/boot/
分区启动第二阶段引导装载程序。
/sbin/init
程序。
/sbin/init
加载所有的服务和用户空间工具,然后挂载 /etc/fstab
里列出的所有分区。
/boot/grub/grub.conf
— at boot time. Refer to 第 E.6 节 “GRUB 菜单配置文件” for information on how to edit this file.
/boot/
目录里相应的内核二进制代码。内核二进制代码是以下面的格式命名的 — /boot/vmlinuz-<kernel-version>
file(在这里 <kernel-version>
对应转载引导程序的设置里指定的内核版本)。
/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
映像被载入了内存,引导装载程序就把引导过程的控制权交给内核。
initramfs
映像,并把这些映像直接解压到 /sysroot/
,然后再装载必要的驱动。其次,在完成 initramfs
过程和释放所有磁盘映像曾占据的内存之前,它会初始化和文件系统相关联的虚拟设备,如 LVM 或 software RAID。
/sbin/init
程序。
/sbin/init
程序/sbin/init
程序(也称作 init
)协调余下的引导过程并为用户配置环境。
init
命令启动时,它成为系统里所有自动启动的进程的父进程或者祖父(grandparent)进程。首先,它运行 /etc/rc.d/rc.sysinit
脚本,这会设置环境路径、启动交换空间、检查文件系统并执行所有系统初始化所需的其他步骤。例如,多数系统会使用时钟,rc.sysinit
读入 /etc/sysconfig/clock
配置文件来初始化硬件时钟。另外一个例子是,如果有必须初始化的特殊串口进程,rc.sysinit
会执行 /etc/rc.serial
脚本。
init
命令运行 /etc/inittab
脚本,这描述了系统在每个 SysV init 运行级别 应该怎样设置。运行级别(runlevel)是一个状态,或者 模式,它由 SysV /etc/rc.d/rc<x>
.d/
目录里列出的服务来定义(在这里,<x>
是运行级别)。关于 SysV init 运行级别的详情,请参考 第 F.4 节 “SysV Init 运行级别”。
init
命令为系统设置 source function library,/etc/rc.d/init.d/functions
,配置怎样启动、杀死和决定程序的进程号(PID)。
init
程序根据 /etc/inittab
里指定的缺省运行级别遍历合适的 rc
目录,启动所有的后台进程。不同的运行级别对应不同的rc
目录。例如,/etc/rc.d/rc5.d/
是对应运行级别 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
符号链接。
/etc/rc.d/init.d/httpd stop
可用来停止 Apache HTTP 服务器。
init
程序最后执行的是 /etc/rc.d/rc.local
脚本。这个文件对于定制系统很有用。请参考 第 F.3 节 “在引导时运行其他的程序” 里关于使用 rc.local
文件的更多信息。
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.
/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.
/etc/rc.d/rc.local
脚本是在引导时被 init
命令执行或者是在切换运行级别时被执行。你可以在这个脚本的最后加入命令来执行某些必需的任务,如启动特殊的服务或初始化设备,而不需要在 /etc/rc.d/init.d/
目录里编写复杂的初始化脚本并创建符号链接。
/etc/rc.serial
脚本。这个脚本运行 setserial
命令来配置系统的串口。详情请参考 setserial
帮助页。
init
启动和停止哪个程序的标准过程。选择 SysV init 的原因是易于使用且比传统的 BSD 风格的 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/
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.
init
启动和停止哪些服务。例如,运行级别 1(单用户模式)停止所有的网路服务,而运行级别 3 则会启动这些服务。通过在某个运行级别下设定启动和停止的服务,init
可以快速地改变机器运行的模式而不需要用户手工停止和启动服务。
0
— 停止1
— 单用户文本模式2
— 未使用(用户可自定义)3
— 完全的多用户文本模式4
— 为使用(用户可自定义)5
— 完全的多用户图形模式(基于 X Window 的登录屏幕)6
— 重启模式
/etc/inittab
里定义。要找到系统的缺省运行级别,可以在 /etc/inittab
靠顶部的地方找如下的一行:
id:5:initdefault:
/etc/inittab
。
/etc/inittab
要非常小心。简单的输入错误就可以导致系统不能启动。如果发生了这样的事情,可以使用启动软盘,进入单用户模式,或者进入救援模式来引导系统并修复这个文件。
/etc/rc.d/
的子目录下大量的符号链接。
/sbin/chkconfig
— /sbin/chkconfig
是一个简单的命令行工具,它可以维护 /etc/rc.d/init.d/
目录层次结构。
chkconfig
更加容易使用。
system-config-services
)程序是一个灵活的配置运行级别的工具。
/sbin/shutdown
command. The shutdown
man page has a complete list of options, but the two most common uses are:
/sbin/shutdown -h now
/sbin/shutdown -r now
-h
选项会关闭机器,而 -r
选项则会重新启动机器。
reboot
and halt
commands to shut down the system while in runlevels 1 through 5. For more information about PAM console users, refer to 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.
anaconda
. To learn more about
anaconda
, visit the project Web page: http://www.fedoraproject.org/wiki/Anaconda.
anaconda
和 Fedora 系统使用相同的软件组件集合。关键技术的详细信息,请访问下面列表的网站:
parted
to partition disks. Refer to http://www.gnu.org/software/parted/ for more information.
Xorg
suite to provide graphical capabilities. Components of Xorg
manage the display, keyboard and mouse for the desktop environments that users interact with. Refer to http://www.x.org/ for more information.
anaconda
include
VNC (Virtual Network Computing) software to enable remote access to graphical displays. For more information about VNC, refer to the documentation on the RealVNC Web site: http://www.realvnc.com/documentation.html.
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/.
anaconda
may use the scp
feature of OpenSSH to transfer crash reports to remote systems. Refer to the OpenSSH Web site for more information: http://www.openssh.com/.
netfilter
framework to provide
firewall features. The Netfilter project website provides documentation for both netfilter
, and the iptables
administration facilities: http://netfilter.org/documentation/index.html.
yum
to manage the RPM packages that make up the system. Refer to http://docs.fedoraproject.org/yum/ for more information.
修订历史 | |||
---|---|---|---|
修订 11.0.0 | Wed Apr 01 2009 | , , , , , | |
| |||
修订 10.0.1 | Mon Feb 16 2009 | ||
| |||
修订 10.0.0 | Mon Nov 24 2008 | ||
| |||
修订 9.9.2 | Sat Oct 18 2008 | ||
| |||
修订 9.0.2 | Fri Jul 25 2008 | ||
| |||
修订 9.0.1 | Sat Jun 28 2008 | ||
| |||
修订 9.0.0 | Tue May 13 2008 | ||
|