0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
[root@PXE ~]# yum install syslinux xinetd tftp-server dhcp -y Dependencies Resolved =============================================== Package Arch Version Repository Size =============================================== Installing: syslinux x86_64 4.04-3.el6 base 346 k tftp-server x86_64 0.49-7.el6 base 39 k xinetd x86_64 2:2.3.14-39.el6_4 base 121 k Installing for dependencies: mtools x86_64 4.0.12-1.el6 base 194 k syslinux-nonlinux noarch 4.04-3.el6 base 584 k Transaction Summary ===================================================================================================================================== Install 5 Package(s) Total download size: 1.3 M Installed size: 2.8 M ############DHCP############ [root@PXE ~]# yum install dhcp [root@PXE ~]# cat /etc/sysconfig/dhcpd # Command line options here DHCPDARGS=eth0 ############安装apache############ [root@PXE ~]# yum install httpd [root@PXE ~]# rpm -qa|grep httpd httpd-tools-2.2.15-47.el6.centos.1.x86_64 httpd-2.2.15-47.el6.centos.1.x86_64 [root@PXE ~]# /etc/init.d/httpd start ############镜像拷贝到apache根目录############ [root@PXE ~]# mkdir /mnt/cdrom [root@PXE ~]# mount /dev/cdrom /mnt/cdrom/ mount: block device /dev/sr0 is write-protected, mounting read-only [root@PXE ~]# cp -r /mnt/cdrom/ /var/www/html/ #yum apache 默认路径是/var/www/html ############网络守护进程服务程序############ [root@PXE ~]# cp /etc/xinetd.d/tftp /etc/xinetd.d/tftp.bk$(date +%F) disable = yes 修改为 disable = no [root@PXE ~]# /etc/init.d/xinetd restart ############必要镜像############ [root@PXE ~]# cp /var/www/html/cdrom/images/pxeboot/{initrd.img,vmlinuz} /var/lib/tftpboot/ [root@PXE ~]# cp /var/www/html/cdrom/isolinux/*.msg /var/lib/tftpboot/ [root@PXE ~]# cp /usr/share/syslinux/menu.c32 /var/lib/tftpboot/ [root@PXE ~]# mkdir /var/lib/tftpboot/pxelinux.cfg [root@PXE ~]# cp /var/www/html/cdrom/isolinux/isolinux.cfg /var/lib/tftpboot/pxelinux.cfg/default [root@PXE ~]# cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/ [root@PXE ~]# ll /var/lib/tftpboot/pxelinux.cfg/default -r--r--r--. 1 root root 936 Jan 23 15:00 /var/lib/tftpboot/pxelinux.cfg/default [root@PXE ~]# cp /var/www/html/cdrom/isolinux/vesamenu.c32 /var/lib/tftpboot/ [root@PXE ~]# ll /var/lib/tftpboot/ total 38316 -r--r--r--. 1 root root 84 Jan 23 15:45 boot.msg -r--r--r--. 1 root root 34815427 Jan 23 15:45 initrd.img #这是一个初始化文件,一个最小的系统镜像 -rw-r--r--. 1 root root 61796 Jan 23 15:48 menu.c32 -rw-r--r--. 1 root root 26759 Jan 23 15:51 pxelinux.0 #这文件是为legcay启动,它是legcay的启动镜像 drwxr-xr-x. 2 root root 4096 Jan 23 15:50 pxelinux.cfg #该文件夹下放的是启动菜单,手动创建 -r--r--r--. 1 root root 163728 Jan 23 15:54 vesamenu.c32 #legacy BIOS引导菜单工具,可以从光盘或 /usr/share/syslinux/ 中找到 -r-xr-xr-x. 1 root root 4152336 Jan 23 15:45 vmlinuz #内核文件 |
part2:http://note.t4x.org/basic/pxe-no-man-on-duty/
参考文档:http://os.51cto.com/art/201402/428737.htm
参考文档:http://yuhongchun.blog.51cto.com/1604432/1100567
参考文档:http://www.cnblogs.com/mchina/p/centos-pxe-kickstart-auto-install-os.html
参考文档:http://wenku.baidu.com/link?url=bBprCWEAHrQdcbUZHHvl6CHZXzPoNd59exoxGv3FIkQzboPbA9KLpqmmNyzSMpHmjulXmHmvMu1o6LR6Nf8k7dNGqLMEaV0uGbDh6eK0ztaSourceByrd's Weblog-https://note.t4x.org/basic/centos-preboot-execute-environment/
SourceByrd's Weblog-https://note.t4x.org/basic/centos-preboot-execute-environment/
申明:除非注明Byrd's Blog内容均为原创,未经许可禁止转载!详情请阅读版权申明!
Trackbacks