30.2. 网络引导配置
下一步是将启动安装所必需的文件复制到
tftp
服务器中,这样当客户端需要它们时就可以找到。tftp
服务器和导出安装树的网络服务器通常是同一个。
PXE 引导配置步骤与 BIOS 和 EFI 不同。为 Power 系统服务器提供独立的 yaboot 配置步骤。
注意
Red Hat Satellite has the ability to automate the setup of a PXE server. See the Red Hat Satellite User Guide for more information.
30.2.1. 为 BIOS 配置 PXE 引导 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
- 如果还没有安装 tftp-server,请运行
yum install tftp-server
。 - In the tftp-server config file at
/etc/xinetd.d/tftp
, change thedisabled
parameter fromyes
tono
. - Configure your DHCP server to use the boot images packaged with SYSLINUX. (If you do not have a DHCP server installed, refer to the DHCP Servers chapter in the Red Hat Enterprise Linux Deployment Guide.)
/etc/dhcp/dhcpd.conf
中的示例配置如下:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 现在需要 ISO 映像文件中 SYSLINUX 软件包中的
pxelinux.0
文件。要访问该文件,请作为 root 运行以下命令:mount -t iso9660 /path_to_image/name_of_image.iso /mount_point -o loop,ro cp -pr /mount_point/Packages/syslinux-version-architecture.rpm /publicly_available_directory umount /mount_point
mount -t iso9660 /path_to_image/name_of_image.iso /mount_point -o loop,romount -t iso9660 /path_to_image/name_of_image.iso /mount_point -o loop,romount -t iso9660 /path_to_image/name_of_image.iso /mount_point -o loop,romount -t iso9660 /path_to_image/name_of_image.iso /mount_point -o loop,romount -t iso9660 /path_to_image/name_of_image.iso /mount_point -o loop,ro cp -pr /mount_point/Packages/syslinux-version-architecture.rpm /publicly_available_directorycp -pr /mount_point/Packages/syslinux-version-architecture.rpm /publicly_available_directorycp -pr /mount_point/Packages/syslinux-version-architecture.rpm /publicly_available_directorycp -pr /mount_point/Packages/syslinux-version-architecture.rpm /publicly_available_directorycp -pr /mount_point/Packages/syslinux-version-architecture.rpm /publicly_available_directorycp -pr /mount_point/Packages/syslinux-version-architecture.rpm /publicly_available_directory umount /mount_pointumount /mount_point
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 提取软件包:rpm2cpio syslinux-version-architecture.rpm | cpio -dimv
rpm2cpio syslinux-version-architecture.rpm | cpio -dimvrpm2cpio syslinux-version-architecture.rpm | cpio -dimvrpm2cpio syslinux-version-architecture.rpm | cpio -dimv
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 在
tftpboot
中创建pxelinux
目录,并将pxelinux.0
复制到该目录中:mkdir /var/lib/tftpboot/pxelinux cp publicly_available_directory/usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/pxelinux
mkdir /var/lib/tftpboot/pxelinux cp publicly_available_directory/usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/pxelinuxcp publicly_available_directory/usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/pxelinuxcp publicly_available_directory/usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/pxelinux
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 在
pxelinux
中创建pxelinux.cfg
目录:mkdir /var/lib/tftpboot/pxelinux/pxelinux.cfg
mkdir /var/lib/tftpboot/pxelinux/pxelinux.cfg
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Add a config file to this directory. The file should either be named
default
or named after the IP address, converted into hexadecimal format without delimiters. For example, if your machine's IP address is 10.0.0.1, the filename would be0A000001
./var/lib/tftpboot/pxelinux/pxelinux.cfg/default
中的示例配置未见类似如下:Copy to Clipboard Copied! Toggle word wrap Toggle overflow 关于如何指定安装源的步骤,请参考 第 7.1.3 节 “其他引导选项”。 - 将 splash 映像复制到
tftp
根目录下:cp /boot/grub/splash.xpm.gz /var/lib/tftpboot/pxelinux/splash.xpm.gz
cp /boot/grub/splash.xpm.gz /var/lib/tftpboot/pxelinux/splash.xpm.gz
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 将引导映像复制到
tftp
根目录下:cp /path/to/x86_64/os/images/pxeboot/{vmlinuz,initrd.img} /var/lib/tftpboot/pxelinux/rhel6/
cp /path/to/x86_64/os/images/pxeboot/{vmlinuz,initrd.img} /var/lib/tftpboot/pxelinux/rhel6/cp /path/to/x86_64/os/images/pxeboot/{vmlinuz,initrd.img} /var/lib/tftpboot/pxelinux/rhel6/cp /path/to/x86_64/os/images/pxeboot/{vmlinuz,initrd.img} /var/lib/tftpboot/pxelinux/rhel6/
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Boot the client system, and select the network device as your boot device when prompted.