RHEL5下网络引导
1.将光盘挂载到文件件/mnt下
[root@oracle isolinux]# mount /dev/cdrom -o loop /mnt/
2.在已经安装好的RHEL5的系统下安装dhcp-server,tftp-service,syslinux。
[root@oracle ~]# rpm -qa dhcp*
dhcpv6-client-1.0.10-17.el5
dhcp-3.0.5-21.el5
[root@oracle ~]# rpm -qa tftp*
tftp-server-0.49-2
[root@oracle ~]# rpm -qa syslinux*
syslinux-3.11-4
[root@oracle ~]# rpm -qa vsftp*
vsftpd-2.0.5-16.el5
3.开机启动服务
[root@oracle ~]# chkconfig dhcpd on
[root@oracle ~]# chkconfig tftp on
[root@oracle ~]# chkconfig xineted on
[root@oracle ~]# chkconfig vsftpd on
4.配置DHCP服务
[root@oracle ~]# cp /usr/share/doc/dhcp-3.0.5/dhcpd.conf.sample /etc/dhcpd.conf
将/etc/dhcpd.conf修改如下:
[root@oracle ~]# cat /etc/dhcpd.conf
ddns-update-style. interim;
ignore client-updates;
subnet 172.25.0.0 netmask 255.255.0.0 {
# --- default gateway
allow booting;
allow bootp;
option routers 172.25.253.254;
option subnet-mask 255.255.0.0;
option time-offset -18000; # Eastern Standard Time
next-server 172.25.5.88; #tfpt服务器的ip地址
filename "pxelinux.0";
range dynamic-bootp 172.25.5.172 172.25.5.198;
default-lease-time 21600;
max-lease-time 43200;
}
5.配置tftp服务
[root@oracle ~]# cp /usr/lib/syslinux/pxelinux.0 /tftpboot/
[root@oracle isolinux]# cp /mnt/isolinux/vmlinuz /tftpboot/
root@oracle isolinux]# cp /mnt/isolinux/initrd.img /tftpboot/
[root@oracle isolinux]# cp /usr/lib/syslinux/menu.c32 /tftpboot/
[root@oracle tftpboot]# cp /mnt/isolinux/isolinux.cfg /tftpboot/
在/tftpboot下生成一个pxelinux。cfg的文件夹
[root@oracle tftpboot]# mdir pxelinux.cfg/
[root@oracle tftpboot]# mv /tftpboot/isolinux.cfg /tftpboot/pxelinux.0
[root@oracle pxelinux.cfg]#mv isolinux.cf default
将default文件修改为
[root@oracle pxelinux.cfg]# more default
default menu.c32 #作为菜单背景
prompt 0
timeout 9999
MENU TITLE Welcome to nestling syslinx
LABEL rescue
MENU LABEL BOOT in rescue mode for RHEL 5.4.x86_32
kernel vmlinuz
append initrd=initrd.img rescue noapic
MENU SEPARATOR
LABEL linux5.4x86_32
kernel vmlinuz
append initrd=initrd.img
6.将光盘中得数据同步到ftp服务器中中
[root@oracle ~]# sync /mnt/* /var/ftp/pub/
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/27634619/viewspace-748832/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/27634619/viewspace-748832/