Chinaunix

标题: PXE网络安装linux [打印本页]

作者: lz198    时间: 2008-05-11 19:10
标题: PXE网络安装linux
1、配置PEXlinux:
   将/usr/lib/syslinux/pxelinux.0拷到/tftpgoot/linux-install目录下,把redhat第一张安装光盘里的文件images/pxeboot目录下的initr.img和vmlinux复制到/tftpboot/linux-install/pxelinuc.cfg目录下用于放syslinux的配置文件,Sysconfig的配置文件可以将第一张光盘下的isolinux/下的一个isolinux.cfg文件把它复制成/tftpboot/linux-install/pxelinux.cfg/default文件,把isolinux/*.msg复制到/tftpboot/linux-install下。以下是default文件
  default linux
prompt 1
timeout 600
display boot.msg
F1 boot.msg
F2 options.msg
F3 general.msg
F4 param.msg
F5 rescue.msg
F7 snake.msg
label linux
   kernel vmlinx
   append initrd=initrd.img
label text
   kernel vmlinux
   append initrd=initrd.imd test
label expert
   kernel vmlinux
   append expert initrd=initrd.imd
2、配置DHCP服务器(配置文件:/etc/dhcpd.conf)
   ddns-update-style interim;
   ignore client-updates;
   allow booting;       //这两行说明允许exp启动[加入]
   allow bootp;           subnet 192.168.1.0 netmask 255.255.255.0 {                       # --- default gateway
           option routers               192.168.1.100;                                option subnet-mask              255.255.255.0;              
          filename "/linux-install/pxelinux.0";             //指明tftp所在的位置[加入]                   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 192.168.1.128 192.168.1.250;  //你想分配的地址段[修改]
                  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;
          #       }           //这些都注释掉
          }3、配置NFS(配置文件:/etc/exports)      /rhel5        *(rw)   其中/rhel5是你所需要的安装系统的软件。4、配置TFTP服务器,启动TFTP服务,用chkconfig tftp on 打开xinetd代理tftp服务。

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/62934/showart_684628.html




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2