Export list for 192.168.10.18:
/install 192.168.10.0/24
5.配置支持PXE启动:[root@localhost install]# cp /usr/lib/syslinux/pxelinux.0 /tftpboot/
[root@localhost install]# cp images/pxeboot/initrd.img /tftpboot/
[root@localhost install]# cp images/pxeboot/vmlinuz /tftpboot/
[root@localhost install]# cp isolinux/*.msg /tftpboot/
[root@localhost install]# cp /install/isolinux/splash.lss ./
splash.lss会让安装时显示出centos5的图形样子,^_^
[root@localhost install]# cd /tftpboot/
[root@localhost tftpboot]# ls
boot.msg general.msg initrd.img options.msg param.msg pxelinux.0 rescue.msg splash.lss vmlinuz
[root@localhost tftpboot]# mkdir pxelinux.cfg
[root@localhost tftpboot]# cd pxelinux.cfg/
启动镜像pxelinux.0文件在执行过程中,会读取配置文件以确定它应该载入什么Linux内核文件来运行。所有的配置文件都放在启动服务器的/tftpboot/pxelinux.cfg/目录下。pxelinux.0根据一定的规则来搜索合适的配置文件名。举例来说,对于前面为待安装机器,dhcp服务分配的IP地址192.168.10.254(十六进制表示为C0A80AFE),MAC地址(08:00:27:3F:1F:D9),pxelinux.0会按如下次序搜索配置文件:
01-08-00-27-3F-1F-D9 > C0A80AFE > C0A80AF > … > C0 > C > default
|
对于一台需要支持很多安装机器的安装服务器来说,将配置写在与IP地址对应的文件里很不灵活。把所有配置都集中在default文件中是个不错的主意,可以减轻配置文件维护负担。
[root@localhost pxelinux.cfg]# cp /install/isolinux/isolinux.cfg default
[root@localhost pxelinux.cfg]# vi default