4 nfs install
cp linux iso file to nfs-path
#cp disk1.iso /tftpboot/iso/rhel4u3/
#cp disk2.iso /tftpboot/iso/rhel4u3/
#cp disk3.iso /tftpboot/iso/rhel4u3/
#cp disk4.iso /tftpboot/iso/rhel4u3/
vi /etc/exports
/tftp/iso/thel4u3/ *(r0,no_root-squash)
#service nfs restart
#service nfs reload
#检查共享时候已经正确输出
#showmount –e
5 编辑启动菜单,或安装多个版本的linux
客户端通过pxe协议引导起来之后,会在服务器的/tftpboot/pxelinux.cfg/目录(该目录需要手工建立)下寻找启动配置文件,启动配置文件中定义了应该引导哪个版本的Linux,文件名默认为default,可以将第一张安装光盘中的 /isolinux/isolinux.cfg文件复制到/tftpboot/pxelinux.cfg/,并改名为default,格式写法请参考里面已有的格式。
default rhel4u3 默认启动项
display pxelinux.cfg/list 显示的启动菜单,供用户选择
prompt 1
timeout 30
display boot.msg
F1 boot.msg
F2 options.msg
F3 general.msg
F4 param.msg
F5 rescue.msg
F7 snake.msg
label rhel4r3 具体的启动项目名称,一个label对应一个linux版本
kernel vmlinuzrhel4r3 #这个文件对应的是/tftpboot目录下的相应版本的linux “vmlinuz”
append ks=nfs:172.16.201.25:/tftpboot/iso/rhel4r3/ks-rhel4r3.cfg initrd=initrdrhel4r3.img ramdisk_size=8192 #initrd的文件对应的是/tftpboot/目录下相应的Linux版本的“initrd.img”文件,
label rhel5r1 具体的启动项目名称,一个label对应一个linux版本
kernel vmlinuzrhel5r1 #这个文件对应的是/tftpboot目录下的相应版本的linux “vmlinuz”
append ks=nfs:172.16.201.25:/tftpboot/iso/rhel5r1/ks-rhel5r1.cfg initrd=initrdrhel5r1.img ramdisk_size=8192 #initrd的文件对应的是/tftpboot/目录下相应的Linux版本的“initrd.img”文件,
#在/tftpboot目录下应该存在以下5个文件(这五个文件名中不能有大写的,否则客户端在启动的时候会报找不到相应的文件):pxelinux.0 、vmlinuzrhel4r3和initrdrhel4r3.img、
vmlinuzrhel5r1和initrdrhel5r1.img
在/tftpboot/pxelinux.cfg目录下手工建立list文件,如下:
choose one name of the following linux distribution for your installation
Name Distribution Install location
rhel4r3 rhel4 172.16.201.25:/tftpboot/iso/rhel4r3/
rhel5r1 rhel5 172.16.201.25:/tftpboot/iso/rhel5r1/
这里的name 的名字要和default文件中的label相对应,大小写应一致。
6 制作ks.cfg文件,在服务器上有个图形界面的程序可以制作,如果没有可以在第二张光盘中找到这个包:system-config-kickstart-2.5.16.1-1.noarch.rpm,安装一下即可;
可以定义语言选项,网卡IP,分区信息,安装的软件包,安装选项选择NFS,输入nfs服务器的IP,路径,最后保存文件,复制到/tftpboot/iso/rhel4r3目录下,其他相应版本的linux的ks.cfg文件也要复制到相应的目录下,然后在default文件中指定该文件即可。
7 将客户机从网卡启动,安装linux。
