7.6. 为 IBM Power 系统配置网络服务器
您可以使用 GRUB 为 IBM Power 系统配置网络引导服务器。
流程
以 root 用户身份,安装以下软件包:
# yum install tftp-server dhcp-server在防火墙中,允许到
tftp服务的进入连接:# firewall-cmd --add-service=tftp这个命令启用了临时访问,直到下次服务器重启为止。
可选:要启用永久访问,请在命令中添加
--permanent选项。根据安装 ISO 文件的位置,您可能需要允许 HTTP 或者其他服务的进入连接。
在 TFTP root 中创建一个 GRUB 网络引导目录:
# grub2-mknetdir --net-directory=/var/lib/tftpboot Netboot directory for powerpc-ieee1275 created. Configure your DHCP server to point to /boot/grub2/powerpc-ieee1275/core.elf命令输出会告诉您 DHCP 配置中需要配置的文件名,如下所述。
如果 PXE 服务器在 x86 机器上运行,则必须在 tftp root 中创建
GRUB2网络引导目录前安装grub2-ppc64le-modules:# yum install grub2-ppc64le-modules
创建一个 GRUB 配置文件:
/var/lib/tftpboot/boot/grub2/grub.cfg,如下例中所示:set default=0 set timeout=5 echo -e "\nWelcome to the Red Hat Enterprise Linux 8 installer!\n\n" menuentry 'Red Hat Enterprise Linux 8' { linux grub2-ppc64/vmlinuz ro ip=dhcp inst.repo=http://192.168.124.2/RHEL-8/x86_64/iso-contents-root/ initrd grub2-ppc64/initrd.img }-
安装程序在没有运行时镜像的情况下无法引导。使用
inst.stage2引导选项指定镜像的位置。另外,您可以使用inst.repo=选项指定镜像和安装源。 -
与
inst.repo一起使用的安装源位置必须包含有效的.treeinfo文件。 -
当您选择 RHEL8 安装 DVD 作为安装源时,
.treeinfo文件会指向 BaseOS 和 AppStream 软件仓库。您可以使用单个inst.repo选项来加载这两个软件仓库。
-
安装程序在没有运行时镜像的情况下无法引导。使用
使用以下命令挂载 DVD ISO 镜像:
# mount -t iso9660 /path_to_image/name_of_iso/ /mount_point -o loop,ro创建一个目录,并将
initrd.img和vmlinuz文件从 DVD ISO 镜像复制到其中,例如:# cp /mount_point/ppc/ppc64/{initrd.img,vmlinuz} /var/lib/tftpboot/grub2-ppc64/将您的 DHCP 服务器配置为使用与
GRUB2打包的引导镜像,如下例所示。如果您已经配置了 DHCP 服务器,那么请在 DHCP 服务器上执行此步骤。subnet 192.168.0.1 netmask 255.255.255.0 { allow bootp; option routers 192.168.0.5; group { #BOOTP POWER clients filename "boot/grub2/powerpc-ieee1275/core.elf"; host client1 { hardware ethernet 01:23:45:67:89:ab; fixed-address 192.168.0.112; } } }-
调整示例参数
subnet、netmask、routers、fixed-address和hardware ethernet以适合您的网络配置。file name参数;这是此流程中前面的grub2-mknetdir命令输出的文件名。 在 DHCP 服务器上,启动并启用
dhcpd服务。如果您已在 localhost 上配置了 DHCP 服务器,请在 localhost 上启动并启用dhcpd服务。# systemctl enable --now dhcpd启动并启用
tftp.socket服务:# systemctl enable --now tftp.socketPXE 引导服务器现在可以提供 PXE 客户端。您可以启动客户端,即您要安装 Red Hat Enterprise Linux 的系统,在提示指定引导源时选择 PXE 引导,并启动网络安装。