首先安装httpd dhcp tftp
ddns-update-style interim;
ignore client-updates;
subnet 10.10.10.0 netmask 255.255.255.0 {
# --- default gateway
option routers 10.10.10.1;
option subnet-mask 255.255.255.0;
option nis-domain "domain.org";
option domain-name "domain.org";
option domain-name-servers 10.10.10.1;
filename "pxelinux.0";
next-server 10.10.10.200;
option time-offset -18000; # Eastern Standard Time
# option ntp-servers 192.168.1.1;
# option netbios-name-servers 192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
# option netbios-node-type 2;
range dynamic-bootp 10.10.10.50 10.10.10.60;
default-lease-time 21600;
default-lease-time 21600;
max-lease-time 43200;
# we want the nameserver to appear at a fixed address
# host ns {
# next-server marvin.redhat.com;
# hardware ethernet 12:34:56:78:AB:CD;
# fixed-address 207.175.42.254;
# }
}
vi /etc/xinetd.d/tftp
disable = no 将disable项改为NO。
复制内核启动文件到tftp目录:
cp /usr/lib/syslinux/pxelinux.0 /tftpboot/
将centos5.4光盘拷贝进入httpd目录
#cp /var/www/html/image/pxeboot/initr.img
/tftpboot/
#cp /var/www/html/image/pxeboot/vmlinuz
/tftpboot/
#cp /mvar/www/html/isolinux/*.msg /tftpboot/
#mkdir /tftpboot/pxelinux.cfg
#cp /var/www/html
/isolinux/isolinux.cfg
/tftpboot/pxelinux.cfg/default
修改default
在最后添加
label autoinstall
kernel vmlinuz
append ks=
initrd=initrd.img devfs=nomount ramdisk_size=9216 nofb
vi /tftpboot/boot.msg
- To Auto Install ^O0bCentOS5.2 Linux^O07,
type:^O0blinux autoinstall ^O07.复制一份anaconda-install.cfg 为auto.cfg放在httpd目录下。加入权限,chmod 755
设置系统从pxe启动
阅读(1057) | 评论(0) | 转发(0) |