Bond 模式下远程安装linux系统的理论和实践(2)
时间:2010-08-27 来源:mydear
NFS 服务器的配置
1)创建存放安装介质的目录。
- # mkdir – p /images/boot
2)在 /etc/exports 文件里增加如下的一行配置信息。
- /images/boot *(rw,no_root_squash,sync)
3)重启 NFS 服务器。
- # service nfsserver restart
4)确保 NFS 服务为启动项。
- # chkconfig --add nfs
- # chkconfig --add nfsserver
- # chkconfig --add nfsboot
- # chkconfig --add portmap
配置 PXE 启动环境
PXE 引导文件的配置
在 TFTP root 目录下创建 PXE 的目录结构。
1.创建目录 pxelinux.cfg。
- # mkdir -p /tftpboot/pxelinux.cfg
1.拷贝 PXE bootstrap 文件到 /tftpboot 目录下。
- # cp /usr/share/syslinux/pxelinux.0 /tftpboot
3) 创建 /tftpboot/pxelinux.cfg/default 文件 。内容如下 :
- prompt 1
- display message.txt
- # UBUNTU
- label ubuntu
- kernel bzimage
- append initrdinitrd=initrd init=/var/rammnt/bin/init
- splash=silent showopts
- netinstall=1
- nfsserver=192.168.0.191
- netmask=255.255.255.0 root=/dev/nfs
- gateway=192.168.0.1
修改“nfsserver=, netmask=, and gateway=”的值与实际环境一致 。
在 linux 安装介质的 /boot/isolinux/ 目录下 ,可以抓取到内核安装引导文件 bzimage 和 initrd。
为抓取到的内核安装引导文件增加权限 。
- # chmod 777 bzimage
- # chmod 777 initrd
1.最终TFTP服务器的目录结构如下:
- /tftpboot
- /tftpboot/pxelinux.0
- /tftpboot/initrd
- /tftpboot/bzimage
- /tftpboot/pxelinux.cfg
- /tftpboot/pxelinux.cfg/default
目标系统引导页面的定义
创建 /tftpboot/message.txt,用来定义PXE引导页面。
- Boot Options:
- Currently available build values:
- ubuntu.904
- EXAMPLE:
- To install build .904:
- ubuntu build=.904 ip=192.168.0.159 ethdev=eth0 bonddev=bond0
相关阅读 更多 +