option routers 192.168.168.230; #定義默認(rèn)網(wǎng)關(guān) option subnet-mask 255.255.255.0; option domain-name-servers 192.168.168.6; #定義nameServer option time-offset -18000; # Eastern Standard Time range dynamic-bootp 192.168.168.12 192.168.168.254; default-lease-time 21600; max-lease-time 43200; # Group the PXE bootable hosts together 定義可以PEX啟動(dòng)的主機(jī)的組 group { # PXE-specific configuration directives... next-server 192.168.168.6; #TFTPServer的IP filename "/pxelinux.0";#pxelinux loader文件位置
# You need an entry like this for every host # unless you‘re using dynamic addresses #可PEX啟動(dòng)的主 #機(jī)的IP與MAC地址的邦定 host wy { hardware ethernet 00:00:E2:89:9BB; fixed-address 192.168.168.128; } }}
紅色的部分為在DHCP中支持TFTP及PXElinux的所要添加的部分。service dhcpd restart 開啟DHCP服務(wù)。 3)配制PEXlinux。要遠(yuǎn)程啟動(dòng)機(jī)器,就必須要有PXElinux這個(gè)由syslinux、isolinux派生出來的,支持PXE的 bootloader,它可以實(shí)現(xiàn)遠(yuǎn)程通過PEX啟動(dòng)一臺機(jī)器。把/usr/lib/syslinux/pxelinux.0考到/tftpboot目錄下,把RedHat9第一張安裝光盤上/image/pxeboot/initr.img和vmlinux也考到/tftpboot目錄下。在 /tftpboot建一個(gè)pxelinux.cfg目錄,用于放syslinux的配制文件。Sysconfig的配制文件有現(xiàn)成的可用,在rh9第一張安裝光盤isolinux/下有一個(gè)isolinux.cfg文件,把它考成/tftpboot/default,把isolinux/*.msg考到 /tftpboot下(RedHat的安裝光盤的Loader就是個(gè)isolinux,呵呵)。對default(也就是isolinux.cfg)作一下修改,下面是我的default文件: default local 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 local localboot 0 label linux kernel vmlinuz append initrd=initrd.img devfs=nomount ramdisk_size=9216 label text kernel vmlinuz append initrd=initrd.img text devfs=nomount ramdisk_size=9216 label expert kernel vmlinuz append expert initrd=initrd.img devfs=nomount ramdisk_size=9216 label ks kernel vmlinuz append ks initrd=initrd.img devfs=nomount ramdisk_size=9216 label nofb kernel vmlinuz append initrd=initrd.img devfs=nomount nofb ramdisk_size=9216 label lowres kernel vmlinuz append initrd=initrd.img lowres devfs=nomount ramdisk_size=9216 label autoinstall kernel vmlinuz append ks=http://192.168.168.6/rh9/ks.cfg initrd=initrd.img devfs=nomount ramdisk_size=9216 nofb 紅色的部份是我加的,用于實(shí)現(xiàn)本地硬盤啟動(dòng)或支持kickstart的PXE網(wǎng)絡(luò)自動(dòng)安裝。 cat一下/tftpboot/boot.msg文件: splash.lss - To Local boot 02Red Hat07 Linux , type: 0f<ENTER>07. - To install or upgrade 02Red Hat07 Linux in graphical mode, press the 0f linux<ENTER>07 key.
- To install or upgrade 02Red Hat07 Linux in text mode, type: 0flinux text <ENTER>07.
- To Auto Install 02Red Hat07 Linux , type: 0flinux autoinstall <ENTER>07. - Use the function keys listed below for more information.